Earlier  
Posted Nick Remark
#openstack-nova - 2020-10-23
12:53:44 recyclehero if resource_tracker.py dont found the host it will set its inital flag to true
12:53:47 noonedeadpunk well, not during runtime, but after host is discovered
12:54:56 sean-k-mooney ya if you calll the api to change a value on the inventory then inital will not have any effect on that
12:55:09 sean-k-mooney inital is just used when creating an inventory and never after that
12:55:20 noonedeadpunk sean-k-mooney: ok, cool, thanks!
12:55:23 recyclehero sean-k-mooney: will u be in half an hour? I feel you are the one who save me from this misery.
12:55:26 recyclehero here
12:55:41 sean-k-mooney ill be here yes
12:55:48 recyclehero great thanks
12:56:04 noonedeadpunk recyclehero: yeah, it was exactly about that patch as I was thinking to just replace cpu_allocation_ratio with initial_cpu_allocation_ratio but it doesn't make sense for this scenario
12:57:04 sean-k-mooney recyclehero: this is the spec by the way that added inital_* https://specs.openstack.org/openstack/nova-specs/specs/stein/implemented/initial-allocation-ratios.html
12:57:26 sean-k-mooney noonedeadpunk: idealy you would support both
12:57:46 sean-k-mooney although only one of the two ways is acutlly used in any one deployment
12:58:36 Diavel Hi guys, currently working on an app which consumes rabbitmq messages from nova-compute and I am wondering - Is there a reason why there is no notification sent on `UpdateMetadata` of an instance?
12:59:16 Diavel there are for imo every other operation you can run from horizon, but there is no for metadata update
12:59:16 noonedeadpunk sean-k-mooney: well, deployers are able to set overrides and define initial ones. and this patch will remove regular ones. so kind of both supported but not in very straightforward way....
13:00:03 sean-k-mooney noonedeadpunk: ah i see well that makes sense i guess
13:00:34 sean-k-mooney noonedeadpunk: i still prefer how kolla ansible does it with config overrides rahter then provideing wrappers around things
13:01:15 noonedeadpunk sean-k-mooney: we encourage to use config overrides https://opendev.org/openstack/openstack-ansible-os_nova/src/branch/master/defaults/main.yml#L501
13:01:24 sean-k-mooney Diavel: when you ser updateMetadata what do you mean
13:01:26 noonedeadpunk but I mean we should have some defaults set?
13:01:32 sean-k-mooney Diavel: is it the server proerties
13:01:43 sean-k-mooney Diavel: or image/flaovr metadata
13:02:00 sean-k-mooney noonedeadpunk: oh you have both
13:02:09 noonedeadpunk yep :p
13:02:37 sean-k-mooney ya its better in the long run i think since the user become more familar with the upstream project names and there for the release note make more sense to them
13:02:37 noonedeadpunk and these vars can be overriden with config_overrides so overrides have prescedence
13:04:10 Diavel sean-k-mooney: it's the server metadata, not flavour
13:04:16 sean-k-mooney Diavel: are you refering to this metadata https://github.com/openstack/nova/blob/master/nova/notifications/objects/instance.py#L58
13:04:19 sean-k-mooney ah ok
13:04:39 sean-k-mooney well that is updated when you do an openstack server set --properties
13:04:46 sean-k-mooney which is not an instance action
13:05:26 sean-k-mooney it might be part of https://github.com/openstack/nova/blob/master/nova/notifications/objects/instance.py#L287
13:05:49 sean-k-mooney we dont have the filed ther ebut that might be triggered form the openstack server set
13:06:18 noonedeadpunk btw, need to remove *_allocation_ratio from config (so that value would be None) is not super convinient from our prespective:))) being able to set it as just empty string to make it not used is more neat and I guess from python prespective is not harder in implementation?
13:06:46 sean-k-mooney Diavel: wa it think its the update https://github.com/openstack/nova/blob/master/nova/notifications/objects/instance.py#L590-L598
13:07:07 noonedeadpunk as `if str()` and `if None` are both false....
13:07:28 noonedeadpunk but whatever
13:08:35 sean-k-mooney Diavel: so i think you just need to addd it to the payload and extend https://github.com/openstack/nova/blob/6a5e158756edc6c01bb23c26dcfc4c3a3df703dc/nova/notifications/base.py#L170-L207
13:08:39 noonedeadpunk ah, well, I guess it might be limitation of oslo.config... as it should be int, so can't be just empty
13:09:37 sean-k-mooney noonedeadpunk: i think you can set it to "cpu_allocation_ratio="
13:10:06 noonedeadpunk oh, really? I thought we can't....
13:10:32 Diavel sean-k-mooney: thanks a lot ;) will take a look at that part
13:10:54 sean-k-mooney noonedeadpunk: you can use 0.0 https://github.com/openstack/nova/blob/master/nova/conf/compute.py#L420-L453
13:11:41 sean-k-mooney noonedeadpunk: but i think y ou can also set it to None
13:12:23 noonedeadpunk i thought that None in config is not None, but str('None')?
13:12:30 noonedeadpunk but yeah
13:12:44 sean-k-mooney not it None unquoted i think
13:12:47 noonedeadpunk 0.0 would be an option out of the box:)
13:12:55 sean-k-mooney anyway 0.0 shoudl work
13:13:01 sean-k-mooney and its still the same type
13:13:05 noonedeadpunk yeah
13:13:40 sean-k-mooney are you thinking of just templating the value
13:14:45 noonedeadpunk well, we do it now
13:15:06 noonedeadpunk and why I started asking question was that change https://review.opendev.org/#/c/758029/2/templates/nova.conf.j2
13:18:00 noonedeadpunk anyway thanks a lot for helping sean-k-mooney!
13:27:23 sean-k-mooney no worries
13:31:07 Diavel sean-k-mooney: if I am not mistaken the metadata should already be included in the payload.. https://github.com/openstack/nova/blob/6a5e158756edc6c01bb23c26dcfc4c3a3df703dc/nova/notifications/base.py#L182-L183 -- https://github.com/openstack/nova/blob/6a5e158756edc6c01bb23c26dcfc4c3a3df703dc/nova/notifications/base.py#L467
13:32:43 sean-k-mooney in the unversion one perhaps
13:32:51 sean-k-mooney but its not defiend in the versiond payload
13:33:20 sean-k-mooney https://github.com/openstack/nova/blob/6a5e158756edc6c01bb23c26dcfc4c3a3df703dc/nova/notifications/base.py#L211-L252
13:33:50 sean-k-mooney that never read it and the object does nto hold that value https://github.com/openstack/nova/blob/6a5e158756edc6c01bb23c26dcfc4c3a3df703dc/nova/notifications/objects/instance.py#L287-L317
13:34:22 sean-k-mooney Diavel: so if you are using the versioned notificaiton which is what you should be using you wont get it
13:34:37 sean-k-mooney it can be added but it cannot be bakcported
13:35:15 recyclehero noonedeadpunk, sean-k-mooney : I set inital_cpu_allocation_ratio via this config overrides.
13:35:55 recyclehero sean-k-mooney: I read the spec but dont know why its still overriding my config
13:35:58 sean-k-mooney Diavel: so you will need to use the unversion notification and then add it to the versioned notificaton for wallaby
13:36:19 recyclehero because I have set it None, I mean they are not there. thats None right?
13:36:28 Diavel sean-k-mooney: got it.. shit I missed that, sorry and thanks again
13:36:40 Diavel sean-k-mooney: I am using the versioned one
13:37:13 sean-k-mooney Diavel: no worries we can totally add it but they are versioned so we cant backprot it
13:37:36 sean-k-mooney Diavel: it would be good to add it so that you dont have to use the unversioned ones
13:37:49 Diavel sean-k-mooney: yeah I totally agree
13:38:11 sean-k-mooney recyclehero: initial is only used when a node if first deployed
13:38:34 sean-k-mooney since it has a default setting it to none will result in it still using the default
13:41:00 recyclehero sean-k-mooney: I didnt completly get the second one. I did the patch which I sent. so cpu_allocation_ratio is not present in nova.conf. also I ahve set the inital_cpu_allocation_ratio:16 which is present in nova.conf
13:41:14 recyclehero it was a clean deploy
13:41:31 recyclehero and I think it did use the iniita ratio because it is set to 16
13:41:39 recyclehero the problem lies it total I guess
13:41:54 recyclehero you were asking me before to do some tests.
13:41:59 sean-k-mooney well total shoudl be equal to the number of cores
13:42:08 sean-k-mooney not 16*number of cores
13:42:19 sean-k-mooney and horizon should not change
13:42:38 recyclehero oh so It means I have it set now. let me check lunching a 10 core instance
13:42:55 sean-k-mooney you cant
13:43:01 sean-k-mooney you have only 8 cores on the host
13:43:12 recyclehero but I want to overcommit :((
13:43:13 sean-k-mooney you cant oversubseribe against your self
13:43:22 sean-k-mooney launch 2 5 core ones
13:43:35 recyclehero aha ok
13:49:56 openstackgerrit Stephen Finucane proposed openstack/nova master: virt: Remove 'change_instance_metadata' API https://review.opendev.org/749316
13:59:44 openstackgerrit Stephen Finucane proposed openstack/nova master: db: Compact Liberty database migrations https://review.opendev.org/758397
14:14:33 stephenfin this looks new :-\ https://zuul.opendev.org/t/openstack/build/c85b0734fb524eefb67449105528b0a2/log/logs/screen-n-cpu.txt#861
14:19:47 recyclehero stephenfin: I am seeing 10 VCPU on my project so I guess it is ok. thank you
14:20:23 recyclehero but on hoizon in hypervisor VCPU usage is 10 of 8
14:20:46 recyclehero stephenfin: before getting of your shoulder, what is the logic that one cat overcommit self?
14:20:56 recyclehero cant
14:20:59 sean-k-mooney recyclehero: 10 of 8 is correct
14:21:05 sean-k-mooney that is what should be in horizon
14:21:31 sean-k-mooney stephenfin: nope

Earlier   Later