These are chat archives for ManageIQ/manageiq/performance

31st
Aug 2016
Nick LaMuro
@NickLaMuro
Aug 31 2016 04:06
Hey, so the long awaited (not really) "Initial Commit" is here: https://github.com/NickLaMuro/miq_performance
Got kinda sidetracked tracking down and performance issue with it, that lead to some very painful Sprockets splunking, but hopefully the README is straight forward enough. Pull Requests welcome!
Also, peace out, I am hitting the sack...
Joe Rafaniello
@jrafanie
Aug 31 2016 12:05
Nice Nick 😍
Alex Krzos
@akrzos
Aug 31 2016 12:32
@dmetzger57 @kbrock db imported on first try with master - nightly too!
Dennis Metzger
@dmetzger57
Aug 31 2016 12:33
mine worked too once I remembered to update the REGION file to match the imported DB, duh
Chris Arcand
@chrisarcand
Aug 31 2016 13:13
Awesome @NickLaMuro :+1:
Keenan Brock
@kbrock
Aug 31 2016 13:31
it is looking up to be a great day for sure
Dennis Metzger
@dmetzger57
Aug 31 2016 13:32
:sunny:
Keenan Brock
@kbrock
Aug 31 2016 13:46
@akrzos I wanted to populate my local "big" db. Is vcsim-xlarge.perf.lab.eng.rdu.redhat.com online? And it seems not to be responding too well
Alex Krzos
@akrzos
Aug 31 2016 13:46
I'll check in a minute or two
Keenan Brock
@kbrock
Aug 31 2016 13:46
thanks
@NickLaMuro if rails console is "hung" - is there an easy way to see what it is currently doing?
(assuming it is a tcp/ip request that is hung)
hm... guess that is anyone
aah - alex. not you
it is retrieving storage device inventory for each host... painful
Alex Krzos
@akrzos
Aug 31 2016 13:50
is it just slow? (miq)
Keenan Brock
@kbrock
Aug 31 2016 13:50
yea, I don't have a broker running
maybe I have to aboft
3seconds per storage device
maybe 1.5 secs
but there are a lot of storage devices on that one
Jason Frey
@Fryguy
Aug 31 2016 16:48
@NickLaMuro :heart_eyes:
That reminds me of a tool @jrafanie were starting but never got anywhere with...very cool!
Keenan Brock
@kbrock
Aug 31 2016 18:05

Feel like putting in a performance bug:

printing the error page is too slow. Remove routes so the page is smaller.

