Earlier  
Posted Nick Remark
#openstack-nova - 2017-03-16
15:28:28 mriedem there doesn't seem to be much they're not willing to do in their company
15:28:29 mdbooth Not during rollback_at_destination
15:28:31 mriedem mdbooth: ^
15:28:48 mdbooth mriedem: Hehe.
15:30:42 mdbooth lyarwood: Sorry, yes. instance.host *will* be the source. I didn't read you right there.
15:30:56 mdbooth However, it's executing on the destination, which is the problem.
15:31:11 mdbooth self.compute_rpcapi.remove_volume_connection(
15:31:11 mdbooth context, instance, bdm.volume_id, dest)
15:31:20 mdbooth In _rollback_live_migration
15:31:25 lyarwood mdbooth: haha right, I just couldn't find the instance.host update
15:31:43 mdbooth So CONF.host != instance.host
15:31:52 mdbooth BUT, we still need to tear it down
15:32:07 mdbooth So I feel like that's the sort of logic that lives in ComputeManager
15:32:12 lyarwood well, we are going to call destroy that's going to do that anyway
15:32:37 lyarwood but sure, I get your point
15:33:53 lyarwood mriedem / johnthetubaguy ; if you have anytime before the cinder meeting the uuid and attachment_id change could really use core review - https://review.openstack.org/#/q/topic:bp/cinder-new-attach-apis & https://review.openstack.org/#/q/status:open+project:openstack/nova+branch:master+topic:bug/1489581
15:34:01 mriedem dansmith: sdague: melwitt: can we get https://review.openstack.org/#/c/444106/ and the test patch below it in so we can move forward with the backport? it would also help ironic ci that is failing on this.
15:34:02 bauzas dansmith: have you seen my comment on archive_deleted_rows ?
15:34:18 mriedem lyarwood: ok, i meant to go through those again today
15:34:23 dansmith bauzas: you said you didn't think you could use it, but didn't say why (or that I saw)
15:34:39 bauzas dansmith: because the logic in there is looping over the cell DB tables
15:34:46 dansmith bauzas: obviously some refactoring will be needed, but I just would like to avoid having to add yet another command to run cleanup
15:34:56 dansmith mriedem: yeah
15:34:57 bauzas to push them in their shadow one
15:35:23 mdbooth lyarwood: In case you didn't notice, I thought the problem in _from_db_object() here was pretty severe: https://review.openstack.org/#/c/242603/23/nova/objects/block_device.py
15:35:30 bauzas dansmith: the main point is that we provide the number of rows per table archived
15:36:01 dansmith bauzas: not per table, but that applies to the thing we need to do in reqspec too right?
15:36:12 bauzas dansmith: so I should say how many rows for the request_spec table are 'archived', ie. killed?
15:36:25 bauzas dansmith: nope, this is per table AFAICS
15:36:37 bauzas you return either 0 or 1
15:36:38 openstackgerrit Moshe Levi proposed openstack/os-vif master: HW offload support for openvswitch https://review.openstack.org/398277
15:36:38 dansmith bauzas: in fact, you have to look at the cell dbs to know what you can remove from reqspec, right?
15:36:39 sdague mriedem: ... once I finish updating the limits spec
15:36:46 openstackgerrit Matt Riedemann proposed openstack/nova master: libvirt: add debug logging in detach_device_with_retry https://review.openstack.org/446601
15:36:47 mriedem lyarwood: ^ is the debug patch for detach
15:37:00 bauzas but the verbose prints that
15:37:11 dansmith bauzas: are you talking about the parameter or what gets printed?
15:37:16 bauzas dansmith: what's printed
15:37:24 lyarwood mdbooth: yeah sorry I did miss that, are you sure that doesn't result in a save straight away?
15:37:38 bauzas dansmith: for looking at which record to remove, I was rather thinking on looking at InstanceMapping
15:37:39 mdbooth lyarwood: If it does, I don't know how
15:37:46 bauzas oh wait
15:37:54 dansmith bauzas: you need to purge those too
15:37:57 bauzas dansmith: we don't remove yet also InstanceMapping records?
15:38:02 bauzas a-ha, yeah
15:38:13 dansmith we don't in the case of soft delete, but otherwise we do
15:38:19 bauzas erf
15:38:30 bauzas okay, then I need to look at all the cells, yeah
15:38:50 bauzas I should also purging the instance_mappings too then
15:38:56 lyarwood mdbooth: ah I might be mixing this up with the driver_bdm dict updates that result in a save
15:39:04 bauzas well, okay, I'll see what I can do to use the same command
15:40:12 mdbooth lyarwood: Also, in the previous patch I didn't like the unnecessary argument type ambiguity. But I think I was ok with everything else.
15:44:04 lyarwood mdbooth: the uuid vs bdm_uuid issue?
15:44:12 mdbooth lyarwood: No, just a sec
15:44:40 lyarwood mdbooth: ah the cellv1 values thing
15:44:54 mdbooth https://review.openstack.org/#/c/242602/22/nova/db/sqlalchemy/api.py
15:45:03 mdbooth block_device_mapping_update
15:45:47 mdbooth The caller has full context, and there are multiple ways to pass it in unambiguously
15:46:32 lyarwood mdbooth: right and at the moment that's always the id so we can just drop this for now
15:47:05 mdbooth Well then you'd have to drop the change in update_or_create
15:47:52 mdbooth It shouldn't be a complex fix.
15:48:09 lyarwood ah yeah got it
15:48:30 dansmith bauzas: remind me, we don't delete reqspec at all right now, but will in the case of non-soft delete soon right?
15:48:47 dansmith bauzas: so this command will really only be needed if operators have soft delete enabled, right?
15:49:02 bauzas dansmith: yup, we don't delete the spec yety
15:49:45 bauzas dansmith: if someone hard-deletes an instance (ie. the instance now longer exists), then we should purge the entry
15:49:52 mriedem mdbooth: lyarwood: in case you haven't noticed yet, the original patches to add bdm.uuid were for a cellsv1 race issue where update_or_create happened at the api cell and things got racey and crazy,
15:50:05 mriedem mdbooth: lyarwood: so that's why there is the update_or_create stuff
15:50:08 dansmith bauzas: you're saying you will soon delete reqspec at normal instance delete time, yes?
15:50:09 bauzas dansmith: tbc, I was planning to iterate over all the spec records, and lookup over all cells to see if some instance exists
15:50:18 bauzas for the purge command
15:50:31 dansmith not talking about purge, I'm talking about normal api delete..
15:50:35 mriedem mdbooth: lyarwood: but i believe that update_or_create is also still called from the compute api (and/or conductor now) when creating the bdms
15:50:49 bauzas dansmith: ah, that, I wasn't planning to introduce it given mriedem's point
15:50:59 dansmith bauzas: his point about what?
15:51:16 bauzas dansmith: the fact that we shouldn't delete the spec record in case this is an instance soft-delete
15:51:19 mdbooth mriedem: IIRC that's correct. The cellsv1 caller was unique in that it passed in a versioned object instead of a list of update values, though.
15:51:27 bauzas dansmith: https://review.openstack.org/#/c/391060/2/nova/compute/api.py@1804
15:51:54 dansmith bauzas: right but assuming like 1% of people use soft delete, we should do the right thing in the 99% case and only require people that use soft-delete to have to worry about this purge
15:52:01 dansmith I dunno what percentage do use it, but we should always delete if we know we can
15:52:16 bauzas dansmith: so, I could just verify if it's a soft-delete ?
15:52:42 bauzas dansmith: and if it's not a soft-delete, then call the _delete_req_spec method?
15:52:57 dansmith bauzas: yeah, of course, I'm not sure why we wouldn't
15:53:00 bauzas lemme verify, but delete_type seems the good argument for verify it
15:53:37 bauzas dansmith: honestly, purging using the archive command would be super-expensive
15:54:02 bauzas because I need to iterate over all the spec records, and then iterate over all cells for each record, so o(n2)
15:54:03 dansmith bauzas: further, in the purge command, it's going to be very intensive to compare all the current reqspecs with all the deleted=1 instances in a cell, so I think you should just do the api-db purge when you archive an instance row, which will be much more efficient.
15:54:09 dansmith bauzas: yeah, that's completely not okay
15:54:34 dansmith bauzas: doing the purge inside archive_deleted_rows is the only place you can do it efficiently
15:54:47 dansmith a separate purge command will have to do it O(n^2)
15:55:08 bauzas yeah, sorry my keybord doesn't ² :p
15:55:19 dansmith a separate purge command will not be able to effectively determine which deleted instances already have a purged api-db record,
15:55:21 dansmith which makes it expensive
15:55:26 dansmith and after you archive, it's too late
15:55:37 bauzas dansmith: correct me if I'm wrong, but archive_deleted_rows isn't yet cells-aware ?
15:55:40 dansmith but if you do it when you archive, then you can do it in O(n) just like archive is now
15:56:03 mdbooth lyarwood: On locking, I think that everything in api which checks instance/task state should be required to immediately and atomically modify task state. That's probably the level of locking required for rebuild.
15:56:07 dansmith bauzas: what does it matter if it is? whether you're doing one cell db or all of them, it's the same amount of work
15:56:07 mriedem bauzas: the delete_type arg is what tells you the type,
15:56:15 mriedem "soft_delete" or just "delete"

Earlier   Later