| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2022-09-08 | |||
| 10:18:06 | gibi | I also tend to forget that fact | |
| 10:26:30 | sean-k-mooney | its rare that that rebase succced but brakes something with out causing a merge conflict | |
| 10:26:39 | sean-k-mooney | so mostly it does not matter | |
| 10:34:04 | sean-k-mooney | gibi: they look fine, i rehecked the second patch as it failed due to a vm segfault | |
| 10:34:17 | gibi | ahh, thanks | |
| 11:25:29 | opendevreview | Merged openstack/nova master: Reproduce bug 1981813 in func env https://review.opendev.org/c/openstack/nova/+/849985 | |
| 12:04:02 | Uggla | gibi, looking at that comment. https://review.opendev.org/c/openstack/nova/+/833090/16/nova/compute/manager.py#3903 the idea is to get a regular list instead of a ShareMappingList. Is there another way to do that ? | |
| 12:47:08 | Uggla | gibi, forget ^ | |
| 14:51:50 | whoami-rajat | stephenfin, hey, would it still be viable to get this merged? the nova and novaclient changes have merged https://review.opendev.org/c/openstack/python-openstackclient/+/831014 | |
| 15:09:18 | stephenfin | whoami-rajat: Sure. It won't be in the initial Zed release but we can backport. Bit of work needed on it though. | |
| 15:34:52 | whoami-rajat | stephenfin, ack, one question, do you mean place it above the --hostname or below it? https://review.opendev.org/c/openstack/python-openstackclient/+/831014/5/openstackclient/compute/v2/server.py#3104 | |
| 15:35:06 | whoami-rajat | I think options are be in sequence of microversion? | |
| 16:12:08 | stephenfin | whoami-rajat: sorry, below | |
| 16:29:40 | whoami-rajat | stephenfin, ack, updated the patch, thanks | |
| 16:29:53 | stephenfin | I just replied :) | |
| 16:30:21 | stephenfin | --confirm-reimage just isn't descriptive enough, IMO, and we generally need pairs for boolean options | |
| 16:43:31 | stephenfin | whoami-rajat: and I left a few more comments on there in reply | |
| 16:46:05 | whoami-rajat | stephenfin, I left a comment midway of your comment mentioning a case where the else would not be appropriate | |
| 16:46:22 | whoami-rajat | stephenfin, so we do allow rebuilding volume backed instance if the old and new image is same | |
| 16:46:38 | whoami-rajat | and if we don't put the elif microversion >=2.91 that case would fail | |
| 16:47:09 | whoami-rajat | will address the other ones | |
| 16:49:21 | stephenfin | so if I call 'openstack server rebuild --image $IMAGE $SERVER' and $IMAGE happens to be the same image that was originally used, it will pass? | |
| 16:49:46 | stephenfin | whoami-rajat: ^ | |
| 16:50:53 | whoami-rajat | stephenfin, yes, it should, the nova side allows it | |
| 16:50:57 | whoami-rajat | at least | |
| 16:51:18 | stephenfin | that feels super janky :-D | |
| 16:52:08 | stephenfin | aren't you effectively preventing that on newer microversions with this change? | |
| 16:53:00 | stephenfin | i.e. if someone was relying this previously, they wouldn't be able to do so with OS_COMPUTE_API_VERSION=2.93 or later unless they also passed '--rebuild-volume' ? | |
| 16:53:39 | stephenfin | perhaps we could have a temporary stop-gap measure before preventing it entirely client side | |
| 16:53:47 | stephenfin | if microversion >= 2.93; block outright | |
| 16:54:41 | stephenfin | if microversion < 2.93; warn that this is unsupported, that it will no longer be allowed in the future, and that nova will reject the request if the image is different from the one originally used, but allow the request to continue (for now) | |
| 16:55:44 | whoami-rajat | yeah but we have implemented a generic case to rebuild any type of volume backed instance, people would prefer that instead of the hacky thing we have had before | |
| 16:56:02 | whoami-rajat | if microversion >= 2.93; block outright: in this case we also block image backed instances | |
| 16:56:08 | whoami-rajat | which we don't want | |
| 16:56:55 | stephenfin | no, we keep the check for 'server.image is not None' | |
| 16:57:15 | whoami-rajat | ok | |
| 16:58:32 | whoami-rajat | I'm kind of confused with all the conditions ... | |
| 16:58:48 | stephenfin | sec, code is probably easier :) | |
| 16:58:53 | whoami-rajat | we've 1) confirm_reimage check 2) microversion check 3) image check | |
| 16:59:07 | whoami-rajat | yeah would be helpful that way :) | |
| 17:08:02 | stephenfin | whoami-rajat: https://paste.opendev.org/show/bpmNKNYMoKN736cxOa7e/ | |
| 17:10:10 | stephenfin | whoami-rajat: that should do the trick. Personally though, I'd really rethink the need for this. People know rebuild is a destructive operation and they'd have to opt-in to the new microversion to even take advantage of this | |
| 17:10:19 | stephenfin | I'm sure the cinder team have discussed this at length though | |
| 17:13:11 | whoami-rajat | I might be thinking too much but if a rebuild related MV is added in future, the first "if" case of the "else" case becomes invalid, Eg: we are passing 2.94 for rebuilding an image backed instance with a new field and this check will fail that operation | |
| 17:15:44 | whoami-rajat | stephenfin, ^ | |
| 17:15:53 | whoami-rajat | stephenfin, yeah the spec discussion has been going on for several releases (when I wasn't working on it) and the general comments from both nova and cinder side were to have an additional check | |
| 17:16:25 | sean-k-mooney | with specifci decenters | |
| 17:16:33 | sean-k-mooney | ie. i did not want the check in nova or the client | |
| 17:16:39 | sean-k-mooney | but i can live with it in the client | |
| 17:17:05 | sean-k-mooney | rebuild is ment to be distructive | |
| 17:17:13 | stephenfin | whoami-rajat: Oh yeah, I need to check if it's BFV in both branches of the else https://paste.opendev.org/show/bveR7gYr02CL4XLBbvVe/ | |
| 17:17:31 | sean-k-mooney | if we want to supporot the other useage we shoudl have explit way to do that that works for all vms not just bfv | |
| 17:17:56 | whoami-rajat | also a bootable volume can still exist when an instance is destroyed so it's kind of different from the rebuild we refer to for ephemeral cases, at least from a cinder perspective | |
| 17:18:33 | sean-k-mooney | form a nova persecvitve not really if you want to save the root data after a vm is delete just snapshot it | |
| 17:18:46 | sean-k-mooney | i dont coniser the nova root disk to be ephemeral | |
| 17:19:06 | sean-k-mooney | nova has a seperate thing called ephmearl disks in addtion to the root disk | |
| 17:19:49 | sean-k-mooney | nova vms by can have 4 types of storage at the same time | |
| 17:20:25 | sean-k-mooney | disk_gb is the root disk, ephemeral_gb is 0-n addtional disk, swap and cinder volumes | |
| 17:20:38 | whoami-rajat | stephenfin, that looks good, will update it | |
| 17:21:09 | sean-k-mooney | ah yes if server.image is None: | |
| 17:21:24 | sean-k-mooney | one slight optimisation | |
| 17:21:30 | sean-k-mooney | can you change the else and if | |
| 17:21:32 | sean-k-mooney | to an elif | |
| 17:22:39 | whoami-rajat | ack, don't have much insights in nova but cinder folks would be really angry without that check :D | |
| 17:22:47 | sean-k-mooney | https://paste.opendev.org/show/befzjPz2izxuGZtwr1Vs/ | |
| 17:23:39 | sean-k-mooney | whoami-rajat: as long as its not in nova im ok with it but i really hate that we allow the non distrutive case and am sad we have to support it | |
| 17:24:26 | sean-k-mooney | we cant change history but allowing the metadat to be updated via rebuidl to same image for BFV instance should not have been done | |
| 17:24:37 | stephenfin | sean-k-mooney: I usually avoid doing that to indicate that the two checks (microversion and "is it volume backed?" aren't totally related but that would be less nesting, yeah | |
| 17:25:19 | sean-k-mooney | honestly i dont mind etither way i guss | |
| 17:25:35 | sean-k-mooney | i just dislike wraping on 80 charters so avoid nesting if i can | |
| 17:26:02 | sean-k-mooney | in this case it does not matter as its only impacting the commnet | |
| 17:26:44 | stephenfin | true | |
| 17:26:54 | sean-k-mooney | whoami-rajat: stephenfin has the +2 rights so follw there prefernce on this | |
| 17:27:13 | stephenfin | for my own notes, attempting to rebuild a volume-backed server without --image fails currently | |
| 17:27:15 | stephenfin | 'str' object has no attribute 'get' | |
| 17:27:15 | stephenfin | ❯ openstack server rebuild test-server-bfv | |
| 17:27:43 | sean-k-mooney | that proably a bug | |
| 17:27:57 | stephenfin | 100% | |
| 17:27:57 | sean-k-mooney | since rebuild without an image specified is ment to default to same image | |
| 17:28:03 | stephenfin | in OSC | |
| 17:28:21 | sean-k-mooney | let me just check if in the api | |
| 17:28:25 | whoami-rajat | yeah, I kind of like stephenfin approach too, we can ignore saving one LOC for readability | |
| 17:28:46 | whoami-rajat | will update the patch | |
| 17:29:01 | sean-k-mooney | stephenfin: its not | |
| 17:29:06 | sean-k-mooney | well there is a osc bug | |
| 17:29:09 | sean-k-mooney | but image is required | |
| 17:29:13 | sean-k-mooney | in the api | |
| 17:29:24 | sean-k-mooney | https://docs.openstack.org/api-ref/compute/?expanded=rebuild-server-rebuild-action-detail#rebuild-server-rebuild-action | |
| 17:29:40 | sean-k-mooney | stephenfin: so in osc image should be required | |
| 17:29:59 | sean-k-mooney | unless this was implemted in osc /nova client | |
| 17:30:04 | stephenfin | yeah, it was | |
| 17:30:10 | sean-k-mooney | ah ok | |
| 17:30:13 | stephenfin | if you don't specify it, we use the same image | |
| 17:30:21 | sean-k-mooney | right but that is client side | |
| 17:30:29 | stephenfin | which is why you're used to that behaviour, I guess | |
| 17:30:31 | stephenfin | sean-k-mooney: yup | |
| 17:30:38 | sean-k-mooney | ack | |
| 17:31:38 | stephenfin | whoami-rajat: one point: annoyingly either nova or novaclient returns the empty string if the server is volume-backed, so that 'if server.image is None' needs to be simply 'if not server.image' :( | |
| 17:32:20 | stephenfin | https://paste.opendev.org/show/bcl82mF5NEjC4T1uhbnu/ | |
| 17:32:30 | stephenfin | yeah, it's nova itself. Ugh | |