Earlier  
Posted Nick Remark
#openstack-nova - 2017-07-17
19:06:07 dansmith yeah
19:06:10 mriedem the fact jsonutils.to_primitive ignored it was to our advantage
19:06:25 dansmith yeah
19:06:58 mriedem that change is also being reverted https://review.openstack.org/#/c/484396/
19:07:18 mriedem b/c i pointed out that releasing that under a patch release versoin w/o any prior warning <2 weeks to FF is likely to break other projects
19:07:19 dansmith heh
19:07:25 dansmith yeah I guess so
19:07:53 mriedem we only had prior warning b/c the requirements changes gate on nova unit/functional tests
19:25:51 mriedem oomichi: i'm +2 again on https://review.openstack.org/#/c/479774/ after your comments
19:39:33 Ctesias hi. I'm digging around in nova trying to figure out why my nova_override.conf file isn't overriding nova defaults and I'm curious where `import nova.conf` and `CONF = nova.conf.CONF` are coming from because I don't see those being defined anywhere
19:41:28 mriedem Ctesias: for nova-compute the options are loaded up here https://github.com/openstack/nova/blob/master/nova/cmd/compute.py#L42
19:41:45 mriedem similar pattern for the other service entry points
19:41:59 mriedem https://github.com/openstack/nova/blob/master/nova/config.py#L49
19:43:15 Ctesias Thanks for the pointer.
19:43:31 Ctesias Is putting an override_nova.conf file in the config directory the right way to get overrides into the nova config?
19:44:10 mriedem i've never used nova_override.conf
19:44:17 mriedem so if it works, it's some magic i'm not aware of
19:45:14 Ctesias well... It doesn't work :(
19:45:27 Ctesias Any tips on how I would go about overriding defaults in nova.conf the right way?
19:45:56 mriedem can't you pass overrides on the --config-file cli option
19:46:02 mriedem i'm not sure though
19:46:38 mriedem there could be something in https://docs.openstack.org/oslo.config/latest/
19:47:40 sdague Ctesias: can you explain what you are trying to do with overrides besides modifying the nova.conf directly? Maybe we're just not understanding the question
19:49:49 Ctesias I was under the impression modifying nova.conf directly was no bueno. But I'm trying to enable a barbican with Nova, so I need to set the api_class setting in config file under [keymgr]
19:50:21 Ctesias I created nova_override.conf in the same directory where nova.conf was and put [keymgr] and api_class = <the barbican manager> in it
19:50:24 Ctesias restarted nova
19:50:30 Ctesias but nova had the defaults when it came back
19:51:33 mriedem just modify nova.conf
19:52:00 mriedem nova.conf can be totally blank and it won't override any defaults - the defaults are all in code
19:52:08 mriedem so if you want to override any defaults, it happens in nova.conf
19:52:25 mriedem nova_override.conf is probably some package-specific trick
19:52:33 Ctesias .....Oh.
19:52:46 Ctesias Well awesome. Thanks for your help, really
19:52:50 mriedem yw
19:52:51 Ctesias I've been pulling my hair out for days
20:00:12 openstackgerrit Matt Riedemann proposed openstack/nova master: Support tag instances when boot(4/4) https://review.openstack.org/469800
20:00:55 mriedem Kevin_Zheng: ^ fixed up the functional test failures; it was pretty simple but not obvious until i injected some debug code and ran the tests, and then also had to tweak the tests a bit
20:03:30 mriedem sdague: can you take a gander at ^ ? it's pretty straight-forward and well tested
20:05:49 openstackgerrit Matt Riedemann proposed openstack/nova master: Optimize creating servers with tags https://review.openstack.org/484170
20:06:38 sdague mriedem: I'll add it to the morning list
20:06:56 mriedem thanks - alex_xu might get it overnight then, he was reviewing it before too
20:08:24 oomichi mriedem: thanks, +2
20:10:10 Ctesias Hi again. I'm getting the same behavior with the changes directly in my nova.conf file. I've tried pointing at the directory with --config-dir and directly at the nova.conf file with --config-file with no change in behavior
20:10:20 Ctesias the api_class value is still the default
20:11:19 mriedem Ctesias: which service?
20:11:33 Ctesias nova service
20:11:45 mriedem which of the nova services, there are several
20:11:50 mriedem nova-osapi_compute?
20:11:57 mriedem nova-compute, etc
20:12:21 Ctesias nova-compute
20:13:59 mriedem when you restart nova-compute, do you have debug logging enabled so you can see it dump which config files are being used to and it will dump the options
20:16:46 Ctesias the file is pretty long, there something I can grep for to get the file it's using?
20:17:57 mriedem yeah
20:17:58 mriedem "command line args"
20:18:02 mriedem "config files"
20:18:07 mriedem like here http://logs.openstack.org/47/484447/1/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/b2fbd0c/logs/screen-n-cpu.txt.gz#_Jul_17_18_47_11_345788
20:18:22 mriedem and then it dumps the options it's using
20:19:05 mriedem Ctesias: you're using the wrong group
20:19:09 mriedem it's not [keymgr]
20:19:13 mriedem it's [key_manager]
20:19:21 mriedem http://logs.openstack.org/47/484447/1/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/b2fbd0c/logs/screen-n-cpu.txt.gz#_Jul_17_18_47_11_670125
20:19:28 Ctesias yeah, that was a typo earlier. I've got [key_manager] in the file
20:21:05 Ctesias If I put a breakpoint in nova/keymgr/conf_key_mgr.py I can go to the line after it grabs the nova configuration and see it's the same
20:21:10 Ctesias (Pdb) CONF['key_manager']['api_class'] 'nova.keymgr.conf_key_mgr.ConfKeyManager'
20:23:35 mriedem and the debug log output when you restart nova-compute shows the same when it dumps the options?
20:23:58 Ctesias yes
20:24:26 Ctesias 2017-07-17 16:20:13.483 DEBUG oslo_service.service [req-ece128f3-fb7c-4da3-af58-78c39fca910c None None] key_manager.api_class = nova.keymgr.conf_key_mgr.ConfKeyManager from (pid=14641) log_opt_values /opt/pf9/venv/lib/python2.7/site-packages/oslo_config/cfg.py:2626-07-17 16:20:13.485 DEBUG oslo_service.service [req-ece128f3-fb7c-4da3-af58-78c39fca910c None None] osapi_v21.project_id_regex = None from (pid=14641)
20:25:19 mriedem hmm, api_class comes from castellan
20:25:24 mriedem which version of that library do you have installed?
20:26:05 Ctesias 0.4.0
20:26:14 mriedem kfarr: ^ have you heard of anything like this?
20:26:40 mriedem Ctesias: which version of nova? master (pike)? or ocata?
20:26:47 mriedem because that version is old for master https://github.com/openstack/requirements/blob/master/upper-constraints.txt#L227
20:27:10 Ctesias Newton, actually
20:27:14 mriedem ew
20:27:21 Ctesias speed of business, man
20:28:01 mriedem so things were different in newton https://github.com/openstack/nova/blob/stable/newton/nova/conf/key_manager.py
20:28:53 mriedem looks like it should still set those options
20:30:38 mriedem Ctesias: this might be your problem https://github.com/openstack/nova/blob/stable/newton/nova/keymgr/__init__.py#L29
20:30:50 mriedem not totally sure
20:31:02 mriedem need to probably talk to kfarr
20:32:12 Ctesias I don't see api_class as an option in /nova/conf/key_manager.py
20:32:34 mriedem that's not the options registry,
20:32:40 mriedem that's the default impl
20:32:59 mriedem the options are registered here https://github.com/openstack/nova/blob/stable/newton/nova/conf/key_manager.py
20:33:20 mriedem and then there is some backward compat magic in https://github.com/openstack/nova/blob/stable/newton/nova/keymgr/__init__.py
20:37:16 Ctesias yeah commenting out the lines in __init__.py fixes it
20:38:36 Ctesias Is this behavior fixed upstream from Newton anywhere yet?
20:41:19 mriedem i think that stuff in init was all removed in ocata
20:41:33 mriedem oh i guess not ocata https://github.com/openstack/nova/blob/stable/ocata/nova/keymgr/__init__.py
20:41:44 mriedem or master https://github.com/openstack/nova/blob/master/nova/keymgr/__init__.py
20:41:44 mriedem damn
20:42:14 mriedem so the fact it's setting that b/c of devstack is a total hack
20:42:21 mriedem let me see if that's at least set in devstack
20:43:27 mriedem Ctesias: https://review.openstack.org/#/c/439855/
20:44:42 Ctesias cool. Thanks
20:45:03 mriedem Ctesias: so did you just remove this line? https://github.com/openstack/nova/blob/stable/newton/nova/keymgr/__init__.py#L29 ?
20:45:08 mriedem or all of the stuff in there
20:46:58 Ctesias I only commented out the lines that re-set the api_class value
20:47:18 Ctesias but if you're curious I can try to get rid of all of it and see what happens

Earlier   Later