Alex Krzos
@akrzos
Aug 31 2016 19:33
@NickLaMuro Hey trying out your tooling right now on master
where does the request file get dumped?
I don't see it in /var/www/miq/vmdb
Nick LaMuro
@NickLaMuro
Aug 31 2016 19:48
@akrzos sorry, should be dump'd into the tmp folder under miq_performance, so tmp/miq_performance
I will admit, that is the part that needs the most love right now, and is VERY beta
Alex Krzos
@akrzos
Aug 31 2016 19:51
rgr
Nick LaMuro
@NickLaMuro
Aug 31 2016 19:57
yeah, so the full path /var/www/miq/vmdb/tmp/miq_performance/Requestfile (had to check your repo to confirm ;) )
let me know what is painful and could use some work
Alex Krzos
@akrzos
Aug 31 2016 19:58
quick typo in the repo
peformance -- performance
on the rake tasks
Nick LaMuro
@NickLaMuro
Aug 31 2016 19:59
you don't even want to know how many times I botched that word writing this...
though, usually it was "perfomance"
Alex Krzos
@akrzos
Aug 31 2016 19:59
getting a traceback on rake miq_performance:benchmark
# . /etc/default/evm;  bin/rake miq_performance:benchmark --trace
** Invoke miq_performance:benchmark (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute miq_performance:benchmark
D, [2016-08-31T15:53:35.558966 #8031] DEBUG -- : --> getting csrf_token...
D, [2016-08-31T15:53:35.612106 #8031] DEBUG -- : --> logging in...
rake aborted!
NoMethodError: undefined method `strip' for nil:NilClass
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/header.rb:18:in `block in initialize_http_header'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/header.rb:16:in `each'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/header.rb:16:in `initialize_http_header'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/generic_request.rb:44:in `initialize'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http/request.rb:15:in `initialize'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1421:in `new'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1421:in `send_entity'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/net/http.rb:1209:in `post'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-98ff58212dde/lib/miq_performance/requestor.rb:45:in `nethttp_request'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-98ff58212dde/lib/miq_performance/requestor.rb:60:in `login'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-98ff58212dde/lib/miq_performance/requestor.rb:23:in `initialize'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-98ff58212dde/lib/miq_performance/tasks/benchmark.rake:14:in `new'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-98ff58212dde/lib/miq_performance/tasks/benchmark.rake:14:in `block (2 levels) in <top (required)>'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
bin/rake:4:in `<main>'
Tasks: TOP => miq_performance:benchmark
Nick LaMuro
@NickLaMuro
Aug 31 2016 20:01
So I think that is a failed login, but let me check
username and pass are hardcoded at the moment :disappointed:
Nick LaMuro
@NickLaMuro
Aug 31 2016 20:07
Alex Krzos
@akrzos
Aug 31 2016 20:08
nope let me set those
Nick LaMuro
@NickLaMuro
Aug 31 2016 20:08
I am just curious what curl [YOUR_MIQ_HOST]/ is returning
seems to be passing in a nil header for some reason
wonder if it is getting a redirect...
because you seem to make it past the first request
Alex Krzos
@akrzos
Aug 31 2016 20:10
302 found
yeah redirect
maybe have to disable https?
Nick LaMuro
@NickLaMuro
Aug 31 2016 20:12
yeah, maybe
@akrzos where does it redirect to, if it is just to a https host, you should be able to set the host with MIQ_HOST to that
Alex Krzos
@akrzos
Aug 31 2016 20:16
certificate verify failed
Nick LaMuro
@NickLaMuro
Aug 31 2016 20:17
oh... that is one I didn't run into locally... hmmm
let me look up how to do that with net/http
Nick LaMuro
@NickLaMuro
Aug 31 2016 20:30
@akrzos fixes pushed, I think you should be able to bundle and try again
err... bundle update
Alex Krzos
@akrzos
Aug 31 2016 20:34
hmm i don't think bundle is updating
nevermind it did
just getting
# bin/rake miq_performance:benchmark --trace
** Invoke miq_performance:benchmark (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute miq_performance:benchmark
D, [2016-08-31T16:36:02.891423 #10618] DEBUG -- : --> getting csrf_token...
rake aborted!
NoMethodError: undefined method `ignore_ssl_cert?' for #<MiqPerformance::Requestor:0x00000009d92688>
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:55:in `block in http'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:53:in `tap'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:53:in `http'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:46:in `nethttp_request'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:68:in `csrf_token'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:75:in `login_headers'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:60:in `login'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/requestor.rb:24:in `initialize'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/tasks/benchmark.rake:15:in `new'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/miq_performance-c4c515b86877/lib/miq_performance/tasks/benchmark.rake:15:in `block (2 levels) in <top (required)>'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/opt/rubies/ruby-2.3.1/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
bin/rake:4:in `<main>'
Tasks: TOP => miq_performance:benchmark
i ran export DISABLE_SSL_VERIFY=True
too
Nick LaMuro
@NickLaMuro
Aug 31 2016 20:37
ugh... did a typo again...
F... named the method wrong... let me fix
that first TODO is biting me right now...
@akrzos fixed
amended the commit since I am all about re-writing history
hopefully that doesn't mess with a bundle update though
Jason Frey
@Fryguy
Aug 31 2016 21:02

amended the commit since I am all about re-writing history

LOL don't do that :P

Nick LaMuro
@NickLaMuro
Aug 31 2016 21:10
@Fryguy I know, I also wouldn't normally just push straight to master either, so I am breaking rules all over the place. I decided that I would prefer a single commit, that might ruin one or two current beta user's day versus a second "opps" one-liner commit.
Alex Krzos
@akrzos
Aug 31 2016 22:04
@NickLaMuro ok got it working now
one other mistake and i couldn't get bundler to pull the new gem
looks like it's flooding requests in :smile:
Nick LaMuro
@NickLaMuro
Aug 31 2016 22:10
yeah, benchmark doesn't really "pause" to give MIQ a break
possibly something I should make configurable
Alex Krzos
@akrzos
Aug 31 2016 22:34
so it doesn't block
Nick LaMuro
@NickLaMuro
Aug 31 2016 22:35
oh, they are done in serial, so yeah, it will only do one at a time
but half of those are probably failing on the CSRF token
Nick LaMuro
@NickLaMuro
Aug 31 2016 22:49
so they are "quick"
Alex Krzos
@akrzos
Aug 31 2016 22:59
ok i'll try disabling csrf
Nick LaMuro
@NickLaMuro
Aug 31 2016 23:00
@akrzos no promises that will solve "all" of the errors :)
@Fryguy Not an immediate, but related question, is there any reason to not have protect_from_forgery as a config setting on the appliance (besides that it should basically be on in production in general)?
Jason Frey
@Fryguy
Aug 31 2016 23:03
I thought it was on
Oh, sorry I misread... You are asking to make it optional/configurable
Nick LaMuro
@NickLaMuro
Aug 31 2016 23:03
right, through a Vmdb::Setting
Jason Frey
@Fryguy
Aug 31 2016 23:04
Ummm... I'm not sure...I guess I'd like to understand why it can't be on all the time
Keenan Brock
@kbrock
Aug 31 2016 23:04
or ENV['SECURE']=false
Nick LaMuro
@NickLaMuro
Aug 31 2016 23:04
basically, it is a pain when doing load UI testing since we basically have to scrape for it from the page the form is on
Keenan Brock
@kbrock
Aug 31 2016 23:04
hmm, or ENV['TURBO']=true
Jason Frey
@Fryguy
Aug 31 2016 23:04
My gut reaction to adding a new setting is "no", particularly if the reason for it is not well understood
Nick LaMuro
@NickLaMuro
Aug 31 2016 23:05
it most definitely should be ON in prod, don't get be wrong
Jason Frey
@Fryguy
Aug 31 2016 23:05
Yeah, hmmmm... Let's chat tomorrow (dinner time here :P )
Nick LaMuro
@NickLaMuro
Aug 31 2016 23:06
hence the "Not an immediate" part of that original question :)
Jason Frey
@Fryguy
Aug 31 2016 23:06
Haha yeah
Nick LaMuro
@NickLaMuro
Aug 31 2016 23:10
@kbrock I am not keen on ENV variables for something like that (though, the simplicity of "SECURE" might be part of my reservations), but I have been bitten so many times in the past in ops roles tracking down ENV related issues that I only resort to them when needed, and favor using config management / command line flags if at all possible.
"Oh, your trying to us the python bin in a cron job? Sorry, cron only has a limited path that doesn't include the dir for that binary you need. LOLZ"
^ python is an example here, but I have had plenty of those type of issues. Many hours wasted...
or the "Yeah, I just copied someone's .bashrc that completely overwrote $PATH to some random string after loading rvm..."
^ I have been on the troubleshooting end of that one on more than one occasion...