)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The flow of the operation is as follows:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"1) Detach the volume"},{"line_number":17,"context_line":"2) Create an empty attachment"},{"line_number":18,"context_line":"3) Request cinder to reimage the volume"},{"line_number":19,"context_line":"4) Wait for cinder to notify success to nova (via external events)"},{"line_number":20,"context_line":"5) Update and complete the attachment"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"e895cbcd_b1aa7cf7","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":29},"updated":"2022-08-26 13:24:08.000000000","message":"I guess we creating an empty attachment to keep the volume reserved. But then the order should be new attachment then detach to avoid a race window when the volume is not reserved.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The flow of the operation is as follows:"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"1) Detach the volume"},{"line_number":17,"context_line":"2) Create an empty attachment"},{"line_number":18,"context_line":"3) Request cinder to reimage the volume"},{"line_number":19,"context_line":"4) Wait for cinder to notify success to nova (via external events)"},{"line_number":20,"context_line":"5) Update and complete the attachment"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"d981c76e_82f4803f","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":29},"in_reply_to":"e895cbcd_b1aa7cf7","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"be6be33dfd51ba55828499d40492d7798d2991f6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"484ae17f_a362b413","updated":"2022-02-04 16:19:10.000000000","message":"I talked through most of this with Rajat on IRC, but documenting here.","commit_id":"abbbd1b1707bf5b5c285d8b5038c333465c21609"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"bf377d30a9ef8dd526ec562e215d8a948c0f550b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"15d04250_276d7e3a","updated":"2022-02-22 08:17:46.000000000","message":"Thanks Dan for the help again!","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"726795e5cb4c70cd0f31b0ca2879547356b9381e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"f77fce8b_e7cd44e8","updated":"2022-02-18 18:35:53.000000000","message":"Thanks Dan for the review.","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"5876e4a4_0a9de0bd","updated":"2022-02-22 20:06:27.000000000","message":"This is looking pretty good, and pretty awesome that it can be so simple for the actual rebuild stuff in compute manager.\n\nI definitely want to see the tempest test proposed and running before I would +2. My understanding is that it\u0027s all tested manually, which is cool, but we should have a tempest test at least available before we mere, IMHO (per the spec also).\n\nI dunno about other reviewers, but this seems like a whole lot of change for a single patch, even though it\u0027s not super large in total size. Seems like it could easily be broken into at least \"add the new event\", \"add the volume client support and test\" and \"implement the rebuild\".\n\nNote that I haven\u0027t audited all the code here for test coverage yet, other than the obviously-missing new volume client one.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"f913e212_e621fda3","updated":"2022-02-23 11:41:17.000000000","message":"Thanks Dan for the review.","commit_id":"ce635d33980409d4716923ae91190085833c5908"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f4b92b3310dee2af9598f108dc761f7fabafd34a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"4513e82d_421738df","updated":"2022-02-23 15:14:45.000000000","message":"Just quickly glanded to this change but indeed I agree with Dan, you should split it by at least two patches : one for adding the new event and one for creating the new microversion.\n\nThis way, if we have problems with the event one, we can just fix it simplity without touching the API microversion and if also we merge a new microversion before this one, you could just need to rebase the microversion patch without touching the event one.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"acddfe310dab3880746850e1598e55ac334a231f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"be410adb_1330f3ae","updated":"2022-02-23 18:22:33.000000000","message":"Sorry, I guess I totally brainfarted on the fact that we\u0027ve been doing microversions for new event names. That event name was always supposed to be pretty lightweight, along with the tag, as it could be used by only a specific virt driver (like the ironic power state one) so enforcement at the API layer is only so useful. But, we\u0027ve clearly been doing it.\n\nI think this is really large in terms of how much it changes all over nova in a single go, and would like to see it split, but I guess avoiding the need to burn a microversion on it makes it less compelling.\n\nWe could certainly do the compute/api and compute/manager plumbing in a first patch, and then have a slim API patch that adds the microversion, the event to the schema, and the option in the rebuild request. The latter becomes the \"enable\" patch.\n\nActually, now that I think about it, maybe that\u0027s the split that Sylvain was suggesting? If so, that seems good.\n\nRajat, I\u0027d say get this monolithic one updated with the latest comments, and I can help with the split tomorrow after Sylvain circles back around.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"47577701d3a9dd907e6950d81fe81cb603152666","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"3a3aaa89_85841233","updated":"2022-02-23 20:39:07.000000000","message":"Thanks Dan for the review.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"47577701d3a9dd907e6950d81fe81cb603152666","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"2699ba40_4b0b0a02","in_reply_to":"be410adb_1330f3ae","updated":"2022-02-23 20:39:07.000000000","message":"Ack","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8472209eb49b9df038fbed889fc6cc453840dc33","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"1c44fd0f_00bf7da9","updated":"2022-02-24 17:55:05.000000000","message":"In splitting this apart, I discovered a bug, which is a good reason for doing this plumbing vs. API split. The manager code will run for all volume-backed instances, not just those rebuilt using the new API version with the new flag. That will be surprising as the volume will get reimaged, unexpectedly. Presumably that\u0027s also the case when the new API is used, but the flag to rebuild the root volume is set to False. So we\u0027ll need to resolve that in some way.\n\nI\u0027m going to push up the split here in a few and then we can work from there.","commit_id":"a23f11d660d6eb310873eee5b5ea77b4f784507a"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"4e0c9d7be65065a2970fd1197f19ea4b5e1d8a87","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"7c3f8d17_bfb0496f","updated":"2022-02-24 14:46:14.000000000","message":"recheck\n\nthis time nova-multi-cell failed, ssh timeout\n\n  File \"/opt/stack/tempest/tempest/lib/common/ssh.py\", line 150, in _get_ssh_connection\n    raise exceptions.SSHTimeout(host\u003dself.host,\ntempest.lib.exceptions.SSHTimeout: Connection to the 172.24.5.16 via SSH timed out.\nUser: cirros, Password: password\n","commit_id":"a23f11d660d6eb310873eee5b5ea77b4f784507a"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"0f8f32b5fffba1e5ab4b1c062be84def5d554da1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"6b8c7666_484f19ba","updated":"2022-02-24 07:36:50.000000000","message":"recheck\n\nunrelated failure in nova-ceph-multistore\n\n  File \"/opt/stack/tempest/tempest/lib/services/identity/v3/token_client.py\", line 172, in request\n    raise exceptions.IdentityError(\ntempest.lib.exceptions.IdentityError: Got identity error\nDetails: Unexpected status code 500","commit_id":"a23f11d660d6eb310873eee5b5ea77b4f784507a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef5f62711851265fa22f1c17b66899ffc1cb7a47","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"4038d4f0_1d714de8","updated":"2022-02-25 20:01:51.000000000","message":"This is missing a bunch of the RPC plumbing. It might be in the next patch (going there next) but it needs to be in this one, since this is where the interface is changed.","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e03f437f4d5891e7c038539323fe94ce119a6cbc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"d9d2d387_7295fe56","updated":"2022-02-28 03:59:31.000000000","message":"Thanks Dan","commit_id":"1a3c7a6cd060b8db643baafe9dad6ab42377b6ba"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"76733dcf4d1420d2619634d1203d1d4002b24ae1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"ef75a382_978d3488","updated":"2022-02-28 17:10:50.000000000","message":"I still think we need to remove the \"or 0\" image size hack, as it would only make worse a situation where we got such an image. We probably need better checks in the rebuild API side that makes sure an image is suitable, but we shouldn\u0027t paper over an unsuitable zero-sized or size\u003dNone image deep in these layers, IMHO.","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"1825c165_47920b8f","updated":"2022-03-23 11:00:09.000000000","message":"Thanks Dan","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"c827844b_afa49f61","updated":"2022-03-21 14:37:54.000000000","message":"This is pretty close. Just some nits and a few things to fix up.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4a29b706845e829080288d5596af42bc449e1d3c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":32,"id":"c6081dbc_b802f1d3","updated":"2022-08-26 13:58:22.000000000","message":"Thanks sean and gibi for reviewing. Some of the comments here are probably doable in a follow-up, but the correctness ones are important for sure. Rajat are you likely to be able to get this revised before the deadline?","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"23af9a50_765b57b1","updated":"2022-08-29 08:52:33.000000000","message":"I have nothing that cannot be handled in a follow up. The func test failures are coming from the parent patch. But the unit test failures seems to be relevant for this patch. I\u0027m only -1 for the unit tests.","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"9e09fff1_40d3af21","updated":"2022-08-26 20:59:49.000000000","message":"Thanks Sean, Dan and Gibi for the reviews.","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"da45059c0241d6d8c9a8ee7a4b80129ea24d2e3d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":36,"id":"9bac9e2a_8b3ab2aa","updated":"2022-08-30 08:51:50.000000000","message":"Looks good to me","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f2b2fe098afd71da7815ebf185048b067791ef39","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":36,"id":"afd41f31_4f76afe8","updated":"2022-08-31 10:02:51.000000000","message":"Ship has sailed and I won\u0027t -1 for a doc nit, but we should amend the documentation once we provide the support in the API.","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1974d53bc454ec2efb0b6bbd69164435e34b6d1a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":36,"id":"65537b10_fb0980bb","updated":"2022-08-29 21:28:30.000000000","message":"recheck unrelated live migration fail","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3efae051b0ea17e93101c2c146b15935ff7c0a0e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"bce47f1b_4046e0ba","updated":"2022-08-31 20:14:49.000000000","message":"recheck\n\nhttps://review.opendev.org/c/openstack/nova/+/855378 merged","commit_id":"30aab9c234035b49c7e2cdc940f624a63eeffc1b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ba27094a54075ac229a069b86bac84ba9395bcbf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"35b85f17_300c7770","updated":"2022-09-01 04:00:14.000000000","message":"recheck\n\nnova-ceph-multistore timed out","commit_id":"30aab9c234035b49c7e2cdc940f624a63eeffc1b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"9d42eb3a6529cb0a875b52b099c2824418e629ff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"5da5394a_c78ae132","updated":"2022-08-31 16:41:37.000000000","message":"recheck\n\nnova-multi-cell seems to be failing a lot\nfailure in test test_unshelve_to_specific_host","commit_id":"30aab9c234035b49c7e2cdc940f624a63eeffc1b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bd4cc1dd2692326354240cd5b7e1b61d90fb842f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":37,"id":"74639c24_a1db2520","updated":"2022-08-31 14:02:50.000000000","message":"recheck unshelve failure","commit_id":"30aab9c234035b49c7e2cdc940f624a63eeffc1b"}],"nova/compute/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":3568,"context_line":"                msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"},{"line_number":3569,"context_line":"                        \u0027volume-backed server.\u0027)"},{"line_number":3570,"context_line":"                raise exception.ImageUnacceptable("},{"line_number":3571,"context_line":"                    image_id\u003dimage_href, reason\u003dmsg)"},{"line_number":3572,"context_line":"        else:"},{"line_number":3573,"context_line":"            orig_image_ref \u003d instance.image_ref"},{"line_number":3574,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fe0d1d29_64766891","side":"PARENT","line":3571,"updated":"2022-02-22 20:06:27.000000000","message":"This is behavior that you\u0027re removing, which means you\u0027re changing the behavior of older microversions. I think your logic needs to be:\n\n if \u0027reimage_boot_volume\u0027 in kwargs:\n     if not kwargs[\u0027reimage_boot_volume\u0027]:\n         raise NovaException(\n             \u0027Volume-backed instances can not be rebuilt..\u0027)\n else:\n     raise ImageUnacceptable(\n         \u0027Unable to rebuild with a different image)","commit_id":"7670303aabe16d1d7c25e411d7bd413aee7fdcf3"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[{"line_number":3568,"context_line":"                msg \u003d _(\u0027Unable to rebuild with a different image for a \u0027"},{"line_number":3569,"context_line":"                        \u0027volume-backed server.\u0027)"},{"line_number":3570,"context_line":"                raise exception.ImageUnacceptable("},{"line_number":3571,"context_line":"                    image_id\u003dimage_href, reason\u003dmsg)"},{"line_number":3572,"context_line":"        else:"},{"line_number":3573,"context_line":"            orig_image_ref \u003d instance.image_ref"},{"line_number":3574,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"a8256772_6e7a9f2a","side":"PARENT","line":3571,"in_reply_to":"fe0d1d29_64766891","updated":"2022-02-23 11:41:17.000000000","message":"Done","commit_id":"7670303aabe16d1d7c25e411d7bd413aee7fdcf3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":3561,"context_line":"                # microversion and hasn\u0027t opted for rebuilding the volume"},{"line_number":3562,"context_line":"                # intentionally"},{"line_number":3563,"context_line":"                raise exception.NovaException("},{"line_number":3564,"context_line":"                    _(\u0027Volume-backed instance can\\\u0027t be rebuild until \u0027"},{"line_number":3565,"context_line":"                      \u0027\"reimage_boot_volume\" is passed as True.\u0027))"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"            volume \u003d self.volume_api.get(context, root_bdm.volume_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"8a1ade4c_b4619739","line":3564,"range":{"start_line":3564,"start_character":37,"end_line":3564,"end_character":69},"updated":"2022-02-22 20:06:27.000000000","message":"\"instances can\u0027t be rebuilt unless\"\n\nAlso, I\u0027d encourage you not to use the contraction, which makes it more clear and also doesn\u0027t require the escape. So,\n\n\"instances can not be rebuild unless\"","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[{"line_number":3561,"context_line":"                # microversion and hasn\u0027t opted for rebuilding the volume"},{"line_number":3562,"context_line":"                # intentionally"},{"line_number":3563,"context_line":"                raise exception.NovaException("},{"line_number":3564,"context_line":"                    _(\u0027Volume-backed instance can\\\u0027t be rebuild until \u0027"},{"line_number":3565,"context_line":"                      \u0027\"reimage_boot_volume\" is passed as True.\u0027))"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"            volume \u003d self.volume_api.get(context, root_bdm.volume_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"a0fb24d0_d174a7db","line":3564,"range":{"start_line":3564,"start_character":37,"end_line":3564,"end_character":69},"in_reply_to":"8a1ade4c_b4619739","updated":"2022-02-23 11:41:17.000000000","message":"Done","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":3562,"context_line":"                # intentionally"},{"line_number":3563,"context_line":"                raise exception.NovaException("},{"line_number":3564,"context_line":"                    _(\u0027Volume-backed instance can\\\u0027t be rebuild until \u0027"},{"line_number":3565,"context_line":"                      \u0027\"reimage_boot_volume\" is passed as True.\u0027))"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"            volume \u003d self.volume_api.get(context, root_bdm.volume_id)"},{"line_number":3568,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"}],"source_content_type":"text/x-python","patch_set":6,"id":"5c4ea62b_935f556e","line":3565,"range":{"start_line":3565,"start_character":45,"end_line":3565,"end_character":54},"updated":"2022-02-22 20:06:27.000000000","message":"I think I would remove \"is passed\" here.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[{"line_number":3562,"context_line":"                # intentionally"},{"line_number":3563,"context_line":"                raise exception.NovaException("},{"line_number":3564,"context_line":"                    _(\u0027Volume-backed instance can\\\u0027t be rebuild until \u0027"},{"line_number":3565,"context_line":"                      \u0027\"reimage_boot_volume\" is passed as True.\u0027))"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"            volume \u003d self.volume_api.get(context, root_bdm.volume_id)"},{"line_number":3568,"context_line":"            volume_image_metadata \u003d volume.get(\u0027volume_image_metadata\u0027, {})"}],"source_content_type":"text/x-python","patch_set":6,"id":"cb67aaea_ac1a4d6c","line":3565,"range":{"start_line":3565,"start_character":45,"end_line":3565,"end_character":54},"in_reply_to":"5c4ea62b_935f556e","updated":"2022-02-23 11:41:17.000000000","message":"Done","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":5671,"context_line":"                    cell_context, event.instance_uuid, inst_action,"},{"line_number":5672,"context_line":"                    want_result\u003dFalse)"},{"line_number":5673,"context_line":"            elif event.name \u003d\u003d \u0027volume-reimaged\u0027:"},{"line_number":5674,"context_line":"                pass"},{"line_number":5675,"context_line":""},{"line_number":5676,"context_line":"            for host in hosts_by_instance[event.instance_uuid]:"},{"line_number":5677,"context_line":"                events_by_host[host].append(event)"}],"source_content_type":"text/x-python","patch_set":6,"id":"b7695f34_726ebdb7","line":5674,"updated":"2022-02-22 20:06:27.000000000","message":"This is useless code that should be removed.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[{"line_number":5671,"context_line":"                    cell_context, event.instance_uuid, inst_action,"},{"line_number":5672,"context_line":"                    want_result\u003dFalse)"},{"line_number":5673,"context_line":"            elif event.name \u003d\u003d \u0027volume-reimaged\u0027:"},{"line_number":5674,"context_line":"                pass"},{"line_number":5675,"context_line":""},{"line_number":5676,"context_line":"            for host in hosts_by_instance[event.instance_uuid]:"},{"line_number":5677,"context_line":"                events_by_host[host].append(event)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bc511f22_56227085","line":5674,"in_reply_to":"b7695f34_726ebdb7","updated":"2022-02-23 11:41:17.000000000","message":"Done","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"}],"nova/compute/manager.py":[{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"50dd00d2ba87bd64abefff8e1d8b00cd054db5ec","unresolved":true,"context_lines":[{"line_number":10453,"context_line":"        connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":10454,"context_line":"        attachment \u003d self.volume_api.attachment_update("},{"line_number":10455,"context_line":"            context, bdm.attachment_id, connector, bdm.device_name)"},{"line_number":10456,"context_line":"        self.driver._connect_volume(context, attachment[\u0027connection_info\u0027],"},{"line_number":10457,"context_line":"                                    instance)"},{"line_number":10458,"context_line":"        self.volume_api.attachment_complete(context, attachment[\u0027id\u0027])"},{"line_number":10459,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"90b7dd77_0e1f97e7","line":10456,"range":{"start_line":10456,"start_character":8,"end_line":10456,"end_character":35},"updated":"2022-01-31 18:31:54.000000000","message":"this doesn\u0027t look right to me, calling libvirt driver\u0027s internal method in the manager but i couldn\u0027t find a better way to call it without adding a new method to libvirt and keeping the events code bounded to the manager, if a new method in libvirt driver is acceptable then i will go with that approach (also remember we are calling disconnect_volume before calling cinder on L#3306 so need a way to handle that as well). Any other thoughts on this appreciated.","commit_id":"b15bb5b557810aba29d04c13f077605cc89a878a"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"21bc89d6b4b231aa6b93e8218e2b5087c6e6d94c","unresolved":false,"context_lines":[{"line_number":10453,"context_line":"        connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":10454,"context_line":"        attachment \u003d self.volume_api.attachment_update("},{"line_number":10455,"context_line":"            context, bdm.attachment_id, connector, bdm.device_name)"},{"line_number":10456,"context_line":"        self.driver._connect_volume(context, attachment[\u0027connection_info\u0027],"},{"line_number":10457,"context_line":"                                    instance)"},{"line_number":10458,"context_line":"        self.volume_api.attachment_complete(context, attachment[\u0027id\u0027])"},{"line_number":10459,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"785cfdd0_f38ccf0f","line":10456,"range":{"start_line":10456,"start_character":8,"end_line":10456,"end_character":35},"in_reply_to":"90b7dd77_0e1f97e7","updated":"2022-02-22 19:22:35.000000000","message":"Done","commit_id":"b15bb5b557810aba29d04c13f077605cc89a878a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"be6be33dfd51ba55828499d40492d7798d2991f6","unresolved":true,"context_lines":[{"line_number":3304,"context_line":"            context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3305,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"},{"line_number":3306,"context_line":"        self.driver._disconnect_volume(context, old_connection_info,"},{"line_number":3307,"context_line":"                                       instance)"},{"line_number":3308,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3309,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3310,"context_line":"        root_bdm.attachment_id \u003d attachment_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"77b3a48f_0e629187","line":3307,"updated":"2022-02-04 16:19:10.000000000","message":"We already talked about this in IRC, but noting for posterity: you need to do something other than call libvirt\u0027s private method here. We have this:\n\nhttps://github.com/openstack/nova/blob/master/nova/virt/driver.py#L581\n\nWhich should do what you want, right? Even if you have to detach and reattach the volume with connection_info, it should be easy to do that in the synchronous pattern described below because you can hold the connection_info while you wait.\n\nYou\u0027re deleting the attachment underneath the volume anyway, so I think doing a full detach on the nova side before you delete the attachment on the cinder side is the right way anyway...","commit_id":"abbbd1b1707bf5b5c285d8b5038c333465c21609"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"726795e5cb4c70cd0f31b0ca2879547356b9381e","unresolved":false,"context_lines":[{"line_number":3304,"context_line":"            context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3305,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"},{"line_number":3306,"context_line":"        self.driver._disconnect_volume(context, old_connection_info,"},{"line_number":3307,"context_line":"                                       instance)"},{"line_number":3308,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3309,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3310,"context_line":"        root_bdm.attachment_id \u003d attachment_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"3614681f_dd53fc59","line":3307,"in_reply_to":"77b3a48f_0e629187","updated":"2022-02-18 18:35:53.000000000","message":"Done","commit_id":"abbbd1b1707bf5b5c285d8b5038c333465c21609"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"be6be33dfd51ba55828499d40492d7798d2991f6","unresolved":true,"context_lines":[{"line_number":3358,"context_line":"                context, instance, bdms)"},{"line_number":3359,"context_line":"            if is_volume_backed:"},{"line_number":3360,"context_line":"                self._rebuild_volume_backed_instance("},{"line_number":3361,"context_line":"                    context, instance, bdms, image_meta.id)"},{"line_number":3362,"context_line":""},{"line_number":3363,"context_line":"        instance.task_state \u003d task_states.REBUILD_BLOCK_DEVICE_MAPPING"},{"line_number":3364,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILDING])"}],"source_content_type":"text/x-python","patch_set":4,"id":"4a6204bf_ef80ab55","line":3361,"updated":"2022-02-04 16:19:10.000000000","message":"I think you actually want to use the synchronous event pattern here, as this is what it\u0027s designed to. You want to hold execution here until the rebuild is done on the cinder side, before you proceed down to the spawn() on L3373. This is similar to the network event case. So I think here you want something like:\n\n with wait_for_instance_event(...):\n     self._rebuild_volume_backed_instance(...)\n self._complete_reimage()\n\nNote that the wait can timeout and will raise or call a handler, which is what you want. That way if the reimage never succeeds or fails, you can do cleanup here. I suppose that timeout may have to be very long, but without one, you\u0027d have to leave the instance in semi-broken state forever. If you handle the timeout and leave the instance in ERROR state, then at least the user could retry the rebuild.","commit_id":"abbbd1b1707bf5b5c285d8b5038c333465c21609"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"726795e5cb4c70cd0f31b0ca2879547356b9381e","unresolved":false,"context_lines":[{"line_number":3358,"context_line":"                context, instance, bdms)"},{"line_number":3359,"context_line":"            if is_volume_backed:"},{"line_number":3360,"context_line":"                self._rebuild_volume_backed_instance("},{"line_number":3361,"context_line":"                    context, instance, bdms, image_meta.id)"},{"line_number":3362,"context_line":""},{"line_number":3363,"context_line":"        instance.task_state \u003d task_states.REBUILD_BLOCK_DEVICE_MAPPING"},{"line_number":3364,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILDING])"}],"source_content_type":"text/x-python","patch_set":4,"id":"c4b9aefd_1092aaf7","line":3361,"in_reply_to":"4a6204bf_ef80ab55","updated":"2022-02-18 18:35:53.000000000","message":"Done","commit_id":"abbbd1b1707bf5b5c285d8b5038c333465c21609"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"be6be33dfd51ba55828499d40492d7798d2991f6","unresolved":true,"context_lines":[{"line_number":10597,"context_line":"            elif event.name \u003d\u003d \u0027power-update\u0027:"},{"line_number":10598,"context_line":"                self.power_update(context, instance, event.tag)"},{"line_number":10599,"context_line":"            elif event.name \u003d\u003d \u0027volume-reimaged\u0027:"},{"line_number":10600,"context_line":"                self.complete_reimage(context, instance, event.tag)"},{"line_number":10601,"context_line":"            else:"},{"line_number":10602,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":10603,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"975444da_2fdc3982","line":10600,"updated":"2022-02-04 16:19:10.000000000","message":"Going with the synchronous pattern described above, you\u0027ll remove this async event handler code. If such an event lands here, you want to let it through to waiters, and log an error if nobody was waiting for it.","commit_id":"abbbd1b1707bf5b5c285d8b5038c333465c21609"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"726795e5cb4c70cd0f31b0ca2879547356b9381e","unresolved":false,"context_lines":[{"line_number":10597,"context_line":"            elif event.name \u003d\u003d \u0027power-update\u0027:"},{"line_number":10598,"context_line":"                self.power_update(context, instance, event.tag)"},{"line_number":10599,"context_line":"            elif event.name \u003d\u003d \u0027volume-reimaged\u0027:"},{"line_number":10600,"context_line":"                self.complete_reimage(context, instance, event.tag)"},{"line_number":10601,"context_line":"            else:"},{"line_number":10602,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":10603,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"a72e9787_45f41516","line":10600,"in_reply_to":"975444da_2fdc3982","updated":"2022-02-18 18:35:53.000000000","message":"Done","commit_id":"abbbd1b1707bf5b5c285d8b5038c333465c21609"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b9547bdb8d8fe2426c7b8b19ae8adf30fe5326af","unresolved":true,"context_lines":[{"line_number":3381,"context_line":"        instance.task_state \u003d task_states.REBUILD_BLOCK_DEVICE_MAPPING"},{"line_number":3382,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":3383,"context_line":""},{"line_number":3384,"context_line":"        new_block_device_info \u003d attach_block_devices(context, instance, bdms)"},{"line_number":3385,"context_line":""},{"line_number":3386,"context_line":"        instance.task_state \u003d task_states.REBUILD_SPAWNING"},{"line_number":3387,"context_line":"        instance.save("}],"source_content_type":"text/x-python","patch_set":5,"id":"639a48c9_72a88a53","line":3384,"updated":"2022-02-21 17:09:39.000000000","message":"I think this is where we setup the BDMs for the rebuild VM, so perhaps just updating the BDMs before this in your complete_* method will result in the correct thing being attached when the instance starts?","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"21bc89d6b4b231aa6b93e8218e2b5087c6e6d94c","unresolved":false,"context_lines":[{"line_number":3381,"context_line":"        instance.task_state \u003d task_states.REBUILD_BLOCK_DEVICE_MAPPING"},{"line_number":3382,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":3383,"context_line":""},{"line_number":3384,"context_line":"        new_block_device_info \u003d attach_block_devices(context, instance, bdms)"},{"line_number":3385,"context_line":""},{"line_number":3386,"context_line":"        instance.task_state \u003d task_states.REBUILD_SPAWNING"},{"line_number":3387,"context_line":"        instance.save("}],"source_content_type":"text/x-python","patch_set":5,"id":"3e2d6c21_36395438","line":3384,"in_reply_to":"61c13058_f474e01a","updated":"2022-02-22 19:22:35.000000000","message":"Done","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"bf377d30a9ef8dd526ec562e215d8a948c0f550b","unresolved":true,"context_lines":[{"line_number":3381,"context_line":"        instance.task_state \u003d task_states.REBUILD_BLOCK_DEVICE_MAPPING"},{"line_number":3382,"context_line":"        instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":3383,"context_line":""},{"line_number":3384,"context_line":"        new_block_device_info \u003d attach_block_devices(context, instance, bdms)"},{"line_number":3385,"context_line":""},{"line_number":3386,"context_line":"        instance.task_state \u003d task_states.REBUILD_SPAWNING"},{"line_number":3387,"context_line":"        instance.save("}],"source_content_type":"text/x-python","patch_set":5,"id":"61c13058_f474e01a","line":3384,"in_reply_to":"639a48c9_72a88a53","updated":"2022-02-22 08:17:46.000000000","message":"You\u0027re right. L#3318-3319 are setting the new attachment ID into the BDM and turns out the complete_image method is not required at all since attach_block_devices is already doing the same work for us. Will update in next PS. Thanks!","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"a7061248174dc543c2466666e7309c9a87aa8be6","unresolved":true,"context_lines":[{"line_number":10471,"context_line":"            connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":10472,"context_line":"            attachment \u003d self.volume_api.attachment_update("},{"line_number":10473,"context_line":"                context, bdm.attachment_id, connector, bdm.device_name)"},{"line_number":10474,"context_line":"            self.driver.attach_volume(context, attachment[\u0027connection_info\u0027],"},{"line_number":10475,"context_line":"                                      instance, bdm.device_name)"},{"line_number":10476,"context_line":"            self.volume_api.attachment_complete(context, attachment[\u0027id\u0027])"},{"line_number":10477,"context_line":"        except Exception as ex:"},{"line_number":10478,"context_line":"            LOG.warning(\u0027Reimage volume failed, \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"8ff502d0_45025717","line":10475,"range":{"start_line":10474,"start_character":0,"end_line":10475,"end_character":64},"updated":"2022-02-18 18:37:20.000000000","message":"This fails with the error instance not found. I think this should be executed after the instance is spawned","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"21bc89d6b4b231aa6b93e8218e2b5087c6e6d94c","unresolved":false,"context_lines":[{"line_number":10471,"context_line":"            connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":10472,"context_line":"            attachment \u003d self.volume_api.attachment_update("},{"line_number":10473,"context_line":"                context, bdm.attachment_id, connector, bdm.device_name)"},{"line_number":10474,"context_line":"            self.driver.attach_volume(context, attachment[\u0027connection_info\u0027],"},{"line_number":10475,"context_line":"                                      instance, bdm.device_name)"},{"line_number":10476,"context_line":"            self.volume_api.attachment_complete(context, attachment[\u0027id\u0027])"},{"line_number":10477,"context_line":"        except Exception as ex:"},{"line_number":10478,"context_line":"            LOG.warning(\u0027Reimage volume failed, \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"d3129dae_ed91e593","line":10475,"range":{"start_line":10474,"start_character":0,"end_line":10475,"end_character":64},"in_reply_to":"0c74d9ea_480b1abe","updated":"2022-02-22 19:22:35.000000000","message":"Done","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"bf377d30a9ef8dd526ec562e215d8a948c0f550b","unresolved":true,"context_lines":[{"line_number":10471,"context_line":"            connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":10472,"context_line":"            attachment \u003d self.volume_api.attachment_update("},{"line_number":10473,"context_line":"                context, bdm.attachment_id, connector, bdm.device_name)"},{"line_number":10474,"context_line":"            self.driver.attach_volume(context, attachment[\u0027connection_info\u0027],"},{"line_number":10475,"context_line":"                                      instance, bdm.device_name)"},{"line_number":10476,"context_line":"            self.volume_api.attachment_complete(context, attachment[\u0027id\u0027])"},{"line_number":10477,"context_line":"        except Exception as ex:"},{"line_number":10478,"context_line":"            LOG.warning(\u0027Reimage volume failed, \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"0c74d9ea_480b1abe","line":10475,"range":{"start_line":10474,"start_character":0,"end_line":10475,"end_character":64},"in_reply_to":"412479da_01f58daa","updated":"2022-02-22 08:17:46.000000000","message":"I\u0027m facing the following error\n\u003e /opt/stack/nova/nova/compute/manager.py(10475)complete_reimage()\n-\u003e self.driver.attach_volume(context, attachment[\u0027connection_info\u0027],\n(Pdb) \nnova.exception.InstanceNotFound: Instance 663c9481-0bf7-4dac-bef5-e5fbd0b3e476 could not be found.","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1046f82cc73b71015ded7352d5444ec8be056848","unresolved":true,"context_lines":[{"line_number":10471,"context_line":"            connector \u003d self.driver.get_volume_connector(instance)"},{"line_number":10472,"context_line":"            attachment \u003d self.volume_api.attachment_update("},{"line_number":10473,"context_line":"                context, bdm.attachment_id, connector, bdm.device_name)"},{"line_number":10474,"context_line":"            self.driver.attach_volume(context, attachment[\u0027connection_info\u0027],"},{"line_number":10475,"context_line":"                                      instance, bdm.device_name)"},{"line_number":10476,"context_line":"            self.volume_api.attachment_complete(context, attachment[\u0027id\u0027])"},{"line_number":10477,"context_line":"        except Exception as ex:"},{"line_number":10478,"context_line":"            LOG.warning(\u0027Reimage volume failed, \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"412479da_01f58daa","line":10475,"range":{"start_line":10474,"start_character":0,"end_line":10475,"end_character":64},"in_reply_to":"8ff502d0_45025717","updated":"2022-02-21 17:06:30.000000000","message":"The instance is already created by this point, so you shouldn\u0027t get an instance not found exception. Perhaps you mean \"domain\" or some other error?\n\nThis might be only used for attaching a volume at runtime and thus expects to be done on a *running* instance.","commit_id":"3cb5a0b1f6364bc37be9f7e5453cb804d3e558f0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":3307,"context_line":""},{"line_number":3308,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3309,"context_line":"                                        image_id):"},{"line_number":3310,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3311,"context_line":"        attachment_id \u003d self.volume_api.attachment_create("},{"line_number":3312,"context_line":"            context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3313,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"},{"line_number":3314,"context_line":"        self.driver.detach_volume(context, old_connection_info,"},{"line_number":3315,"context_line":"                                  instance, root_bdm.device_name)"},{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"}],"source_content_type":"text/x-python","patch_set":6,"id":"483a550c_f937e06a","line":3317,"range":{"start_line":3310,"start_character":0,"end_line":3317,"end_character":65},"updated":"2022-02-22 20:06:27.000000000","message":"Presumably these could all raise various exceptions, especially with the attachment_create call to cinder, and the detach_volume call to libvirt. Are these handled somewhere or will they end up with stack traces in the logs and broken state?","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[{"line_number":3307,"context_line":""},{"line_number":3308,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3309,"context_line":"                                        image_id):"},{"line_number":3310,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3311,"context_line":"        attachment_id \u003d self.volume_api.attachment_create("},{"line_number":3312,"context_line":"            context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3313,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"},{"line_number":3314,"context_line":"        self.driver.detach_volume(context, old_connection_info,"},{"line_number":3315,"context_line":"                                  instance, root_bdm.device_name)"},{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da74983b_19125c56","line":3317,"range":{"start_line":3310,"start_character":0,"end_line":3317,"end_character":65},"in_reply_to":"483a550c_f937e06a","updated":"2022-02-23 11:41:17.000000000","message":"I\u0027ve added the handling for detach_volume call to libvirt driver.\n\nThe attachment API calls are handled in the cinder.py file. Regarding the cleanup of attachment calls:\n1) If attachment_create fails, we don\u0027t need to do anything (since previous attachment exists)\n2) If attachment_delete fails, I\u0027ve added call to attachment_delete to remove the newly created attachment","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a816355afc2278e5fd7f66b60d94104936fff56c","unresolved":false,"context_lines":[{"line_number":3307,"context_line":""},{"line_number":3308,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3309,"context_line":"                                        image_id):"},{"line_number":3310,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3311,"context_line":"        attachment_id \u003d self.volume_api.attachment_create("},{"line_number":3312,"context_line":"            context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3313,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"},{"line_number":3314,"context_line":"        self.driver.detach_volume(context, old_connection_info,"},{"line_number":3315,"context_line":"                                  instance, root_bdm.device_name)"},{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"}],"source_content_type":"text/x-python","patch_set":6,"id":"89291c6c_4ba5debc","line":3317,"range":{"start_line":3310,"start_character":0,"end_line":3317,"end_character":65},"in_reply_to":"61f48820_61c081c0","updated":"2022-02-24 16:32:03.000000000","message":"Ack, I think we should try to avoid stack tracing, but it sounds like that happens elsewhere so at least raising the right exception allows us to do that consistently where it happens (separate from this of course).","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":false,"context_lines":[{"line_number":3307,"context_line":""},{"line_number":3308,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3309,"context_line":"                                        image_id):"},{"line_number":3310,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3311,"context_line":"        attachment_id \u003d self.volume_api.attachment_create("},{"line_number":3312,"context_line":"            context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3313,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"},{"line_number":3314,"context_line":"        self.driver.detach_volume(context, old_connection_info,"},{"line_number":3315,"context_line":"                                  instance, root_bdm.device_name)"},{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"}],"source_content_type":"text/x-python","patch_set":6,"id":"dd3441e3_f1c81916","line":3317,"range":{"start_line":3310,"start_character":0,"end_line":3317,"end_character":65},"in_reply_to":"da74983b_19125c56","updated":"2022-02-23 15:02:05.000000000","message":"\u003e I\u0027ve added the handling for detach_volume call to libvirt driver.\n\u003e \n\u003e The attachment API calls are handled in the cinder.py file. Regarding the cleanup of attachment calls:\n\u003e 1) If attachment_create fails, we don\u0027t need to do anything (since previous attachment exists)\n\nBut do we catch that somewhere and log a helpful message and set the instance state to something reasonable where the user can retry without operator intervention? Or do we log a stack trace?\n\nThe other rebuild code looks like it raises BuildAbortException if something fails, so I would expect this should as well.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"47577701d3a9dd907e6950d81fe81cb603152666","unresolved":false,"context_lines":[{"line_number":3307,"context_line":""},{"line_number":3308,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3309,"context_line":"                                        image_id):"},{"line_number":3310,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3311,"context_line":"        attachment_id \u003d self.volume_api.attachment_create("},{"line_number":3312,"context_line":"            context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3313,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"},{"line_number":3314,"context_line":"        self.driver.detach_volume(context, old_connection_info,"},{"line_number":3315,"context_line":"                                  instance, root_bdm.device_name)"},{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"}],"source_content_type":"text/x-python","patch_set":6,"id":"61f48820_61c081c0","line":3317,"range":{"start_line":3310,"start_character":0,"end_line":3317,"end_character":65},"in_reply_to":"dd3441e3_f1c81916","updated":"2022-02-23 20:39:07.000000000","message":"The instance ends up in ERROR state and we can try rebuilding it again (which seems to be a reasonable state).\n\nThis is the stacktrace if it fails\nhttps://paste.opendev.org/show/b7QGLlq97I4ITL6He2Yg/\n\nThe helpful error log is\nFeb 24 01:13:19 devstack-VirtualBox nova-compute[910819]: ERROR oslo_messaging.rpc.server     LOG.error(\u0027Create attachment failed for volume \u0027\n\nI\u0027ve updated the except block to raise BuildAbortException but it is still caught at the same place by reraising the existing exceptions","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3321,"context_line":"        deadline \u003d CONF.reimage_timeout"},{"line_number":3322,"context_line":"        error_cb \u003d self._reimage_failed_callback"}],"source_content_type":"text/x-python","patch_set":6,"id":"af4928c9_9af3dc5e","line":3319,"updated":"2022-02-22 20:06:27.000000000","message":"I assume this could raise InstanceNotFound if the instance gets deleting before we hit this line. I imagine that requires some cleanup on the cinder side?","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":false,"context_lines":[{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3321,"context_line":"        deadline \u003d CONF.reimage_timeout"},{"line_number":3322,"context_line":"        error_cb \u003d self._reimage_failed_callback"}],"source_content_type":"text/x-python","patch_set":6,"id":"c43ae6dd_0999a909","line":3319,"in_reply_to":"2e709a9f_815062d5","updated":"2022-02-23 15:02:05.000000000","message":"Ack","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":true,"context_lines":[{"line_number":3316,"context_line":"        self.volume_api.attachment_delete(context,"},{"line_number":3317,"context_line":"                                          root_bdm.attachment_id)"},{"line_number":3318,"context_line":"        root_bdm.attachment_id \u003d attachment_id"},{"line_number":3319,"context_line":"        root_bdm.save()"},{"line_number":3320,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3321,"context_line":"        deadline \u003d CONF.reimage_timeout"},{"line_number":3322,"context_line":"        error_cb \u003d self._reimage_failed_callback"}],"source_content_type":"text/x-python","patch_set":6,"id":"2e709a9f_815062d5","line":3319,"in_reply_to":"af4928c9_9af3dc5e","updated":"2022-02-23 11:41:17.000000000","message":"If the instance is deleted and this call fails, we need to delete the newly created attachment on cinder side. included this with the above case.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":3331,"context_line":"        except Exception as ex:"},{"line_number":3332,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3333,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3334,"context_line":"            raise ex"},{"line_number":3335,"context_line":""},{"line_number":3336,"context_line":"    def _rebuild_default_impl("},{"line_number":3337,"context_line":"            self, context, instance, image_meta, injected_files,"}],"source_content_type":"text/x-python","patch_set":6,"id":"488ac765_77bf00ea","line":3334,"updated":"2022-02-22 20:06:27.000000000","message":"Is there really nothing you need to do here to clean things up if the reimage failed? I guess you\u0027ve already saved the new attachment_id on the BDM, so maybe not, but ... is the action retry-able at this point without a state reset?\n\nAlso, where does this exception you\u0027re re-raising eventually get handled?","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":true,"context_lines":[{"line_number":3331,"context_line":"        except Exception as ex:"},{"line_number":3332,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3333,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3334,"context_line":"            raise ex"},{"line_number":3335,"context_line":""},{"line_number":3336,"context_line":"    def _rebuild_default_impl("},{"line_number":3337,"context_line":"            self, context, instance, image_meta, injected_files,"}],"source_content_type":"text/x-python","patch_set":6,"id":"59f66b92_d0dc26fd","line":3334,"in_reply_to":"488ac765_77bf00ea","updated":"2022-02-23 11:41:17.000000000","message":"The bdm contains the newly created empty attachment ID in it at this point. We can update the attachment to make the volume in-use but that doesn\u0027t seem right from a cleanup perspective.\nA failure here will leave the volume in reserved state and we would need to reset it to in-use to retry this operation.\n\nIf the exception is not because of nova, it should be handled here https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L3508-L3515","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":true,"context_lines":[{"line_number":3331,"context_line":"        except Exception as ex:"},{"line_number":3332,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3333,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3334,"context_line":"            raise ex"},{"line_number":3335,"context_line":""},{"line_number":3336,"context_line":"    def _rebuild_default_impl("},{"line_number":3337,"context_line":"            self, context, instance, image_meta, injected_files,"}],"source_content_type":"text/x-python","patch_set":6,"id":"e12c6ef9_d86002f3","line":3334,"in_reply_to":"59f66b92_d0dc26fd","updated":"2022-02-23 15:02:05.000000000","message":"Meaning operator intervention to do that, right? That\u0027s definitely less-than-ideal. I\u0027m not really sure what the right thing to do is here.\n\nIf it\u0027s left in reserved state, what happens from the user\u0027s perspective? What state is the instance in? What happens if I try to start, reboot, or rebuild it again?","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"454ae291c5676797f1239f65ace5a25e238871f2","unresolved":false,"context_lines":[{"line_number":3331,"context_line":"        except Exception as ex:"},{"line_number":3332,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3333,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3334,"context_line":"            raise ex"},{"line_number":3335,"context_line":""},{"line_number":3336,"context_line":"    def _rebuild_default_impl("},{"line_number":3337,"context_line":"            self, context, instance, image_meta, injected_files,"}],"source_content_type":"text/x-python","patch_set":6,"id":"35c0df34_87e54853","line":3334,"in_reply_to":"9d5fcb89_1645817a","updated":"2022-02-28 04:01:32.000000000","message":"Ack","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"47577701d3a9dd907e6950d81fe81cb603152666","unresolved":true,"context_lines":[{"line_number":3331,"context_line":"        except Exception as ex:"},{"line_number":3332,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3333,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3334,"context_line":"            raise ex"},{"line_number":3335,"context_line":""},{"line_number":3336,"context_line":"    def _rebuild_default_impl("},{"line_number":3337,"context_line":"            self, context, instance, image_meta, injected_files,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9d5fcb89_1645817a","line":3334,"in_reply_to":"e12c6ef9_d86002f3","updated":"2022-02-23 20:39:07.000000000","message":"The instance will be in error state. What we can do here is to reset the state of volume from reserved to in-use and initiate the rebuild operation again.\nI\u0027m not sure if start/reboot establishes new attachments but if it does, we can perform the rebuild again. The key here is that volume should change from reserved to in-use state.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":true,"context_lines":[{"line_number":3342,"context_line":"                                              root_bdm.attachment_id)"},{"line_number":3343,"context_line":"            root_bdm.attachment_id \u003d attachment_id"},{"line_number":3344,"context_line":"            root_bdm.save()"},{"line_number":3345,"context_line":"        except Exception:"},{"line_number":3346,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3347,"context_line":"                                              attachment_id)"},{"line_number":3348,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"087d7700_23034f22","line":3345,"range":{"start_line":3345,"start_character":15,"end_line":3345,"end_character":25},"updated":"2022-02-23 15:02:05.000000000","message":"Presumably this should be:\n\n except (exception.InstanceNotFound, \n         exception.SomeCinderClientError)\n\ninstead of the fully-generic? Catching Exception without logging or re-raising it will mask even things like a NameError coding bug.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"47577701d3a9dd907e6950d81fe81cb603152666","unresolved":false,"context_lines":[{"line_number":3342,"context_line":"                                              root_bdm.attachment_id)"},{"line_number":3343,"context_line":"            root_bdm.attachment_id \u003d attachment_id"},{"line_number":3344,"context_line":"            root_bdm.save()"},{"line_number":3345,"context_line":"        except Exception:"},{"line_number":3346,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3347,"context_line":"                                              attachment_id)"},{"line_number":3348,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"}],"source_content_type":"text/x-python","patch_set":8,"id":"be2158cf_01af03f6","line":3345,"range":{"start_line":3345,"start_character":15,"end_line":3345,"end_character":25},"in_reply_to":"087d7700_23034f22","updated":"2022-02-23 20:39:07.000000000","message":"Done","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":true,"context_lines":[{"line_number":3344,"context_line":"            root_bdm.save()"},{"line_number":3345,"context_line":"        except Exception:"},{"line_number":3346,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3347,"context_line":"                                              attachment_id)"},{"line_number":3348,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3349,"context_line":"        image \u003d utils.get_image_from_system_metadata("},{"line_number":3350,"context_line":"                instance.system_metadata)"}],"source_content_type":"text/x-python","patch_set":8,"id":"4d8194e4_5742026a","line":3347,"updated":"2022-02-23 15:02:05.000000000","message":"This will delete the attachment, which is cool, but then it continues on to wait for the new event. If we get here because we didn\u0027t finish root_bdm.save() then we won\u0027t have recorded the new attachment and will end up with an unbootable instance, right?\n\nFurther, if we fail to save the root_bdm, we need to *not* delete the old attachment, right? Otherwise we\u0027ve broken the instance in a way that it can\u0027t really be re-used I think. We won\u0027t have an attachment for our volume, and running this rebuild again will fail because we can\u0027t delete the now-stale attachment.\n\nI think the safest thing to do is save the root_bdm with the new attachment and only proceed to delete the original if that works.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"47577701d3a9dd907e6950d81fe81cb603152666","unresolved":false,"context_lines":[{"line_number":3344,"context_line":"            root_bdm.save()"},{"line_number":3345,"context_line":"        except Exception:"},{"line_number":3346,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3347,"context_line":"                                              attachment_id)"},{"line_number":3348,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3349,"context_line":"        image \u003d utils.get_image_from_system_metadata("},{"line_number":3350,"context_line":"                instance.system_metadata)"}],"source_content_type":"text/x-python","patch_set":8,"id":"f8a62b41_d3ef9ba3","line":3347,"in_reply_to":"4d8194e4_5742026a","updated":"2022-02-23 20:39:07.000000000","message":"After this fails (either root_bdm.save() or attachment_delete) we should reraise and terminate the operation. Instead of reraise, we will raise BuildAbortException as suggested in last comment. will add it in next PS.\n\nMoved the sequence to first try and save new attachment_id in BDM and then delete the old attachment.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":true,"context_lines":[{"line_number":3350,"context_line":"                instance.system_metadata)"},{"line_number":3351,"context_line":"        image_size \u003d int(image.get(\u0027size\u0027) or 0)"},{"line_number":3352,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3353,"context_line":"            image_size \u003d 1"},{"line_number":3354,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3355,"context_line":"        error_cb \u003d self._reimage_failed_callback"},{"line_number":3356,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"93dd729b_8c4dbd50","line":3353,"updated":"2022-02-23 15:02:05.000000000","message":"AFAIK, all volume-backed instances are likely to have root_gb\u003d0, so this is probably not very helpful.\n\nIn the rebuild API code, it fetches the image from the ref stored in the volume, which I think is the appropriate thing to do here as well. The volume could have been rebuilt from a different image without nova knowing about it, right?\n\nIf cinder stores the image size, then we\u0027re done, but if not, we might need to go nova-\u003ecinder-\u003eglance to really get it. We hit glance from here all the time, so that shouldn\u0027t be a problem I think.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a816355afc2278e5fd7f66b60d94104936fff56c","unresolved":true,"context_lines":[{"line_number":3350,"context_line":"                instance.system_metadata)"},{"line_number":3351,"context_line":"        image_size \u003d int(image.get(\u0027size\u0027) or 0)"},{"line_number":3352,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3353,"context_line":"            image_size \u003d 1"},{"line_number":3354,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3355,"context_line":"        error_cb \u003d self._reimage_failed_callback"},{"line_number":3356,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9d0e81e2_ca902de7","line":3353,"in_reply_to":"6ee186ac_c0cf1574","updated":"2022-02-24 16:32:03.000000000","message":"Yeah, the target image of course :)","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"47577701d3a9dd907e6950d81fe81cb603152666","unresolved":true,"context_lines":[{"line_number":3350,"context_line":"                instance.system_metadata)"},{"line_number":3351,"context_line":"        image_size \u003d int(image.get(\u0027size\u0027) or 0)"},{"line_number":3352,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3353,"context_line":"            image_size \u003d 1"},{"line_number":3354,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3355,"context_line":"        error_cb \u003d self._reimage_failed_callback"},{"line_number":3356,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"6ee186ac_c0cf1574","line":3353,"in_reply_to":"93dd729b_8c4dbd50","updated":"2022-02-23 20:39:07.000000000","message":"For an in-use root volume, I don\u0027t think it\u0027s possible to reimage the volume unless nova initiates the operation. I assume we don\u0027t allow detaching the root volume and cinder only supports reimaging for volumes that are in available/error/reserved state. So in most (if not all) cases, nova will be the only one doing the rebuild of root volumes since we can\u0027t set volume state from in-use -\u003e reserved in any other way for a root volume (apart from the reset state APIs).\n\nCinder does store the glance image metadata containing the size of the image. The question I\u0027ve is, we need to know the size of destination image and not the source image residing inside the volume right? I think what we need to do here is query glance to provide the size of the destination image requested to reimage the volume with.","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef5f62711851265fa22f1c17b66899ffc1cb7a47","unresolved":false,"context_lines":[{"line_number":3350,"context_line":"                instance.system_metadata)"},{"line_number":3351,"context_line":"        image_size \u003d int(image.get(\u0027size\u0027) or 0)"},{"line_number":3352,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3353,"context_line":"            image_size \u003d 1"},{"line_number":3354,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3355,"context_line":"        error_cb \u003d self._reimage_failed_callback"},{"line_number":3356,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"4ed68701_1562198b","line":3353,"in_reply_to":"9d0e81e2_ca902de7","updated":"2022-02-25 20:01:51.000000000","message":"Ack","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8472209eb49b9df038fbed889fc6cc453840dc33","unresolved":true,"context_lines":[{"line_number":3414,"context_line":"            is_volume_backed \u003d compute_utils.is_volume_backed_instance("},{"line_number":3415,"context_line":"                context, instance, bdms)"},{"line_number":3416,"context_line":"            if is_volume_backed:"},{"line_number":3417,"context_line":"                self._rebuild_volume_backed_instance("},{"line_number":3418,"context_line":"                    context, instance, bdms, image_meta.id)"},{"line_number":3419,"context_line":""},{"line_number":3420,"context_line":"        instance.task_state \u003d task_states.REBUILD_BLOCK_DEVICE_MAPPING"}],"source_content_type":"text/x-python","patch_set":9,"id":"8d1483ae_0a671acd","line":3417,"updated":"2022-02-24 17:55:05.000000000","message":"This will run the new code for volume-backed instances regardless of whether or not the new API is used, which I think is not the goal. A user using the old API and/or not sending the new flag will expect their volume to be untouched during a rebuild, yet they\u0027ll get this new behavior.","commit_id":"a23f11d660d6eb310873eee5b5ea77b4f784507a"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"76a863969bea896be7c98c183574b8c8e813b4cf","unresolved":false,"context_lines":[{"line_number":3414,"context_line":"            is_volume_backed \u003d compute_utils.is_volume_backed_instance("},{"line_number":3415,"context_line":"                context, instance, bdms)"},{"line_number":3416,"context_line":"            if is_volume_backed:"},{"line_number":3417,"context_line":"                self._rebuild_volume_backed_instance("},{"line_number":3418,"context_line":"                    context, instance, bdms, image_meta.id)"},{"line_number":3419,"context_line":""},{"line_number":3420,"context_line":"        instance.task_state \u003d task_states.REBUILD_BLOCK_DEVICE_MAPPING"}],"source_content_type":"text/x-python","patch_set":9,"id":"68cb0d27_cefd92b3","line":3417,"in_reply_to":"8d1483ae_0a671acd","updated":"2022-02-25 08:12:36.000000000","message":"Done","commit_id":"a23f11d660d6eb310873eee5b5ea77b4f784507a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef5f62711851265fa22f1c17b66899ffc1cb7a47","unresolved":true,"context_lines":[{"line_number":3352,"context_line":"            raise exception.BuildAbortException("},{"line_number":3353,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3354,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3355,"context_line":"        image \u003d self.image_api.get(context, image_id)"},{"line_number":3356,"context_line":"        image_size \u003d int(math.ceil(float(image.get(\u0027size\u0027) or 0) / units.Gi))"},{"line_number":3357,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3358,"context_line":"            image_size \u003d 1"}],"source_content_type":"text/x-python","patch_set":13,"id":"da6eb46b_e48ed404","line":3355,"updated":"2022-02-25 20:01:51.000000000","message":"This could raise 404 or another error that we need to catch and cleanup from. Even though we check this at the API, this happens later and things on the glance side could have changed, or the compute node may be unable to reach glance even though the API could.","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e03f437f4d5891e7c038539323fe94ce119a6cbc","unresolved":false,"context_lines":[{"line_number":3352,"context_line":"            raise exception.BuildAbortException("},{"line_number":3353,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3354,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3355,"context_line":"        image \u003d self.image_api.get(context, image_id)"},{"line_number":3356,"context_line":"        image_size \u003d int(math.ceil(float(image.get(\u0027size\u0027) or 0) / units.Gi))"},{"line_number":3357,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3358,"context_line":"            image_size \u003d 1"}],"source_content_type":"text/x-python","patch_set":13,"id":"ada67660_5187fd9b","line":3355,"in_reply_to":"da6eb46b_e48ed404","updated":"2022-02-28 03:59:31.000000000","message":"Done\nAfter the old attachment is deleted and new attachment is saved in the BDM, there\u0027s not much cleanup we can do apart from raising BuildAbortException","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef5f62711851265fa22f1c17b66899ffc1cb7a47","unresolved":true,"context_lines":[{"line_number":3354,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3355,"context_line":"        image \u003d self.image_api.get(context, image_id)"},{"line_number":3356,"context_line":"        image_size \u003d int(math.ceil(float(image.get(\u0027size\u0027) or 0) / units.Gi))"},{"line_number":3357,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3358,"context_line":"            image_size \u003d 1"},{"line_number":3359,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3360,"context_line":"        error_cb \u003d self._reimage_failed_callback"}],"source_content_type":"text/x-python","patch_set":13,"id":"2ec7c51a_a7482dea","line":3357,"updated":"2022-02-25 20:01:51.000000000","message":"When could this happen? Maybe you meant to remove this from the previous solution of using sysmeta?\n\nActually, I wonder if image_size could be zero if the image is created but no data has been uploaded? If so, we should fail instead of artificially waiting for 1*timeout and/or starting the reimage on the cinder side only to see it fail.","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e03f437f4d5891e7c038539323fe94ce119a6cbc","unresolved":false,"context_lines":[{"line_number":3354,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3355,"context_line":"        image \u003d self.image_api.get(context, image_id)"},{"line_number":3356,"context_line":"        image_size \u003d int(math.ceil(float(image.get(\u0027size\u0027) or 0) / units.Gi))"},{"line_number":3357,"context_line":"        if image_size \u003d\u003d 0:"},{"line_number":3358,"context_line":"            image_size \u003d 1"},{"line_number":3359,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3360,"context_line":"        error_cb \u003d self._reimage_failed_callback"}],"source_content_type":"text/x-python","patch_set":13,"id":"26d1ee3f_13c6b8f5","line":3357,"in_reply_to":"2ec7c51a_a7482dea","updated":"2022-02-28 03:59:31.000000000","message":"Done\nYeah this was missed during the last revision. In this logic, even if it\u0027s a 1MB image, the ceil method will raise it to 1GB so we shouldn\u0027t have a problem with non zero sized (valid) images.","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef5f62711851265fa22f1c17b66899ffc1cb7a47","unresolved":true,"context_lines":[{"line_number":3452,"context_line":"                         bdms, recreate, on_shared_storage,"},{"line_number":3453,"context_line":"                         preserve_ephemeral, migration,"},{"line_number":3454,"context_line":"                         scheduled_node, limits, request_spec, accel_uuids,"},{"line_number":3455,"context_line":"                         reimage_boot_volume\u003dFalse):"},{"line_number":3456,"context_line":"        \"\"\"Destroy and re-make this instance."},{"line_number":3457,"context_line":""},{"line_number":3458,"context_line":"        A \u0027rebuild\u0027 effectively purges all existing data from the system and"}],"source_content_type":"text/x-python","patch_set":13,"id":"3661cb27_70d2c79e","line":3455,"updated":"2022-02-25 20:01:51.000000000","message":"This is the only place where the flag should be an optional kwarg, for rpc compatibility. The internal methods should all take a stable interface where all parameters are supplied. That helps keep our tests and internal interfaces from accumulating too much conditional behavior and cruft.\n\nThat said, you\u0027re changing the RPC interface here, which means you need to plumb it through rpcapi.py, bump the version here, and adapt the rpc client to allow it, if the version pin allows.","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e03f437f4d5891e7c038539323fe94ce119a6cbc","unresolved":false,"context_lines":[{"line_number":3452,"context_line":"                         bdms, recreate, on_shared_storage,"},{"line_number":3453,"context_line":"                         preserve_ephemeral, migration,"},{"line_number":3454,"context_line":"                         scheduled_node, limits, request_spec, accel_uuids,"},{"line_number":3455,"context_line":"                         reimage_boot_volume\u003dFalse):"},{"line_number":3456,"context_line":"        \"\"\"Destroy and re-make this instance."},{"line_number":3457,"context_line":""},{"line_number":3458,"context_line":"        A \u0027rebuild\u0027 effectively purges all existing data from the system and"}],"source_content_type":"text/x-python","patch_set":13,"id":"7bcac047_f2c859b9","line":3455,"in_reply_to":"3661cb27_70d2c79e","updated":"2022-02-28 03:59:31.000000000","message":"Done","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef5f62711851265fa22f1c17b66899ffc1cb7a47","unresolved":true,"context_lines":[{"line_number":3611,"context_line":"            injected_files, new_pass, orig_sys_metadata, bdms, evacuate,"},{"line_number":3612,"context_line":"            on_shared_storage, preserve_ephemeral, migration, request_spec,"},{"line_number":3613,"context_line":"            allocations, rebuild_claim, scheduled_node, limits, accel_uuids,"},{"line_number":3614,"context_line":"            reimage_boot_volume\u003dFalse):"},{"line_number":3615,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""},{"line_number":3616,"context_line":""},{"line_number":3617,"context_line":"        provider_mapping \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"77210cf7_319d8610","line":3614,"updated":"2022-02-25 20:01:51.000000000","message":"...so, this should s/\u003dFalse//","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e03f437f4d5891e7c038539323fe94ce119a6cbc","unresolved":false,"context_lines":[{"line_number":3611,"context_line":"            injected_files, new_pass, orig_sys_metadata, bdms, evacuate,"},{"line_number":3612,"context_line":"            on_shared_storage, preserve_ephemeral, migration, request_spec,"},{"line_number":3613,"context_line":"            allocations, rebuild_claim, scheduled_node, limits, accel_uuids,"},{"line_number":3614,"context_line":"            reimage_boot_volume\u003dFalse):"},{"line_number":3615,"context_line":"        \"\"\"Helper to avoid deep nesting in the top-level method.\"\"\""},{"line_number":3616,"context_line":""},{"line_number":3617,"context_line":"        provider_mapping \u003d None"}],"source_content_type":"text/x-python","patch_set":13,"id":"f0d18bbc_4ac1b3d7","line":3614,"in_reply_to":"77210cf7_319d8610","updated":"2022-02-28 03:59:31.000000000","message":"Done","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ef5f62711851265fa22f1c17b66899ffc1cb7a47","unresolved":true,"context_lines":[{"line_number":10997,"context_line":"                         bdms, recreate, on_shared_storage,"},{"line_number":10998,"context_line":"                         preserve_ephemeral, migration,"},{"line_number":10999,"context_line":"                         scheduled_node, limits, request_spec,"},{"line_number":11000,"context_line":"                         accel_uuids\u003dNone, reimage_boot_volume\u003dFalse):"},{"line_number":11001,"context_line":"        self.manager.rebuild_instance("},{"line_number":11002,"context_line":"            context, instance, orig_image_ref, image_ref,"},{"line_number":11003,"context_line":"            injected_files, new_pass, orig_sys_metadata,"}],"source_content_type":"text/x-python","patch_set":13,"id":"42a52ca9_df1300ec","line":11000,"updated":"2022-02-25 20:01:51.000000000","message":"This is a compatibility interface for rpc, so it should not be added here at all. RPC 5.x never had this and never will. So remove it from the interface here, and explicitly pass False on L11007 below.","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e03f437f4d5891e7c038539323fe94ce119a6cbc","unresolved":false,"context_lines":[{"line_number":10997,"context_line":"                         bdms, recreate, on_shared_storage,"},{"line_number":10998,"context_line":"                         preserve_ephemeral, migration,"},{"line_number":10999,"context_line":"                         scheduled_node, limits, request_spec,"},{"line_number":11000,"context_line":"                         accel_uuids\u003dNone, reimage_boot_volume\u003dFalse):"},{"line_number":11001,"context_line":"        self.manager.rebuild_instance("},{"line_number":11002,"context_line":"            context, instance, orig_image_ref, image_ref,"},{"line_number":11003,"context_line":"            injected_files, new_pass, orig_sys_metadata,"}],"source_content_type":"text/x-python","patch_set":13,"id":"8ddf3c4a_37090877","line":11000,"in_reply_to":"42a52ca9_df1300ec","updated":"2022-02-28 03:59:31.000000000","message":"Done","commit_id":"867300915ed4d9e4e52496cfd55627bc755d11cc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"76733dcf4d1420d2619634d1203d1d4002b24ae1","unresolved":true,"context_lines":[{"line_number":3443,"context_line":"            LOG.error(msg)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3446,"context_line":"        image_size \u003d int(math.ceil(float(image.get(\u0027size\u0027) or 0) / units.Gi))"},{"line_number":3447,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3448,"context_line":"        error_cb \u003d self._reimage_failed_callback"},{"line_number":3449,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":19,"id":"509ae778_03a7bb81","line":3446,"range":{"start_line":3446,"start_character":58,"end_line":3446,"end_character":63},"updated":"2022-02-28 17:10:50.000000000","message":"Again, this papers over an image that has no chance of succeeding for a rebuild, right? Are you adding this because of a specific test case, either manual or automatic or just trying to be defensive? I think it makes it worse, and if there\u0027s some specific case we\u0027re defending against, we should check for it there.","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e9e1578f81bcbdcc17b4df0f1cbcad1ac14c5d4b","unresolved":false,"context_lines":[{"line_number":3443,"context_line":"            LOG.error(msg)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3446,"context_line":"        image_size \u003d int(math.ceil(float(image.get(\u0027size\u0027) or 0) / units.Gi))"},{"line_number":3447,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size"},{"line_number":3448,"context_line":"        error_cb \u003d self._reimage_failed_callback"},{"line_number":3449,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7861f025_ec5a747e","line":3446,"range":{"start_line":3446,"start_character":58,"end_line":3446,"end_character":63},"in_reply_to":"509ae778_03a7bb81","updated":"2022-02-28 18:17:29.000000000","message":"There is no reason to keep it here, it was added in support of the image_size check previously and is a leftover while removing the last logic. will update in next PS.","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":3431,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":3432,"context_line":"                cinder_exception.ClientException):"},{"line_number":3433,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3434,"context_line":"                                              attachment_id)"},{"line_number":3435,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3436,"context_line":"            raise exception.BuildAbortException("},{"line_number":3437,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":26,"id":"bfff9bd3_4d97d981","line":3434,"range":{"start_line":3434,"start_character":46,"end_line":3434,"end_character":59},"updated":"2022-03-21 14:37:54.000000000","message":"If we fail to create the attachment and raise to get here, attachment_id will be unset and give a NameError when we use it. Perhaps just initialize it to None above?","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":3431,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":3432,"context_line":"                cinder_exception.ClientException):"},{"line_number":3433,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3434,"context_line":"                                              attachment_id)"},{"line_number":3435,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3436,"context_line":"            raise exception.BuildAbortException("},{"line_number":3437,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":26,"id":"4d6874cd_ad83444e","line":3434,"range":{"start_line":3434,"start_character":46,"end_line":3434,"end_character":59},"in_reply_to":"bfff9bd3_4d97d981","updated":"2022-03-23 11:00:09.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":3429,"context_line":"        old_attachment_id \u003d root_bdm.attachment_id"},{"line_number":3430,"context_line":"        attachment_id \u003d None"},{"line_number":3431,"context_line":"        try:"},{"line_number":3432,"context_line":"            attachment_id \u003d self.volume_api.attachment_create("},{"line_number":3433,"context_line":"                context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3434,"context_line":"            self._detach_device(context, instance, root_bdm)"},{"line_number":3435,"context_line":"            root_bdm.attachment_id \u003d attachment_id"}],"source_content_type":"text/x-python","patch_set":32,"id":"3cdfb3af_9777ada5","line":3432,"updated":"2022-08-26 13:24:08.000000000","message":"cool so my comment in the commit message can be ignored, we do the proper attach detach order to avoid races","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":3429,"context_line":"        old_attachment_id \u003d root_bdm.attachment_id"},{"line_number":3430,"context_line":"        attachment_id \u003d None"},{"line_number":3431,"context_line":"        try:"},{"line_number":3432,"context_line":"            attachment_id \u003d self.volume_api.attachment_create("},{"line_number":3433,"context_line":"                context, root_bdm.volume_id, instance.uuid)[\u0027id\u0027]"},{"line_number":3434,"context_line":"            self._detach_device(context, instance, root_bdm)"},{"line_number":3435,"context_line":"            root_bdm.attachment_id \u003d attachment_id"}],"source_content_type":"text/x-python","patch_set":32,"id":"37189b98_8bd7c717","line":3432,"in_reply_to":"3cdfb3af_9777ada5","updated":"2022-08-26 20:59:49.000000000","message":"Ack","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c8426792761ec4cdd603e439cb8f3362bcff2818","unresolved":true,"context_lines":[{"line_number":3439,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":3440,"context_line":"                cinder_exception.ClientException):"},{"line_number":3441,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3442,"context_line":"                                              attachment_id)"},{"line_number":3443,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":32,"id":"73866771_c17a746c","line":3442,"updated":"2022-08-26 17:40:01.000000000","message":"Working on gibi\u0027s tests and if the attachment_create fails, we will fail here as well and not raise BuildAbortException as expected.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":3439,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":3440,"context_line":"                cinder_exception.ClientException):"},{"line_number":3441,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3442,"context_line":"                                              attachment_id)"},{"line_number":3443,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":32,"id":"19d94889_09d02516","line":3442,"in_reply_to":"73866771_c17a746c","updated":"2022-08-26 20:59:49.000000000","message":"Ack","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"aa8ef08145d377a38ee0a21dc624797cad443cb5","unresolved":false,"context_lines":[{"line_number":3439,"context_line":"        except (exception.InstanceNotFound,"},{"line_number":3440,"context_line":"                cinder_exception.ClientException):"},{"line_number":3441,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3442,"context_line":"                                              attachment_id)"},{"line_number":3443,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":32,"id":"00e75366_3462d1ca","line":3442,"in_reply_to":"73866771_c17a746c","updated":"2022-08-26 19:19:34.000000000","message":"Gerrit is very much misrepresenting this on the latest patchset (weird). But I did resolve this in my push.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":3441,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3442,"context_line":"                                              attachment_id)"},{"line_number":3443,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3446,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3447,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"5194d5e9_02895250","line":3444,"updated":"2022-08-26 13:24:08.000000000","message":"OK, so at this point we can assume that the volume is attached via the old_attachment_id as the attachment delete was the last step in the try block. BUT you updated root_bdm.attachment_id to the new attachment_id that is being deleted here. So I think you have to revert that changes too. Also the volume is now detached from the instance so that needs to be re-attached.\n\nIn general, how would the user recover the VM from this situation?","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3442,"context_line":"                                              attachment_id)"},{"line_number":3443,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3446,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3447,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"dfe3c2f9_926c9606","line":3444,"in_reply_to":"1667c4f4_870fb660","updated":"2022-08-26 20:59:49.000000000","message":"Fixed by Dan in latest PS, thanks!","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4a29b706845e829080288d5596af42bc449e1d3c","unresolved":true,"context_lines":[{"line_number":3441,"context_line":"            self.volume_api.attachment_delete(context,"},{"line_number":3442,"context_line":"                                              attachment_id)"},{"line_number":3443,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3444,"context_line":"            raise exception.BuildAbortException("},{"line_number":3445,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3446,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3447,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1667c4f4_870fb660","line":3444,"in_reply_to":"5194d5e9_02895250","updated":"2022-08-26 13:58:22.000000000","message":"...because the final delete could have gotten us here, right? Good catch, and we probably need to split out InstanceNotFound from ClientException as what we do with each will vary (i.e. we probably don\u0027t want to try to update the bdm again if the instance was deleted underneath us).","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":3463,"context_line":"                    reimage_reserved\u003dTrue)"},{"line_number":3464,"context_line":""},{"line_number":3465,"context_line":"        except Exception as ex:"},{"line_number":3466,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3467,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3468,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3469,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":32,"id":"7146a128_a6bf88a6","line":3466,"updated":"2022-08-26 13:24:08.000000000","message":"at this point the root_bdm.attachment_id points to the new and valid attachment but the device is detached from the instance. What would be the recovery for the user from this state? A hard reboot?","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a608cdf628febae2cc38426ef10b9b50a5f93e7","unresolved":false,"context_lines":[{"line_number":3463,"context_line":"                    reimage_reserved\u003dTrue)"},{"line_number":3464,"context_line":""},{"line_number":3465,"context_line":"        except Exception as ex:"},{"line_number":3466,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3467,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3468,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3469,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":32,"id":"4779c498_7da79d76","line":3466,"in_reply_to":"2c831c7f_6c4ebf4f","updated":"2022-08-29 18:55:53.000000000","message":"Ack","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"88a5da4885aeeac9e6059debcaae606b8a595283","unresolved":true,"context_lines":[{"line_number":3463,"context_line":"                    reimage_reserved\u003dTrue)"},{"line_number":3464,"context_line":""},{"line_number":3465,"context_line":"        except Exception as ex:"},{"line_number":3466,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3467,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3468,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3469,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":32,"id":"e16a3619_9c798c7f","line":3466,"in_reply_to":"5b165453_0b02e3c5","updated":"2022-08-28 21:49:30.000000000","message":"hard reboot at least when it comes to neutron never calls it.\n\ni would not exectp hard reboot for cinder to involve any api calls.\ni have not looked but we do not call cyborg either as far as im aware so i would not expect hard reboot to recrete attachment recored or reinitiate the connection.\n\nit might happen in os-brick but its not something i would expect to happen.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":true,"context_lines":[{"line_number":3463,"context_line":"                    reimage_reserved\u003dTrue)"},{"line_number":3464,"context_line":""},{"line_number":3465,"context_line":"        except Exception as ex:"},{"line_number":3466,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3467,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3468,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3469,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":32,"id":"5b165453_0b02e3c5","line":3466,"in_reply_to":"7146a128_a6bf88a6","updated":"2022-08-26 20:59:49.000000000","message":"I think so yes. IIUC a hard reboot recreates the attachment records and re initiates the connection with os-brick.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":false,"context_lines":[{"line_number":3463,"context_line":"                    reimage_reserved\u003dTrue)"},{"line_number":3464,"context_line":""},{"line_number":3465,"context_line":"        except Exception as ex:"},{"line_number":3466,"context_line":"            LOG.error(\u0027Failed to rebuild volume backed instance: %s\u0027,"},{"line_number":3467,"context_line":"                      str(ex), instance\u003dinstance)"},{"line_number":3468,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3469,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":32,"id":"2c831c7f_6c4ebf4f","line":3466,"in_reply_to":"e16a3619_9c798c7f","updated":"2022-08-29 08:52:33.000000000","message":"On Friday over IRC it was noted that recovering from a failed rebuild would be the retry of the rebuild. Which is probably fine too as detach is handling transparently if the device is already detached afaik.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":3494,"context_line":"                    raise exception.BuildAbortException("},{"line_number":3495,"context_line":"                        instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3496,"context_line":"            detach_block_devices(context, bdms,"},{"line_number":3497,"context_line":"                                 detach_root_bdm\u003ddetach_root_bdm)"},{"line_number":3498,"context_line":"        else:"},{"line_number":3499,"context_line":"            self._power_off_instance(instance, clean_shutdown\u003dTrue)"},{"line_number":3500,"context_line":"            detach_block_devices(context, bdms,"}],"source_content_type":"text/x-python","patch_set":32,"id":"f57ee442_827c7e89","line":3497,"updated":"2022-08-26 13:24:08.000000000","message":"wondering why we need anything special for evacuate.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"88a5da4885aeeac9e6059debcaae606b8a595283","unresolved":true,"context_lines":[{"line_number":3494,"context_line":"                    raise exception.BuildAbortException("},{"line_number":3495,"context_line":"                        instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3496,"context_line":"            detach_block_devices(context, bdms,"},{"line_number":3497,"context_line":"                                 detach_root_bdm\u003ddetach_root_bdm)"},{"line_number":3498,"context_line":"        else:"},{"line_number":3499,"context_line":"            self._power_off_instance(instance, clean_shutdown\u003dTrue)"},{"line_number":3500,"context_line":"            detach_block_devices(context, bdms,"}],"source_content_type":"text/x-python","patch_set":32,"id":"f1855f16_acdcfeb2","line":3497,"in_reply_to":"99f40c40_63fbc657","updated":"2022-08-28 21:49:30.000000000","message":"evacuate was previouly allowed for bfv guests\n\nso for evacuate we need to preserve all data so we definetly need to treat evacuate differnt form rebuild.\n\nill review this in the morning just skiming over teh comments quickly tonight.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":false,"context_lines":[{"line_number":3494,"context_line":"                    raise exception.BuildAbortException("},{"line_number":3495,"context_line":"                        instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3496,"context_line":"            detach_block_devices(context, bdms,"},{"line_number":3497,"context_line":"                                 detach_root_bdm\u003ddetach_root_bdm)"},{"line_number":3498,"context_line":"        else:"},{"line_number":3499,"context_line":"            self._power_off_instance(instance, clean_shutdown\u003dTrue)"},{"line_number":3500,"context_line":"            detach_block_devices(context, bdms,"}],"source_content_type":"text/x-python","patch_set":32,"id":"83ef94e3_146f277a","line":3497,"in_reply_to":"f1855f16_acdcfeb2","updated":"2022-08-29 08:52:33.000000000","message":"yes, I agree with Sean, evacuation of bfv VMs worked before. So we do reached this point before with root bdms during evac. In case of evac detach_block_devices() detached the root volume too. With the new detach_root_bdm this patch also preserves that logic. So I think the logic is OK. Just a code is a bit confusing.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":true,"context_lines":[{"line_number":3494,"context_line":"                    raise exception.BuildAbortException("},{"line_number":3495,"context_line":"                        instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3496,"context_line":"            detach_block_devices(context, bdms,"},{"line_number":3497,"context_line":"                                 detach_root_bdm\u003ddetach_root_bdm)"},{"line_number":3498,"context_line":"        else:"},{"line_number":3499,"context_line":"            self._power_off_instance(instance, clean_shutdown\u003dTrue)"},{"line_number":3500,"context_line":"            detach_block_devices(context, bdms,"}],"source_content_type":"text/x-python","patch_set":32,"id":"99f40c40_63fbc657","line":3497,"in_reply_to":"f57ee442_827c7e89","updated":"2022-08-26 20:59:49.000000000","message":"Not sure about evacuate but if we want to rebuild volume backed instances and we don\u0027t skip the root bdm, it errors out.\nSince previously, the call would never reach here and would be blocked at API level, we assumed that here we only have image rebuild calls so it\u0027s OK to detach all volumes but not true for root bdm.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":3500,"context_line":"            detach_block_devices(context, bdms,"},{"line_number":3501,"context_line":"                                 detach_root_bdm\u003ddetach_root_bdm)"},{"line_number":3502,"context_line":"            if reimage_boot_volume:"},{"line_number":3503,"context_line":"                block_device_info_copy \u003d copy.deepcopy(block_device_info)"},{"line_number":3504,"context_line":"                root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3505,"context_line":"                for i in range("},{"line_number":3506,"context_line":"                        len(block_device_info_copy[\u0027block_device_mapping\u0027])):"}],"source_content_type":"text/x-python","patch_set":32,"id":"77efd428_123a8a28","line":3503,"updated":"2022-08-26 13:24:08.000000000","message":"could you please provide a comment describing why you delete volumes from the bdm?","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":3500,"context_line":"            detach_block_devices(context, bdms,"},{"line_number":3501,"context_line":"                                 detach_root_bdm\u003ddetach_root_bdm)"},{"line_number":3502,"context_line":"            if reimage_boot_volume:"},{"line_number":3503,"context_line":"                block_device_info_copy \u003d copy.deepcopy(block_device_info)"},{"line_number":3504,"context_line":"                root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3505,"context_line":"                for i in range("},{"line_number":3506,"context_line":"                        len(block_device_info_copy[\u0027block_device_mapping\u0027])):"}],"source_content_type":"text/x-python","patch_set":32,"id":"fc422a0e_6e178a85","line":3503,"in_reply_to":"77efd428_123a8a28","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":3502,"context_line":"            if reimage_boot_volume:"},{"line_number":3503,"context_line":"                block_device_info_copy \u003d copy.deepcopy(block_device_info)"},{"line_number":3504,"context_line":"                root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3505,"context_line":"                for i in range("},{"line_number":3506,"context_line":"                        len(block_device_info_copy[\u0027block_device_mapping\u0027])):"},{"line_number":3507,"context_line":"                    if (block_device_info_copy["},{"line_number":3508,"context_line":"                        \u0027block_device_mapping\u0027][i][\u0027volume_id\u0027] \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":32,"id":"1e0b80f2_8c93ae56","line":3505,"updated":"2022-08-26 13:24:08.000000000","message":"this is highly nested now. I would alias the mapping to allow reformatting this to:\n\n                mapping \u003d block_device_info_copy[\"block_device_mapping\"]\n                for i in range(len(mapping)):\n                    if mapping[i][\"volume_id\"] \u003d\u003d root_bdm.volume_id:\n                        del mapping[i]","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":3502,"context_line":"            if reimage_boot_volume:"},{"line_number":3503,"context_line":"                block_device_info_copy \u003d copy.deepcopy(block_device_info)"},{"line_number":3504,"context_line":"                root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3505,"context_line":"                for i in range("},{"line_number":3506,"context_line":"                        len(block_device_info_copy[\u0027block_device_mapping\u0027])):"},{"line_number":3507,"context_line":"                    if (block_device_info_copy["},{"line_number":3508,"context_line":"                        \u0027block_device_mapping\u0027][i][\u0027volume_id\u0027] \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":32,"id":"7953c154_2065f39d","line":3505,"in_reply_to":"1e0b80f2_8c93ae56","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":3864,"context_line":"            self._get_instance_block_device_info("},{"line_number":3865,"context_line":"                    context, instance, bdms\u003dbdms)"},{"line_number":3866,"context_line":""},{"line_number":3867,"context_line":"        def detach_block_devices(context, bdms, detach_root_bdm\u003dTrue):"},{"line_number":3868,"context_line":"            for bdm in bdms:"},{"line_number":3869,"context_line":"                if not detach_root_bdm and bdm.is_root:"},{"line_number":3870,"context_line":"                    continue"},{"line_number":3871,"context_line":"                if bdm.is_volume:"},{"line_number":3872,"context_line":"                    # NOTE (ildikov): Having the attachment_id set in the BDM"},{"line_number":3873,"context_line":"                    # means that it\u0027s the new Cinder attach/detach flow"}],"source_content_type":"text/x-python","patch_set":32,"id":"039082c7_c46f9dc3","line":3870,"range":{"start_line":3867,"start_character":8,"end_line":3870,"end_character":28},"updated":"2022-08-26 09:38:45.000000000","message":"why are we filtering like this here.\ncan you add a comment to explain.\n-------------later---------------\n\ni realise this is probaly related to the hacky behavior we have for rebuild to same image with BFV today where we dont actully rebuild we jsut update the metadata.\n\neventually i ant to remove that and replace that fucntionality genericaly with a recreate api.\n\nis that why we are filtering out the root device in the detach.\n\nin either case please add a comment to explian this.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":true,"context_lines":[{"line_number":3864,"context_line":"            self._get_instance_block_device_info("},{"line_number":3865,"context_line":"                    context, instance, bdms\u003dbdms)"},{"line_number":3866,"context_line":""},{"line_number":3867,"context_line":"        def detach_block_devices(context, bdms, detach_root_bdm\u003dTrue):"},{"line_number":3868,"context_line":"            for bdm in bdms:"},{"line_number":3869,"context_line":"                if not detach_root_bdm and bdm.is_root:"},{"line_number":3870,"context_line":"                    continue"},{"line_number":3871,"context_line":"                if bdm.is_volume:"},{"line_number":3872,"context_line":"                    # NOTE (ildikov): Having the attachment_id set in the BDM"},{"line_number":3873,"context_line":"                    # means that it\u0027s the new Cinder attach/detach flow"}],"source_content_type":"text/x-python","patch_set":32,"id":"d8f06e4a_e8e8d13a","line":3870,"range":{"start_line":3867,"start_character":8,"end_line":3870,"end_character":28},"in_reply_to":"039082c7_c46f9dc3","updated":"2022-08-26 20:59:49.000000000","message":"Previously we didn\u0027t allow calls for rebuilding a volume backed instance to reach here (blocked at the API) and assumed all volumes are attached and none of them is root bdm (Only rebuilding image backed instance could reach here before)\nNow we are allowing it so need to manually skip detaching the root bdm.\nAlso we don\u0027t want to perform any action on it since we are doing it manually i.e. all the attachment create/delete calls so we are just skipping it here.\nWill add a comment.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"12632913c38bf94baab4fad9cabf022f648f5fff","unresolved":false,"context_lines":[{"line_number":3864,"context_line":"            self._get_instance_block_device_info("},{"line_number":3865,"context_line":"                    context, instance, bdms\u003dbdms)"},{"line_number":3866,"context_line":""},{"line_number":3867,"context_line":"        def detach_block_devices(context, bdms, detach_root_bdm\u003dTrue):"},{"line_number":3868,"context_line":"            for bdm in bdms:"},{"line_number":3869,"context_line":"                if not detach_root_bdm and bdm.is_root:"},{"line_number":3870,"context_line":"                    continue"},{"line_number":3871,"context_line":"                if bdm.is_volume:"},{"line_number":3872,"context_line":"                    # NOTE (ildikov): Having the attachment_id set in the BDM"},{"line_number":3873,"context_line":"                    # means that it\u0027s the new Cinder attach/detach flow"}],"source_content_type":"text/x-python","patch_set":32,"id":"2ff9b9b4_2faf27a3","line":3870,"range":{"start_line":3867,"start_character":8,"end_line":3870,"end_character":28},"in_reply_to":"d8f06e4a_e8e8d13a","updated":"2022-08-26 21:01:35.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":3906,"context_line":"            accel_uuids\u003daccel_uuids)"},{"line_number":3907,"context_line":"        try:"},{"line_number":3908,"context_line":"            with instance.mutated_migration_context():"},{"line_number":3909,"context_line":"                self.driver.rebuild(**kwargs)"},{"line_number":3910,"context_line":"        except NotImplementedError:"},{"line_number":3911,"context_line":"            # NOTE(rpodolyaka): driver doesn\u0027t provide specialized version"},{"line_number":3912,"context_line":"            # of rebuild, fall back to the default implementation"}],"source_content_type":"text/x-python","patch_set":32,"id":"711f86cd_9c3731a4","line":3909,"range":{"start_line":3909,"start_character":14,"end_line":3909,"end_character":45},"updated":"2022-08-26 09:38:45.000000000","message":"so we are not support this for ironic? it also support booting form iscsi cinder vomumnes right?\n\nmy understandign is we have supported boot from volume for ironic for about 3 or 4 releases so you should be adding the reimage_boot_volume kwarg above when defineing the kwargs dict.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":3906,"context_line":"            accel_uuids\u003daccel_uuids)"},{"line_number":3907,"context_line":"        try:"},{"line_number":3908,"context_line":"            with instance.mutated_migration_context():"},{"line_number":3909,"context_line":"                self.driver.rebuild(**kwargs)"},{"line_number":3910,"context_line":"        except NotImplementedError:"},{"line_number":3911,"context_line":"            # NOTE(rpodolyaka): driver doesn\u0027t provide specialized version"},{"line_number":3912,"context_line":"            # of rebuild, fall back to the default implementation"}],"source_content_type":"text/x-python","patch_set":32,"id":"bca4141f_0b4702cc","line":3909,"range":{"start_line":3909,"start_character":14,"end_line":3909,"end_character":45},"in_reply_to":"711f86cd_9c3731a4","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":11170,"context_line":"            bdms, recreate, on_shared_storage,"},{"line_number":11171,"context_line":"            preserve_ephemeral, migration,"},{"line_number":11172,"context_line":"            scheduled_node, limits, request_spec,"},{"line_number":11173,"context_line":"            accel_uuids, False)"},{"line_number":11174,"context_line":""},{"line_number":11175,"context_line":"    # 5.13 support for optional accel_uuids argument"},{"line_number":11176,"context_line":"    def shelve_instance(self, context, instance, image_id,"}],"source_content_type":"text/x-python","patch_set":32,"id":"de850aa7_b0aab4e2","line":11173,"updated":"2022-08-26 09:38:45.000000000","message":"so in this patch we are extending the manager api but hard coding the feature to disabled. presumable because we want to test this before we enable the the feature on the api","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4a29b706845e829080288d5596af42bc449e1d3c","unresolved":true,"context_lines":[{"line_number":11170,"context_line":"            bdms, recreate, on_shared_storage,"},{"line_number":11171,"context_line":"            preserve_ephemeral, migration,"},{"line_number":11172,"context_line":"            scheduled_node, limits, request_spec,"},{"line_number":11173,"context_line":"            accel_uuids, False)"},{"line_number":11174,"context_line":""},{"line_number":11175,"context_line":"    # 5.13 support for optional accel_uuids argument"},{"line_number":11176,"context_line":"    def shelve_instance(self, context, instance, image_id,"}],"source_content_type":"text/x-python","patch_set":32,"id":"80f57b07_ea9b947d","line":11173,"in_reply_to":"1d9c1329_d6d1a8df","updated":"2022-08-26 13:58:22.000000000","message":"Yup.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"12632913c38bf94baab4fad9cabf022f648f5fff","unresolved":false,"context_lines":[{"line_number":11170,"context_line":"            bdms, recreate, on_shared_storage,"},{"line_number":11171,"context_line":"            preserve_ephemeral, migration,"},{"line_number":11172,"context_line":"            scheduled_node, limits, request_spec,"},{"line_number":11173,"context_line":"            accel_uuids, False)"},{"line_number":11174,"context_line":""},{"line_number":11175,"context_line":"    # 5.13 support for optional accel_uuids argument"},{"line_number":11176,"context_line":"    def shelve_instance(self, context, instance, image_id,"}],"source_content_type":"text/x-python","patch_set":32,"id":"2a44e46e_8bb59aae","line":11173,"in_reply_to":"80f57b07_ea9b947d","updated":"2022-08-26 21:01:35.000000000","message":"Ack","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":11170,"context_line":"            bdms, recreate, on_shared_storage,"},{"line_number":11171,"context_line":"            preserve_ephemeral, migration,"},{"line_number":11172,"context_line":"            scheduled_node, limits, request_spec,"},{"line_number":11173,"context_line":"            accel_uuids, False)"},{"line_number":11174,"context_line":""},{"line_number":11175,"context_line":"    # 5.13 support for optional accel_uuids argument"},{"line_number":11176,"context_line":"    def shelve_instance(self, context, instance, image_id,"}],"source_content_type":"text/x-python","patch_set":32,"id":"1d9c1329_d6d1a8df","line":11173,"in_reply_to":"de850aa7_b0aab4e2","updated":"2022-08-26 13:24:08.000000000","message":"I think this is OLD 5.x RPC where the flag is not provided so we not support rebuild bfv there","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":false,"context_lines":[{"line_number":3433,"context_line":"                              instance\u003dinstance)"},{"line_number":3434,"context_line":"                self.volume_api.roll_detaching(context, volume_id)"},{"line_number":3435,"context_line":""},{"line_number":3436,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3437,"context_line":"                                        image_id):"},{"line_number":3438,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3439,"context_line":"        old_attachment_id \u003d root_bdm.attachment_id"}],"source_content_type":"text/x-python","patch_set":35,"id":"d20de7e0_67e56517","line":3436,"updated":"2022-08-29 08:52:33.000000000","message":"femtonit: coudl you use empty lines to break up the sequence of this function into steps?","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a608cdf628febae2cc38426ef10b9b50a5f93e7","unresolved":false,"context_lines":[{"line_number":3433,"context_line":"                              instance\u003dinstance)"},{"line_number":3434,"context_line":"                self.volume_api.roll_detaching(context, volume_id)"},{"line_number":3435,"context_line":""},{"line_number":3436,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3437,"context_line":"                                        image_id):"},{"line_number":3438,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3439,"context_line":"        old_attachment_id \u003d root_bdm.attachment_id"}],"source_content_type":"text/x-python","patch_set":35,"id":"1ecd165e_5157c40c","line":3436,"in_reply_to":"d20de7e0_67e56517","updated":"2022-08-29 18:55:53.000000000","message":"Done","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":true,"context_lines":[{"line_number":3470,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3471,"context_line":"        try:"},{"line_number":3472,"context_line":"            image \u003d self.image_api.get(context, image_id)"},{"line_number":3473,"context_line":"        except exception.ImageNotFound:"},{"line_number":3474,"context_line":"            msg \u003d _(\u0027Image %s not found.\u0027) % image_id"},{"line_number":3475,"context_line":"            LOG.error(msg)"},{"line_number":3476,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":35,"id":"9a493454_e8e98d6e","line":3473,"updated":"2022-08-29 08:52:33.000000000","message":"nit: do we validate the image_id ever before? If yes then this is OK as is. If not then I would move this validation as the first step of this call to avoid the whole attachment dance in the simple error case where the image does not exists.","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"da45059c0241d6d8c9a8ee7a4b80129ea24d2e3d","unresolved":false,"context_lines":[{"line_number":3470,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3471,"context_line":"        try:"},{"line_number":3472,"context_line":"            image \u003d self.image_api.get(context, image_id)"},{"line_number":3473,"context_line":"        except exception.ImageNotFound:"},{"line_number":3474,"context_line":"            msg \u003d _(\u0027Image %s not found.\u0027) % image_id"},{"line_number":3475,"context_line":"            LOG.error(msg)"},{"line_number":3476,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":35,"id":"4f4f733f_164d41d6","line":3473,"in_reply_to":"45ef19af_db4ec94f","updated":"2022-08-30 08:51:50.000000000","message":"thanks. it is good then","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a608cdf628febae2cc38426ef10b9b50a5f93e7","unresolved":false,"context_lines":[{"line_number":3470,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3471,"context_line":"        try:"},{"line_number":3472,"context_line":"            image \u003d self.image_api.get(context, image_id)"},{"line_number":3473,"context_line":"        except exception.ImageNotFound:"},{"line_number":3474,"context_line":"            msg \u003d _(\u0027Image %s not found.\u0027) % image_id"},{"line_number":3475,"context_line":"            LOG.error(msg)"},{"line_number":3476,"context_line":"            raise exception.BuildAbortException("}],"source_content_type":"text/x-python","patch_set":35,"id":"45ef19af_db4ec94f","line":3473,"in_reply_to":"9a493454_e8e98d6e","updated":"2022-08-29 18:55:53.000000000","message":"Yes, it\u0027s checked in compute api[1]\n\n[1] https://github.com/openstack/nova/blob/0bab2e5a882235bfd41d2bce86db9885fd0b81b2/nova/compute/api.py#L3633","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":false,"context_lines":[{"line_number":3531,"context_line":"                # manually as we want to maintain a \u0027reserved\u0027 state"},{"line_number":3532,"context_line":"                # throughout the reimage process from the cinder side so"},{"line_number":3533,"context_line":"                # we are excluding the root BDM from certain operations"},{"line_number":3534,"context_line":"                # here i.e. deleteing it\u0027s mapping before the destroy call."},{"line_number":3535,"context_line":"                block_device_info_copy \u003d copy.deepcopy(block_device_info)"},{"line_number":3536,"context_line":"                root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3537,"context_line":"                mapping \u003d block_device_info_copy[\"block_device_mapping\"]"}],"source_content_type":"text/x-python","patch_set":35,"id":"05112ea1_fdd804b1","line":3534,"updated":"2022-08-29 08:52:33.000000000","message":"thanks","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":true,"context_lines":[{"line_number":3535,"context_line":"                block_device_info_copy \u003d copy.deepcopy(block_device_info)"},{"line_number":3536,"context_line":"                root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3537,"context_line":"                mapping \u003d block_device_info_copy[\"block_device_mapping\"]"},{"line_number":3538,"context_line":"                for i in range(len(mapping)):"},{"line_number":3539,"context_line":"                    if mapping[i][\"volume_id\"] \u003d\u003d root_bdm.volume_id:"},{"line_number":3540,"context_line":"                        del mapping[i]"},{"line_number":3541,"context_line":"                        break"},{"line_number":3542,"context_line":"                self.driver.destroy(context, instance,"},{"line_number":3543,"context_line":"                                    network_info\u003dnetwork_info,"},{"line_number":3544,"context_line":"                                    block_device_info\u003dblock_device_info_copy)"}],"source_content_type":"text/x-python","patch_set":35,"id":"b3eb0e97_79c77253","line":3541,"range":{"start_line":3538,"start_character":0,"end_line":3541,"end_character":29},"updated":"2022-08-29 08:52:33.000000000","message":"nit: I think this can be simplified to:\n              \n              # drop root bdm from the mapping\n              mapping \u003d [\n                  bdm for bdm in mapping \n                  if bdm[\"volume_id\"] !\u003d root_bdm.volume_id\n              ]","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a608cdf628febae2cc38426ef10b9b50a5f93e7","unresolved":false,"context_lines":[{"line_number":3535,"context_line":"                block_device_info_copy \u003d copy.deepcopy(block_device_info)"},{"line_number":3536,"context_line":"                root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3537,"context_line":"                mapping \u003d block_device_info_copy[\"block_device_mapping\"]"},{"line_number":3538,"context_line":"                for i in range(len(mapping)):"},{"line_number":3539,"context_line":"                    if mapping[i][\"volume_id\"] \u003d\u003d root_bdm.volume_id:"},{"line_number":3540,"context_line":"                        del mapping[i]"},{"line_number":3541,"context_line":"                        break"},{"line_number":3542,"context_line":"                self.driver.destroy(context, instance,"},{"line_number":3543,"context_line":"                                    network_info\u003dnetwork_info,"},{"line_number":3544,"context_line":"                                    block_device_info\u003dblock_device_info_copy)"}],"source_content_type":"text/x-python","patch_set":35,"id":"4012ff37_b7a220dd","line":3541,"range":{"start_line":3538,"start_character":0,"end_line":3541,"end_character":29},"in_reply_to":"b3eb0e97_79c77253","updated":"2022-08-29 18:55:53.000000000","message":"Done","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":true,"context_lines":[{"line_number":3907,"context_line":"                # rebuilding the volume backed instance so we don\u0027t have"},{"line_number":3908,"context_line":"                # to worry about other callers as they won\u0027t satisfy this"},{"line_number":3909,"context_line":"                # condition."},{"line_number":3910,"context_line":"                if not detach_root_bdm and bdm.is_root:"},{"line_number":3911,"context_line":"                    continue"},{"line_number":3912,"context_line":"                if bdm.is_volume:"},{"line_number":3913,"context_line":"                    # NOTE (ildikov): Having the attachment_id set in the BDM"}],"source_content_type":"text/x-python","patch_set":35,"id":"681a7172_e80e018f","line":3910,"updated":"2022-08-29 08:52:33.000000000","message":"so this is called for evac too. but we never have reimage\u003dTrue for evac, so detach_root_bdm will be alway True for evac. So in the evac case this added filtering is disabled. \nI think the logic is OK, but need to mention the evac case in the comment.","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a608cdf628febae2cc38426ef10b9b50a5f93e7","unresolved":false,"context_lines":[{"line_number":3907,"context_line":"                # rebuilding the volume backed instance so we don\u0027t have"},{"line_number":3908,"context_line":"                # to worry about other callers as they won\u0027t satisfy this"},{"line_number":3909,"context_line":"                # condition."},{"line_number":3910,"context_line":"                if not detach_root_bdm and bdm.is_root:"},{"line_number":3911,"context_line":"                    continue"},{"line_number":3912,"context_line":"                if bdm.is_volume:"},{"line_number":3913,"context_line":"                    # NOTE (ildikov): Having the attachment_id set in the BDM"}],"source_content_type":"text/x-python","patch_set":35,"id":"867a55c4_c20d08c9","line":3910,"in_reply_to":"681a7172_e80e018f","updated":"2022-08-29 18:55:53.000000000","message":"Done","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8c3f660c6e8c1aafa220b525b263d89c10371329","unresolved":true,"context_lines":[{"line_number":3407,"context_line":"        LOG.error(msg, msg_args)"},{"line_number":3408,"context_line":"        raise exception.ReimageException(msg % msg_args)"},{"line_number":3409,"context_line":""},{"line_number":3410,"context_line":"    def _detach_device(self, context, instance, root_bdm):"},{"line_number":3411,"context_line":"        volume_id \u003d root_bdm.volume_id"},{"line_number":3412,"context_line":"        mp \u003d root_bdm.device_name"},{"line_number":3413,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"}],"source_content_type":"text/x-python","patch_set":36,"id":"a3ef922d_f0cf7b7d","line":3410,"range":{"start_line":3410,"start_character":8,"end_line":3410,"end_character":22},"updated":"2022-08-30 14:55:57.000000000","message":"we should have chosen a better name than this so it would be nice to use something more descriptive in a follow-up patch\n\nnova can detach NICs, PCI device mdevs ectra, not just volumes so _detach_device is really really ambiguous.\n\nthis is an internal method however so we can change this later\n\n_detach_root_volume","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a76ac0096d91c19fbca5e71d82ff56a5a531d9b","unresolved":false,"context_lines":[{"line_number":3407,"context_line":"        LOG.error(msg, msg_args)"},{"line_number":3408,"context_line":"        raise exception.ReimageException(msg % msg_args)"},{"line_number":3409,"context_line":""},{"line_number":3410,"context_line":"    def _detach_device(self, context, instance, root_bdm):"},{"line_number":3411,"context_line":"        volume_id \u003d root_bdm.volume_id"},{"line_number":3412,"context_line":"        mp \u003d root_bdm.device_name"},{"line_number":3413,"context_line":"        old_connection_info \u003d jsonutils.loads(root_bdm.connection_info)"}],"source_content_type":"text/x-python","patch_set":36,"id":"29faeab2_e770dd9d","line":3410,"range":{"start_line":3410,"start_character":8,"end_line":3410,"end_character":22},"in_reply_to":"a3ef922d_f0cf7b7d","updated":"2022-08-31 11:36:22.000000000","message":"Done","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8c3f660c6e8c1aafa220b525b263d89c10371329","unresolved":true,"context_lines":[{"line_number":3435,"context_line":""},{"line_number":3436,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3437,"context_line":"                                        image_id):"},{"line_number":3438,"context_line":"        # Get rood bdm and attachment ID associated to it"},{"line_number":3439,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3440,"context_line":"        old_attachment_id \u003d root_bdm.attachment_id"},{"line_number":3441,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"01ec67d4_db0f427c","line":3438,"range":{"start_line":3438,"start_character":14,"end_line":3438,"end_character":18},"updated":"2022-08-30 14:55:57.000000000","message":"nit:root","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a76ac0096d91c19fbca5e71d82ff56a5a531d9b","unresolved":false,"context_lines":[{"line_number":3435,"context_line":""},{"line_number":3436,"context_line":"    def _rebuild_volume_backed_instance(self, context, instance, bdms,"},{"line_number":3437,"context_line":"                                        image_id):"},{"line_number":3438,"context_line":"        # Get rood bdm and attachment ID associated to it"},{"line_number":3439,"context_line":"        root_bdm \u003d compute_utils.get_root_bdm(context, instance, bdms)"},{"line_number":3440,"context_line":"        old_attachment_id \u003d root_bdm.attachment_id"},{"line_number":3441,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"f72ae32c_baee08dc","line":3438,"range":{"start_line":3438,"start_character":14,"end_line":3438,"end_character":18},"in_reply_to":"01ec67d4_db0f427c","updated":"2022-08-31 11:36:22.000000000","message":"Done","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8c3f660c6e8c1aafa220b525b263d89c10371329","unresolved":true,"context_lines":[{"line_number":3463,"context_line":"                          attachment_id)"},{"line_number":3464,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3465,"context_line":"            raise exception.BuildAbortException("},{"line_number":3466,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3467,"context_line":"        except cinder_exception.ClientException:"},{"line_number":3468,"context_line":"            if attachment_id:"},{"line_number":3469,"context_line":"                LOG.error(\u0027Failed to delete old attachment %s\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"738bee2c_6004c43c","line":3466,"updated":"2022-08-30 14:55:57.000000000","message":"+1","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a76ac0096d91c19fbca5e71d82ff56a5a531d9b","unresolved":false,"context_lines":[{"line_number":3463,"context_line":"                          attachment_id)"},{"line_number":3464,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3465,"context_line":"            raise exception.BuildAbortException("},{"line_number":3466,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3467,"context_line":"        except cinder_exception.ClientException:"},{"line_number":3468,"context_line":"            if attachment_id:"},{"line_number":3469,"context_line":"                LOG.error(\u0027Failed to delete old attachment %s\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"180de827_a882d4fa","line":3466,"in_reply_to":"738bee2c_6004c43c","updated":"2022-08-31 11:36:22.000000000","message":"Ack","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8c3f660c6e8c1aafa220b525b263d89c10371329","unresolved":true,"context_lines":[{"line_number":3472,"context_line":"                LOG.error(\u0027Failed to create new attachment\u0027)"},{"line_number":3473,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3474,"context_line":"            raise exception.BuildAbortException("},{"line_number":3475,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3476,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3477,"context_line":""},{"line_number":3478,"context_line":"        # Get the image requested for rebuild"}],"source_content_type":"text/x-python","patch_set":36,"id":"e6045b56_a44701e3","line":3475,"updated":"2022-08-30 14:55:57.000000000","message":"+1","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a76ac0096d91c19fbca5e71d82ff56a5a531d9b","unresolved":false,"context_lines":[{"line_number":3472,"context_line":"                LOG.error(\u0027Failed to create new attachment\u0027)"},{"line_number":3473,"context_line":"            msg \u003d _(\u0027Failed to rebuild volume backed instance.\u0027)"},{"line_number":3474,"context_line":"            raise exception.BuildAbortException("},{"line_number":3475,"context_line":"                instance_uuid\u003dinstance.uuid, reason\u003dmsg)"},{"line_number":3476,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":3477,"context_line":""},{"line_number":3478,"context_line":"        # Get the image requested for rebuild"}],"source_content_type":"text/x-python","patch_set":36,"id":"eb6e19f2_db55e02c","line":3475,"in_reply_to":"e6045b56_a44701e3","updated":"2022-08-31 11:36:22.000000000","message":"Ack","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"}],"nova/compute/rpcapi.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"76733dcf4d1420d2619634d1203d1d4002b24ae1","unresolved":true,"context_lines":[{"line_number":1081,"context_line":"            image_ref, orig_image_ref, orig_sys_metadata, bdms,"},{"line_number":1082,"context_line":"            recreate, on_shared_storage, host, node,"},{"line_number":1083,"context_line":"            preserve_ephemeral, migration, limits, request_spec, accel_uuids,"},{"line_number":1084,"context_line":"            reimage_boot_volume\u003dFalse):"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # NOTE(edleafe): compute nodes can only use the dict form of limits."},{"line_number":1087,"context_line":"        if isinstance(limits, objects.SchedulerLimits):"}],"source_content_type":"text/x-python","patch_set":19,"id":"423eda18_0f4d7d46","line":1084,"range":{"start_line":1084,"start_character":31,"end_line":1084,"end_character":37},"updated":"2022-02-28 17:10:50.000000000","message":"Ideally we would not make this an optional parameter, and I expect it\u0027s only called in a few places. Explicit is better than implicit.","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e9e1578f81bcbdcc17b4df0f1cbcad1ac14c5d4b","unresolved":true,"context_lines":[{"line_number":1081,"context_line":"            image_ref, orig_image_ref, orig_sys_metadata, bdms,"},{"line_number":1082,"context_line":"            recreate, on_shared_storage, host, node,"},{"line_number":1083,"context_line":"            preserve_ephemeral, migration, limits, request_spec, accel_uuids,"},{"line_number":1084,"context_line":"            reimage_boot_volume\u003dFalse):"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # NOTE(edleafe): compute nodes can only use the dict form of limits."},{"line_number":1087,"context_line":"        if isinstance(limits, objects.SchedulerLimits):"}],"source_content_type":"text/x-python","patch_set":19,"id":"e8e3ce5c_c8de8ae6","line":1084,"range":{"start_line":1084,"start_character":31,"end_line":1084,"end_character":37},"in_reply_to":"423eda18_0f4d7d46","updated":"2022-02-28 18:17:29.000000000","message":"If we want to make this compatible with old API/conductor, we need to make it optional. If we remove the default value, all requests from conductor manager will fail here saying reimage_boot_volume is required but not passed.\nI\u0027m not sure how other parameters were added but i suppose they were added in a single patch containing the conductor and compute logic together else a separate patch for compute changes would fail here (as this was failing a lot of functional tests).","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"c43fc2c4cd2b881c79b8df2d5aa1a59097937a62","unresolved":false,"context_lines":[{"line_number":1081,"context_line":"            image_ref, orig_image_ref, orig_sys_metadata, bdms,"},{"line_number":1082,"context_line":"            recreate, on_shared_storage, host, node,"},{"line_number":1083,"context_line":"            preserve_ephemeral, migration, limits, request_spec, accel_uuids,"},{"line_number":1084,"context_line":"            reimage_boot_volume\u003dFalse):"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # NOTE(edleafe): compute nodes can only use the dict form of limits."},{"line_number":1087,"context_line":"        if isinstance(limits, objects.SchedulerLimits):"}],"source_content_type":"text/x-python","patch_set":19,"id":"72373298_b86d00ea","line":1084,"range":{"start_line":1084,"start_character":31,"end_line":1084,"end_character":37},"in_reply_to":"da4ed418_6ec5671f","updated":"2022-02-28 19:18:30.000000000","message":"As discussed, will add a placeholder in conductor manager for this patch and will correct it in the next conductor changes patch.","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e32be3ac30a09bf30e3815a1bfef51aee74bbc46","unresolved":true,"context_lines":[{"line_number":1081,"context_line":"            image_ref, orig_image_ref, orig_sys_metadata, bdms,"},{"line_number":1082,"context_line":"            recreate, on_shared_storage, host, node,"},{"line_number":1083,"context_line":"            preserve_ephemeral, migration, limits, request_spec, accel_uuids,"},{"line_number":1084,"context_line":"            reimage_boot_volume\u003dFalse):"},{"line_number":1085,"context_line":""},{"line_number":1086,"context_line":"        # NOTE(edleafe): compute nodes can only use the dict form of limits."},{"line_number":1087,"context_line":"        if isinstance(limits, objects.SchedulerLimits):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da4ed418_6ec5671f","line":1084,"range":{"start_line":1084,"start_character":31,"end_line":1084,"end_character":37},"in_reply_to":"e8e3ce5c_c8de8ae6","updated":"2022-02-28 18:38:24.000000000","message":"It must be optional on the wire, but it should not be optional here. This is the client-side interface to the RPC interface, so we should always pass our intention here. Just like you did in the compute RPC interface, we should always pass it here and then refuse to make the call if we can\u0027t make a compatible one. The *manager* side needs to tolerate it being missing, if old clients are used, but this side should always expect it from anything using this client.","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"76733dcf4d1420d2619634d1203d1d4002b24ae1","unresolved":true,"context_lines":[{"line_number":1102,"context_line":"        if not client.can_send_version(version):"},{"line_number":1103,"context_line":"            if msg_args[\u0027reimage_boot_volume\u0027]:"},{"line_number":1104,"context_line":"                raise exception.NovaException("},{"line_number":1105,"context_line":"                    \u0027Compute RPC version does not recognize \u0027"},{"line_number":1106,"context_line":"                    \u0027reimage_boot_volume parameter.\u0027)"},{"line_number":1107,"context_line":"            else:"},{"line_number":1108,"context_line":"                del msg_args[\u0027reimage_boot_volume\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"e210aec5_565e87a9","line":1105,"range":{"start_line":1105,"start_character":50,"end_line":1105,"end_character":59},"updated":"2022-02-28 17:10:50.000000000","message":"nit: \"support\"","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e9e1578f81bcbdcc17b4df0f1cbcad1ac14c5d4b","unresolved":false,"context_lines":[{"line_number":1102,"context_line":"        if not client.can_send_version(version):"},{"line_number":1103,"context_line":"            if msg_args[\u0027reimage_boot_volume\u0027]:"},{"line_number":1104,"context_line":"                raise exception.NovaException("},{"line_number":1105,"context_line":"                    \u0027Compute RPC version does not recognize \u0027"},{"line_number":1106,"context_line":"                    \u0027reimage_boot_volume parameter.\u0027)"},{"line_number":1107,"context_line":"            else:"},{"line_number":1108,"context_line":"                del msg_args[\u0027reimage_boot_volume\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"2edce2e2_93544377","line":1105,"range":{"start_line":1105,"start_character":50,"end_line":1105,"end_character":59},"in_reply_to":"e210aec5_565e87a9","updated":"2022-02-28 18:17:29.000000000","message":"Done","commit_id":"d3ad7808fb4c6d3796b05dbed7407832ad7c308b"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f2b2fe098afd71da7815ebf185048b067791ef39","unresolved":false,"context_lines":[{"line_number":1104,"context_line":"            if msg_args[\u0027reimage_boot_volume\u0027]:"},{"line_number":1105,"context_line":"                raise exception.NovaException("},{"line_number":1106,"context_line":"                    \u0027Compute RPC version does not support \u0027"},{"line_number":1107,"context_line":"                    \u0027reimage_boot_volume parameter.\u0027)"},{"line_number":1108,"context_line":"            else:"},{"line_number":1109,"context_line":"                del msg_args[\u0027reimage_boot_volume\u0027]"},{"line_number":1110,"context_line":"            version \u003d self._ver(ctxt, \u00275.12\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"f36ae4b0_da046a09","line":1107,"updated":"2022-08-31 10:02:51.000000000","message":"in theory this is impossible to go into this conditional and pass the parameter if you correctly negociate with the client, but meh.","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"}],"nova/conductor/manager.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":1312,"context_line":"                limits\u003dlimits,"},{"line_number":1313,"context_line":"                request_spec\u003drequest_spec,"},{"line_number":1314,"context_line":"                accel_uuids\u003daccel_uuids,"},{"line_number":1315,"context_line":"                reimage_boot_volume\u003dFalse)"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"    def _validate_image_traits_for_rebuild(self, context, instance, image_ref):"},{"line_number":1318,"context_line":"        \"\"\"Validates that the traits specified in the image can be satisfied"}],"source_content_type":"text/x-python","patch_set":32,"id":"0863c5d5_498a8594","line":1315,"updated":"2022-08-26 13:24:08.000000000","message":"why we are passing always False here? We have reimage_boot_volume passed to us so I think we need to pass it forward at least for the rebuild case (but I guess it is always false for the evac case)","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4a29b706845e829080288d5596af42bc449e1d3c","unresolved":true,"context_lines":[{"line_number":1312,"context_line":"                limits\u003dlimits,"},{"line_number":1313,"context_line":"                request_spec\u003drequest_spec,"},{"line_number":1314,"context_line":"                accel_uuids\u003daccel_uuids,"},{"line_number":1315,"context_line":"                reimage_boot_volume\u003dFalse)"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"    def _validate_image_traits_for_rebuild(self, context, instance, image_ref):"},{"line_number":1318,"context_line":"        \"\"\"Validates that the traits specified in the image can be satisfied"}],"source_content_type":"text/x-python","patch_set":32,"id":"599a2e76_04f0630f","line":1315,"in_reply_to":"0863c5d5_498a8594","updated":"2022-08-26 13:58:22.000000000","message":"You probably already realized this, but because the conductor chunk of this is the next patch up so this is just keeping the outbound RPC interface consistent until that shows up.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":1312,"context_line":"                limits\u003dlimits,"},{"line_number":1313,"context_line":"                request_spec\u003drequest_spec,"},{"line_number":1314,"context_line":"                accel_uuids\u003daccel_uuids,"},{"line_number":1315,"context_line":"                reimage_boot_volume\u003dFalse)"},{"line_number":1316,"context_line":""},{"line_number":1317,"context_line":"    def _validate_image_traits_for_rebuild(self, context, instance, image_ref):"},{"line_number":1318,"context_line":"        \"\"\"Validates that the traits specified in the image can be satisfied"}],"source_content_type":"text/x-python","patch_set":32,"id":"c78d7643_d100b8a0","line":1315,"in_reply_to":"599a2e76_04f0630f","updated":"2022-08-26 20:59:49.000000000","message":"Ack","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"}],"nova/conf/compute.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":315,"context_line":"Number of seconds to wait for volume-reimaged events to arrive before"},{"line_number":316,"context_line":"continuing or failing."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"Try increasing the timeout if the image size is big and you are hitting"},{"line_number":319,"context_line":"timeout failures."},{"line_number":320,"context_line":"\"\"\"),"},{"line_number":321,"context_line":"]"},{"line_number":322,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"a31e152c_dde4b9b3","line":319,"range":{"start_line":318,"start_character":0,"end_line":319,"end_character":17},"updated":"2022-02-22 20:06:27.000000000","message":"Is five minutes a reasonable default? It is for the networking that I\u0027m sure you copied this from, but in the case of multi-gigabyte storage, I wonder if it\u0027s so short that everyone would have to adjust this.\n\nAlso, it seems like this really needs to scale with the image size. Maybe this should be \"reimage_timeout_per_gb\" or something, where we multiply this by how many gigs the image is? Otherwise people with 2GB images will have to wait a looong time to find out the reimage failed, in order for this to be also workable for people using 40GB images.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":true,"context_lines":[{"line_number":315,"context_line":"Number of seconds to wait for volume-reimaged events to arrive before"},{"line_number":316,"context_line":"continuing or failing."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"Try increasing the timeout if the image size is big and you are hitting"},{"line_number":319,"context_line":"timeout failures."},{"line_number":320,"context_line":"\"\"\"),"},{"line_number":321,"context_line":"]"},{"line_number":322,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"e51fa8cd_01a0a87c","line":319,"range":{"start_line":318,"start_character":0,"end_line":319,"end_character":17},"in_reply_to":"a31e152c_dde4b9b3","updated":"2022-02-23 11:41:17.000000000","message":"You\u0027re right, it should be a per GB timeout to scale well. Updating in next PS.","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":false,"context_lines":[{"line_number":315,"context_line":"Number of seconds to wait for volume-reimaged events to arrive before"},{"line_number":316,"context_line":"continuing or failing."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"Try increasing the timeout if the image size is big and you are hitting"},{"line_number":319,"context_line":"timeout failures."},{"line_number":320,"context_line":"\"\"\"),"},{"line_number":321,"context_line":"]"},{"line_number":322,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9506e823_5bfa8fd8","line":319,"range":{"start_line":318,"start_character":0,"end_line":319,"end_character":17},"in_reply_to":"e51fa8cd_01a0a87c","updated":"2022-02-23 15:02:05.000000000","message":"Ack","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d68f46d4d00779259d76fd3d65a8bc347a39ebc0","unresolved":true,"context_lines":[{"line_number":319,"context_line":"will be multiplied by the GB size of image. Eg: an image of 6 GB will have"},{"line_number":320,"context_line":"a timeout of 50 * 6 \u003d 300 seconds."},{"line_number":321,"context_line":"Try increasing the timeout if the image copy per GB takes more time and you"},{"line_number":322,"context_line":"are hitting timeout failures."},{"line_number":323,"context_line":"\"\"\"),"},{"line_number":324,"context_line":"]"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"4cbbd57b_438f289a","line":322,"updated":"2022-02-23 15:02:05.000000000","message":"Nice","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"7d5845b3e11e6338687af4897cce705f853cbd1c","unresolved":false,"context_lines":[{"line_number":319,"context_line":"will be multiplied by the GB size of image. Eg: an image of 6 GB will have"},{"line_number":320,"context_line":"a timeout of 50 * 6 \u003d 300 seconds."},{"line_number":321,"context_line":"Try increasing the timeout if the image copy per GB takes more time and you"},{"line_number":322,"context_line":"are hitting timeout failures."},{"line_number":323,"context_line":"\"\"\"),"},{"line_number":324,"context_line":"]"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"88a144f3_460c9b0a","line":322,"in_reply_to":"4cbbd57b_438f289a","updated":"2022-02-28 15:07:00.000000000","message":"Ack","commit_id":"c8f38fc52594fd149be7d9e5df1d8b3db06bb33f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":306,"context_line":"  configured as HVM."},{"line_number":307,"context_line":" \"\"\"),"},{"line_number":308,"context_line":"    cfg.IntOpt(\u0027reimage_timeout_per_gb\u0027,"},{"line_number":309,"context_line":"        default\u003d50,"},{"line_number":310,"context_line":"        min\u003d0,"},{"line_number":311,"context_line":"        help\u003d\"\"\""},{"line_number":312,"context_line":"Timeout for reimaging a volume."}],"source_content_type":"text/x-python","patch_set":32,"id":"e62ea632_f3bb80bb","line":309,"range":{"start_line":309,"start_character":16,"end_line":309,"end_character":18},"updated":"2022-08-26 09:38:45.000000000","message":"nit this is a pretty high default.\n\nthat works out at about 20MBps\n\nhonestly i would set this to 10 or 20","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":true,"context_lines":[{"line_number":306,"context_line":"  configured as HVM."},{"line_number":307,"context_line":" \"\"\"),"},{"line_number":308,"context_line":"    cfg.IntOpt(\u0027reimage_timeout_per_gb\u0027,"},{"line_number":309,"context_line":"        default\u003d50,"},{"line_number":310,"context_line":"        min\u003d0,"},{"line_number":311,"context_line":"        help\u003d\"\"\""},{"line_number":312,"context_line":"Timeout for reimaging a volume."}],"source_content_type":"text/x-python","patch_set":32,"id":"2b8c5b6b_9973d09e","line":309,"range":{"start_line":309,"start_character":16,"end_line":309,"end_character":18},"in_reply_to":"253ed4fe_ef069797","updated":"2022-08-26 20:59:49.000000000","message":"I don\u0027t have strong feelings about this since it\u0027s configurable and honestly it also depends on the backend we are using. I think 20 should be good enough to expect a speed of 50MBps but not sure as I haven\u0027t run any performance numbers on this.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"12632913c38bf94baab4fad9cabf022f648f5fff","unresolved":false,"context_lines":[{"line_number":306,"context_line":"  configured as HVM."},{"line_number":307,"context_line":" \"\"\"),"},{"line_number":308,"context_line":"    cfg.IntOpt(\u0027reimage_timeout_per_gb\u0027,"},{"line_number":309,"context_line":"        default\u003d50,"},{"line_number":310,"context_line":"        min\u003d0,"},{"line_number":311,"context_line":"        help\u003d\"\"\""},{"line_number":312,"context_line":"Timeout for reimaging a volume."}],"source_content_type":"text/x-python","patch_set":32,"id":"321f131b_f7933157","line":309,"range":{"start_line":309,"start_character":16,"end_line":309,"end_character":18},"in_reply_to":"2b8c5b6b_9973d09e","updated":"2022-08-26 21:01:35.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4a29b706845e829080288d5596af42bc449e1d3c","unresolved":true,"context_lines":[{"line_number":306,"context_line":"  configured as HVM."},{"line_number":307,"context_line":" \"\"\"),"},{"line_number":308,"context_line":"    cfg.IntOpt(\u0027reimage_timeout_per_gb\u0027,"},{"line_number":309,"context_line":"        default\u003d50,"},{"line_number":310,"context_line":"        min\u003d0,"},{"line_number":311,"context_line":"        help\u003d\"\"\""},{"line_number":312,"context_line":"Timeout for reimaging a volume."}],"source_content_type":"text/x-python","patch_set":32,"id":"253ed4fe_ef069797","line":309,"range":{"start_line":309,"start_character":16,"end_line":309,"end_character":18},"in_reply_to":"e62ea632_f3bb80bb","updated":"2022-08-26 13:58:22.000000000","message":"Maybe we should take advice from the guy that runs the project this waits for? :)","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":307,"context_line":" \"\"\"),"},{"line_number":308,"context_line":"    cfg.IntOpt(\u0027reimage_timeout_per_gb\u0027,"},{"line_number":309,"context_line":"        default\u003d50,"},{"line_number":310,"context_line":"        min\u003d0,"},{"line_number":311,"context_line":"        help\u003d\"\"\""},{"line_number":312,"context_line":"Timeout for reimaging a volume."},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"41c7fe2a_36b68acc","line":310,"range":{"start_line":310,"start_character":12,"end_line":310,"end_character":13},"updated":"2022-08-26 09:38:45.000000000","message":"the min should likely be 1\n\nwe tend to use -1 if we want to allow infinity timesout and the doc text does not indicate that 0 would have any specail menaing so logicaly it should instantly timeout and fail.\n\n\nso unless we are toign to allow infinity timeouts with -1 we should just set the min value to 1","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":307,"context_line":" \"\"\"),"},{"line_number":308,"context_line":"    cfg.IntOpt(\u0027reimage_timeout_per_gb\u0027,"},{"line_number":309,"context_line":"        default\u003d50,"},{"line_number":310,"context_line":"        min\u003d0,"},{"line_number":311,"context_line":"        help\u003d\"\"\""},{"line_number":312,"context_line":"Timeout for reimaging a volume."},{"line_number":313,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"e7d84082_bbc5ff5e","line":310,"range":{"start_line":310,"start_character":12,"end_line":310,"end_character":13},"in_reply_to":"41c7fe2a_36b68acc","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"}],"nova/objects/service.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# NOTE(danms): This is the global service version counter"},{"line_number":34,"context_line":"SERVICE_VERSION \u003d 62"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# NOTE(danms): This is our SERVICE_VERSION history. The idea is that any"}],"source_content_type":"text/x-python","patch_set":32,"id":"8ac821c8_b0fcde4c","line":34,"updated":"2022-08-26 09:38:45.000000000","message":"this now needs to be 64\n\n62 and 63 were added by the vdpa seriese","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# NOTE(danms): This is the global service version counter"},{"line_number":34,"context_line":"SERVICE_VERSION \u003d 62"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# NOTE(danms): This is our SERVICE_VERSION history. The idea is that any"}],"source_content_type":"text/x-python","patch_set":32,"id":"b1c7562b_e25626e8","line":34,"in_reply_to":"8ac821c8_b0fcde4c","updated":"2022-08-26 13:24:08.000000000","message":"yes this is one reason of the merge conflict","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"# NOTE(danms): This is the global service version counter"},{"line_number":34,"context_line":"SERVICE_VERSION \u003d 62"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# NOTE(danms): This is our SERVICE_VERSION history. The idea is that any"}],"source_content_type":"text/x-python","patch_set":32,"id":"3bf3e4d7_c7d0378a","line":34,"in_reply_to":"b1c7562b_e25626e8","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cf8e9ba253ee5f669b1cdb68653465b0494545b","unresolved":true,"context_lines":[{"line_number":216,"context_line":"    # Version 61: Compute RPC v6.0:"},{"line_number":217,"context_line":"    # Add support for remotely-managed ports (vnic-type \u0027remote-managed\u0027)"},{"line_number":218,"context_line":"    {\u0027compute_rpc\u0027: \u00276.0\u0027},"},{"line_number":219,"context_line":"    # Version 62: Compute RPC v6.1:"},{"line_number":220,"context_line":"    # Add reimage_boot_volume parameter to rebuild_instance()"},{"line_number":221,"context_line":"    {\u0027compute_rpc\u0027: \u00276.1\u0027},"},{"line_number":222,"context_line":")"}],"source_content_type":"text/x-python","patch_set":32,"id":"c603499c_09b1d8e4","line":219,"range":{"start_line":219,"start_character":14,"end_line":219,"end_character":16},"updated":"2022-08-26 13:24:08.000000000","message":"ditto","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":216,"context_line":"    # Version 61: Compute RPC v6.0:"},{"line_number":217,"context_line":"    # Add support for remotely-managed ports (vnic-type \u0027remote-managed\u0027)"},{"line_number":218,"context_line":"    {\u0027compute_rpc\u0027: \u00276.0\u0027},"},{"line_number":219,"context_line":"    # Version 62: Compute RPC v6.1:"},{"line_number":220,"context_line":"    # Add reimage_boot_volume parameter to rebuild_instance()"},{"line_number":221,"context_line":"    {\u0027compute_rpc\u0027: \u00276.1\u0027},"},{"line_number":222,"context_line":")"}],"source_content_type":"text/x-python","patch_set":32,"id":"7a2551c6_e59c923b","line":219,"range":{"start_line":219,"start_character":14,"end_line":219,"end_character":16},"in_reply_to":"c603499c_09b1d8e4","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":2713,"context_line":""},{"line_number":2714,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":2715,"context_line":"                       return_value\u003dFalse)"},{"line_number":2716,"context_line":"    def test_rebuild(self, mock_is_vol_backed):"},{"line_number":2717,"context_line":"        # Ensure instance can be rebuilt."},{"line_number":2718,"context_line":"        instance \u003d self._create_fake_instance_obj()"},{"line_number":2719,"context_line":"        image_ref \u003d instance[\u0027image_ref\u0027]"}],"source_content_type":"text/x-python","patch_set":26,"id":"3a645528_31be6c95","line":2716,"range":{"start_line":2716,"start_character":27,"end_line":2716,"end_character":45},"updated":"2022-03-21 14:37:54.000000000","message":"Ensure this was called?","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":2713,"context_line":""},{"line_number":2714,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":2715,"context_line":"                       return_value\u003dFalse)"},{"line_number":2716,"context_line":"    def test_rebuild(self, mock_is_vol_backed):"},{"line_number":2717,"context_line":"        # Ensure instance can be rebuilt."},{"line_number":2718,"context_line":"        instance \u003d self._create_fake_instance_obj()"},{"line_number":2719,"context_line":"        image_ref \u003d instance[\u0027image_ref\u0027]"}],"source_content_type":"text/x-python","patch_set":26,"id":"1e4379b7_68054684","line":2716,"range":{"start_line":2716,"start_character":27,"end_line":2716,"end_character":45},"in_reply_to":"3a645528_31be6c95","updated":"2022-03-23 11:00:09.000000000","message":"Removing this since it\u0027s not called as reimage_boot_volume is False.\nI think i added this when the reimage_boot_volume param wasn\u0027t passed down to the compute manager and this was called everytime but it\u0027s not called anymore (it\u0027s called once actually from [1] but we don\u0027t want to validate that here).\n\n[1] https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L1754-L1755","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":2819,"context_line":""},{"line_number":2820,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":2821,"context_line":"                       return_value\u003dFalse)"},{"line_number":2822,"context_line":"    def test_rebuild_no_image(self, mock_is_vol_backed):"},{"line_number":2823,"context_line":"        # Ensure instance can be rebuilt when started with no image."},{"line_number":2824,"context_line":"        params \u003d {\u0027image_ref\u0027: \u0027\u0027}"},{"line_number":2825,"context_line":"        instance \u003d self._create_fake_instance_obj(params)"}],"source_content_type":"text/x-python","patch_set":26,"id":"980714bc_f409ca32","line":2822,"range":{"start_line":2822,"start_character":36,"end_line":2822,"end_character":54},"updated":"2022-03-21 14:37:54.000000000","message":"Same.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":2819,"context_line":""},{"line_number":2820,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":2821,"context_line":"                       return_value\u003dFalse)"},{"line_number":2822,"context_line":"    def test_rebuild_no_image(self, mock_is_vol_backed):"},{"line_number":2823,"context_line":"        # Ensure instance can be rebuilt when started with no image."},{"line_number":2824,"context_line":"        params \u003d {\u0027image_ref\u0027: \u0027\u0027}"},{"line_number":2825,"context_line":"        instance \u003d self._create_fake_instance_obj(params)"}],"source_content_type":"text/x-python","patch_set":26,"id":"4879938a_f4a97616","line":2822,"range":{"start_line":2822,"start_character":36,"end_line":2822,"end_character":54},"in_reply_to":"980714bc_f409ca32","updated":"2022-03-23 11:00:09.000000000","message":"removing this, same reason as above","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":2839,"context_line":""},{"line_number":2840,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":2841,"context_line":"                       return_value\u003dFalse)"},{"line_number":2842,"context_line":"    def test_rebuild_launched_at_time(self, mock_is_vol_backed):"},{"line_number":2843,"context_line":"        # Ensure instance can be rebuilt."},{"line_number":2844,"context_line":"        old_time \u003d datetime.datetime(2012, 4, 1)"},{"line_number":2845,"context_line":"        cur_time \u003d datetime.datetime(2012, 12, 21, 12, 21)"}],"source_content_type":"text/x-python","patch_set":26,"id":"1cfcc6b2_0cd4047c","line":2842,"range":{"start_line":2842,"start_character":44,"end_line":2842,"end_character":62},"updated":"2022-03-21 14:37:54.000000000","message":"Here too.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":2839,"context_line":""},{"line_number":2840,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":2841,"context_line":"                       return_value\u003dFalse)"},{"line_number":2842,"context_line":"    def test_rebuild_launched_at_time(self, mock_is_vol_backed):"},{"line_number":2843,"context_line":"        # Ensure instance can be rebuilt."},{"line_number":2844,"context_line":"        old_time \u003d datetime.datetime(2012, 4, 1)"},{"line_number":2845,"context_line":"        cur_time \u003d datetime.datetime(2012, 12, 21, 12, 21)"}],"source_content_type":"text/x-python","patch_set":26,"id":"fb84fa12_107d8670","line":2842,"range":{"start_line":2842,"start_character":44,"end_line":2842,"end_character":62},"in_reply_to":"1cfcc6b2_0cd4047c","updated":"2022-03-23 11:00:09.000000000","message":"removing this, same reason as above","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":5096,"context_line":""},{"line_number":5097,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":5098,"context_line":"                       return_value\u003dFalse)"},{"line_number":5099,"context_line":"    def test_rebuild_instance_notification(self, mock_is_vol_backed):"},{"line_number":5100,"context_line":"        # Ensure notifications on instance migrate/resize."},{"line_number":5101,"context_line":"        old_time \u003d datetime.datetime(2012, 4, 1)"},{"line_number":5102,"context_line":"        cur_time \u003d datetime.datetime(2012, 12, 21, 12, 21)"}],"source_content_type":"text/x-python","patch_set":26,"id":"89775f41_e3dd185f","line":5099,"range":{"start_line":5099,"start_character":49,"end_line":5099,"end_character":67},"updated":"2022-03-21 14:37:54.000000000","message":"Also here","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":5096,"context_line":""},{"line_number":5097,"context_line":"    @mock.patch.object(compute_utils, \u0027is_volume_backed_instance\u0027,"},{"line_number":5098,"context_line":"                       return_value\u003dFalse)"},{"line_number":5099,"context_line":"    def test_rebuild_instance_notification(self, mock_is_vol_backed):"},{"line_number":5100,"context_line":"        # Ensure notifications on instance migrate/resize."},{"line_number":5101,"context_line":"        old_time \u003d datetime.datetime(2012, 4, 1)"},{"line_number":5102,"context_line":"        cur_time \u003d datetime.datetime(2012, 12, 21, 12, 21)"}],"source_content_type":"text/x-python","patch_set":26,"id":"04f892e5_4405756d","line":5099,"range":{"start_line":5099,"start_character":49,"end_line":5099,"end_character":67},"in_reply_to":"89775f41_e3dd185f","updated":"2022-03-23 11:00:09.000000000","message":"removing this, same reason as above","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":5635,"context_line":"                instance, clean_shutdown\u003dTrue)"},{"line_number":5636,"context_line":"            if is_vol_backed and reimage_boot_vol:"},{"line_number":5637,"context_line":"                mock_rebuild_vol_backed_inst.assert_called_once_with("},{"line_number":5638,"context_line":"                    self.context, instance, [], fake_image_meta.id)"},{"line_number":5639,"context_line":""},{"line_number":5640,"context_line":"    @mock.patch(\u0027nova.volume.cinder.API.attachment_delete\u0027)"},{"line_number":5641,"context_line":"    @mock.patch(\u0027nova.volume.cinder.API.attachment_create\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"979d5373_986eccd3","line":5638,"updated":"2022-03-21 14:37:54.000000000","message":"Assert not called in the other cases.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":5635,"context_line":"                instance, clean_shutdown\u003dTrue)"},{"line_number":5636,"context_line":"            if is_vol_backed and reimage_boot_vol:"},{"line_number":5637,"context_line":"                mock_rebuild_vol_backed_inst.assert_called_once_with("},{"line_number":5638,"context_line":"                    self.context, instance, [], fake_image_meta.id)"},{"line_number":5639,"context_line":""},{"line_number":5640,"context_line":"    @mock.patch(\u0027nova.volume.cinder.API.attachment_delete\u0027)"},{"line_number":5641,"context_line":"    @mock.patch(\u0027nova.volume.cinder.API.attachment_create\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"22f3fa1d_a792a71d","line":5638,"in_reply_to":"979d5373_986eccd3","updated":"2022-03-23 11:00:09.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":5659,"context_line":"                  return_value\u003droot_bdm),"},{"line_number":5660,"context_line":"            mock.patch.object(self.compute, \u0027volume_api\u0027),"},{"line_number":5661,"context_line":"            mock.patch.object(self.compute.image_api, \u0027get\u0027),"},{"line_number":5662,"context_line":"        ) as("},{"line_number":5663,"context_line":"            mock_save,"},{"line_number":5664,"context_line":"            mock_get_root_bdm,"},{"line_number":5665,"context_line":"            mock_vol_api,"}],"source_content_type":"text/x-python","patch_set":26,"id":"0f5ee345_e32a219b","line":5662,"range":{"start_line":5662,"start_character":12,"end_line":5662,"end_character":13},"updated":"2022-03-21 14:37:54.000000000","message":"Whitespace before this?","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"                  return_value\u003droot_bdm),"},{"line_number":5660,"context_line":"            mock.patch.object(self.compute, \u0027volume_api\u0027),"},{"line_number":5661,"context_line":"            mock.patch.object(self.compute.image_api, \u0027get\u0027),"},{"line_number":5662,"context_line":"        ) as("},{"line_number":5663,"context_line":"            mock_save,"},{"line_number":5664,"context_line":"            mock_get_root_bdm,"},{"line_number":5665,"context_line":"            mock_vol_api,"}],"source_content_type":"text/x-python","patch_set":26,"id":"787e616c_868b1246","line":5662,"range":{"start_line":5662,"start_character":12,"end_line":5662,"end_character":13},"in_reply_to":"0f5ee345_e32a219b","updated":"2022-03-23 11:00:09.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":5661,"context_line":"            mock.patch.object(self.compute.image_api, \u0027get\u0027),"},{"line_number":5662,"context_line":"        ) as("},{"line_number":5663,"context_line":"            mock_save,"},{"line_number":5664,"context_line":"            mock_get_root_bdm,"},{"line_number":5665,"context_line":"            mock_vol_api,"},{"line_number":5666,"context_line":"            mock_get_img"},{"line_number":5667,"context_line":"        ):"}],"source_content_type":"text/x-python","patch_set":26,"id":"83ee0ed6_e1ea4106","line":5664,"updated":"2022-03-21 14:37:54.000000000","message":"What about confirming how these were called (and that they were)?","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":5661,"context_line":"            mock.patch.object(self.compute.image_api, \u0027get\u0027),"},{"line_number":5662,"context_line":"        ) as("},{"line_number":5663,"context_line":"            mock_save,"},{"line_number":5664,"context_line":"            mock_get_root_bdm,"},{"line_number":5665,"context_line":"            mock_vol_api,"},{"line_number":5666,"context_line":"            mock_get_img"},{"line_number":5667,"context_line":"        ):"}],"source_content_type":"text/x-python","patch_set":26,"id":"be2a0248_e6cca52d","line":5664,"in_reply_to":"83ee0ed6_e1ea4106","updated":"2022-03-23 11:00:09.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":5667,"context_line":"        ):"},{"line_number":5668,"context_line":"            instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":5669,"context_line":"            instance.task_state \u003d task_states.REBUILDING"},{"line_number":5670,"context_line":"            instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":5671,"context_line":"            mock_get_img.return_value \u003d {\u0027size\u0027: 1}"},{"line_number":5672,"context_line":"            self.compute._rebuild_volume_backed_instance("},{"line_number":5673,"context_line":"                self.context, instance, bdms, uuids.image_id)"}],"source_content_type":"text/x-python","patch_set":26,"id":"cd06aa2f_a5d575e6","line":5670,"updated":"2022-03-21 14:37:54.000000000","message":"Isn\u0027t this just calling your mock?","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":5667,"context_line":"        ):"},{"line_number":5668,"context_line":"            instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":5669,"context_line":"            instance.task_state \u003d task_states.REBUILDING"},{"line_number":5670,"context_line":"            instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":5671,"context_line":"            mock_get_img.return_value \u003d {\u0027size\u0027: 1}"},{"line_number":5672,"context_line":"            self.compute._rebuild_volume_backed_instance("},{"line_number":5673,"context_line":"                self.context, instance, bdms, uuids.image_id)"}],"source_content_type":"text/x-python","patch_set":26,"id":"d4706baf_4e3673e4","line":5670,"in_reply_to":"cd06aa2f_a5d575e6","updated":"2022-03-23 11:00:09.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":5668,"context_line":"            instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":5669,"context_line":"            instance.task_state \u003d task_states.REBUILDING"},{"line_number":5670,"context_line":"            instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":5671,"context_line":"            mock_get_img.return_value \u003d {\u0027size\u0027: 1}"},{"line_number":5672,"context_line":"            self.compute._rebuild_volume_backed_instance("},{"line_number":5673,"context_line":"                self.context, instance, bdms, uuids.image_id)"},{"line_number":5674,"context_line":"            mock_vol_api.attachment_create.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":26,"id":"59ac13ac_89f10358","line":5671,"range":{"start_line":5671,"start_character":49,"end_line":5671,"end_character":50},"updated":"2022-03-21 14:37:54.000000000","message":"I think you should change this to something other than 1 to make sure we\u0027re doing the multiplication. Ideally something other than an even GiB as well to make sure the math.ceil does what you want.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":false,"context_lines":[{"line_number":5668,"context_line":"            instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":5669,"context_line":"            instance.task_state \u003d task_states.REBUILDING"},{"line_number":5670,"context_line":"            instance.save(expected_task_state\u003d[task_states.REBUILDING])"},{"line_number":5671,"context_line":"            mock_get_img.return_value \u003d {\u0027size\u0027: 1}"},{"line_number":5672,"context_line":"            self.compute._rebuild_volume_backed_instance("},{"line_number":5673,"context_line":"                self.context, instance, bdms, uuids.image_id)"},{"line_number":5674,"context_line":"            mock_vol_api.attachment_create.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":26,"id":"00440bd2_cd9f2282","line":5671,"range":{"start_line":5671,"start_character":49,"end_line":5671,"end_character":50},"in_reply_to":"59ac13ac_89f10358","updated":"2022-03-23 11:00:09.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":5752,"context_line":"                          self.compute._detach_device,"},{"line_number":5753,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5754,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5755,"context_line":"        self.assertRaises(Exception, self.compute._detach_device,  # noqa"},{"line_number":5756,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5757,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5758,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"67e68a8b_0e7a3b6e","line":5755,"range":{"start_line":5755,"start_character":67,"end_line":5755,"end_character":73},"updated":"2022-03-21 14:37:54.000000000","message":"Why, because of Exception? Just use TestingException and check for that here. That will confirm the diaper case.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":true,"context_lines":[{"line_number":5752,"context_line":"                          self.compute._detach_device,"},{"line_number":5753,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5754,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5755,"context_line":"        self.assertRaises(Exception, self.compute._detach_device,  # noqa"},{"line_number":5756,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5757,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5758,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba691d80_1b6768bc","line":5755,"range":{"start_line":5755,"start_character":67,"end_line":5755,"end_character":73},"in_reply_to":"67e68a8b_0e7a3b6e","updated":"2022-03-23 11:00:09.000000000","message":"Yes, because of Exception (is too broad) and No TestingException doesn\u0027t work\n\nERROR: nova.tests.unit.compute.test_compute_mgr.ComputeManagerUnitTestCase.test__detach_device\n----------------------------------------------------------------------\npythonlogging:\u0027\u0027: {{{\n2022-03-22 15:49:14,967 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.\n2022-03-22 15:49:14,967 WARNING [oslo_policy.policy] JSON formatted policy_file support is deprecated since Victoria release. You need to use YAML format which will be default in future. You can use ``oslopolicy-convert-json-to-yaml`` tool to convert existing JSON-formatted policy file to YAML-formatted in backward compatible way: https://docs.openstack.org/oslo.policy/latest/cli/oslopolicy-convert-json-to-yaml.html.\n2022-03-22 15:49:14,969 WARNING [oslo_policy.policy] Policy Rules [\u0027os_compute_api:extensions\u0027, \u0027os_compute_api:os-floating-ip-pools\u0027, \u0027os_compute_api:os-quota-sets:defaults\u0027, \u0027os_compute_api:os-availability-zone:list\u0027, \u0027os_compute_api:limits\u0027, \u0027project_admin_api\u0027, \u0027project_member_api\u0027, \u0027project_reader_api\u0027, \u0027project_reader_or_admin\u0027, \u0027os_compute_api:limits:other_project\u0027, \u0027os_compute_api:os-lock-server:unlock:unlock_override\u0027, \u0027os_compute_api:servers:create:zero_disk_flavor\u0027, \u0027compute:servers:resize:cross_cell\u0027] specified in policy files are the same as the defaults provided by the service. You can remove these rules from policy files which will make maintenance easier. You can detect these redundant rules by ``oslopolicy-list-redundant`` tool also.\n2022-03-22 15:49:14,975 INFO [nova.virt.driver] Loading compute driver \u0027fake.SmallFakeDriver\u0027\n2022-03-22 15:49:14,976 INFO [nova.compute.provider_config] No provider configs found in /etc/nova/provider_config/. If files are present, ensure the Nova process has access.\n2022-03-22 15:49:14,979 WARNING [nova.compute.manager] Ignoring DiskNotFound exception while detaching volume 9e7fdb30-1b1b-41d7-9e5f-804f4649e8ad from fake_vda : No disk at not\\here\n2022-03-22 15:49:14,980 WARNING [nova.compute.manager] Guest refused to detach volume 9e7fdb30-1b1b-41d7-9e5f-804f4649e8ad\n2022-03-22 15:49:14,980 ERROR [nova.compute.manager] Failed to detach volume 9e7fdb30-1b1b-41d7-9e5f-804f4649e8ad from fake_vda\nTraceback (most recent call last):\n  File \"/opt/stack/nova/nova/compute/manager.py\", line 3399, in _detach_device\n    self.driver.detach_volume(context, old_connection_info,\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/mock/mock.py\", line 1100, in __call__\n    return _mock_self._mock_call(*args, **kwargs)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/mock/mock.py\", line 1104, in _mock_call\n    return _mock_self._execute_mock_call(*args, **kwargs)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/mock/mock.py\", line 1165, in _execute_mock_call\n    raise result\nException\n}}}\n\nTraceback (most recent call last):\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/mock/mock.py\", line 1346, in patched\n    return func(*newargs, **newkeywargs)\n  File \"/opt/stack/nova/nova/tests/unit/compute/test_compute_mgr.py\", line 5769, in test__detach_device\n    self.assertRaises(test.TestingException, self.compute._detach_device,\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py\", line 467, in assertRaises\n    self.assertThat(our_callable, matcher)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py\", line 478, in assertThat\n    mismatch_error \u003d self._matchHelper(matchee, matcher, message, verbose)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py\", line 530, in _matchHelper\n    mismatch \u003d matcher.match(matchee)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/matchers/_exception.py\", line 104, in match\n    mismatch \u003d self.exception_matcher.match(exc_info)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/matchers/_higherorder.py\", line 62, in match\n    mismatch \u003d matcher.match(matchee)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py\", line 457, in match\n    reraise(*matchee)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/compat.py\", line 27, in reraise\n    raise exc_obj.with_traceback(exc_tb)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/matchers/_exception.py\", line 97, in match\n    result \u003d matchee()\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/testtools/testcase.py\", line 1039, in __call__\n    return self._callable_object(*self._args, **self._kwargs)\n  File \"/opt/stack/nova/nova/compute/manager.py\", line 3418, in _detach_device\n    self.volume_api.roll_detaching(context, volume_id)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/oslo_utils/excutils.py\", line 227, in __exit__\n    self.force_reraise()\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/oslo_utils/excutils.py\", line 200, in force_reraise\n    raise self.value\n  File \"/opt/stack/nova/nova/compute/manager.py\", line 3399, in _detach_device\n    self.driver.detach_volume(context, old_connection_info,\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/mock/mock.py\", line 1100, in __call__\n    return _mock_self._mock_call(*args, **kwargs)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/mock/mock.py\", line 1104, in _mock_call\n    return _mock_self._execute_mock_call(*args, **kwargs)\n  File \"/opt/stack/nova/.tox/py38/lib/python3.8/site-packages/mock/mock.py\", line 1165, in _execute_mock_call\n    raise result\nException","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":5752,"context_line":"                          self.compute._detach_device,"},{"line_number":5753,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5754,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5755,"context_line":"        self.assertRaises(Exception, self.compute._detach_device,  # noqa"},{"line_number":5756,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5757,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5758,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"bbda473a_444028c4","line":5755,"range":{"start_line":5755,"start_character":67,"end_line":5755,"end_character":73},"in_reply_to":"ba691d80_1b6768bc","updated":"2022-08-26 09:38:45.000000000","message":"i dont think this is adding value so i would prefer if you remove this call to detach.\n\nthe log above is just because you are hardcodeing a generic exctpion to be raised the third time this is invoked.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"12632913c38bf94baab4fad9cabf022f648f5fff","unresolved":false,"context_lines":[{"line_number":5752,"context_line":"                          self.compute._detach_device,"},{"line_number":5753,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5754,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5755,"context_line":"        self.assertRaises(Exception, self.compute._detach_device,  # noqa"},{"line_number":5756,"context_line":"                          self.context, instance, root_bdm)"},{"line_number":5757,"context_line":"        mock_roll_detach.assert_called_with(self.context, uuids.volume_id)"},{"line_number":5758,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"70a1cb65_47a93905","line":5755,"range":{"start_line":5755,"start_character":67,"end_line":5755,"end_character":73},"in_reply_to":"bbda473a_444028c4","updated":"2022-08-26 21:01:35.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":16,"context_line":"import copy"},{"line_number":17,"context_line":"import datetime"},{"line_number":18,"context_line":"import fixtures as std_fixtures"},{"line_number":19,"context_line":"import math"},{"line_number":20,"context_line":"import time"},{"line_number":21,"context_line":"from unittest import mock"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"fe321beb_ba0385a5","line":19,"range":{"start_line":19,"start_character":7,"end_line":19,"end_character":11},"updated":"2022-08-26 09:38:45.000000000","message":"this is not really needed see below","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import copy"},{"line_number":17,"context_line":"import datetime"},{"line_number":18,"context_line":"import fixtures as std_fixtures"},{"line_number":19,"context_line":"import math"},{"line_number":20,"context_line":"import time"},{"line_number":21,"context_line":"from unittest import mock"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"79b38a6f_49fbc229","line":19,"range":{"start_line":19,"start_character":7,"end_line":19,"end_character":11},"in_reply_to":"fe321beb_ba0385a5","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":5677,"context_line":"            save\u003dmock.MagicMock())"},{"line_number":5678,"context_line":"        bdms \u003d [root_bdm]"},{"line_number":5679,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":5680,"context_line":"        image_size_gb \u003d int(math.ceil(float(1073741823) / units.Gi))"},{"line_number":5681,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size_gb"},{"line_number":5682,"context_line":""},{"line_number":5683,"context_line":"        with test.nested("}],"source_content_type":"text/x-python","patch_set":32,"id":"1a732c95_c2d00385","line":5680,"range":{"start_line":5680,"start_character":24,"end_line":5680,"end_character":68},"updated":"2022-08-26 09:38:45.000000000","message":"since this is hardcoded why are we doign the calulation?\n\nyou cand just put the size here as 1","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":5677,"context_line":"            save\u003dmock.MagicMock())"},{"line_number":5678,"context_line":"        bdms \u003d [root_bdm]"},{"line_number":5679,"context_line":"        events \u003d [(\u0027volume-reimaged\u0027, root_bdm.volume_id)]"},{"line_number":5680,"context_line":"        image_size_gb \u003d int(math.ceil(float(1073741823) / units.Gi))"},{"line_number":5681,"context_line":"        deadline \u003d CONF.reimage_timeout_per_gb * image_size_gb"},{"line_number":5682,"context_line":""},{"line_number":5683,"context_line":"        with test.nested("}],"source_content_type":"text/x-python","patch_set":32,"id":"768cc23f_3e7b3e3f","line":5680,"range":{"start_line":5680,"start_character":24,"end_line":5680,"end_character":68},"in_reply_to":"1a732c95_c2d00385","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":5698,"context_line":"            # 1024 ** 3 \u003d 1073741824, here we are assigning size as"},{"line_number":5699,"context_line":"            # 1073741823 bytes (1024 ** 3 - 1) which is equivalent to"},{"line_number":5700,"context_line":"            # 0.99 GB. The math.ceil function will convert it to 1 GB"},{"line_number":5701,"context_line":"            mock_get_img.return_value \u003d {\u0027size\u0027: 1073741823}"},{"line_number":5702,"context_line":"            self.compute._rebuild_volume_backed_instance("},{"line_number":5703,"context_line":"                self.context, instance, bdms, uuids.image_id)"},{"line_number":5704,"context_line":"            mock_vol_api.attachment_create.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":32,"id":"82b54c3d_9b73a865","line":5701,"range":{"start_line":5701,"start_character":49,"end_line":5701,"end_character":59},"updated":"2022-08-26 09:38:45.000000000","message":"either set this to 1073741824 or 1024 ** 3\n\ntesting the math.ceil function is not germain to the test","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":5698,"context_line":"            # 1024 ** 3 \u003d 1073741824, here we are assigning size as"},{"line_number":5699,"context_line":"            # 1073741823 bytes (1024 ** 3 - 1) which is equivalent to"},{"line_number":5700,"context_line":"            # 0.99 GB. The math.ceil function will convert it to 1 GB"},{"line_number":5701,"context_line":"            mock_get_img.return_value \u003d {\u0027size\u0027: 1073741823}"},{"line_number":5702,"context_line":"            self.compute._rebuild_volume_backed_instance("},{"line_number":5703,"context_line":"                self.context, instance, bdms, uuids.image_id)"},{"line_number":5704,"context_line":"            mock_vol_api.attachment_create.assert_called_once_with("}],"source_content_type":"text/x-python","patch_set":32,"id":"ab25bf1c_d3ac548b","line":5701,"range":{"start_line":5701,"start_character":49,"end_line":5701,"end_character":59},"in_reply_to":"82b54c3d_9b73a865","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":5769,"context_line":"            \u0027\u0027,"},{"line_number":5770,"context_line":"            exception.DiskNotFound(location\u003d\"not\\\\here\"),"},{"line_number":5771,"context_line":"            exception.DeviceDetachFailed(device\u003d\"fake_dev\", reason\u003d\"unknown\"),"},{"line_number":5772,"context_line":"            Exception()"},{"line_number":5773,"context_line":"            ]"},{"line_number":5774,"context_line":"        mock_detach.side_effect \u003d exception_list"},{"line_number":5775,"context_line":"        fake_conn_info \u003d \u0027{}\u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"693edc5e_e6152ad9","line":5772,"range":{"start_line":5772,"start_character":12,"end_line":5772,"end_character":21},"updated":"2022-08-26 09:38:45.000000000","message":"you are explictly adding Exctpition to the list.\n\nim not sure we should be raisign a generic exctpion from this code path.","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":5769,"context_line":"            \u0027\u0027,"},{"line_number":5770,"context_line":"            exception.DiskNotFound(location\u003d\"not\\\\here\"),"},{"line_number":5771,"context_line":"            exception.DeviceDetachFailed(device\u003d\"fake_dev\", reason\u003d\"unknown\"),"},{"line_number":5772,"context_line":"            Exception()"},{"line_number":5773,"context_line":"            ]"},{"line_number":5774,"context_line":"        mock_detach.side_effect \u003d exception_list"},{"line_number":5775,"context_line":"        fake_conn_info \u003d \u0027{}\u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"b19acf33_637c677b","line":5772,"range":{"start_line":5772,"start_character":12,"end_line":5772,"end_character":21},"in_reply_to":"693edc5e_e6152ad9","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"cd6f12bb0ca897203037411038295bd24baa9a68"}],"nova/tests/unit/compute/test_rpcapi.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f9d5e795cd37eee0a37d00a81b07832a461192ea","unresolved":true,"context_lines":[{"line_number":250,"context_line":"    def test_confirm_resize_cast(self):"},{"line_number":251,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027cast\u0027,"},{"line_number":252,"context_line":"                instance\u003dself.fake_instance_obj, migration\u003d{\u0027id\u0027: \u0027foo\u0027},"},{"line_number":253,"context_line":"                host\u003d\u0027host\u0027, version\u003d\u00276.0\u0027)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_confirm_resize_call(self):"},{"line_number":256,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027call\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"1d2bf229_7fa158e3","line":253,"range":{"start_line":253,"start_character":29,"end_line":253,"end_character":42},"updated":"2022-03-21 14:37:54.000000000","message":"Perhaps I\u0027m missing something, but why do you need to add this all over this file?","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"90ca1a6f837e20cc961b2b9bb7b53fda410e2985","unresolved":true,"context_lines":[{"line_number":250,"context_line":"    def test_confirm_resize_cast(self):"},{"line_number":251,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027cast\u0027,"},{"line_number":252,"context_line":"                instance\u003dself.fake_instance_obj, migration\u003d{\u0027id\u0027: \u0027foo\u0027},"},{"line_number":253,"context_line":"                host\u003d\u0027host\u0027, version\u003d\u00276.0\u0027)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_confirm_resize_call(self):"},{"line_number":256,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027call\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"5ee322a0_39203f4a","line":253,"range":{"start_line":253,"start_character":29,"end_line":253,"end_character":42},"in_reply_to":"1d2bf229_7fa158e3","updated":"2022-03-23 11:00:09.000000000","message":"If we don\u0027t pass the version (i.e. expected version) _test_compute_api takes the latest compute version[1] i.e. 6.1[2] so we need to pass 6.0 explicitly as the version for these requests is 6.0[3][4]\n\n[1] https://github.com/openstack/nova/blob/master/nova/tests/unit/compute/test_rpcapi.py#L127-L128\n[2] https://review.opendev.org/c/openstack/nova/+/820368/26/nova/compute/manager.py#620\n[3] https://github.com/openstack/nova/blob/master/nova/compute/rpcapi.py#L625\n[4] https://github.com/openstack/nova/blob/master/nova/compute/rpcapi.py#L468-L469","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"bb0bd6dc787638042f2dc49a3194152e08c43bd3","unresolved":true,"context_lines":[{"line_number":250,"context_line":"    def test_confirm_resize_cast(self):"},{"line_number":251,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027cast\u0027,"},{"line_number":252,"context_line":"                instance\u003dself.fake_instance_obj, migration\u003d{\u0027id\u0027: \u0027foo\u0027},"},{"line_number":253,"context_line":"                host\u003d\u0027host\u0027, version\u003d\u00276.0\u0027)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_confirm_resize_call(self):"},{"line_number":256,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027call\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"6b8459dd_1209c61f","line":253,"range":{"start_line":253,"start_character":29,"end_line":253,"end_character":42},"in_reply_to":"5ee322a0_39203f4a","updated":"2022-08-26 09:38:45.000000000","message":"we epect our test to use the latest version unless tehy are testing a specific behavior of an old rpc api i which case we normally name the test with teh version to call that out.\n\nso im not confivece you should be changing this back to 6.0\n\nif you pin it we wont catch possible breakages in the future.\n\nwe would only need to pas 6.0 if we removed these calls form 6.1 or otherwise altered them.","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"3a5a690af42c48a2374710e018321c7076e5dfee","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    def test_confirm_resize_cast(self):"},{"line_number":251,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027cast\u0027,"},{"line_number":252,"context_line":"                instance\u003dself.fake_instance_obj, migration\u003d{\u0027id\u0027: \u0027foo\u0027},"},{"line_number":253,"context_line":"                host\u003d\u0027host\u0027, version\u003d\u00276.0\u0027)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_confirm_resize_call(self):"},{"line_number":256,"context_line":"        self._test_compute_api(\u0027confirm_resize\u0027, \u0027call\u0027,"}],"source_content_type":"text/x-python","patch_set":26,"id":"f6917e25_891ca3fc","line":253,"range":{"start_line":253,"start_character":29,"end_line":253,"end_character":42},"in_reply_to":"6b8459dd_1209c61f","updated":"2022-08-26 20:59:49.000000000","message":"Done","commit_id":"baab833892b7c5e138471fca028c1b79fbf6a387"}],"nova/virt/driver.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":true,"context_lines":[{"line_number":334,"context_line":"                attach_block_devices, network_info\u003dNone,"},{"line_number":335,"context_line":"                evacuate\u003dFalse, block_device_info\u003dNone,"},{"line_number":336,"context_line":"                preserve_ephemeral\u003dFalse, accel_uuids\u003dNone,"},{"line_number":337,"context_line":"                reimage_boot_volume\u003dFalse):"},{"line_number":338,"context_line":"        \"\"\"Destroy and re-make this instance."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        A \u0027rebuild\u0027 effectively purges all existing data from the system and"}],"source_content_type":"text/x-python","patch_set":35,"id":"e805d461_79fe9815","line":337,"updated":"2022-08-29 08:52:33.000000000","message":"This needs a mail to the ML to notify out of tree driver authors. (for example https://lists.openstack.org/pipermail/openstack-discuss/2020-July/015824.html)","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"730e87a9f59a7d5e1f40e1b2bb8ae80b0db0444b","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                attach_block_devices, network_info\u003dNone,"},{"line_number":335,"context_line":"                evacuate\u003dFalse, block_device_info\u003dNone,"},{"line_number":336,"context_line":"                preserve_ephemeral\u003dFalse, accel_uuids\u003dNone,"},{"line_number":337,"context_line":"                reimage_boot_volume\u003dFalse):"},{"line_number":338,"context_line":"        \"\"\"Destroy and re-make this instance."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        A \u0027rebuild\u0027 effectively purges all existing data from the system and"}],"source_content_type":"text/x-python","patch_set":35,"id":"80a47bc0_cbf3e368","line":337,"in_reply_to":"8d320dca_0454a8fe","updated":"2022-08-29 18:56:30.000000000","message":"Saw this too late ...","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a608cdf628febae2cc38426ef10b9b50a5f93e7","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                attach_block_devices, network_info\u003dNone,"},{"line_number":335,"context_line":"                evacuate\u003dFalse, block_device_info\u003dNone,"},{"line_number":336,"context_line":"                preserve_ephemeral\u003dFalse, accel_uuids\u003dNone,"},{"line_number":337,"context_line":"                reimage_boot_volume\u003dFalse):"},{"line_number":338,"context_line":"        \"\"\"Destroy and re-make this instance."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        A \u0027rebuild\u0027 effectively purges all existing data from the system and"}],"source_content_type":"text/x-python","patch_set":35,"id":"8d320dca_0454a8fe","line":337,"in_reply_to":"e805d461_79fe9815","updated":"2022-08-29 18:55:53.000000000","message":"Done\nhttps://lists.openstack.org/pipermail/openstack-discuss/2022-August/030176.html","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4484aac04857244ea11ae12fb3f2fac4618a08de","unresolved":true,"context_lines":[{"line_number":334,"context_line":"                attach_block_devices, network_info\u003dNone,"},{"line_number":335,"context_line":"                evacuate\u003dFalse, block_device_info\u003dNone,"},{"line_number":336,"context_line":"                preserve_ephemeral\u003dFalse, accel_uuids\u003dNone,"},{"line_number":337,"context_line":"                reimage_boot_volume\u003dFalse):"},{"line_number":338,"context_line":"        \"\"\"Destroy and re-make this instance."},{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        A \u0027rebuild\u0027 effectively purges all existing data from the system and"}],"source_content_type":"text/x-python","patch_set":35,"id":"27143c9e_89dd337e","line":337,"in_reply_to":"e805d461_79fe9815","updated":"2022-08-29 13:49:49.000000000","message":"I once again state my opinion that we have no out of tree plugin API for this and that such notifications are unnecessary.\n\nHowever, if we\u0027re going to, I think we should wait until this is merged, in case it doesn\u0027t make the deadline or anything else happens.","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f2b2fe098afd71da7815ebf185048b067791ef39","unresolved":false,"context_lines":[{"line_number":337,"context_line":"                attach_block_devices, network_info\u003dNone,"},{"line_number":338,"context_line":"                evacuate\u003dFalse, block_device_info\u003dNone,"},{"line_number":339,"context_line":"                preserve_ephemeral\u003dFalse, accel_uuids\u003dNone,"},{"line_number":340,"context_line":"                reimage_boot_volume\u003dFalse):"},{"line_number":341,"context_line":"        \"\"\"Destroy and re-make this instance."},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        A \u0027rebuild\u0027 effectively purges all existing data from the system and"}],"source_content_type":"text/x-python","patch_set":36,"id":"d4f9c3d7_8a8b33b9","line":340,"updated":"2022-08-31 10:02:51.000000000","message":"https://lists.openstack.org/pipermail/openstack-discuss/2022-August/030177.html\n\nLGTM.","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"bd29644cc82b2a6fa88062703c548b1c43bd32e6","unresolved":false,"context_lines":[{"line_number":1677,"context_line":"        if reimage_boot_volume:"},{"line_number":1678,"context_line":"            raise exception.NovaException("},{"line_number":1679,"context_line":"                _(\"Ironic doesn\u0027t support rebuilding volume backed \""},{"line_number":1680,"context_line":"                  \"instances.\"))"},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"        LOG.debug(\u0027Rebuild called for instance\u0027, instance\u003dinstance)"},{"line_number":1683,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"7727dc3d_2d6cf1ac","line":1680,"updated":"2022-08-29 08:52:33.000000000","message":"+1 ironic is the only in tree virt driver implementing the specific rebuild virt driver calls (the rest uses the fallback in the compute manager)","commit_id":"46caa805dbacd1dce9dee9200425ca955938f891"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f2b2fe098afd71da7815ebf185048b067791ef39","unresolved":true,"context_lines":[{"line_number":1677,"context_line":"        if reimage_boot_volume:"},{"line_number":1678,"context_line":"            raise exception.NovaException("},{"line_number":1679,"context_line":"                _(\"Ironic doesn\u0027t support rebuilding volume backed \""},{"line_number":1680,"context_line":"                  \"instances.\"))"},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"        LOG.debug(\u0027Rebuild called for instance\u0027, instance\u003dinstance)"},{"line_number":1683,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"bd35c4c9_0ad9dd3d","line":1680,"updated":"2022-08-31 10:02:51.000000000","message":"you should then amend https://docs.openstack.org/nova/latest/user/support-matrix.html#operation_rebuild\n\nPlease mention it in https://review.opendev.org/c/openstack/nova/+/830883/ when you respin.","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1a76ac0096d91c19fbca5e71d82ff56a5a531d9b","unresolved":false,"context_lines":[{"line_number":1677,"context_line":"        if reimage_boot_volume:"},{"line_number":1678,"context_line":"            raise exception.NovaException("},{"line_number":1679,"context_line":"                _(\"Ironic doesn\u0027t support rebuilding volume backed \""},{"line_number":1680,"context_line":"                  \"instances.\"))"},{"line_number":1681,"context_line":""},{"line_number":1682,"context_line":"        LOG.debug(\u0027Rebuild called for instance\u0027, instance\u003dinstance)"},{"line_number":1683,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"3f81eca8_957ef6f3","line":1680,"in_reply_to":"bd35c4c9_0ad9dd3d","updated":"2022-08-31 11:36:22.000000000","message":"Ack","commit_id":"dce40ac550f9f94245ef2c3531d8f5679d2ad606"}],"nova/volume/cinder.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":929,"context_line":"    def reimage_volume(self, context, volume_id, image_id,"},{"line_number":930,"context_line":"                       reimage_reserved\u003dFalse):"},{"line_number":931,"context_line":"        cinderclient(context, \u00273.67\u0027).volumes.reimage("},{"line_number":932,"context_line":"            volume_id, image_id, reimage_reserved)"}],"source_content_type":"text/x-python","patch_set":6,"id":"f19d39e4_ef7995e9","line":932,"updated":"2022-02-22 20:06:27.000000000","message":"No test for this? Should be trivial, but you could have a typo in here and we wouldn\u0027t see it in the test results of this patch (especially without the tempest side).","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[{"line_number":929,"context_line":"    def reimage_volume(self, context, volume_id, image_id,"},{"line_number":930,"context_line":"                       reimage_reserved\u003dFalse):"},{"line_number":931,"context_line":"        cinderclient(context, \u00273.67\u0027).volumes.reimage("},{"line_number":932,"context_line":"            volume_id, image_id, reimage_reserved)"}],"source_content_type":"text/x-python","patch_set":6,"id":"bb029b92_9739c848","line":932,"in_reply_to":"f19d39e4_ef7995e9","updated":"2022-02-23 11:41:17.000000000","message":"Done","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"}],"releasenotes/notes/add-volume-rebuild-b973562ea8f49347.yaml":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ff4e9b22ba598822409339f20608828cd258a587","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added support for rebuilding a volume backed instance."},{"line_number":5,"context_line":"    This is supported starting from API microversion 2.91 and requires"},{"line_number":6,"context_line":"    an additional parameter ``reimage_boot_volume`` to be passed as"},{"line_number":7,"context_line":"    ``True``."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"fe286c54_9ae67e4c","line":4,"range":{"start_line":4,"start_character":35,"end_line":4,"end_character":48},"updated":"2022-02-22 20:06:27.000000000","message":"volume-backed","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"86c7d7ee98e100dc4c6ed4090061d23a93c5eac1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added support for rebuilding a volume backed instance."},{"line_number":5,"context_line":"    This is supported starting from API microversion 2.91 and requires"},{"line_number":6,"context_line":"    an additional parameter ``reimage_boot_volume`` to be passed as"},{"line_number":7,"context_line":"    ``True``."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"ea19b8f0_fde730ef","line":4,"range":{"start_line":4,"start_character":35,"end_line":4,"end_character":48},"in_reply_to":"fe286c54_9ae67e4c","updated":"2022-02-23 11:41:17.000000000","message":"Done","commit_id":"c8e1ebdf6370ac46e8fcfa903b1bbabca1d9801f"}]}
