Earlier  
Posted Nick Remark
#openstack-nova - 2018-09-26
16:19:11 mdbooth mriedem: I probably asked this before: my memory is terrible.
16:23:38 imacdonn mgariepy: you should at least try in #openstack ... "how do I...?" questions should start there. This channel is about development, not deployment .. if it's determined that there's a current bug, it could be brought here
16:24:34 mriedem mdbooth: we do,
16:24:37 mriedem it's in the experimental queue
16:24:47 mriedem melwitt: yes for api spec for extra spec validation in the api
16:24:59 mriedem as for cpu models stuff in nova.conf, idk, wasn't paying attention to that at the ptg
16:25:35 mriedem mdbooth: pro tip: look in nova's .zuul.yaml file
16:25:46 mriedem ye shall behold legacy-tempest-dsvm-full-devstack-plugin-nfs
16:26:01 cfriesen mdbooth: the starlingx server group validation stuff is here: https://github.com/starlingx-staging/stx-nova/blob/master/nova/compute/manager.py#L1408-L1436 and the check against "older" instances is here: https://github.com/starlingx-staging/stx-nova/blob/master/nova/objects/instance_group.py#L550-L572
16:26:30 cfriesen melwitt: okay, specs it is.
16:26:36 mriedem cfriesen: i think i might have mentioned this to you before, but you know how starlingx has a patched/upgraded flag it sets on the HostState object in the scheduler and then has a weigher for those?
16:26:45 melwitt thanks. cfriesen ^ you could try the cpu models as a specless bp and when we ask for approval during the nova meeting, someone might point out why it should be a spec, so you might have to write one at that point
16:26:49 mriedem i think the idea being, send new requests to patched/upgraded hosts?
16:27:19 mriedem cfriesen: any reason to not just check the compute's service version to see if it's the latest?
16:27:22 mriedem that would tell you if it's upgraded
16:28:11 melwitt mgariepy: you said earlier that you have not manually deleted any instances from the database?
16:28:14 cfriesen mriedem: one issue was that patching for a bugfix might not affect the service version
16:28:28 cfriesen mriedem: but that would work for the upgrade case
16:29:02 mgariepy melwitt, nop i didn't
16:29:11 mriedem weighing based on bug fix patches seems excessive
16:29:26 mgariepy i think the upgrade db didn't updated the deleted instances attrbutes.
16:29:35 mriedem but i guess i get it
16:30:32 cfriesen mriedem: so in the original model due to limitations we had to reboot the compute node when patching, so when rolling out a patch we really didn't want to have to migrate instances multiple times if we could avoid it. Probably less of an issue now.
16:31:16 mgariepy melwitt, updated the keypairs fields in the db..
16:34:33 imacdonn efried: ping me if you want to discuss https://review.openstack.org/#/c/605329/ - there's probably a sexier way to do it
16:35:15 mriedem imacdonn: gonna need tests
16:35:32 mriedem b/c clearly we weren't testing this before which is why it's a bug
16:35:41 imacdonn mriedem: yeah, I figured that'd come up ... but there aren't any tests at all for this stuff currently, or I failed to find them
16:36:28 imacdonn Trying to verify the contents of a PrettyTable didn't seem appealing :/
16:36:39 mriedem https://github.com/openstack/nova/blob/41ac87f812f239e38ad3b72c2f2108523ad3444d/nova/tests/unit/test_nova_manage.py#L749
16:37:08 mriedem there are tests for each individual migration method but you're right that they aren't tested together in aggregate
16:37:09 imacdonn oh. Why isn't that under "cmd" ?
16:37:16 mriedem b/c history
16:37:19 imacdonn mmkay
16:37:28 mriedem no reason we couldn't move it
16:37:35 mriedem except it makes backports a pain in the ass
16:37:37 melwitt mgariepy: oh, hm. ok, we have had online data migrations before that skip deleted records, so that sounds legit but I need to look and double check. it's surprising though that we haven't had this reported before, I'd think it would be common
16:38:10 imacdonn k, I'll look into why the test didn't catch the bug
16:38:40 imacdonn oh, I guess because it didn't have more than 50 of any migration type
16:40:44 melwitt tssurya, mriedem: I've got a call at the top of the hour, so I won't be able to participate much in a cells meeting if we have one
16:43:21 mgariepy melwitt, the cloud i'm upgarding lives from some times. first install was kilo and upgraded
16:43:43 mgariepy but depending on the when it's upgraded, it can cause inconsistency some times..
16:46:07 melwitt mgariepy: yeah, so I'm looking at this and the migration is that it's moving keypairs from the "main" database to the api database. and it's counting only the non-deleted InstanceExtra. InstanceExtra are marked as deleted when instances are deleted through the nova API https://github.com/openstack/nova/blob/stable/queens/nova/objects/keypair.py#L245
16:50:20 melwitt I don't yet understand how this works, I see the migration creates a keypair in the api db, deletes the keypair from the cell db, but I'm not yet seeing the connection with instance_extra
16:51:48 melwitt it looks like the instance_extra part is a separate migration that should have happened before this cell db => api db one that I'm looking at
16:52:43 melwitt ok yeah, instance_obj.migrate_instance_keypairs
16:52:49 melwitt from newton
16:53:21 mgariepy i'm currently using : nova_git_install_branch: d7864fbb9c2c558c409559e1d5989f84c7403832 # HEAD of "stable/queens" as of 23.07.2018
16:53:54 mgariepy melwitt, can you point me to the commit ?
16:54:51 melwitt mgariepy: here's the code https://github.com/openstack/nova/blob/stable/ocata/nova/objects/instance.py#L1398 that should have run when you upgraded to newton, when you ran the nova-manage db online_data_migrations. did you do that for newton?
16:55:53 melwitt the code no longer exists in queens, so if you missed running that online data migration in newton, you can't run it with the queens code
16:56:16 mgariepy i ran it for sure.
16:58:33 melwitt and there were no errors? because while this is only migrating non-deleted records, the check that is blocking you in queens is also only considering non-deleted records, so I don't see how this could be happening unless the online migration from newton was missed or had errors
16:58:53 openstackgerrit Merged openstack/nova master: placement: Always reset conf.CONF when starting the wsgi app https://review.openstack.org/604693
17:00:24 melwitt as for getting out of it, if the unmigrated instance_extra records are associated with non-deleted instances, I think you're going to have to do something like use the old newton code to migrate the records. if they unmigrated instance_extra records are associated with deleted instances, you're going to have to delete them manually
17:02:27 mgariepy the Ocata code i was runnig wasn't the latest
17:03:16 mgariepy anyway seems to be fixed now.
17:04:34 mgariepy is there a script to validate the database ?
17:07:17 mgariepy i run this cloud since kilo
17:08:01 mgariepy maybe some stuff didn't migrate well, it's just not fun to find out the day you upgrade it
17:11:20 melwitt yeah, so there's this tool called the upgrade status check
17:12:21 melwitt https://docs.openstack.org/nova/pike/cli/nova-status.html
17:12:29 cfriesen mriedem: re: weighing based on patching, the main usecase currently is for things that fundamentally require taking the node out of service (kernel and kernel modules, for example). But it's coupled with our proprietary patching orchestrator, so it's not really upstreamable.
17:30:32 mgariepy anyway, thanks for you help melwitt,
17:33:27 melwitt mgariepy: yeah, take a look at the nova-status command, that should help you out during each upgrade to make sure you've done all the steps needed for the upgrade to succeed
17:44:44 mriedem melwitt: i assumed the cells meeting was not happening since tssurya isn't around and dan is out
17:45:04 cfriesen melwitt: for the "image properties and flavor extra-spec validation", can we use the fact that rebuild/resize/create can all already return a 400 error to avoid the need for a new microversion?
17:46:14 cfriesen mriedem: maybe you could answer this too. ^
17:46:24 melwitt yeah, I was thinking mriedem would be better for answering that
17:48:11 mriedem cfriesen: uh, no
17:48:51 mriedem because on cloud A i can do something which i can't on cloud B
17:49:32 cfriesen mriedem: what about the argument that it silently failed before (you have to check the instance state to see it go to ERROR) but now we'll return an error?
17:50:06 mriedem i could maybe buy that, but this is a big enough change that i think it's hard to justify
17:50:43 mriedem tbc, i don't think a spec is warranted just b/c of a microversion, but also about how this is going to work and which specs will be validated and how
17:51:56 cfriesen mriedem: okay, new microversion it is. I'm not going to be the one writing this spec, I'm just establishing the parameters for someone else to write it up.
17:52:07 cfriesen (someone else on our side, I mean)
17:52:54 mriedem i'm also only one person
17:52:59 mriedem others might have other opinions
17:53:50 mriedem like alex_xu and gmann
17:54:27 cfriesen we can write it up assuming a new microversion and call it out in the review. easy enough to remove if not needed
17:55:18 mriedem yeah just use the alternatives sectoin
17:55:19 mriedem *section
18:07:57 openstackgerrit iain MacDonnell proposed openstack/nova master: nova-manage - fix online_data_migrations counts https://review.openstack.org/605329
18:46:56 openstackgerrit Jonte Watford proposed openstack/nova master: Add __str__ method to NUMACell related objects https://review.openstack.org/600269
18:49:24 openstackgerrit Jonte Watford proposed openstack/nova master: Add __str__ method to NUMACell related objects https://review.openstack.org/600269
19:18:28 openstackgerrit Jonte Watford proposed openstack/nova master: Add __str__ method to NUMACell related objects https://review.openstack.org/600269
19:37:51 efried imacdonn: The test will hopefully help me understand it - or at least prove to myself that you've fixed something.
19:38:48 imacdonn efried: I pasted example output of the failure case in the bug report
19:39:29 mriedem i could use a hashable ovo right about now
19:40:30 efried imacdonn: Yeah, I saw that and it helped me understand the problem, but looking at the code I couldn't see a) how the problem was happening, or b) how you fixed it. It's been a few hours now, maybe a second look will do the trick.
19:40:37 mriedem i've got a sorted list of things, but some of those things could be duplicates, and i need to filter out the duplicates, but ovos are'nt hashable as far as i can tell
19:40:50 efried mriedem: set()?
19:41:01 efried oh, you have a sorted list of OVOs.
19:41:05 mriedem right
19:41:08 efried got it
19:41:15 efried are the __eq__ able?
19:41:19 mriedem specifically, 2 of the Migration objects in the same list have the same uuid
19:41:19 imacdonn efried: heh. the problem was that each invocation of the inner method was returning a dict with counts from that run, and it was being used to update() a dict in the outer functions .. that replaced the values in the outer one, instead of adding to them
19:41:34 mriedem but their updated_at values are different and i just need to remove the older one
19:41:41 efried mriedem: So you sorted by UUID?

Earlier   Later