| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2018-04-17 | |||
| 20:24:10 | mriedem | how about just looking at the test to see if i'm missing something | |
| 20:24:16 | dansmith | mriedem: yeah, I mean, getting by binary kinda has to ignore deleted | |
| 20:24:17 | cfriesen | looking already | |
| 20:25:26 | mriedem | dansmith: it's redundant with the context.read_deleted which defaults to 'no' | |
| 20:25:34 | mriedem | but in this test i needed to specifically read deleted services | |
| 20:25:51 | mriedem | and that was preventing me from being able to | |
| 20:26:01 | mriedem | hence, "GAH" | |
| 20:26:29 | mriedem | cfriesen: adding more debug, looks like the deleted service does in fact have a uuid | |
| 20:26:45 | arvindn05 | https://github.com/openstack/nova/blob/master/nova/scheduler/manager.py#L93 | |
| 20:26:45 | arvindn05 | Is calling GET /os-hypervisors the only way? Ideally I was hoping the request_spec had the uuid but all I get is the host name | |
| 20:26:45 | arvindn05 | how do we get host uuid from hostname in the scheduler? i am trying to get host uuid for host specified in the request_spec.force_hosts. | |
| 20:27:13 | arvindn05 | any hints on internal methods i can call from the scheduler to provide the uuid's? | |
| 20:28:15 | mriedem | arvindn05: scheduler doesn't need to call compute REST APIs | |
| 20:28:18 | mriedem | it can use the db | |
| 20:28:49 | cfriesen | mriedem: I wonder if deleting the service added the uuid back in? | |
| 20:29:15 | mriedem | arvindn05: likely looking at https://github.com/openstack/nova/blob/master/nova/objects/compute_node.py#L269 | |
| 20:29:29 | mriedem | cfriesen: ah yeah, it probably did b/c the API looks up the service from the db to build the object and then delete it | |
| 20:30:17 | mriedem | arvindn05: there is also force_nodes | |
| 20:30:25 | mriedem | ironic nodes are 1:M host:node | |
| 20:30:45 | mriedem | that's why get_first_node_by_host_for_old_compat is semi deprecated | |
| 20:30:53 | arvindn05 | mriedem: thanks. so i need to load compute node using the get_by_host_and_nodename method and get the uuid that way? | |
| 20:31:29 | mriedem | this is to get the compute node uuid to find the resource provider for rebuild right? | |
| 20:31:36 | arvindn05 | yup | |
| 20:32:00 | mriedem | arvindn05: yeah then likely just use this https://github.com/openstack/nova/blob/master/nova/objects/compute_node.py#L262 | |
| 20:32:20 | arvindn05 | i have both the host and node names...so it looks appropriate | |
| 20:32:25 | mriedem | that's a bit heavy since we don't need the full compute node object, but that should work for starters | |
| 20:33:26 | arvindn05 | mriedem: thanks. is there any other lightweight mapping other than going to the db? | |
| 20:33:58 | arvindn05 | i saw somewhere that the host id is generated from a combination of something....let me look it up | |
| 20:34:59 | arvindn05 | https://ask.openstack.org/en/question/29085/which-api-to-be-used-to-get-uuid-of-compute-host/?answer=29091#post-id-29091 | |
| 20:35:21 | mriedem | no that's not it | |
| 20:35:25 | cfriesen | arvindn05: going to the DB should be relatively cheap | |
| 20:35:26 | mriedem | that's the hashed instance.hostId | |
| 20:35:58 | mriedem | the computenode.host is the hostname of the compute service | |
| 20:36:01 | mriedem | the physical hostname | |
| 20:36:11 | mriedem | the nodename is the same as the host for all virt drivers except ironic | |
| 20:36:12 | arvindn05 | mriedem: cfriesen: thanks...will go to the db then. if there are more effiecint methods, hopefully they will be pointed out in the CR | |
| 20:36:22 | mriedem | in the case of ironic, the computenode.hypervisor_hostname (nodename) is the ironic node uuid | |
| 20:36:41 | mriedem | there are not more efficient methods without writing your own new DB API query method via the ComputeNode object | |
| 20:36:48 | mriedem | like, get_uuid_by_host_and_nodename | |
| 20:37:17 | arvindn05 | ^ was hoping someone already wrote that method :) | |
| 20:37:48 | mriedem | i don't think it's a huge issue to lookup the compute node for the rebuild case, it's not like scheduling for that should be very expensive since all we're doing is validating the new image | |
| 20:38:38 | arvindn05 | yup...its not for all rebuild cases either...only rebuild cases where they have traits expressed in image....so its a minor subset | |
| 20:42:11 | openstack | bug 1764556 in OpenStack Compute (nova) ""nova list" fails with exception.ServiceNotFound if service is deleted and has no UUID" [Undecided,New] https://launchpad.net/bugs/1764556 | |
| 20:42:11 | openstackgerrit | Matt Riedemann proposed openstack/nova master: WIP: Add functional recreate test for bug 1764556 https://review.openstack.org/562041 | |
| 20:42:12 | mriedem | cfriesen: getting further but still not failing when listing instances ^ | |
| 20:44:21 | efried | imacdonn: Quick delta there and I'm happy | |
| 20:45:28 | imacdonn | efried: Ahh, good catch | |
| 20:45:43 | efried | imacdonn: I checked and that's the only place it was used. | |
| 20:45:58 | imacdonn | yep, I just 'grep -r'ed too ;) | |
| 20:46:33 | imacdonn | ooooh | |
| 20:46:39 | efried | ...which is probably less reliable than grep -r | |
| 20:46:43 | imacdonn | heh | |
| 20:46:52 | efried | but way more efficient. | |
| 20:47:07 | efried | You know, as long as you discount all the freaking processing power the IDE had to do up front to indext the whole freaking project. | |
| 20:47:17 | efried | s/indext/index/ | |
| 20:47:22 | imacdonn | yeah | |
| 20:47:30 | mriedem | cfriesen: if i revert this https://review.openstack.org/#/c/543970/ then the test fails with ServiceNotFound | |
| 20:48:31 | openstackgerrit | Matt Riedemann proposed openstack/nova master: DNM: Revert "Lazy-load instance attributes with read_deleted=yes" https://review.openstack.org/562051 | |
| 20:48:39 | mriedem | but, that basically means it's already fixed | |
| 20:49:11 | cfriesen | mriedem: does host1.stop() delete the entry in the DB? or do we need host1.kill()? | |
| 20:49:24 | cfriesen | I definitely tested it with current stable/pike in devstack | |
| 20:49:33 | mriedem | .stop() doesn't delete the service | |
| 20:50:16 | openstackgerrit | Merged openstack/nova master: Parse forbidden in extra_specs https://review.openstack.org/561677 | |
| 20:50:20 | cfriesen | ah, I see. you're stopping it then deleting it | |
| 20:50:23 | mriedem | besides, yeah | |
| 20:50:49 | mriedem | i stop the service, delete it, and then have to null out the service uuid because as noted, deleting the service via the rest api looks it up and will migrate the uuid if not set | |
| 20:50:59 | cfriesen | let me just double-check my devstack | |
| 20:52:13 | mriedem | cfriesen: did you have https://review.openstack.org/#/c/545988/ in your devstack env? | |
| 20:52:30 | openstackgerrit | Merged openstack/nova stable/pike: libvirt: Block swap volume attempts with encrypted volumes prior to Queens https://review.openstack.org/543569 | |
| 20:52:32 | mriedem | oh you said current stable/pike | |
| 20:53:42 | openstackgerrit | iain MacDonnell proposed openstack/nova master: Remove placement config check https://review.openstack.org/558089 | |
| 20:56:01 | openstack | bug 1745977 in OpenStack Compute (nova) queens "When source compute service up, will not destroy and clean up those instances which be evacuated then be deleted." [Medium,Fix committed] https://launchpad.net/bugs/1745977 - Assigned to Matt Riedemann (mriedem) | |
| 20:56:01 | mriedem | well, if anything, i guess i can still leave this test in place for bug 1745977 so we have coverage of the scenario | |
| 20:57:08 | cfriesen | mriedem: when you list the servers, are you doing it as an admin user? | |
| 20:57:21 | cfriesen | mriedem: regular user doesn't get the host info | |
| 20:57:57 | cfriesen | mriedem: and so doesn't trigger the bug | |
| 20:58:41 | cfriesen | I just reproduced in devstack after restarting all the nova services, so should be valid | |
| 20:59:39 | openstackgerrit | melanie witt proposed openstack/nova master: Add periodic task to clean expired console tokens https://review.openstack.org/325381 | |
| 20:59:40 | openstackgerrit | melanie witt proposed openstack/nova master: Use ConsoleAuthToken object to generate authorizations https://review.openstack.org/325414 | |
| 20:59:41 | openstackgerrit | melanie witt proposed openstack/nova master: Convert websocketproxy to use db for token validation https://review.openstack.org/333990 | |
| 20:59:42 | openstackgerrit | melanie witt proposed openstack/nova master: Update layout docs for running console proxies https://review.openstack.org/557489 | |
| 20:59:44 | cfriesen | I wonder if you just replaced self.api.get_servers() at the bottom with self.admin_api.get_servers()... | |
| 20:59:45 | mriedem | cfriesen: no, not admin | |
| 21:00:09 | mriedem | i can try that | |
| 21:00:50 | efried | jaypipes: Quick +A on previously +2'd https://review.openstack.org/#/c/558089/ ? | |
| 21:04:26 | mriedem | there will be an obvious error in the n-cpu logs when placement isn't configured without that? | |
| 21:04:37 | mriedem | or will we just get the safe_connect warnings? | |
| 21:05:10 | mriedem | cfriesen: that doesn't change anything, listing with admin | |
| 21:05:47 | efried | mriedem: We should see MissingAuthPlugin | |
| 21:05:53 | efried | mriedem: But IMO safe_connect is still broken. | |
| 21:06:15 | mriedem | so we'll get https://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L77 | |
| 21:06:21 | mriedem | and nova-compute will be running and not reporting into placement | |
| 21:06:57 | dansmith | we shouldn't warn_limit that I think | |
| 21:07:04 | efried | mriedem: Yup, I believe that's right. You'll get that nag the first ten times (or whatever) and then it'll quit. | |
| 21:07:28 | efried | It's more broken than warn_limit can fix. | |
| 21:07:51 | efried | What's broken about it is that we don't raise an exception when it happens. We just let the decorated code continue. | |
| 21:08:08 | dansmith | yeah we should explode I think | |
| 21:08:14 | mriedem | well, for nova-compute sure | |
| 21:08:20 | mriedem | but for nova-api in rocky no | |
| 21:08:38 | efried | If safe_connect was used extremely carefully - only in the outermost scope of whatever is calling into placement - then it would be less broken. | |