Earlier  
Posted Nick Remark
#openstack-nova - 2017-03-02
21:51:10 mriedem dansmith: that's what it looks like, the tags extensions can fail with an InstanceNotFound
21:51:15 sdague dansmith: I'm going to have to reload this bit back into my head
21:51:17 mriedem but it looks like the instance lookup is hidden in the tag object
21:51:43 dansmith mriedem: right I just want to make sure that's the only one, because I don't seem to make it into that method *at all*
21:51:51 mriedem https://github.com/openstack/nova/blob/master/nova/objects/tag.py#L51
21:51:51 mriedem oh
21:51:52 dansmith and I'm wondering if there is some other glue that is missing the cell lookup
21:52:01 mriedem dansmith: microversoin?
21:52:13 dansmith mriedem: it's tempest
21:52:21 mriedem still
21:52:27 mriedem is it passing 2.1?
21:52:56 mriedem i think you need at least 2.26
21:52:57 dansmith I dunno, but the test seems to work without cells. I just tried from nova client and I get the same deal
21:53:17 mriedem novaclient CLI will request the latest microversion available that it understands
21:53:19 mriedem tempest won't
21:53:35 dansmith PUT http://192.168.201.194:8774/v2.1/servers/0d97611d-f1d6-4146-858d-9387baf36558/tags/tagme -H "OpenStack-API-Version: compute 2.41"
21:53:36 mriedem i don't think anyway
21:53:37 sdague mriedem: the tests should be configured correctly
21:53:43 cfriesen related to my earlier DB question....is there a reason why "instance_actions" rows don't get deleted when the instance does?
21:53:58 mriedem cfriesen: have you bothered to look at the code?
21:54:45 cfriesen mriedem: I'm looking at instance_destroy() in the DB API code
21:55:05 mriedem it doesn't appear that they do there
21:55:17 mriedem i believe this came up in the ML in newton
21:55:30 cfriesen okay, I can check the archives
21:55:37 sdague dansmith: I'm pretty sure nothing else is validating the server id until you get into server_tags.py
21:55:43 cfriesen I didn't see a bug for it
21:55:48 dansmith sdague: okay
21:55:55 sdague but, it's end of day, so that's just my recollection
21:56:06 dansmith sdague: http://pastebin.com/bicZYZVt
21:56:20 dansmith sdague: with that, when I add a tag from the client, I get _none_ of my log lines in the log
21:56:36 dansmith well, when I _try_ to add a tag.. it fails with 404
21:57:48 dansmith anyway, just want to make sure I'm not missing something obvious
21:57:58 mriedem cfriesen: https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L6468
21:58:07 mriedem they are handled differently for archive at least
21:58:11 mriedem because they aren't soft deleted
21:59:27 mriedem cfriesen: http://lists.openstack.org/pipermail/openstack-dev/2015-November/079701.html
22:00:13 dansmith mriedem: just checking, but... api_version('2.26') means "2.26 or later" right? just making sure we don't have another single-version thing
22:00:20 dansmith that wouldn't explain tempest not working though
22:00:37 cfriesen mriedem: I was just looking at the bug related to that email thread
22:00:48 mriedem cfriesen: http://lists.openstack.org/pipermail/openstack-dev/2015-November/079778.html
22:00:50 mriedem ^ is the summary
22:01:13 sdague dansmith: https://github.com/openstack/nova/blob/37cd9a961b065a07352b49ee72394cb210d8838b/nova/api/openstack/wsgi.py#L907-L910
22:01:22 mriedem dansmith: depends on where the code is i guess
22:01:41 dansmith sdague: okay yeah
22:02:35 sdague dansmith: anyway, if this is still a thing tomorrow, I can help debug. But I'm pretty sure we end up just building the routes through route mapper and we get straight to these functions
22:02:43 mriedem cfriesen: i also remember this coming out of that discussion https://docs.openstack.org/developer/nova/api_microversion_history.html#id19
22:02:50 dansmith sdague: okay me too, I just don't know how else to explain what I'm seeing
22:02:55 dansmith sdague: but yeah thanks
22:02:57 sdague the only question is if there is a very early 404 in wsgi
22:03:00 dansmith right
22:03:14 cfriesen mriedem: right, I saw that part.
22:03:50 sdague https://github.com/openstack/nova/blob/37cd9a961b065a07352b49ee72394cb210d8838b/nova/api/openstack/wsgi.py#L601
22:03:59 sdague but that should show up in nova-api logs as a fault
22:04:08 openstackgerrit Sujitha proposed openstack/nova master: Add description to policies in admin_actions. https://review.openstack.org/440829
22:04:48 dansmith oooooo
22:05:16 dansmith no, no.
22:05:17 cfriesen mriedem: that summary is useful, thanks. it might be nice if it was in the code as a comment or something.
22:05:18 dansmith dammit
22:05:44 sdague ok, you have to share before I run away
22:05:48 dansmith there is no instance lookup in the path of the PUT
22:05:48 sdague because I want to know :)
22:06:02 dansmith I thought there was, but it's for the server get the client does before the put of the tag
22:06:05 dansmith after the get returns,
22:06:13 sdague ah
22:06:14 dansmith no instance get at all
22:06:19 dansmith so......
22:06:24 sdague right, so you are way off in 404 land
22:06:35 dansmith I don't like 404 land
22:08:21 openstackgerrit Sujitha proposed openstack/nova master: Add description to policies in admin_actions. https://review.openstack.org/440829
22:09:46 mriedem dims: v
22:09:47 mriedem https://review.openstack.org/440832
22:10:05 mriedem cfriesen: i have to go back and read the summary myself
22:10:50 dansmith sdague: omg I am so awesaome
22:11:36 dansmith sdague: RROR stevedore.extension [req-3b12728d-ad52-44bd-b79d-ba66275e1d1d None None] Could not load 'server_tags': cannot import name nova_context
22:12:35 mriedem cfriesen: ok so we fixed the 2 things in that thread we said we would,
22:12:44 mriedem which is the microversion to list instance actions for deleted instances,
22:12:53 mriedem and hard delete instance actions when archiving an instance
22:13:14 mriedem cfriesen: if you wanted to push a change to add a comment about why we don't soft delete instance actions when deleting an instance, in the instance_destroy db api method, i'd +2 that
22:13:28 cfriesen mriedem: okay
22:22:21 openstackgerrit Anusha Unnam proposed openstack/nova master: Add description to policies to availability_zone https://review.openstack.org/440836
22:25:30 cfriesen one final DB question (for today, anyway). What's the story around console_auth_tokens added in Newton? Is something going to delete them?
22:25:57 dansmith my jar runneth over
22:28:58 mriedem cfriesen: talk to melwitt about the spec for that
22:29:23 cfriesen mriedem: I'm looking at https://blueprints.launchpad.net/nova/+spec/convert-consoles-to-objects ... looks like it got only partially implemented?
22:29:31 mriedem cfriesen: yes
22:29:39 mriedem melwitt is going to re-propose the spec for pike
22:30:25 cfriesen okay, cool. so in Newton the table is there but unused?
22:31:24 melwitt looks like it. you can see the patches that merged vs ones that ended up abandoned here https://review.openstack.org/#/q/topic:bp/convert-consoles-to-objects,n,z
22:32:18 melwitt so my plan is to repropose the spec and then resurrect those old patches and fix them up if needed to finish the work
22:33:12 cfriesen melwitt: thanks. I was looking for users of console_auth_token_create() but didn't see any.
22:33:31 melwitt yeah
22:36:05 cfriesen melwitt: okay, looks like https://review.openstack.org/#/c/325381/ introduces a periodic task to clean up expired tokens. seems maybe a bit odd to drive it from the compute nodes though.
22:38:36 melwitt cfriesen: yeah, although that works out for cells, since the tokens will be kept in cell databases, and only n-cpu and n-cond run in a cell
22:44:33 jaypipes dansmith: hey, splitting that big patch is prolly a good idea at this point, yeah. I'll do it when I get to my hotel this evening (currently sitting in SeaTac airport...)
22:44:48 dansmith jaypipes: okay I think it'll be easy
22:45:51 cfriesen just noticed something odd. at https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L1879 we soft-delete migrations when the instance is deleted, but then at https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L6474 we special-case the migrations table like we do for instance_actions. Is that no longer needed?
22:47:30 jaypipes dansmith: ya, shouldn't be a big deal.
22:47:35 mriedem1 cfriesen: that's for dealing with migrations that were not soft deleted
22:47:51 mriedem1 so you'd have migrations in the db that weren't soft deleted and those would break the archive
22:48:07 mriedem1 anything after we started soft deleting migrations when the instance was deleted would be fine

Earlier   Later