Earlier  
Posted Nick Remark
#openstack-nova - 2020-10-15
17:18:01 melwitt ok, so this issue is NOT to do with the whitelist at all. I see
17:18:29 melwitt so the whitelist parsing code is reused to parse the devices returned by libvirt
17:18:59 melwitt ok, I was missing that
17:19:17 sean-k-mooney so here https://github.com/openstack/nova/blob/master/nova/pci/manager.py#L118-L122
17:20:03 sean-k-mooney yep we reuse https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/pci/whitelist.py#L80-L88
17:20:05 melwitt ok, this way we're sure we're not parsing a whitelist
17:20:54 sean-k-mooney so what we do is we build a device spec object for every entry in the whitelist
17:21:16 sean-k-mooney then for every device returned by the vert driver we constuct a second one and see if tey match
17:21:28 sean-k-mooney its the libvirt address that is 32bit
17:22:16 melwitt but the exception guessed raised in __init__ not in the match() call?
17:22:30 melwitt *is
17:23:07 sean-k-mooney from here https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/pci/devspec.py#L217-L238
17:23:28 melwitt ohhhh
17:23:30 melwitt guh
17:23:43 openstackgerrit Sylvain Bauza proposed openstack/nova master: Fix the vGPU dynamic options race https://review.opendev.org/758470
17:24:44 melwitt so devices_json is a list of whitelist pci objects
17:26:01 melwitt maybe not... I'll look. this is so confusing to me
17:26:34 sean-k-mooney its a json blob we construct for the data we get from libvirt
17:26:43 sean-k-mooney the nodedev xmls
17:28:02 sean-k-mooney it looks like a list of these https://github.com/openstack/nova/blob/131f7606c179bd08bde3b7ae0e6bb0b59acf1545/nova/tests/unit/pci/test_manager.py#L32-L41
17:28:07 melwitt yeah, just that device_assignable is from the Whitelist class
17:29:40 sean-k-mooney i have to look this up everythim but it generated here https://opendev.org/openstack/nova/src/branch/master/nova/virt/libvirt/driver.py#L7127-L7150
17:30:42 sean-k-mooney i rewrote this recently
17:31:02 sean-k-mooney but we get all the nodedev form libvirt that are pci device ro nics
17:31:08 melwitt thanks
17:31:55 melwitt oh it's the dev_filter that's the whitelist, facepalm. sorry
17:32:20 melwitt I have gone through this before too, but still mess it up
17:33:07 sean-k-mooney dev_filter is an instance of the Whitelist class yes
17:33:47 sean-k-mooney whic has one filed specs which holds all the whitelist entries
17:34:02 sean-k-mooney then we just do
17:34:04 sean-k-mooney for spec in self.specs:
17:34:06 sean-k-mooney if spec.match(dev):
17:34:08 sean-k-mooney return True
17:34:10 sean-k-mooney return False
17:34:33 sean-k-mooney so if any of the entries match the json seriasition of the pci device form the virt driver w return true
17:35:01 melwitt ok
17:35:39 sean-k-mooney that mach is the on defiend in WhitelistPciAddress
17:36:09 sean-k-mooney which does https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/pci/devspec.py#L238
17:37:07 sean-k-mooney whic eventually expodes
17:37:51 sean-k-mooney it actully expoding here https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/pci/devspec.py#L237
17:38:20 sean-k-mooney when we contuct the dev object to compare agaisnt form teh adress we get form libvirt
17:38:55 sean-k-mooney that why its expoliding in init
17:39:21 sean-k-mooney we constuct the object form the string to reuse the parsing that was written for teh whitelist
17:39:30 sean-k-mooney so we dont have to have it twice
17:40:13 melwitt is pci_phys_addr the whitelist entry?
17:41:24 sean-k-mooney no that is the pci adress form libvirt
17:41:39 sean-k-mooney self.pci_address_spec is the object form the whitelist
17:41:47 sean-k-mooney arent the names great
17:41:57 sean-k-mooney so easy to follow and not confusing at all
17:42:04 melwitt /o\
17:43:01 sean-k-mooney melwitt: its not taking this branch https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/pci/devspec.py#L231-L234
17:43:10 sean-k-mooney but it would explode if it did
17:43:31 melwitt well, what I mean is, IIUC (which I probably don't) one of those construct of PhysicalPciAddress is "correctly" parsing a whitelist entry and the other one is parsing an address from libvirt. is my understanding wrong?
17:43:34 sean-k-mooney that is for pci device that are capable fo sriov
17:43:46 melwitt oh, ok. nevermind my question then
17:44:09 sean-k-mooney for PF if you list a PF we allow all the VF if they are allocated to be used
17:44:15 sean-k-mooney that is what that branch is for
17:44:38 sean-k-mooney so if whitelist a PF its a shortcut to whitelist the VFs
17:44:55 melwitt that makes sense
17:46:59 sean-k-mooney anyway the tl;dr for gibi is we shoudl catch the excpetion here https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/pci/whitelist.py#L85-L87 instead
17:47:18 sean-k-mooney to that if should be in a try
17:48:00 sean-k-mooney and we retrun fause if we get the PciConfigInvalidWhitelist excption
17:48:15 sean-k-mooney whcih is what he is doing here https://review.opendev.org/#/c/756697/4/nova/pci/manager.py
17:48:54 sean-k-mooney back to your orginal question
17:48:57 sean-k-mooney https://review.opendev.org/#/c/756697/4/nova/pci/devspec.py
17:49:18 sean-k-mooney is still going to raise and excption if you input an invalid whitelist
17:49:36 sean-k-mooney so i think the compute agent will still fail to start in that case
17:50:13 sean-k-mooney but we support 3 different type of adresses.
17:51:08 sean-k-mooney gibi only exeteded this one since its the one we use for the virt driver objcts
17:52:28 sean-k-mooney since gibi is not catching the excption it will still fail here
17:52:30 sean-k-mooney https://github.com/openstack/nova/blob/2c3ff1004e8812da0bc4e5502762e6b9a7650846/nova/pci/whitelist.py#L52-L79
17:52:54 sean-k-mooney when we are parsing the whitelist if it had a 32bit domain
17:53:25 sean-k-mooney this will raise the new excption
17:53:47 sean-k-mooney spec = devspec.PciDeviceSpec(ds)
17:53:53 sean-k-mooney line 75
18:21:27 ganso hi folks! If anyone could please spare a few minutes to look at this stable/train backport, should be really simple and quick as the other ones: https://review.opendev.org/#/c/757870/
18:22:30 ganso melwitt, lyarwood, elod ^
18:24:12 melwitt ganso: ack will look later today
18:24:22 ganso melwitt: thank you!
20:12:33 elod ganso: the backport looks good to me, just as it was ok to ussuri. +2
20:12:50 ganso elod: thanks!
#openstack-nova - 2020-10-16
08:00:14 yingjisun gibi: are you here?
08:08:29 gibi yingjisun: hi!
08:14:15 yingjisun gibi: I have a question about updating nova db. I would like to change the length of internal_access_path in console_auth_tokens, starting from Train. I want to modify nova/db/sqlalchemy/models.py and the migration file under nova/db/sqlalchemy/migrate_repo/versions. However I did not find some placeholder in Train. 402_add_resources.py is the last one in Train and 403_ is "Add reserved schema migrations for Ussuri". So how can I do it in Train ?
08:15:03 yingjisun Here is the repo link. https://github.com/openstack/nova/tree/master/nova/db/sqlalchemy/migrate_repo/versions
08:19:19 gibi yingjisun: good question, let me think about it
08:24:26 yingjisun Thank you very much. If it is not a question at hand, I can ask it in openstack-discuss alias. I do not want you to spend much time on this. :)
08:25:46 gibi yingjisun: I think you can use 403 for the backport to Train. As 402 is train and and no newer migration merged yet
08:26:56 yingjisun ok. Then I will open a bug first and invovle more people to review it. Thank you.
08:27:05 gibi but it would be nice to ask dansmith about this ^^ I've never done db migration backports
08:27:24 yingjisun sure. I will.
08:27:35 gibi thnks
08:27:38 gibi thanks
08:28:46 gibi link me the bug when you open it
08:28:57 yingjisun ok.
09:11:40 gibi dansmith: could you please update the topic of the channel with the wallaby runways etherpad link? https://etherpad.opendev.org/p/nova-runways-wallaby ?
10:17:26 frickler gibi: ^^ like this?
10:22:36 gibi frickler: thanks
10:22:44 gibi is there a way I can do it next time?
10:26:12 openstackgerrit Andrew Bonney proposed openstack/nova master: Handle disabled CPU features to fix live migration failures https://review.opendev.org/757577

Earlier   Later