)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":10,"context_line":"as they have successfully started up before."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"If a user tries to rebuild an instance in cell0, the request fails"},{"line_number":13,"context_line":"with an exception of type InstanceInvalidState."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This spec summarizes the changes needed to enable the rebuilding of"},{"line_number":16,"context_line":"instances that failed during creation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ffd0ebdf_b52623b7","line":13,"updated":"2019-01-04 19:06:39.000000000","message":"I guess because of this:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/compute/api.py#L147","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"}],"specs/rocky/approved/enable-rebuild-for-instances-in-cell0.rst":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fcfe95d5abb889667780f6dfc9200ef92d7a1b43","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be be able to rebuild a server that faild to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"As an operator I want to enable an external service to take actions after a"},{"line_number":30,"context_line":"failed build request, such as removing preemptible resources. After the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_2f2ac6e6","line":27,"range":{"start_line":27,"start_character":56,"end_line":27,"end_character":61},"updated":"2018-03-22 12:58:44.000000000","message":"Nit: failed to build.","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":2033,"name":"Belmiro Moreira","email":"moreira.belmiro.email.lists@gmail.com","username":"moreira-belmiro-email-lists"},"change_message_id":"b8379a99b5c002f6ae2226e80d4b8a2616b1886e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be be able to rebuild a server that faild to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"As an operator I want to enable an external service to take actions after a"},{"line_number":30,"context_line":"failed build request, such as removing preemptible resources. After the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_ce763ed9","line":27,"range":{"start_line":27,"start_character":20,"end_line":27,"end_character":22},"updated":"2018-03-23 16:03:33.000000000","message":"nit: duplicated","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f836cdc9cb25f2728fc9af7cfe5016adf195008c","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be be able to rebuild a server that faild to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"As an operator I want to enable an external service to take actions after a"},{"line_number":30,"context_line":"failed build request, such as removing preemptible resources. After the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_1defecb0","line":27,"range":{"start_line":27,"start_character":56,"end_line":27,"end_character":61},"in_reply_to":"df7087c5_2f2ac6e6","updated":"2018-03-27 13:12:03.000000000","message":"Done","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f836cdc9cb25f2728fc9af7cfe5016adf195008c","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be be able to rebuild a server that faild to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"As an operator I want to enable an external service to take actions after a"},{"line_number":30,"context_line":"failed build request, such as removing preemptible resources. After the"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_bd2b60e9","line":27,"range":{"start_line":27,"start_character":20,"end_line":27,"end_character":22},"in_reply_to":"df7087c5_ce763ed9","updated":"2018-03-27 13:12:03.000000000","message":"Done","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fcfe95d5abb889667780f6dfc9200ef92d7a1b43","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be be able to rebuild a server that faild to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"As an operator I want to enable an external service to take actions after a"},{"line_number":30,"context_line":"failed build request, such as removing preemptible resources. After the"},{"line_number":31,"context_line":"succesful execution of the follow up actions, the service should be able to"},{"line_number":32,"context_line":"issue a rebuild request for the server that failed in the first place."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_0f390240","line":32,"range":{"start_line":29,"start_character":0,"end_line":32,"end_character":70},"updated":"2018-03-22 12:58:44.000000000","message":"I would remove this, that is really the follow on spec.","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":2033,"name":"Belmiro Moreira","email":"moreira.belmiro.email.lists@gmail.com","username":"moreira-belmiro-email-lists"},"change_message_id":"b8379a99b5c002f6ae2226e80d4b8a2616b1886e","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be be able to rebuild a server that faild to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"As an operator I want to enable an external service to take actions after a"},{"line_number":30,"context_line":"failed build request, such as removing preemptible resources. After the"},{"line_number":31,"context_line":"succesful execution of the follow up actions, the service should be able to"},{"line_number":32,"context_line":"issue a rebuild request for the server that failed in the first place."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_2e3c9adf","line":32,"range":{"start_line":29,"start_character":0,"end_line":32,"end_character":70},"in_reply_to":"df7087c5_0f390240","updated":"2018-03-23 16:03:33.000000000","message":"But this doesn\u0027t need to be/or be limited to an external service. Can we be more generic?","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fcfe95d5abb889667780f6dfc9200ef92d7a1b43","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"The request to rebuild a server mapped to cell0, would be handled internally"},{"line_number":38,"context_line":"as a new build request. All input needed, can be retrieved by the already"},{"line_number":39,"context_line":"existing instance record. The user has to provide the image that will be used"},{"line_number":40,"context_line":"(since the parameter is mandatory)."},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_ac3c5be1","line":38,"range":{"start_line":37,"start_character":49,"end_line":38,"end_character":23},"updated":"2018-03-22 12:58:44.000000000","message":"I would remove this bit as it creates confusion with the list below.","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f836cdc9cb25f2728fc9af7cfe5016adf195008c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"The request to rebuild a server mapped to cell0, would be handled internally"},{"line_number":38,"context_line":"as a new build request. All input needed, can be retrieved by the already"},{"line_number":39,"context_line":"existing instance record. The user has to provide the image that will be used"},{"line_number":40,"context_line":"(since the parameter is mandatory)."},{"line_number":41,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_dd097495","line":38,"range":{"start_line":37,"start_character":49,"end_line":38,"end_character":23},"in_reply_to":"df7087c5_ac3c5be1","updated":"2018-03-27 13:12:03.000000000","message":"Done","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":2033,"name":"Belmiro Moreira","email":"moreira.belmiro.email.lists@gmail.com","username":"moreira-belmiro-email-lists"},"change_message_id":"b8379a99b5c002f6ae2226e80d4b8a2616b1886e","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"#. Create copies of the info stored in cell0 regarding the instance."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"#. Delete all the info from cell0 database, regarding the instance being"},{"line_number":62,"context_line":"   rebuilt."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"#. Implement a `rebuild_instance_in_cell0` method in the conductor API that"},{"line_number":65,"context_line":"   actually calls the `schedule_and_build_instances` or (parts of it)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_b846594f","line":62,"range":{"start_line":61,"start_character":3,"end_line":62,"end_character":10},"updated":"2018-03-23 16:03:33.000000000","message":"This can\u0027t be soft deleted. Otherwise the VM can be shown as deleted and active at same time.\nnova list --deleted","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f836cdc9cb25f2728fc9af7cfe5016adf195008c","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"#. Create copies of the info stored in cell0 regarding the instance."},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"#. Delete all the info from cell0 database, regarding the instance being"},{"line_number":62,"context_line":"   rebuilt."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"#. Implement a `rebuild_instance_in_cell0` method in the conductor API that"},{"line_number":65,"context_line":"   actually calls the `schedule_and_build_instances` or (parts of it)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_7d006868","line":62,"range":{"start_line":61,"start_character":3,"end_line":62,"end_character":10},"in_reply_to":"bf659307_b846594f","updated":"2018-03-27 13:12:03.000000000","message":"+1","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fcfe95d5abb889667780f6dfc9200ef92d7a1b43","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"#. Implement a `rebuild_instance_in_cell0` method in the conductor API that"},{"line_number":65,"context_line":"   actually calls the `schedule_and_build_instances` or (parts of it)"},{"line_number":66,"context_line":"   internally."},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"Alternatives"},{"line_number":69,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_6f3955d5","line":66,"updated":"2018-03-22 12:58:44.000000000","message":"I would split this into two parts:\n\n* store extra info in request spec around requested network (define the specific objects to be used there, i.e. NetworkRequestList)\n\n* describe the flow for the new rebuild method\n\nIn the later piece be sure to make clear the RPC API calls that are needed in the process, i.e. the api makes an RPC API call to a new conductor API method, then describe what happens from that point onwards, in sequence.","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fcfe95d5abb889667780f6dfc9200ef92d7a1b43","unresolved":false,"context_lines":[{"line_number":74,"context_line":"-----------------"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Add a `requested_networks` field in the RequestSpec object where the list of"},{"line_number":77,"context_line":"NetworkRequest objects are stored."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"REST API impact"},{"line_number":80,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_af58cd30","line":77,"range":{"start_line":77,"start_character":0,"end_line":77,"end_character":14},"updated":"2018-03-22 12:58:44.000000000","message":"Nit: its a single NetworkRequestList object I think you want.","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f836cdc9cb25f2728fc9af7cfe5016adf195008c","unresolved":false,"context_lines":[{"line_number":74,"context_line":"-----------------"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Add a `requested_networks` field in the RequestSpec object where the list of"},{"line_number":77,"context_line":"NetworkRequest objects are stored."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"REST API impact"},{"line_number":80,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_9d03fc73","line":77,"range":{"start_line":77,"start_character":0,"end_line":77,"end_character":14},"in_reply_to":"df7087c5_af58cd30","updated":"2018-03-27 13:12:03.000000000","message":"Done","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fcfe95d5abb889667780f6dfc9200ef92d7a1b43","unresolved":false,"context_lines":[{"line_number":79,"context_line":"REST API impact"},{"line_number":80,"context_line":"---------------"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"None."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Security impact"},{"line_number":85,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"df7087c5_ef7b2589","line":82,"updated":"2018-03-22 12:58:44.000000000","message":"This has to be a new microversion. Only when you request the new microversion of the API will you now be able to rebuild an instance that you couldn\u0027t before.\n\nOld microversions should fail like they do today.","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f836cdc9cb25f2728fc9af7cfe5016adf195008c","unresolved":false,"context_lines":[{"line_number":79,"context_line":"REST API impact"},{"line_number":80,"context_line":"---------------"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"None."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"Security impact"},{"line_number":85,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_5df56482","line":82,"in_reply_to":"df7087c5_ef7b2589","updated":"2018-03-27 13:12:03.000000000","message":"Done","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":2033,"name":"Belmiro Moreira","email":"moreira.belmiro.email.lists@gmail.com","username":"moreira-belmiro-email-lists"},"change_message_id":"b8379a99b5c002f6ae2226e80d4b8a2616b1886e","unresolved":false,"context_lines":[{"line_number":114,"context_line":"Upgrade impact"},{"line_number":115,"context_line":"--------------"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"TODO: Some help needed over here."},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"Implementation"},{"line_number":120,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"bf659307_58837d57","line":117,"range":{"start_line":117,"start_character":0,"end_line":117,"end_character":32},"updated":"2018-03-23 16:03:33.000000000","message":"Don\u0027t think there\u0027s an upgrade impact","commit_id":"24a5fbfedc9f5b3c5e24f48cabb45e5f6570fbf6"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Presently, it is allowed to rebuild servers in ERROR state, as long as they"},{"line_number":19,"context_line":"have successfully started up before."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"If a user tries to rebuild an instance in cell0, the request fails with an"},{"line_number":22,"context_line":"exception of type InstanceInvalidState."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_224855ca","line":21,"range":{"start_line":21,"start_character":3,"end_line":21,"end_character":48},"updated":"2018-05-24 19:16:51.000000000","message":"that\u0027s a technical detail. Why the instance can\u0027t be rebuilt is because the instance hasn\u0027t yet been launched (and the real technical check is about the launched_at DB field)","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f07523429ed57d856d9aff017af378f503dae952","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Presently, it is allowed to rebuild servers in ERROR state, as long as they"},{"line_number":19,"context_line":"have successfully started up before."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"If a user tries to rebuild an instance in cell0, the request fails with an"},{"line_number":22,"context_line":"exception of type InstanceInvalidState."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_446793b8","line":21,"range":{"start_line":21,"start_character":3,"end_line":21,"end_character":48},"in_reply_to":"5f7c97a3_224855ca","updated":"2018-05-25 13:17:10.000000000","message":"I see your point, but launched_at may be  equal to None also for instances that are not in cell0. Meaning that they failed after scheduling for some reason. This is why I wanted to differentiate.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"b4a9b00a1018eab03045eac07de13d6fed1404e3","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be able to rebuild a server that failed to be built due to"},{"line_number":28,"context_line":"scheduling errors."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Proposed change"},{"line_number":31,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_8d6b83b5","line":28,"range":{"start_line":27,"start_character":0,"end_line":28,"end_character":18},"updated":"2018-05-10 23:45:37.000000000","message":"It should be described that this spec is related to the \"Preemptible instances\" function.\nI could not understand that this function is necessary before I read the Rocky PTG etherpad.\nIn usual case, users have only to send a request to create a server again.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"As a user I want to be able to rebuild a server that failed to be built due to"},{"line_number":28,"context_line":"scheduling errors."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Proposed change"},{"line_number":31,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_e2c6dd16","line":28,"range":{"start_line":27,"start_character":0,"end_line":28,"end_character":18},"in_reply_to":"5f7c97a3_8d6b83b5","updated":"2018-05-24 19:16:51.000000000","message":"Well, that\u0027s rather the above sentence isn\u0027t a real use-case description.\nI see the use case as more as the problem that we don\u0027t really have good reasons for preventing rebuilds based on just the assertion that the instance has to be active before (because the real reason is purely technical).\n\nMaybe that sounds opinionated, so yeah, maybe more something like : \"as a user, I\u0027d like to rebuild my instance without needing to boot yet another one if the first time my instance was hit under the bus\".","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":42,"context_line":"For this:"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":45,"context_line":"   requested_networks fields. In the new field, the NetworkRequestList should"},{"line_number":46,"context_line":"   be stored."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":49,"context_line":"   should store the list of requested networks in the new field."}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_9da42c0a","line":46,"range":{"start_line":45,"start_character":31,"end_line":46,"end_character":13},"updated":"2018-05-24 19:16:51.000000000","message":"Another better way to say that is that the RequestSpec object will have a nested NetworkResquestList object attached to it thru the requested_networks field.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f07523429ed57d856d9aff017af378f503dae952","unresolved":false,"context_lines":[{"line_number":42,"context_line":"For this:"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":45,"context_line":"   requested_networks fields. In the new field, the NetworkRequestList should"},{"line_number":46,"context_line":"   be stored."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":49,"context_line":"   should store the list of requested networks in the new field."}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_24c29735","line":46,"range":{"start_line":45,"start_character":31,"end_line":46,"end_character":13},"in_reply_to":"5f7c97a3_9da42c0a","updated":"2018-05-25 13:17:10.000000000","message":"Done","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":46,"context_line":"   be stored."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":49,"context_line":"   should store the list of requested networks in the new field."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":52,"context_line":"following changes:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_9d7d0c70","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":15},"updated":"2018-05-24 19:16:51.000000000","message":"AFAICS, this NetworkRequestList object wasn\u0027t intented to be persisted, hence you need to describe the data model for it.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f8b5d0b4686fd2b988e13d52ccf09ebaaabcf205","unresolved":false,"context_lines":[{"line_number":46,"context_line":"   be stored."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":49,"context_line":"   should store the list of requested networks in the new field."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":52,"context_line":"following changes:"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_c43c03e3","line":49,"range":{"start_line":49,"start_character":10,"end_line":49,"end_character":15},"in_reply_to":"5f7c97a3_9d7d0c70","updated":"2018-05-25 13:40:53.000000000","message":"Oh now I got what you mean. Do you think there should be a table for for these objects in the db? I thought that they could be just added in the RequestSpec object and be retrieved from there.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":51,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":52,"context_line":"following changes:"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"#. Allow rebuild for instances that have never booted and are mapped to cell0."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"#. Reconstruct a new BuildRequest for the instance, since the original one was"},{"line_number":57,"context_line":"   deleted as soon as the instance was mapped to cell0."}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_7d9270a1","line":54,"updated":"2018-05-24 19:16:51.000000000","message":"isn\u0027t just modifying the decorator by saying \"must_have_launched\u003dFalse\" ?","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f07523429ed57d856d9aff017af378f503dae952","unresolved":false,"context_lines":[{"line_number":51,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":52,"context_line":"following changes:"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"#. Allow rebuild for instances that have never booted and are mapped to cell0."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"#. Reconstruct a new BuildRequest for the instance, since the original one was"},{"line_number":57,"context_line":"   deleted as soon as the instance was mapped to cell0."}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_841feb06","line":54,"in_reply_to":"5f7c97a3_7d9270a1","updated":"2018-05-25 13:17:10.000000000","message":"Exactly.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":54,"context_line":"#. Allow rebuild for instances that have never booted and are mapped to cell0."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"#. Reconstruct a new BuildRequest for the instance, since the original one was"},{"line_number":57,"context_line":"   deleted as soon as the instance was mapped to cell0."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"#. Update the extisting instance_mapping with a ``None`` cell_mapping. The"},{"line_number":60,"context_line":"   instance_mapping has to be updated again when a host has been selected."}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_5d977491","line":57,"updated":"2018-05-24 19:16:51.000000000","message":"++ good catch","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":56,"context_line":"#. Reconstruct a new BuildRequest for the instance, since the original one was"},{"line_number":57,"context_line":"   deleted as soon as the instance was mapped to cell0."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"#. Update the extisting instance_mapping with a ``None`` cell_mapping. The"},{"line_number":60,"context_line":"   instance_mapping has to be updated again when a host has been selected."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"#. Delete all the info from cell0 database, regarding the instance being"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_dd2dc446","line":59,"range":{"start_line":59,"start_character":14,"end_line":59,"end_character":23},"updated":"2018-05-24 19:16:51.000000000","message":"nit: existing","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":67,"context_line":"   \"hard delete\" instances from the cell0 DB."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"The flow of the rebuild procedure for instances mapped in cell0 would then be"},{"line_number":70,"context_line":"the like this:"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. The nova-api, after identifying an instance in cell0, should take care of"},{"line_number":73,"context_line":"   the creation of the new BuildRequest, the update of the instance_mapping"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_5de69418","line":70,"updated":"2018-05-24 19:16:51.000000000","message":"This should be moved right at the beginning of the proposed change section, as it\u0027s more important to describe the workflow than the implementation details.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":69,"context_line":"The flow of the rebuild procedure for instances mapped in cell0 would then be"},{"line_number":70,"context_line":"the like this:"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. The nova-api, after identifying an instance in cell0, should take care of"},{"line_number":73,"context_line":"   the creation of the new BuildRequest, the update of the instance_mapping"},{"line_number":74,"context_line":"   and the deletion of the instance records from the cell0 database."},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_7de110fc","line":72,"range":{"start_line":72,"start_character":46,"end_line":72,"end_character":50},"updated":"2018-05-24 19:16:51.000000000","message":"as being in","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":77,"context_line":"   ``rebuild_instance_in_cell0``. This new method\u0027s purpose is almost (if not"},{"line_number":78,"context_line":"   exactly) the same as the existing ``schedule_and_build_instances``. So we"},{"line_number":79,"context_line":"   could either call to it internally or extract parts of it\u0027s functionality"},{"line_number":80,"context_line":"   and reuse them."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"#. Finally, an RPC API call is needed from the conductor to the compute"},{"line_number":83,"context_line":"   service of the selected cell. The ``rebuild_instance`` method tries to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_1df01cc9","line":80,"updated":"2018-05-24 19:16:51.000000000","message":"I\u0027m not super happy with creating a new RPC endpoint for something very similar than build.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f07523429ed57d856d9aff017af378f503dae952","unresolved":false,"context_lines":[{"line_number":77,"context_line":"   ``rebuild_instance_in_cell0``. This new method\u0027s purpose is almost (if not"},{"line_number":78,"context_line":"   exactly) the same as the existing ``schedule_and_build_instances``. So we"},{"line_number":79,"context_line":"   could either call to it internally or extract parts of it\u0027s functionality"},{"line_number":80,"context_line":"   and reuse them."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"#. Finally, an RPC API call is needed from the conductor to the compute"},{"line_number":83,"context_line":"   service of the selected cell. The ``rebuild_instance`` method tries to"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_c4de433d","line":80,"in_reply_to":"5f7c97a3_1df01cc9","updated":"2018-05-25 13:17:10.000000000","message":"I see your point... Do you think we should call directly to schedule_and_build_instances?","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":95,"context_line":"-----------------"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Add a `requested_networks` field in the RequestSpec object that will contain a"},{"line_number":98,"context_line":"NetworkRequestList object."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"REST API impact"},{"line_number":101,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_7d459014","line":98,"updated":"2018-05-24 19:16:51.000000000","message":"like I said, please describe the DB modifications you plan to get.","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f07523429ed57d856d9aff017af378f503dae952","unresolved":false,"context_lines":[{"line_number":95,"context_line":"-----------------"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Add a `requested_networks` field in the RequestSpec object that will contain a"},{"line_number":98,"context_line":"NetworkRequestList object."},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"REST API impact"},{"line_number":101,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_44ed53b5","line":98,"in_reply_to":"5f7c97a3_7d459014","updated":"2018-05-25 13:17:10.000000000","message":"The RequestSpec objects are stored in the DB as mediumtext. Should there be a modification in the DB schema for that?","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"420039ffbb76f28762b2d9252fe4bf9a9b5aec69","unresolved":false,"context_lines":[{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"The documentation regarding required VM_states should be updated to contain"},{"line_number":175,"context_line":"the ERROR state."},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"References"},{"line_number":178,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_9db50cf1","line":175,"updated":"2018-05-24 19:16:51.000000000","message":"I don\u0027t get that ?","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"f07523429ed57d856d9aff017af378f503dae952","unresolved":false,"context_lines":[{"line_number":172,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"The documentation regarding required VM_states should be updated to contain"},{"line_number":175,"context_line":"the ERROR state."},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"References"},{"line_number":178,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":2,"id":"5f7c97a3_6495ef3f","line":175,"in_reply_to":"5f7c97a3_9db50cf1","updated":"2018-05-25 13:17:10.000000000","message":"I meant to update the documentation about rebuild... I\u0027ll fix it....","commit_id":"d1d623dd7c2ddf2dadcfd9da1ab56b0a94221d40"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7d975af81a5dee8e5369ec8a736c4f498313e897","unresolved":false,"context_lines":[{"line_number":37,"context_line":"The flow of the rebuild procedure for instances mapped in cell0 would then be"},{"line_number":38,"context_line":"the like this:"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"#. The nova-api, after identifying an instance as being in cell0, should take"},{"line_number":41,"context_line":"   care of the creation of the new BuildRequest, the update of the"},{"line_number":42,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":43,"context_line":"   database."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_35ca111a","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":64},"updated":"2018-06-06 09:19:10.000000000","message":"you mean, when the nova-api rebuild() method is called ?","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"48f3b742d399bfde2a6e67f9d2ace6195d933730","unresolved":false,"context_lines":[{"line_number":37,"context_line":"The flow of the rebuild procedure for instances mapped in cell0 would then be"},{"line_number":38,"context_line":"the like this:"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"#. The nova-api, after identifying an instance as being in cell0, should take"},{"line_number":41,"context_line":"   care of the creation of the new BuildRequest, the update of the"},{"line_number":42,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":43,"context_line":"   database."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_b6536239","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":64},"in_reply_to":"5f7c97a3_35ca111a","updated":"2018-06-07 15:10:58.000000000","message":"That seems like a problem for the implementation, it has to be the code for that API as proposed here / as agreed in dublin.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":37,"context_line":"The flow of the rebuild procedure for instances mapped in cell0 would then be"},{"line_number":38,"context_line":"the like this:"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"#. The nova-api, after identifying an instance as being in cell0, should take"},{"line_number":41,"context_line":"   care of the creation of the new BuildRequest, the update of the"},{"line_number":42,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":43,"context_line":"   database."}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_ec9ccb6b","line":40,"range":{"start_line":40,"start_character":16,"end_line":40,"end_character":64},"in_reply_to":"5f7c97a3_35ca111a","updated":"2018-10-30 15:23:13.000000000","message":"Yes","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7d975af81a5dee8e5369ec8a736c4f498313e897","unresolved":false,"context_lines":[{"line_number":42,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":43,"context_line":"   database."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#. Then the nova-api should make an RPC API call to the conductor\u0027s new method"},{"line_number":46,"context_line":"   ``rebuild_instance_in_cell0``. This new method\u0027s purpose is almost (if not"},{"line_number":47,"context_line":"   exactly) the same as the existing ``schedule_and_build_instances``. So we"},{"line_number":48,"context_line":"   could either call to it internally or extract parts of it\u0027s functionality"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_15eef58a","line":45,"range":{"start_line":45,"start_character":68,"end_line":45,"end_character":78},"updated":"2018-06-06 09:19:10.000000000","message":"I\u0027m not sure we should create a new conductor method for rebuild ?","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"48f3b742d399bfde2a6e67f9d2ace6195d933730","unresolved":false,"context_lines":[{"line_number":42,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":43,"context_line":"   database."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#. Then the nova-api should make an RPC API call to the conductor\u0027s new method"},{"line_number":46,"context_line":"   ``rebuild_instance_in_cell0``. This new method\u0027s purpose is almost (if not"},{"line_number":47,"context_line":"   exactly) the same as the existing ``schedule_and_build_instances``. So we"},{"line_number":48,"context_line":"   could either call to it internally or extract parts of it\u0027s functionality"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_d6237ebd","line":45,"range":{"start_line":45,"start_character":68,"end_line":45,"end_character":78},"in_reply_to":"5f7c97a3_15eef58a","updated":"2018-06-07 15:10:58.000000000","message":"At dublin I thought we agreed it should be a new method (because of the evacuate + rebuild confusion in the current method) that shares code where possible.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":42,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":43,"context_line":"   database."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#. Then the nova-api should make an RPC API call to the conductor\u0027s new method"},{"line_number":46,"context_line":"   ``rebuild_instance_in_cell0``. This new method\u0027s purpose is almost (if not"},{"line_number":47,"context_line":"   exactly) the same as the existing ``schedule_and_build_instances``. So we"},{"line_number":48,"context_line":"   could either call to it internally or extract parts of it\u0027s functionality"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_6c975b3c","line":45,"range":{"start_line":45,"start_character":68,"end_line":45,"end_character":78},"in_reply_to":"5f7c97a3_15eef58a","updated":"2018-10-30 15:23:13.000000000","message":"Do you think it\u0027s better to call directly to schedule_and_build_instances?","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7d975af81a5dee8e5369ec8a736c4f498313e897","unresolved":false,"context_lines":[{"line_number":67,"context_line":"For this:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":70,"context_line":"   requested_networks field, where the requested networks will be stored."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":73,"context_line":"   should add the list of requested networks in the RequestSpec\u0027s"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_15935502","line":70,"updated":"2018-06-06 09:19:10.000000000","message":"Yup, Okay with me, but should we persist the field ? I\u0027m not sure honestly. Maybe we should just lazy-loading ?","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"48f3b742d399bfde2a6e67f9d2ace6195d933730","unresolved":false,"context_lines":[{"line_number":67,"context_line":"For this:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":70,"context_line":"   requested_networks field, where the requested networks will be stored."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":73,"context_line":"   should add the list of requested networks in the RequestSpec\u0027s"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_96066620","line":70,"in_reply_to":"5f7c97a3_15935502","updated":"2018-06-07 15:10:58.000000000","message":"We have to store it / persist it, because its not in memory after the API has returned and the instance is in the error state.\n\nLazy-load from a separate table isn\u0027t really an option with the single blob approach, unless we decide to have two blobs.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7cc22c191589e5d0891f1de91d7d94e3bc2ae145","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":73,"context_line":"   should add the list of requested networks in the RequestSpec\u0027s"},{"line_number":74,"context_line":"   requested_networks field."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":77,"context_line":"following changes:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_f8082492","line":74,"updated":"2018-06-05 14:34:57.000000000","message":"If we persist the requested_networks in the RequestSpec then we have to make sure that it is up to date after operations like interface_attach and interface_detach. Sure an instance buried in cell0 will not support interface_attach or detach but as soon as we have such a field in RequestSpec other code places might start using that at a later point in the instance\u0027s lifecycle.\n\nWould it be possible to populate the instance.info_cache.network_info in the instance that is stored in the BuildRequest instead?","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"48f3b742d399bfde2a6e67f9d2ace6195d933730","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":73,"context_line":"   should add the list of requested networks in the RequestSpec\u0027s"},{"line_number":74,"context_line":"   requested_networks field."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":77,"context_line":"following changes:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_ca1bce19","line":74,"in_reply_to":"5f7c97a3_9d9f8b64","updated":"2018-06-07 15:10:58.000000000","message":"Maybe we just call it initial_requested_networks, so its clearer?\n\nAFAIK we don\u0027t update the block_device_mapping in RequestSpec, so this seems consistent. We should only ever use this information when an instance is in cell0, i.e. when there is no instance.info_cache available.\n\nFWIW, I really wanted this when I was doing the neutron v2 API refactor work. Storing the actual network request rather than just playing in-memory hot potato, would really help.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":73,"context_line":"   should add the list of requested networks in the RequestSpec\u0027s"},{"line_number":74,"context_line":"   requested_networks field."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":77,"context_line":"following changes:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_268bbf68","line":74,"in_reply_to":"5f7c97a3_9d9f8b64","updated":"2018-10-30 15:23:13.000000000","message":"Yeap, I see your point... I don\u0027t know where we could retrieve this info though while rebuilding...","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7d975af81a5dee8e5369ec8a736c4f498313e897","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":73,"context_line":"   should add the list of requested networks in the RequestSpec\u0027s"},{"line_number":74,"context_line":"   requested_networks field."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":77,"context_line":"following changes:"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_9d9f8b64","line":74,"in_reply_to":"5f7c97a3_f8082492","updated":"2018-06-06 09:19:10.000000000","message":"Yeah, that\u0027s the problem I see if we persist the networks in the RequestSpec.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"48f3b742d399bfde2a6e67f9d2ace6195d933730","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"Add a `requested_networks` field in the RequestSpec object that will contain a"},{"line_number":103,"context_line":"NetworkRequestList object. Since the RequestSpec is stored as a blob"},{"line_number":104,"context_line":"(mediumtext) in the database, no schema modification is needed."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"REST API impact"},{"line_number":107,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_ca0c2e3b","line":104,"updated":"2018-06-07 15:10:58.000000000","message":"But... that implies we need an on line data migration to move all old records so they use the latest format of the request spec object. This should be discussed in upgrade impact.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8bcee967cffa40a0d97cb2a17980d3033e07bbf4","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"Add a `requested_networks` field in the RequestSpec object that will contain a"},{"line_number":103,"context_line":"NetworkRequestList object. Since the RequestSpec is stored as a blob"},{"line_number":104,"context_line":"(mediumtext) in the database, no schema modification is needed."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"REST API impact"},{"line_number":107,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_ed5584fb","line":104,"in_reply_to":"5f7c97a3_ca0c2e3b","updated":"2018-06-07 15:50:28.000000000","message":"ignore me.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8bcee967cffa40a0d97cb2a17980d3033e07bbf4","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"A new API microversion is needed. Rebuilding an instance that is mapped to"},{"line_number":110,"context_line":"cell0 will continue to fail for older microversions."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"Security impact"},{"line_number":113,"context_line":"---------------"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_2d4cdc74","line":111,"updated":"2018-06-07 15:50:28.000000000","message":"So, if the requested_networks is empty, we should make the instance go to the error state. That is for instances that were created well before us persisting requested_networks.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f2bf75d794646fb5cece66ccd61e5750bde54882","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"A new API microversion is needed. Rebuilding an instance that is mapped to"},{"line_number":110,"context_line":"cell0 will continue to fail for older microversions."},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"Security impact"},{"line_number":113,"context_line":"---------------"},{"line_number":114,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_0d7240ae","line":111,"in_reply_to":"5f7c97a3_2d4cdc74","updated":"2018-06-07 15:51:39.000000000","message":"Note: this is a 409 error.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"48f3b742d399bfde2a6e67f9d2ace6195d933730","unresolved":false,"context_lines":[{"line_number":142,"context_line":"Upgrade impact"},{"line_number":143,"context_line":"--------------"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"None."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"Implementation"},{"line_number":148,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_4a2a5e7e","line":145,"updated":"2018-06-07 15:10:58.000000000","message":"We need an online data migration, I believe, to update the version of the stored RequestSpec.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f3e79732285189a91df75e87eee098480f1cc694","unresolved":false,"context_lines":[{"line_number":142,"context_line":"Upgrade impact"},{"line_number":143,"context_line":"--------------"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"None."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"Implementation"},{"line_number":148,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_8aa5d649","line":145,"in_reply_to":"5f7c97a3_4a2a5e7e","updated":"2018-06-07 15:37:37.000000000","message":"Well, Nova objects verify the persisted object version, and just don\u0027t query the field if the version is old, so I don\u0027t see why we need a data migration, right?\n\nThat said, we *could* need a data migration for existing records if we really *want* to know the requested networks, but IMHO just a lazy-load could be fine, nope ?","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8bcee967cffa40a0d97cb2a17980d3033e07bbf4","unresolved":false,"context_lines":[{"line_number":142,"context_line":"Upgrade impact"},{"line_number":143,"context_line":"--------------"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"None."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"Implementation"},{"line_number":148,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"5f7c97a3_4d4fd869","line":145,"in_reply_to":"5f7c97a3_8aa5d649","updated":"2018-06-07 15:50:28.000000000","message":"Right, ignore my comment, its not needed.","commit_id":"40318a956ac006842198115ebd20bd0c4f636494"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9f942987e0faa5597275cc7606eb8eca4cf16dd0","unresolved":false,"context_lines":[{"line_number":10,"context_line":"https://blueprints.launchpad.net/nova/+spec/enable-rebuild-for-instances-in-cell0"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This spec summarizes the changes needed to enable the rebuilding of instances"},{"line_number":13,"context_line":"that failed during creation."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Problem description"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3f79a3b5_9f5bb452","line":13,"updated":"2018-09-17 13:00:08.000000000","message":"I think we should be more specific here, allow the rebuild of instances that fail because there is not enough capacity to build the instance in the cloud, i.e. the instance is moved to the failed state.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":15,"context_line":"Problem description"},{"line_number":16,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Presently, it is allowed to rebuild servers in ERROR state, as long as they"},{"line_number":19,"context_line":"have successfully started up before."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"If a user tries to rebuild an instance that was never launched before, the"},{"line_number":22,"context_line":"request fails with an exception of type InstanceInvalidState."}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_804e1736","line":19,"range":{"start_line":18,"start_character":0,"end_line":19,"end_character":36},"updated":"2018-06-07 16:56:51.000000000","message":"Note to self: we don\u0027t document any preconditions for rebuild in the API reference today:\n\nhttps://developer.openstack.org/api-ref/compute/#rebuild-server-rebuild-action","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"have successfully started up before."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"If a user tries to rebuild an instance that was never launched before, the"},{"line_number":22,"context_line":"request fails with an exception of type InstanceInvalidState."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_a072337b","line":22,"range":{"start_line":22,"start_character":40,"end_line":22,"end_character":60},"updated":"2018-06-07 16:56:51.000000000","message":"nit: ``InstanceInvalidState``\n\nI\u0027m assuming this is because the launched_at field is None:\n\nhttps://github.com/openstack/nova/blob/54c9a944c618dc173bd1214be4de9a44479c8959/nova/compute/api.py#L143","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f41ea22cde08843c461fec89923b0b50f27adc2e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"have successfully started up before."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"If a user tries to rebuild an instance that was never launched before, the"},{"line_number":22,"context_line":"request fails with an exception of type InstanceInvalidState."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_52be90ff","line":22,"range":{"start_line":22,"start_character":40,"end_line":22,"end_character":60},"in_reply_to":"5f7c97a3_a072337b","updated":"2018-06-07 21:50:33.000000000","message":"yeah, its the launched_at check that fails.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"#. As a user I want to be able to rebuild an instance that failed to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#. As an operator I want to be able to provide Preemptible Instances. For this"},{"line_number":30,"context_line":"   reason, an external -to Nova- service, after freeing up resources consumed"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_a0f793d4","line":27,"updated":"2018-06-07 16:56:51.000000000","message":"Why? Why not just delete and redo the server create request? Rebuild is generally used for saving the attached volumes, uuid and ports, but you don\u0027t have volumes and ports in use when the server fails to create and is put into cell0. And the uuid on a server that never existed before isn\u0027t useful.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9f942987e0faa5597275cc7606eb8eca4cf16dd0","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"#. As a user I want to be able to rebuild an instance that failed to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#. As an operator I want to be able to provide Preemptible Instances. For this"},{"line_number":30,"context_line":"   reason, an external -to Nova- service, after freeing up resources consumed"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3f79a3b5_3a45ce44","line":27,"in_reply_to":"5f7c97a3_72670cb9","updated":"2018-09-17 13:00:08.000000000","message":"It becomes much clearer users want this... but its specifically retrying a build that failed due to lack of capacity on the first build attempt.\n\nIf the instance failed to build after getting a host assigned, we don\u0027t fix that cases (i.e. instance is outside cell0). That will return bad request (still).\n\nIf it moves to the pending state, it shows the operators intent that they will try increase capacity when things fail, so a retry might make sense, noting the deployer may trigger the rebuild automatically using their own tooling, once additional capacity has been added.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f41ea22cde08843c461fec89923b0b50f27adc2e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"#. As a user I want to be able to rebuild an instance that failed to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#. As an operator I want to be able to provide Preemptible Instances. For this"},{"line_number":30,"context_line":"   reason, an external -to Nova- service, after freeing up resources consumed"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_72670cb9","line":27,"in_reply_to":"5f7c97a3_a0f793d4","updated":"2018-06-07 21:50:33.000000000","message":"Its a weak use case, granted.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"#. As a user I want to be able to rebuild an instance that failed to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#. As an operator I want to be able to provide Preemptible Instances. For this"},{"line_number":30,"context_line":"   reason, an external -to Nova- service, after freeing up resources consumed"},{"line_number":31,"context_line":"   by Preemptible VMs, should be able to rebuild instances that failed while"},{"line_number":32,"context_line":"   scheduling due to not enough available space."}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_8015b7e7","line":29,"range":{"start_line":29,"start_character":47,"end_line":29,"end_character":68},"updated":"2018-06-07 16:56:51.000000000","message":"This is really skimming over the preemptible instances design and why this rebuild from cell0 is needed for it. Can\u0027t we link to other design specs, or the vancouver forum etherpad, or the vancouver summit presentation, or something else?","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f41ea22cde08843c461fec89923b0b50f27adc2e","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"#. As a user I want to be able to rebuild an instance that failed to be built."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"#. As an operator I want to be able to provide Preemptible Instances. For this"},{"line_number":30,"context_line":"   reason, an external -to Nova- service, after freeing up resources consumed"},{"line_number":31,"context_line":"   by Preemptible VMs, should be able to rebuild instances that failed while"},{"line_number":32,"context_line":"   scheduling due to not enough available space."}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_b2f284e2","line":29,"range":{"start_line":29,"start_character":47,"end_line":29,"end_character":68},"in_reply_to":"5f7c97a3_8015b7e7","updated":"2018-06-07 21:50:33.000000000","message":"It didn\u0027t seem needed for the context here, because we said we would try make a general mechanism.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"#. As an operator I want to be able to provide Preemptible Instances. For this"},{"line_number":30,"context_line":"   reason, an external -to Nova- service, after freeing up resources consumed"},{"line_number":31,"context_line":"   by Preemptible VMs, should be able to rebuild instances that failed while"},{"line_number":32,"context_line":"   scheduling due to not enough available space."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_a093135c","line":32,"updated":"2018-06-07 16:56:51.000000000","message":"I\u0027d ask, why does it need to rebuild the failed instances after freeing up instances? Why not just re-submit the server create request? I think the answer is because the external service doesn\u0027t have the request spec so it doesn\u0027t know how to re-submit the server create request? If that\u0027s generally the reason, that really needs to be in the problem description section of this spec as this is then just a hard dependency for the preemptible instances work but it\u0027s glossed over here.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f41ea22cde08843c461fec89923b0b50f27adc2e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"#. As an operator I want to be able to provide Preemptible Instances. For this"},{"line_number":30,"context_line":"   reason, an external -to Nova- service, after freeing up resources consumed"},{"line_number":31,"context_line":"   by Preemptible VMs, should be able to rebuild instances that failed while"},{"line_number":32,"context_line":"   scheduling due to not enough available space."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Proposed change"},{"line_number":35,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_5253f0e2","line":32,"in_reply_to":"5f7c97a3_a093135c","updated":"2018-06-07 21:50:33.000000000","message":"Its because the user is waiting on their instance uuid to become active. Anything else seems to really suck from a user point of view. I could be missing something.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"   appropriate."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"All input needed to rebuild an instance, can be retrieved by the already"},{"line_number":59,"context_line":"existing instance record and the existing request spec. The user has to"},{"line_number":60,"context_line":"provide the image that will be used (since the parameter is mandatory)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The only problem is that when an instance fails during build, its network_info"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_a0a1d397","line":59,"range":{"start_line":59,"start_character":60,"end_line":59,"end_character":64},"updated":"2018-06-07 16:56:51.000000000","message":"But there is no user really, there is the external wreaper service, so which image is it going to use? Presumably the one already used from the original request.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"26fcc28ce529455f2021c2f27e9a29c9a2eaee64","unresolved":false,"context_lines":[{"line_number":56,"context_line":"   appropriate."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"All input needed to rebuild an instance, can be retrieved by the already"},{"line_number":59,"context_line":"existing instance record and the existing request spec. The user has to"},{"line_number":60,"context_line":"provide the image that will be used (since the parameter is mandatory)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The only problem is that when an instance fails during build, its network_info"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_c04f2fbc","line":59,"range":{"start_line":59,"start_character":60,"end_line":59,"end_character":64},"in_reply_to":"5f7c97a3_a0a1d397","updated":"2018-06-07 16:58:51.000000000","message":"s/wreaper/reaper/ :(","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"existing instance record and the existing request spec. The user has to"},{"line_number":60,"context_line":"provide the image that will be used (since the parameter is mandatory)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The only problem is that when an instance fails during build, its network_info"},{"line_number":63,"context_line":"field is empty. Currently there is no way to recover the requested networks"},{"line_number":64,"context_line":"while trying to rebuild the instance. So the NetworkRequestList object"},{"line_number":65,"context_line":"should be stored while building the server."}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_201383ba","line":62,"updated":"2018-06-07 16:56:51.000000000","message":"Surely there is more stuff that can be in the initial request that\u0027s not stored in the request spec field, like personality files, for example. And those aren\u0027t stored on the instance (they aren\u0027t stored at all, that\u0027s part of the reason we deprecated their usage).\n\nAnd what about user-supplied server tags when creating the server, those aren\u0027t in the request spec nor are they created in cell0 when we bury the instance during a scheduling failure. Those would also be lost and then a rebuild wouldn\u0027t match the original request.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f41ea22cde08843c461fec89923b0b50f27adc2e","unresolved":false,"context_lines":[{"line_number":59,"context_line":"existing instance record and the existing request spec. The user has to"},{"line_number":60,"context_line":"provide the image that will be used (since the parameter is mandatory)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"The only problem is that when an instance fails during build, its network_info"},{"line_number":63,"context_line":"field is empty. Currently there is no way to recover the requested networks"},{"line_number":64,"context_line":"while trying to rebuild the instance. So the NetworkRequestList object"},{"line_number":65,"context_line":"should be stored while building the server."}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_9220a84b","line":62,"in_reply_to":"5f7c97a3_201383ba","updated":"2018-06-07 21:50:33.000000000","message":"Ah, you are totally right, forgot about all those. Sigh :(","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"For this:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":70,"context_line":"   requested_networks field, where the requested networks will be stored."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_00020770","line":69,"updated":"2018-06-07 16:56:51.000000000","message":"This gets tricky and we have some other specs:\n\nhttps://specs.openstack.org/openstack/nova-specs/specs/rocky/approved/bandwidth-resource-provider.html\n\nWhich use a network request list on the request spec just for scheduling purposes, but don\u0027t persist it. And then it gets re-calculated on every other scheduling request, like move operations (migration, unshelve, evacuate). The tricky part is you can attach ports to the instance after it\u0027s created so you have to consider those ports if you\u0027re going through the scheduler again with something that cares about networks associated with the instance (like in the bw aware scheduling spec). So we need to consider what happens if we have the NetworkRequestList stored in the RequestSpec, attach some ports later, and then move the instance.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f41ea22cde08843c461fec89923b0b50f27adc2e","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"For this:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":70,"context_line":"   requested_networks field, where the requested networks will be stored."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_92e5080d","line":69,"in_reply_to":"5f7c97a3_00020770","updated":"2018-06-07 21:50:33.000000000","message":"Yeah, I didn\u0027t see that was approved already, my bad.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9f942987e0faa5597275cc7606eb8eca4cf16dd0","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"For this:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":70,"context_line":"   requested_networks field, where the requested networks will be stored."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3f79a3b5_1a7a5287","line":69,"in_reply_to":"5f7c97a3_2e75a4fa","updated":"2018-09-17 13:00:08.000000000","message":"Just a note that we said we should consider emptying these details from request_spec once leaving cell0 and being rebuilt somewhere else. That might help a little bit here.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"52225fd9c8542386cf4ed9471fdd974a9a65906c","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"For this:"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"#. A reasonable change would be to extend the RequestSpec object to adding a"},{"line_number":70,"context_line":"   requested_networks field, where the requested networks will be stored."},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"#. While building the server and when creating the request specification, we"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_2e75a4fa","line":69,"in_reply_to":"5f7c97a3_92e5080d","updated":"2018-06-08 08:54:54.000000000","message":"To be correct the bandwidth spec does not propose to temporary store the whole requested networks on the RequestSpec just temporary store the resource request of the ports in the requested networks. \nhttps://specs.openstack.org/openstack/nova-specs/specs/rocky/approved/bandwidth-resource-provider.html#data-model-impact\n\nSo technically the requested_networks field proposed here can coexists with the requested_resources field proposed in the bandwidth path.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"#. Update the existing instance_mapping with a ``None`` cell_mapping. The"},{"line_number":85,"context_line":"   instance_mapping has to be updated again when a host has been selected."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"#. Delete all the info from cell0 database, regarding the instance being"},{"line_number":88,"context_line":"   rebuilt. If we use a soft delete of the instance then after the successful"},{"line_number":89,"context_line":"   completion of the operation, we would end up with one active record of the"},{"line_number":90,"context_line":"   instance in the selected cell\u0027s DB and a record of the same instance in"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_c0c5ef3e","line":87,"updated":"2018-06-07 16:56:51.000000000","message":"Note that the block device mappings are also buried in cell0 when the instance is buried there, so what do we do with those? Presumably they also have to be deleted from cell0 and re-used to create the build request for the call to conductor to build the instance.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"9f942987e0faa5597275cc7606eb8eca4cf16dd0","unresolved":false,"context_lines":[{"line_number":84,"context_line":"#. Update the existing instance_mapping with a ``None`` cell_mapping. The"},{"line_number":85,"context_line":"   instance_mapping has to be updated again when a host has been selected."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"#. Delete all the info from cell0 database, regarding the instance being"},{"line_number":88,"context_line":"   rebuilt. If we use a soft delete of the instance then after the successful"},{"line_number":89,"context_line":"   completion of the operation, we would end up with one active record of the"},{"line_number":90,"context_line":"   instance in the selected cell\u0027s DB and a record of the same instance in"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3f79a3b5_ba9f9eb1","line":87,"in_reply_to":"5f7c97a3_c0c5ef3e","updated":"2018-09-17 13:00:08.000000000","message":"+1 I think that is what this is trying to suggest.","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3baf8a9e800f561d32dd0e986dd209babdda50c","unresolved":false,"context_lines":[{"line_number":188,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"Discussed at the Dublin PTG:"},{"line_number":191,"context_line":" * https://etherpad.openstack.org/p/nova-ptg-rocky (#L459)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"History"},{"line_number":194,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"5f7c97a3_60209bf8","line":191,"updated":"2018-06-07 16:56:51.000000000","message":"formatting nit: you need a blank line before the bullet list and drop the leading space","commit_id":"db23e269e3ee2c5f779a11f1d8bc2cb6d1f82c45"}],"specs/stein/approved/enable-rebuild-for-instances-in-cell0.rst":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"624230667c754b146f30e19b83bceabb54c0538b","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"If a user tries to rebuild an instance that was never launched before, the"},{"line_number":22,"context_line":"request fails with an exception of type ``InstanceInvalidState``."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_737d5ee4","line":23,"updated":"2018-10-29 17:09:52.000000000","message":"I think we need to be specific about not including the case where a build has never successfully built anywhere, but failed due to build errors unrelated to capacity, i.e. it is not in cell0.","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"If a user tries to rebuild an instance that was never launched before, the"},{"line_number":22,"context_line":"request fails with an exception of type ``InstanceInvalidState``."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_cee58709","line":23,"in_reply_to":"3f79a3b5_737d5ee4","updated":"2018-10-30 15:23:13.000000000","message":"Done","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"624230667c754b146f30e19b83bceabb54c0538b","unresolved":false,"context_lines":[{"line_number":27,"context_line":"#. As an operator I want to be able to perform corrective actions after a"},{"line_number":28,"context_line":"   server fails to be scheduled because there were not enough resources and"},{"line_number":29,"context_line":"   then rebuild the server. Such actions could be adding more capacity or"},{"line_number":30,"context_line":"   freeing up used resources."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_f342ceab","line":30,"updated":"2018-10-29 17:09:52.000000000","message":"I know this i the opposite of what I said before, but we should probably mention the pending state here, noting it is out of scope of this spec.\n\nIt is tempting to only allow rebuild for the Pending state, i.e. we our out of capacity and failed.","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":27,"context_line":"#. As an operator I want to be able to perform corrective actions after a"},{"line_number":28,"context_line":"   server fails to be scheduled because there were not enough resources and"},{"line_number":29,"context_line":"   then rebuild the server. Such actions could be adding more capacity or"},{"line_number":30,"context_line":"   freeing up used resources."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_2e075bcb","line":30,"in_reply_to":"3f79a3b5_f342ceab","updated":"2018-10-30 15:23:13.000000000","message":"Done","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"624230667c754b146f30e19b83bceabb54c0538b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   care of the creation of the new BuildRequest, the update of the"},{"line_number":40,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":41,"context_line":"   database."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"#. Then the nova-api should make an RPC API call to the conductor\u0027s new method"},{"line_number":44,"context_line":"   ``rebuild_instance_in_cell0``. This new method\u0027s purpose is almost (if not"},{"line_number":45,"context_line":"   exactly) the same as the existing ``schedule_and_build_instances``. So we"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_7356be60","line":42,"updated":"2018-10-29 17:09:52.000000000","message":"I think it is worth spliting the deletetion of the instance records in cell0 as a separate list item that notes the API is no longer reading from cell0, so it can be deleted, noting the small risk of a race during the switch over.","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   care of the creation of the new BuildRequest, the update of the"},{"line_number":40,"context_line":"   instance_mapping and the deletion of the instance records from the cell0"},{"line_number":41,"context_line":"   database."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"#. Then the nova-api should make an RPC API call to the conductor\u0027s new method"},{"line_number":44,"context_line":"   ``rebuild_instance_in_cell0``. This new method\u0027s purpose is almost (if not"},{"line_number":45,"context_line":"   exactly) the same as the existing ``schedule_and_build_instances``. So we"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_4e0c17eb","line":42,"in_reply_to":"3f79a3b5_7356be60","updated":"2018-10-30 15:23:13.000000000","message":"Done","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"624230667c754b146f30e19b83bceabb54c0538b","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"All input needed to rebuild an instance, can be retrieved by the already"},{"line_number":57,"context_line":"existing instance record and the existing request spec. The request has to"},{"line_number":58,"context_line":"contain also the image that will be used (since the parameter is mandatory)."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"The only problem is that when an instance fails during build, its network_info"},{"line_number":61,"context_line":"field is empty. Currently there is no way to recover the requested networks"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_1612d855","line":58,"updated":"2018-10-29 17:09:52.000000000","message":"This is confusing, below you say you are missing some info, namely the network_info. But here you say we already have everything.\n\nMaybe just drop these three lines?","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"All input needed to rebuild an instance, can be retrieved by the already"},{"line_number":57,"context_line":"existing instance record and the existing request spec. The request has to"},{"line_number":58,"context_line":"contain also the image that will be used (since the parameter is mandatory)."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"The only problem is that when an instance fails during build, its network_info"},{"line_number":61,"context_line":"field is empty. Currently there is no way to recover the requested networks"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_93133d02","line":58,"in_reply_to":"3f79a3b5_1612d855","updated":"2018-10-30 15:23:13.000000000","message":"Done","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"624230667c754b146f30e19b83bceabb54c0538b","unresolved":false,"context_lines":[{"line_number":76,"context_line":"   requested_networks field."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":79,"context_line":"following changes:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"#. Allow rebuild for instances that have never booted and are mapped to cell0."},{"line_number":82,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_566370dd","line":79,"updated":"2018-10-29 17:09:52.000000000","message":"This reads a little strangly to me, as we have sort of covered all these bits above.\n\nI would just move this list to the work items section, and moving any of the extra details into the above description.","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":76,"context_line":"   requested_networks field."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to support the rebuild of instances mapped to cell0, we need the"},{"line_number":79,"context_line":"following changes:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"#. Allow rebuild for instances that have never booted and are mapped to cell0."},{"line_number":82,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_eede433c","line":79,"in_reply_to":"3f79a3b5_566370dd","updated":"2018-10-30 15:23:13.000000000","message":"You are tottaly right. Seems not needed actually..","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"624230667c754b146f30e19b83bceabb54c0538b","unresolved":false,"context_lines":[{"line_number":90,"context_line":"   rebuilt. If we use a soft delete of the instance then after the successful"},{"line_number":91,"context_line":"   completion of the operation, we would end up with one active record of the"},{"line_number":92,"context_line":"   instance in the selected cell\u0027s DB and a record of the same instance in"},{"line_number":93,"context_line":"   cell0 (with deleted\u003dTrue). In order to overcome this, we need a way to"},{"line_number":94,"context_line":"   \"hard delete\" instances from the cell0 DB."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"Alternatives"},{"line_number":97,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_c589fa6f","line":94,"range":{"start_line":93,"start_character":57,"end_line":94,"end_character":44},"updated":"2018-10-29 17:09:52.000000000","message":"I would re-word this a little bit. Its not that we need a way to hard delete, its that we should do hard delete instead of soft delete (I believe the SQL alchemy models have delete implemented, its just not used today)","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":27057,"name":"Theodoros Tsioutsias","email":"theodoros.tsioutsias@cern.ch","username":"ttsiouts"},"change_message_id":"881b262cd27ed805ce94328f38de6e7c1741ac32","unresolved":false,"context_lines":[{"line_number":90,"context_line":"   rebuilt. If we use a soft delete of the instance then after the successful"},{"line_number":91,"context_line":"   completion of the operation, we would end up with one active record of the"},{"line_number":92,"context_line":"   instance in the selected cell\u0027s DB and a record of the same instance in"},{"line_number":93,"context_line":"   cell0 (with deleted\u003dTrue). In order to overcome this, we need a way to"},{"line_number":94,"context_line":"   \"hard delete\" instances from the cell0 DB."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"Alternatives"},{"line_number":97,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3f79a3b5_0edcdf41","line":94,"range":{"start_line":93,"start_character":57,"end_line":94,"end_character":44},"in_reply_to":"3f79a3b5_c589fa6f","updated":"2018-10-30 15:23:13.000000000","message":"Done","commit_id":"d0fe47a4ff9f81fe44e415fab434212bb7547cc4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1a8dfd763b6132e527eeabfb86d76ecd44fd42d0","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Presently, it is allowed to rebuild servers in ERROR state, as long as they"},{"line_number":19,"context_line":"have successfully started up before. But if a user tries to rebuild an instance"},{"line_number":20,"context_line":"that was never launched before because scheduler failed to find a valid host"},{"line_number":21,"context_line":"due to the lack of available resources, the request fails with an exception of"},{"line_number":22,"context_line":"type ``InstanceInvalidState``."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Use Cases"},{"line_number":25,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"3f79a3b5_b1bfe3fb","line":22,"range":{"start_line":20,"start_character":0,"end_line":22,"end_character":30},"updated":"2018-11-06 14:12:08.000000000","message":"Sorry, I am being a pedant here.\n\nTechnically there are two cases here. If we hit three retries, rebuild would also fail. And this spec doesn\u0027t address that case.","commit_id":"8b95dfeb70ea11b209886737e5b07ff722663868"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1a8dfd763b6132e527eeabfb86d76ecd44fd42d0","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"#. As an operator I want to be able to perform corrective actions after a"},{"line_number":28,"context_line":"   server fails to be scheduled because there were not enough resources (i.e."},{"line_number":29,"context_line":"   the instance ends up in PENDING state). Such actions could be adding more"},{"line_number":30,"context_line":"   capacity or freeing up used resources. Following the execution of these"},{"line_number":31,"context_line":"   actions I want to be able to rebuild the server that failed."},{"line_number":32,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"3f79a3b5_f046957e","line":29,"range":{"start_line":29,"start_character":27,"end_line":29,"end_character":40},"updated":"2018-11-06 14:12:08.000000000","message":"Nit: if configured.","commit_id":"8b95dfeb70ea11b209886737e5b07ff722663868"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Presently, it is allowed to rebuild servers in ERROR state, as long as they"},{"line_number":19,"context_line":"have successfully started up before. But if a user tries to rebuild an instance"},{"line_number":20,"context_line":"that was never launched before because scheduler failed to find a valid host"},{"line_number":21,"context_line":"due to the lack of available resources, the request fails with an exception of"},{"line_number":22,"context_line":"type ``InstanceInvalidState``. We are not addressing the case were the server"},{"line_number":23,"context_line":"was never launched due to exceeding the maximum number of build retries."}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_d575e799","line":20,"updated":"2019-01-04 19:06:39.000000000","message":"Well, technically the scheduler could have found a host, or several hosts, but building on them all failed. That check for launched_at on the rebuild API will fail until launched_at is not None, which is set by _update_instance_after_spawn in the compute which only happens after the guest is successfully spawned on a host. I get your meaning, but want to be clear that the server can be in ERROR state because scheduling failed or because the build failed.\n\nIf the build fails, the instance claim should abort and unset the host/node values as well:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/compute/resource_tracker.py#L422","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3bf5b31956ca2f95761a5f29468ed94190a2e75e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"have successfully started up before. But if a user tries to rebuild an instance"},{"line_number":20,"context_line":"that was never launched before because scheduler failed to find a valid host"},{"line_number":21,"context_line":"due to the lack of available resources, the request fails with an exception of"},{"line_number":22,"context_line":"type ``InstanceInvalidState``. We are not addressing the case were the server"},{"line_number":23,"context_line":"was never launched due to exceeding the maximum number of build retries."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_0ae24b30","line":22,"range":{"start_line":22,"start_character":62,"end_line":22,"end_character":66},"updated":"2019-01-02 14:06:45.000000000","message":"where","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":20,"context_line":"that was never launched before because scheduler failed to find a valid host"},{"line_number":21,"context_line":"due to the lack of available resources, the request fails with an exception of"},{"line_number":22,"context_line":"type ``InstanceInvalidState``. We are not addressing the case were the server"},{"line_number":23,"context_line":"was never launched due to exceeding the maximum number of build retries."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_d583a755","line":23,"updated":"2019-01-04 19:06:39.000000000","message":"How are you going to be able to tell? /me reads on...\n\nI guess because you can tell the difference since a server that fails to schedule at all will be in cell0, but a server that fails to build will be in a specific non-cell0 cell.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81906d30f0798a8792ad110a1da067ffd71f1454","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"#. As an operator I want to be able to perform corrective actions after a"},{"line_number":29,"context_line":"   server fails to be scheduled because there were not enough resources (i.e."},{"line_number":30,"context_line":"   the instance ends up in PENDING state, if configured). Such actions could"},{"line_number":31,"context_line":"   be adding more capacity or freeing up used resources. Following the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_96aa4a17","line":28,"range":{"start_line":28,"start_character":47,"end_line":28,"end_character":57},"updated":"2018-12-22 07:38:10.000000000","message":"maybe it is not accurate as a \"corrective\" action, sounds like that server fails to be scheduled due to capacity reason is a wrong action. But I\u0027m not an english native speaker :)","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"#. As an operator I want to be able to perform corrective actions after a"},{"line_number":29,"context_line":"   server fails to be scheduled because there were not enough resources (i.e."},{"line_number":30,"context_line":"   the instance ends up in PENDING state, if configured). Such actions could"},{"line_number":31,"context_line":"   be adding more capacity or freeing up used resources. Following the"},{"line_number":32,"context_line":"   execution of these actions I want to be able to rebuild the server that"},{"line_number":33,"context_line":"   failed."}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_957d1f70","line":30,"range":{"start_line":30,"start_character":27,"end_line":30,"end_character":40},"updated":"2019-01-04 19:06:39.000000000","message":"Given this doesn\u0027t exist today, you should refer/link to https://blueprints.launchpad.net/nova/+spec/introduce-pending-vm-state here.\n\n(later)\n\nNevermind, now I see the note.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81906d30f0798a8792ad110a1da067ffd71f1454","unresolved":false,"context_lines":[{"line_number":29,"context_line":"   server fails to be scheduled because there were not enough resources (i.e."},{"line_number":30,"context_line":"   the instance ends up in PENDING state, if configured). Such actions could"},{"line_number":31,"context_line":"   be adding more capacity or freeing up used resources. Following the"},{"line_number":32,"context_line":"   execution of these actions I want to be able to rebuild the server that"},{"line_number":33,"context_line":"   failed."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"   NOTE::"},{"line_number":36,"context_line":"   Adding the PENDING state as well as setting instances to it, are out of the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_b6a74650","line":33,"range":{"start_line":32,"start_character":70,"end_line":33,"end_character":9},"updated":"2018-12-22 07:38:10.000000000","message":"that failed to boot due to capacity reasons.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3bf5b31956ca2f95761a5f29468ed94190a2e75e","unresolved":false,"context_lines":[{"line_number":32,"context_line":"   execution of these actions I want to be able to rebuild the server that"},{"line_number":33,"context_line":"   failed."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"   NOTE::"},{"line_number":36,"context_line":"   Adding the PENDING state as well as setting instances to it, are out of the"},{"line_number":37,"context_line":"   scope of this spec, as they are being addressed by another change[1]."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_0abb2b0e","line":36,"range":{"start_line":35,"start_character":3,"end_line":36,"end_character":10},"updated":"2019-01-02 14:06:45.000000000","message":"this renders strangely http://logs.openstack.org/18/554218/8/check/openstack-tox-docs/cef8fb6/html/specs/stein/approved/enable-rebuild-for-instances-in-cell0.html#use-cases\n\nEither Note: or use the \u0027.. note::\u0027 thing","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":32,"context_line":"   execution of these actions I want to be able to rebuild the server that"},{"line_number":33,"context_line":"   failed."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"   NOTE::"},{"line_number":36,"context_line":"   Adding the PENDING state as well as setting instances to it, are out of the"},{"line_number":37,"context_line":"   scope of this spec, as they are being addressed by another change[1]."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_55dc9773","line":36,"range":{"start_line":35,"start_character":3,"end_line":36,"end_character":10},"in_reply_to":"1f769fc5_0abb2b0e","updated":"2019-01-04 19:06:39.000000000","message":"Yeah use .. note:: for proper formatting.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cd8b6e3891859e262801700fe056e049ba9df638","unresolved":false,"context_lines":[{"line_number":36,"context_line":"   Adding the PENDING state as well as setting instances to it, are out of the"},{"line_number":37,"context_line":"   scope of this spec, as they are being addressed by another change[1]."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Proposed change"},{"line_number":40,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"The flow of the rebuild procedure for instances mapped in cell0 because of"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_b8261ab7","line":39,"updated":"2019-01-04 19:17:40.000000000","message":"Another thing we probably need in here is a mention about quota checks? Although that might be handled implicitly by the conductor code which runs schedule_and_build_instances (or something very similar).","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81906d30f0798a8792ad110a1da067ffd71f1454","unresolved":false,"context_lines":[{"line_number":43,"context_line":"scheduling failures caused by lack of resources would then be like this:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#. The nova-api, after identifying an instance as being in cell0, should create"},{"line_number":46,"context_line":"   a new BuildRequest and update the instance mapping."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. At this point the api should also delete the instance records from cell0 DB."},{"line_number":49,"context_line":"   If this is a soft delete, then after the successful completion of the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_76676e27","line":46,"range":{"start_line":46,"start_character":37,"end_line":46,"end_character":53},"updated":"2018-12-22 07:38:10.000000000","message":"update to what? None?","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":43,"context_line":"scheduling failures caused by lack of resources would then be like this:"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#. The nova-api, after identifying an instance as being in cell0, should create"},{"line_number":46,"context_line":"   a new BuildRequest and update the instance mapping."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. At this point the api should also delete the instance records from cell0 DB."},{"line_number":49,"context_line":"   If this is a soft delete, then after the successful completion of the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_d53647b5","line":46,"range":{"start_line":46,"start_character":37,"end_line":46,"end_character":53},"in_reply_to":"1f769fc5_76676e27","updated":"2019-01-04 19:06:39.000000000","message":"I\u0027m assuming the instance mapping has to be updated to set the cell_mapping to None, because when we bury the instance in cell0 we update the instance mapping to point at cell0:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/conductor/manager.py#L1215\n\nAlso, why would there be a new build request? OK I guess we need a new build request because conductor destroys the build request when the instance is buried in cell0:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/conductor/manager.py#L1222\n\n--\n\nAlso, when rebuild you can change things like the image, keys, userdata, metadata, etc. I\u0027m assuming those would be honored when rebuilding from cell0? We would have to update the RequestSpec I would think so those are taken into account when rescheduling the instance.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81906d30f0798a8792ad110a1da067ffd71f1454","unresolved":false,"context_lines":[{"line_number":46,"context_line":"   a new BuildRequest and update the instance mapping."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. At this point the api should also delete the instance records from cell0 DB."},{"line_number":49,"context_line":"   If this is a soft delete, then after the successful completion of the"},{"line_number":50,"context_line":"   operation, we would end up with one record of the instance in the new cell\u0027s"},{"line_number":51,"context_line":"   DB and a record of the same instance in cell0 (deleted\u003dTrue). A better"},{"line_number":52,"context_line":"   approach, here, would be to hard delete the instance\u0027s information from"},{"line_number":53,"context_line":"   cell0. While rebuilding the instance and before deleting it from cell0,"},{"line_number":54,"context_line":"   a user could try to update it (i.e. its metadata, tags, etc). We, then,"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_56303208","line":51,"range":{"start_line":49,"start_character":3,"end_line":51,"end_character":63},"updated":"2018-12-22 07:38:10.000000000","message":"Hmm, interesting, if the rebuild succeed, and is deleted after that, then if we list instances with --delete, we will end up with two records.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":46,"context_line":"   a new BuildRequest and update the instance mapping."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. At this point the api should also delete the instance records from cell0 DB."},{"line_number":49,"context_line":"   If this is a soft delete, then after the successful completion of the"},{"line_number":50,"context_line":"   operation, we would end up with one record of the instance in the new cell\u0027s"},{"line_number":51,"context_line":"   DB and a record of the same instance in cell0 (deleted\u003dTrue). A better"},{"line_number":52,"context_line":"   approach, here, would be to hard delete the instance\u0027s information from"},{"line_number":53,"context_line":"   cell0. While rebuilding the instance and before deleting it from cell0,"},{"line_number":54,"context_line":"   a user could try to update it (i.e. its metadata, tags, etc). We, then,"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_f5bcabbc","line":51,"range":{"start_line":49,"start_character":3,"end_line":51,"end_character":63},"in_reply_to":"1f769fc5_56303208","updated":"2019-01-04 19:06:39.000000000","message":"I think he\u0027s saying that we won\u0027t honor soft deleted instances for this (next sentence). In fact, I wonder how delete works today if you have soft delete enabled since soft delete is handled on the compute service:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/compute/manager.py#L7649\n\nMeaning, if the instance in cell0 it\u0027s never going to be reclaimed and would need to be hard deleted in the API, which I\u0027m not sure we handle - that might be a bug. If it is handled, then hard deleting an instance in cell0 should be fine since it\u0027s what would happen anyway when the user deletes the instance (it can\u0027t be reclaimed/restored).","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4185d1664556b2d1689f7315553c0913825bfed8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"   a new BuildRequest and update the instance mapping."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"#. At this point the api should also delete the instance records from cell0 DB."},{"line_number":49,"context_line":"   If this is a soft delete, then after the successful completion of the"},{"line_number":50,"context_line":"   operation, we would end up with one record of the instance in the new cell\u0027s"},{"line_number":51,"context_line":"   DB and a record of the same instance in cell0 (deleted\u003dTrue). A better"},{"line_number":52,"context_line":"   approach, here, would be to hard delete the instance\u0027s information from"},{"line_number":53,"context_line":"   cell0. While rebuilding the instance and before deleting it from cell0,"},{"line_number":54,"context_line":"   a user could try to update it (i.e. its metadata, tags, etc). We, then,"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_58404e36","line":51,"range":{"start_line":49,"start_character":3,"end_line":51,"end_character":63},"in_reply_to":"ffd0ebdf_f5bcabbc","updated":"2019-01-04 19:20:31.000000000","message":"Regarding soft delete of an instance in cell0, it looks like the API handles that like a normal delete:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/api/openstack/compute/servers.py#L680\n\nBecause the instance would have never launched.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81906d30f0798a8792ad110a1da067ffd71f1454","unresolved":false,"context_lines":[{"line_number":51,"context_line":"   DB and a record of the same instance in cell0 (deleted\u003dTrue). A better"},{"line_number":52,"context_line":"   approach, here, would be to hard delete the instance\u0027s information from"},{"line_number":53,"context_line":"   cell0. While rebuilding the instance and before deleting it from cell0,"},{"line_number":54,"context_line":"   a user could try to update it (i.e. its metadata, tags, etc). We, then,"},{"line_number":55,"context_line":"   might end up in race and those changes end up not making it across to the"},{"line_number":56,"context_line":"   new cell. Although, the window, for this, is really small, we have to metion"},{"line_number":57,"context_line":"   it here."}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_f6205eb3","line":54,"range":{"start_line":54,"start_character":23,"end_line":54,"end_character":63},"updated":"2018-12-22 07:38:10.000000000","message":"Hmm, this remind me that, bury_in_cell0() creates BDM and tags records in cell0 too, you may want to delete them too? How about related instance actions and events? do we want to copy them or delete them? as copy them may provide a full record for the admins, but then it might not be transparent to normal users as they might found out that this instances has been rebuiled.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":51,"context_line":"   DB and a record of the same instance in cell0 (deleted\u003dTrue). A better"},{"line_number":52,"context_line":"   approach, here, would be to hard delete the instance\u0027s information from"},{"line_number":53,"context_line":"   cell0. While rebuilding the instance and before deleting it from cell0,"},{"line_number":54,"context_line":"   a user could try to update it (i.e. its metadata, tags, etc). We, then,"},{"line_number":55,"context_line":"   might end up in race and those changes end up not making it across to the"},{"line_number":56,"context_line":"   new cell. Although, the window, for this, is really small, we have to metion"},{"line_number":57,"context_line":"   it here."}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_b504e37c","line":54,"range":{"start_line":54,"start_character":23,"end_line":54,"end_character":63},"in_reply_to":"1f769fc5_f6205eb3","updated":"2019-01-04 19:06:39.000000000","message":"BDMs and tags would be deleted when the instance is deleted:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/db/sqlalchemy/api.py#L1787\n\nAs for actions and events, those are intentionally not deleted with the instance since they can be used for auditing:\n\nhttps://github.com/openstack/nova/blob/8ef3d253a086e4f8575f5221d4515cda421abea2/nova/db/sqlalchemy/api.py#L1832\n\nI\u0027m not sure an instance in cell0 has any actions or events with it though - _bury_in_cell0 doesn\u0027t create any.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"3bf5b31956ca2f95761a5f29468ed94190a2e75e","unresolved":false,"context_lines":[{"line_number":53,"context_line":"   cell0. While rebuilding the instance and before deleting it from cell0,"},{"line_number":54,"context_line":"   a user could try to update it (i.e. its metadata, tags, etc). We, then,"},{"line_number":55,"context_line":"   might end up in race and those changes end up not making it across to the"},{"line_number":56,"context_line":"   new cell. Although, the window, for this, is really small, we have to metion"},{"line_number":57,"context_line":"   it here."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"#. Then the nova-api should make an RPC API call to the conductor\u0027s new method"}],"source_content_type":"text/x-rst","patch_set":8,"id":"1f769fc5_4a460324","line":56,"range":{"start_line":56,"start_character":60,"end_line":56,"end_character":61},"updated":"2019-01-02 14:06:45.000000000","message":"You don\u0027t need any of the , in this sentence, although the one after \u0027small\u0027 is acceptable.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":83,"context_line":"   rebuild procedure starts and the requested networks are retrieved, the new"},{"line_number":84,"context_line":"   field will be set to None."},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"#. While building the server and when creating the request specification, we"},{"line_number":87,"context_line":"   should add the list of requested networks in the RequestSpec\u0027s"},{"line_number":88,"context_line":"   requested_networks field."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"Alternatives"},{"line_number":91,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_950d1f92","line":88,"range":{"start_line":86,"start_character":0,"end_line":88,"end_character":28},"updated":"2019-01-04 19:06:39.000000000","message":"This seems to contradict the last part of the item above, namely that we would only set RequestSpec.requested_networks when burying in cell0.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":90,"context_line":"Alternatives"},{"line_number":91,"context_line":"------------"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"None."},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"Data model impact"},{"line_number":96,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_154fefbd","line":93,"updated":"2019-01-04 19:06:39.000000000","message":"Well, clearly the alternative for the user is delete the server in ERROR state and submit a new create request.\n\nHowever, the real reason you need this functionality is for preemptible instances so that an external reaper can reap preemptible instances to free up space and then automatically trigger the rebuild of the instance in cell0 (if it\u0027s in PENDING state or whatever).\n\nI think it would be worthwhile to call out the (traditional) alternative for thoroughness but also note that this blueprint is really needed as a dependency for supporting preemptible VMs.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b21d7131dccee562f12afca8675dcaeba1c4f350","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"#. Unit and functional tests have to be added to verify the rebuilding of"},{"line_number":172,"context_line":"   instances in cell0."},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"Documentation Impact"},{"line_number":175,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-rst","patch_set":8,"id":"ffd0ebdf_d5ef2785","line":173,"updated":"2019-01-04 19:06:39.000000000","message":"I would hope that whatever CI runs against the external reaper service would also have some kind of integration testing for the end to end flow, but that\u0027s likely out of scope for this spec.","commit_id":"3c143b8157c7d3354e2eff2fbb5f4473f295e9cb"}]}
