Earlier  
Posted Nick Remark
#openstack-nova - 2021-12-07
16:56:29 bauzas this one, I'm OK with a specless BP
16:56:30 bauzas but,
16:56:39 bauzas "We should also implement the possibility to retrieve deleted instance actions as we do for instances." seems like an API change, right?
16:57:22 sean-k-mooney pslestang: so just to be clear the meaning of soft delete upstream is the row is kept in the db but marked as delete
16:57:40 sean-k-mooney so that it can be mared as not deleted again later
16:57:40 pslestang bauzas: I did not dive into the API so need to be checked
16:57:46 pslestang sean-k-mooney: yes
16:57:58 bauzas are we sure that instance-actions table is soft-deletable already ?
16:58:15 sean-k-mooney i tought it was
16:58:24 bauzas I dunno, hence my question
16:58:31 pslestang bauzas: yes it is
16:58:33 bauzas if yes, looks like a config option setting
16:58:35 sean-k-mooney so that if we resotred a soft deleted instance its action woudl be preserved
16:58:44 bauzas if no, this is a db change hence a spec required
16:59:00 sean-k-mooney pslestang: so today we shoudl be soft deleting them already
16:59:03 pslestang the instance_actions table is soft-deletable
16:59:15 sean-k-mooney and the new config option you would instead hard delete them
16:59:32 bauzas sean-k-mooney: yeah I'm assuming we would mark the records soft-deleted in the DB and we would also unmark them when undeleting
16:59:47 bauzas actually, we're at time
16:59:54 bauzas but we can continue off the meeting
17:00:09 bauzas #endmeeting
17:00:09 opendevmeet Meeting ended Tue Dec 7 17:00:09 2021 UTC. Information about MeetBot at http://wiki.debian.org/MeetBot . (v 0.1.4)
17:00:09 opendevmeet Minutes: https://meetings.opendev.org/meetings/nova/2021/nova.2021-12-07-16.00.html
17:00:09 opendevmeet Minutes (text): https://meetings.opendev.org/meetings/nova/2021/nova.2021-12-07-16.00.txt
17:00:09 opendevmeet Log: https://meetings.opendev.org/meetings/nova/2021/nova.2021-12-07-16.00.log.html
17:00:15 gibi I think there is a reason to keep the actions visible after the instance is deleted
17:00:28 lyarwood fun, I did have another topic
17:00:32 lyarwood A quick heads for upstream folks who might not be aware, I'll be stepping away from OpenStack in the new year from ~Jan 28th, moving to a different project within Red Hat. My focus until then is to close out the various open specs, bugfixes etc that I currently have.
17:00:34 pslestang sean-k-mooney: today when we soft-delete an instance instance actions are not soft-deleted (I suppose to let the operator have an history on a deleted instane)
17:00:56 gibi lyarwood: I will miss you!
17:01:04 gibi lyarwood: but good luck!
17:01:08 elodilles lyarwood: :-o
17:01:15 lyarwood gibi: thanks
17:01:16 gibi and let me know if help needed to close up things
17:01:22 sean-k-mooney pslestang: ah ok then i think that might be a bug then
17:01:28 bauzas lyarwood: sorry, I stopped the meeting on time given i didn't see any other item
17:01:40 sean-k-mooney pslestang: we should keep the records in the db for auit use until they are archived
17:01:41 lyarwood oh I'll be chasing for reviews don't worry about that gibi :)
17:01:56 lyarwood bauzas: yeah np I didn't post it in the agenda
17:01:59 elodilles lyarwood: same as gibi says: will miss you (especially at stable team!) :(
17:02:05 gmann lyarwood: ohh. it is great help from you in many areas not just nova where we all will miss your contribution.
17:02:09 pslestang sean-k-mooney: agree with that
17:02:13 elodilles lyarwood: good luck with the new position!
17:02:14 bauzas pslestang: sean-k-mooney: I think instance actions be kept when soft-delete isn't a bug but rather made on purpose
17:02:40 lyarwood gmann / elodilles ; thanks both
17:02:41 sean-k-mooney bauzas: pslestang i belive is reproting that currently they are not kept
17:02:42 gibi pslestang, sean-k-mooney: I need the instance actions to remind me that I deleted my instance yesterday hence not finding it
17:02:48 bauzas but I'm not opposed to let operators define this behaviour as opt-out
17:03:21 bauzas pslestang: can you then clarify ?
17:03:23 sean-k-mooney gibi: right so my expection is that the instacne action woudl remain until we do archive-delete-rows or whatever that is called
17:03:24 gmann what is purpose of disabling it via config instead just ignore that action record if not needed ?
17:03:38 sean-k-mooney so that we could retrive them for deleted instance to see who deleted them
17:04:02 bauzas gmann: good question, what's the use case ?
17:04:11 gibi I need to drop, but I will read back tomorrow
17:04:15 bauzas not letting the instance action appearing at the API level ?
17:04:30 bauzas but given you need an instance UUID, I don't get the problem
17:04:42 sean-k-mooney bauzas: you can list delete instanes
17:04:46 sean-k-mooney to get the uuid
17:05:04 bauzas sure, and then you can get the instance actions of that deleted UUID
17:05:09 bauzas which is expected behaviour
17:05:13 sean-k-mooney but pslestang can you confrim when you delete an instance today are the isntance actions deleted from the db
17:05:20 bauzas in order to know why this disappeared
17:05:34 gmann yeah
17:05:40 pslestang the use case is to have the table uniformly soft-deleted because we use a custom tool to archive the data
17:06:12 sean-k-mooney bauzas: i think pslestang is suggeting that is not what happens today
17:06:21 sean-k-mooney pslestang: yes i think i have seen your tool
17:06:29 sean-k-mooney its now in the ops tools repo right
17:06:37 bauzas again, what's the current behaviour ?
17:06:40 pslestang sean-k-mooney: it should be I guess
17:06:56 sean-k-mooney pslestang: i tought ye upstreamed it recently into one of the opendev repos
17:07:06 sean-k-mooney i rembere a mail thread about it
17:07:09 pslestang the current behaviour is: on instance soft delete, instance actions are not soft deleted
17:07:44 sean-k-mooney pslestang: the db rows in the instance action table are deleted? or just not marked as deleted
17:07:45 pslestang when running nova db-archive, all the data ar copied into shadow table
17:08:07 bauzas that
17:08:21 pslestang sean-k-mooney: the db rows in the instance action table are not marked as deleted
17:08:26 bauzas OK, that's then expected behavioour and not a bug
17:08:41 sean-k-mooney ok and you just want them to be marked as deleted when the new config opiton is set
17:08:49 bauzas given the records aren't marked as soft-deleted, you can retrieve them thru the API
17:09:07 bauzas sean-k-mooney: yeah he wants the records to not be showable
17:09:12 sean-k-mooney yes you should be able too
17:09:19 pslestang and on nova db purge the data are remove from sahdow table and there is a if in the code for instance action to rely on updated_at instead of deleted_at
17:09:35 pslestang sean-k-mooney: yes that's it
17:09:40 bauzas he prefers data consistency over API
17:10:02 pslestang bauzas: exact
17:10:10 bauzas well, 'he' being OVH, not pslestang I guess :)
17:10:21 sean-k-mooney well its not really a consitency issue
17:10:33 sean-k-mooney they are two differnece reseoucces
17:10:40 sean-k-mooney the instnace and the instnace actions
17:10:51 bauzas pslestang: do you understand that you won't be able to investigate an instance deletion thru the API if you mark the action records as soft-deleted ?
17:10:55 sean-k-mooney the sate of the instnace does not modify the sate of the actions
17:11:01 bauzas sean-k-mooney: agreed
17:11:12 bauzas sean-k-mooney: this is two different models but,
17:11:20 bauzas OVH wants their script to be simplier
17:11:24 sean-k-mooney bauzas: the way around that would be to extend the api to allow a --delete
17:11:29 sean-k-mooney like we do for instnace list
17:11:34 sean-k-mooney in a new microverion
17:11:51 pslestang bauzas: yes we know but this is also the point you mention earlier to be able to retrieve instance action for a deleted instance
17:11:53 bauzas sean-k-mooney: that's exactly why I said in the meeting that I'm opposed to this be a specless BP if we touch the API
17:12:15 bauzas the scope of this BP needs to be clarified

Earlier   Later