)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"031c0f9d9e374b805115ea546e54714894faf766","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently thoughout Nova instance\u0027s root_gb is used as a size of host"},{"line_number":10,"context_line":"disk space used by the instance root volume. This leads to errors"},{"line_number":11,"context_line":"because root_gb is assined to instance\u0027s flavor root_gb which almost"},{"line_number":12,"context_line":"always is not 0, but the root volume of the volume-backed instance"},{"line_number":13,"context_line":"doesn\u0027t consume space of host disk. I.e. the real value is 0, but the"},{"line_number":14,"context_line":"used value is not 0."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"da20952f_1f5d9e14","line":11,"updated":"2015-08-31 16:38:56.000000000","message":"nit s/assined/assigned","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"71cb2b20c8286df4e88d803da95181b8bd54f786","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix evaluation of host disk usage by volume-backed instances"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently thoughout Nova instance\u0027s root_gb is used as a size of host"},{"line_number":10,"context_line":"disk space used by the instance root volume. This leads to errors"},{"line_number":11,"context_line":"because root_gb is assined to instance\u0027s flavor root_gb which almost"},{"line_number":12,"context_line":"always is not 0, but the root volume of the volume-backed instance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"5a9d85d2_b3aae56e","line":9,"range":{"start_line":9,"start_character":10,"end_line":9,"end_character":19},"updated":"2016-06-20 12:21:16.000000000","message":"throughout Nova an instance\u0027s","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"5192cb396aeb3e397c7903f07d2c4c1eca62d85b","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix evaluation of host disk usage by volume-backed instances"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently thoughout Nova instance\u0027s root_gb is used as a size of host"},{"line_number":10,"context_line":"disk space used by the instance root volume. This leads to errors"},{"line_number":11,"context_line":"because root_gb is assined to instance\u0027s flavor root_gb which almost"},{"line_number":12,"context_line":"always is not 0, but the root volume of the volume-backed instance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3aaa91ec_ca3561f7","line":9,"range":{"start_line":9,"start_character":10,"end_line":9,"end_character":19},"in_reply_to":"5a9d85d2_b3aae56e","updated":"2016-07-01 09:10:33.000000000","message":"Done","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"6da29e77edaf784bffef7f308b629f109277b50d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently thoughout Nova instance\u0027s root_gb is used as a size of host"},{"line_number":10,"context_line":"disk space used by the instance root volume. This leads to errors"},{"line_number":11,"context_line":"because root_gb is assined to instance\u0027s flavor root_gb which almost"},{"line_number":12,"context_line":"always is not 0, but the root volume of the volume-backed instance"},{"line_number":13,"context_line":"doesn\u0027t consume space of host disk. I.e. the real value is 0, but the"},{"line_number":14,"context_line":"used value is not 0."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"7aa08908_0da338b3","line":11,"range":{"start_line":11,"start_character":19,"end_line":11,"end_character":27},"updated":"2016-06-08 10:30:30.000000000","message":"nit: s/assined/assigned","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"5192cb396aeb3e397c7903f07d2c4c1eca62d85b","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently thoughout Nova instance\u0027s root_gb is used as a size of host"},{"line_number":10,"context_line":"disk space used by the instance root volume. This leads to errors"},{"line_number":11,"context_line":"because root_gb is assined to instance\u0027s flavor root_gb which almost"},{"line_number":12,"context_line":"always is not 0, but the root volume of the volume-backed instance"},{"line_number":13,"context_line":"doesn\u0027t consume space of host disk. I.e. the real value is 0, but the"},{"line_number":14,"context_line":"used value is not 0."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3aaa91ec_2a3985f2","line":11,"range":{"start_line":11,"start_character":19,"end_line":11,"end_character":27},"in_reply_to":"7aa08908_0da338b3","updated":"2016-07-01 09:10:33.000000000","message":"Done","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0900945db9b0b211ce7a6336b35f93ee7d973ba2","unresolved":false,"context_lines":[{"line_number":17,"context_line":"tool, resource_tracker, claims, notifications, host_manager."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This patch sets instance.root_gb \u003d 0 for volume-backed instances and"},{"line_number":20,"context_line":"keep it during instance life cycle. This gives a chance to modules above"},{"line_number":21,"context_line":"to do work with volume-backed instances properly without modification."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1469179"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3aaa91ec_cddafee7","line":20,"updated":"2016-06-23 18:08:36.000000000","message":"s/chance to modules/chance for the modules/","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"5192cb396aeb3e397c7903f07d2c4c1eca62d85b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"tool, resource_tracker, claims, notifications, host_manager."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This patch sets instance.root_gb \u003d 0 for volume-backed instances and"},{"line_number":20,"context_line":"keep it during instance life cycle. This gives a chance to modules above"},{"line_number":21,"context_line":"to do work with volume-backed instances properly without modification."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Closes-Bug: #1469179"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"3aaa91ec_0a3c89df","line":20,"in_reply_to":"3aaa91ec_cddafee7","updated":"2016-07-01 09:10:33.000000000","message":"Done","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"}],"nova/compute/api.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0900945db9b0b211ce7a6336b35f93ee7d973ba2","unresolved":false,"context_lines":[{"line_number":2747,"context_line":"            request_spec \u003d None"},{"line_number":2748,"context_line":""},{"line_number":2749,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2750,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2751,"context_line":""},{"line_number":2752,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2753,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_4df56e55","line":2750,"updated":"2016-06-23 18:08:36.000000000","message":"@Ankit: At the very least, please add a comment above that explains why we are doing this. Otherwise, I guarantee that someone in 6 months will come around and ask \"why is this happening here?\". :)","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"affa137deecfdc7aa2d0e9ee5a3c1ca9775328c8","unresolved":false,"context_lines":[{"line_number":2747,"context_line":"            request_spec \u003d None"},{"line_number":2748,"context_line":""},{"line_number":2749,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2750,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2751,"context_line":""},{"line_number":2752,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2753,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_513a6e35","line":2750,"range":{"start_line":2750,"start_character":12,"end_line":2750,"end_character":56},"updated":"2016-05-24 21:25:50.000000000","message":"this seems hackish...we shouldn\u0027t need to muck with the flavor if the logic of how to handle volumes is correct.","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"5192cb396aeb3e397c7903f07d2c4c1eca62d85b","unresolved":false,"context_lines":[{"line_number":2747,"context_line":"            request_spec \u003d None"},{"line_number":2748,"context_line":""},{"line_number":2749,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2750,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2751,"context_line":""},{"line_number":2752,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2753,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_ed003703","line":2750,"in_reply_to":"3aaa91ec_4df56e55","updated":"2016-07-01 09:10:33.000000000","message":"Done","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"28414bbdc529531d6f9e9e20d2c166938fa57321","unresolved":false,"context_lines":[{"line_number":2747,"context_line":"            request_spec \u003d None"},{"line_number":2748,"context_line":""},{"line_number":2749,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2750,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2751,"context_line":""},{"line_number":2752,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2753,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":16,"id":"bab6814e_95f2e998","line":2750,"range":{"start_line":2750,"start_character":12,"end_line":2750,"end_character":56},"in_reply_to":"bab6814e_513a6e35","updated":"2016-05-25 09:48:55.000000000","message":"Hi Chris,\n\nIn case of \"resize\" disk_gb is calculated based on the new_instance_type (flavor) at [1].\nAs instance.root_gb is updated to zero at API level in case of volume backed instance so this change will reflect the same value for new_instance_type.\n\nAs of now this is the best available way to fix this issue, Any suggestions are welcome.\n\n[1] https://github.com/openstack/nova/blob/master/nova/compute/claims.py#L277","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"2d6215378e140d8b9f36ffbd0388f7403ec0c047","unresolved":false,"context_lines":[{"line_number":2747,"context_line":"            request_spec \u003d None"},{"line_number":2748,"context_line":""},{"line_number":2749,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2750,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2751,"context_line":""},{"line_number":2752,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2753,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9abb7d3a_58ca6d6e","line":2750,"range":{"start_line":2750,"start_character":12,"end_line":2750,"end_character":56},"in_reply_to":"bab6814e_95f2e998","updated":"2016-05-30 18:02:39.000000000","message":"Tough call.  Personally I don\u0027t like having an \"instance_type\" object that doesn\u0027t actually reflect any of the instance types in the database.  I\u0027d prefer if the claim could correct for the fact that the instance is boot-from-volume, but that correction should be in a helper function somewhere so the logic is only in once place.\n\nAnyways, that can be fixed up later so I won\u0027t insist it\u0027s done in this patch.","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1658208e128a1b9d9de577535e55a3853dadf758","unresolved":false,"context_lines":[{"line_number":1131,"context_line":"                instance_type, metadata, injected_files, root_bdm)"},{"line_number":1132,"context_line":""},{"line_number":1133,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1134,"context_line":"            base_options[\u0027root_gb\u0027] \u003d 0"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1137,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_a55fa43f","line":1134,"updated":"2016-07-12 14:22:26.000000000","message":"I think communicating this using this field (which I consider to be deprecated in favor of the flavor attributes) is wrong.\n\nAlso, why don\u0027t we just set the instance.flavor.root_gb to the volume size, instead of using zero as a sentinel? Having root_gb be zero as a sentinel pretty much anywhere seems like a bad idea and is just asking for math errors later when calculating quotas, usage, etc.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ee339e4bad230ccbe439de8822be4761e7ba3357","unresolved":false,"context_lines":[{"line_number":2647,"context_line":"        # root_gb of instance type to 0 (i.e. instance.root_gb) if the instance"},{"line_number":2648,"context_line":"        # is booted from volume."},{"line_number":2649,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2650,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2651,"context_line":""},{"line_number":2652,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2653,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_344be888","line":2650,"updated":"2016-07-12 13:31:17.000000000","message":"I\u0027m not super happy to see this ^\nWhy are we adding this instead of making sure the Flavor object is updated to relate root_gb equal to 0 ?","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0ef5081877de64ac528bc53fde281a2d5651144d","unresolved":false,"context_lines":[{"line_number":2647,"context_line":"        # root_gb of instance type to 0 (i.e. instance.root_gb) if the instance"},{"line_number":2648,"context_line":"        # is booted from volume."},{"line_number":2649,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2650,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2651,"context_line":""},{"line_number":2652,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2653,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_97a1fe96","line":2650,"in_reply_to":"1aa78d24_344be888","updated":"2016-07-12 13:45:40.000000000","message":"So, lemme be more clear. \nWhen we first hydrate the RequestSpec, we can just verify whether it\u0027s a BFV instance like you do a lot, and just modify the nested Flavor object from the ReqSpec to have root_gb\u003d0.\n\nThen, once we we want to resize, we could just modify the existing nova.compute.api::resize() method to just modify the new instance_type to set root_gb\u003d0 given we already get the original ReqSpec by the end of that method.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1658208e128a1b9d9de577535e55a3853dadf758","unresolved":false,"context_lines":[{"line_number":2647,"context_line":"        # root_gb of instance type to 0 (i.e. instance.root_gb) if the instance"},{"line_number":2648,"context_line":"        # is booted from volume."},{"line_number":2649,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2650,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2651,"context_line":""},{"line_number":2652,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2653,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_e5f9ac4f","line":2650,"in_reply_to":"1aa78d24_97a1fe96","updated":"2016-07-12 14:22:26.000000000","message":"I consider instance.root_gb (and the other flavor-duplicated fields) to be deprecated and targets for removal some day. Setting the new flavor object from this field seems extremely wrong to me. If it\u0027s getting set from the volume size (or to zero) somewhere, then we should set it on the nested flavor (if that\u0027s the desire) and not use a deprecated field as a proxy. I assume this is just because you set it above, in which case I think we should use the flavor instead. Sounds like Claim needs to look at the flavor instead of the old instance property anyway.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b4ff1eea933274a2856af9b9f029d7b403aebbd8","unresolved":false,"context_lines":[{"line_number":2647,"context_line":"        # root_gb of instance type to 0 (i.e. instance.root_gb) if the instance"},{"line_number":2648,"context_line":"        # is booted from volume."},{"line_number":2649,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2650,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2651,"context_line":""},{"line_number":2652,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2653,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_a195ed33","line":2650,"in_reply_to":"1aa78d24_ab42d33b","updated":"2016-07-20 17:34:10.000000000","message":"As of the following patch, we shouldn\u0027t be using instance.root_gb (or any of the other instance.$resource ones):\n\nhttps://review.openstack.org/#/q/status:merged+project:openstack/nova+branch:master+topic:cleanup-legacy-attrs\n\nSo please update this to use one of the nested flavors, at least.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d298f397bf6e4e888ca771c60ac6c8d5c2249f61","unresolved":false,"context_lines":[{"line_number":2647,"context_line":"        # root_gb of instance type to 0 (i.e. instance.root_gb) if the instance"},{"line_number":2648,"context_line":"        # is booted from volume."},{"line_number":2649,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":2650,"context_line":"            new_instance_type.root_gb \u003d instance.root_gb"},{"line_number":2651,"context_line":""},{"line_number":2652,"context_line":"        scheduler_hint \u003d {\u0027filter_properties\u0027: filter_properties}"},{"line_number":2653,"context_line":"        self.compute_task_api.resize_instance(context, instance,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_ab42d33b","line":2650,"in_reply_to":"1aa78d24_e5f9ac4f","updated":"2016-07-12 14:40:36.000000000","message":"I\u0027m fine with your point, I think we can just make sure we modify the nested flavor field to the current volume size and then call compute_utils.is_volume_backed_instance in the claim method to do the math.\n\nThat way, we wouldn\u0027t need a special treatment for resize because we have a new flavor...","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0421ddc178e2bc59e383f892bad2c7d55bb8c175","unresolved":false,"context_lines":[{"line_number":1133,"context_line":"        self._checks_for_create_and_rebuild(context, image_id, boot_meta,"},{"line_number":1134,"context_line":"                instance_type, metadata, injected_files, root_bdm)"},{"line_number":1135,"context_line":""},{"line_number":1136,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1137,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_0e03c80e","line":1136,"updated":"2016-08-03 05:52:35.000000000","message":"So this is the equivalent of checking is_volume_backed_instance since we already have the root_bdm. I think we should add a comment explaining what this code is doing and why (that is, it\u0027s setting root_gb \u003d 0 for volume backed instance).","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0421ddc178e2bc59e383f892bad2c7d55bb8c175","unresolved":false,"context_lines":[{"line_number":2550,"context_line":"                    flavor_id, read_deleted\u003d\"no\")"},{"line_number":2551,"context_line":"            if (new_instance_type.get(\u0027root_gb\u0027) \u003d\u003d 0 and"},{"line_number":2552,"context_line":"                current_instance_type.get(\u0027root_gb\u0027) !\u003d 0 and"},{"line_number":2553,"context_line":"                not compute_utils.is_volume_backed_instance(context,"},{"line_number":2554,"context_line":"                    instance)):"},{"line_number":2555,"context_line":"                reason \u003d _(\u0027Resize to zero disk flavor is not allowed.\u0027)"},{"line_number":2556,"context_line":"                raise exception.CannotResizeDisk(reason\u003dreason)"},{"line_number":2557,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_eb6bc683","line":2554,"range":{"start_line":2553,"start_character":20,"end_line":2554,"end_character":29},"updated":"2016-08-03 05:52:35.000000000","message":"is_volume_backed_instance is already being called in this method for resize. We should make the call once and reuse the result later for the root_gb.\n\nWe could have a variable \u0027is_volume_backed \u003d None\u0027 before the check for migrate vs resize, set it in the resize block and use it. Then later for the root_gb:\n\n if is_volume_backed is None:\n     is_volume_backed \u003d compute_utils...\n if is_volume_backed:\n     new_instance_type.root_gb \u003d ...\n\nThis way we only ever call compute_utils.is_volume_backed_instance once instead of twice for resize.","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"657504557be9b196765586ac742d7c95a8872f6e","unresolved":false,"context_lines":[{"line_number":2550,"context_line":"                    flavor_id, read_deleted\u003d\"no\")"},{"line_number":2551,"context_line":"            if (new_instance_type.get(\u0027root_gb\u0027) \u003d\u003d 0 and"},{"line_number":2552,"context_line":"                current_instance_type.get(\u0027root_gb\u0027) !\u003d 0 and"},{"line_number":2553,"context_line":"                not compute_utils.is_volume_backed_instance(context,"},{"line_number":2554,"context_line":"                    instance)):"},{"line_number":2555,"context_line":"                reason \u003d _(\u0027Resize to zero disk flavor is not allowed.\u0027)"},{"line_number":2556,"context_line":"                raise exception.CannotResizeDisk(reason\u003dreason)"},{"line_number":2557,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_902506b0","line":2554,"range":{"start_line":2553,"start_character":20,"end_line":2554,"end_character":29},"in_reply_to":"bacf61ea_eb6bc683","updated":"2016-08-03 09:18:42.000000000","message":"+1 i agree with this","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"553ca54a13e0ed051b89deb67bb218fe50eeb6c2","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        # backed to make sure it\u0027s not calculated against the hypervisors"},{"line_number":1138,"context_line":"        # local disk usage."},{"line_number":1139,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1140,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1143,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_836098a6","line":1140,"updated":"2016-08-05 14:29:48.000000000","message":"I still think this is a hack. The flavor is what it is, and we don\u0027t really know here whether or not the volume means that the compute node\u0027s disk is uninvolved. If we\u0027re going to avoid reporting usage by volume-backed instances, then we should do it on the compute where it knows the right answer.","commit_id":"80b452e7798feb0dd695e67af74a802abb289f66"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f6c908b6135a7360d46b47d4d00c79a1f6878b0d","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        # backed to make sure it\u0027s not calculated against the hypervisors"},{"line_number":1138,"context_line":"        # local disk usage."},{"line_number":1139,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1140,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1143,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_b2e4f60c","line":1140,"in_reply_to":"bacf61ea_3628fd99","updated":"2016-08-05 18:50:44.000000000","message":"For what it\u0027s worth, we have customers that run with mimimal numbers of minimal-sized compute nodes, and failing to schedule (because of disk space that clearly should be available) is very noticeable in that environment.\n\nSo I\u0027d like to see some kind of fix, even if it\u0027s not exactly this patch.","commit_id":"80b452e7798feb0dd695e67af74a802abb289f66"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a3691efb81af82f0353a7cad71222eecd41fea5c","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        # backed to make sure it\u0027s not calculated against the hypervisors"},{"line_number":1138,"context_line":"        # local disk usage."},{"line_number":1139,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1140,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1143,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_804fe390","line":1140,"in_reply_to":"bacf61ea_55f00ec9","updated":"2016-08-05 17:24:22.000000000","message":"I wonder if it would be possible to do something like check is_volume_backed in the resource tracker as it updates usage for instances, and set root_gb \u003d 0 in the usage there instead. The caveat there would be a db query of block device mappings per instance per update usage period.\n\nIIUC, trying to handle this only in the claims doesn\u0027t solve the problem of the scheduler being able to select a host without considering root_gb of volume-backed instances and also doesn\u0027t solve the reporting problem.","commit_id":"80b452e7798feb0dd695e67af74a802abb289f66"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0c88e946d5ae9b9f859d725e1b6632db20f195e5","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        # backed to make sure it\u0027s not calculated against the hypervisors"},{"line_number":1138,"context_line":"        # local disk usage."},{"line_number":1139,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1140,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1143,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_b67b4df4","line":1140,"in_reply_to":"bacf61ea_804fe390","updated":"2016-08-05 17:36:58.000000000","message":"That\u0027s what I said in my first reply above. If we want to not report disk usage inclusive of instances that have volumes as root devices, then we should do that in the compute manager code:\n\n\u003eIf we\u0027re going to avoid reporting usage by volume-backed instances, \n\u003ethen we should do it on the compute where it knows the right answer.\n\nI\u0027m not sure I really feel like it\u0027s all that important given all the other ways we misreport resources like this, but if we\u0027re going to do something, we should do that. Doing what this patch does is not okay, IMHO.","commit_id":"80b452e7798feb0dd695e67af74a802abb289f66"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"24fcf69d0b957324c2e41b79e64fdf29914ec4d5","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        # backed to make sure it\u0027s not calculated against the hypervisors"},{"line_number":1138,"context_line":"        # local disk usage."},{"line_number":1139,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1140,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1143,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_d4e524dc","line":1140,"in_reply_to":"bacf61ea_836098a6","updated":"2016-08-05 15:01:03.000000000","message":"Yes it\u0027s a hack, but it\u0027s basicly a temp fix for a 2+ year old bug that nobody have bothered to fix. The root_gb field needs to be set to zero otherwise the scheduler\u0027s DiskFilter will fail since it will count volume backed instance against it\u0027s checks, changing it on the compute side would only make the actual resource tracker statistics correct but not fix the first part of the issue.\n\nThe real fix is when the resource-providers blueprint arrives where a lot of this code will be refactored including the resource tracker.\n\nI\u0027ve been pushing for this change for a while now, because in my opinion wrong data is a critical issue, I know a lot of people at NTT Data also wants this merged.\n\nThe recent patchsets has made significant improvements.\nMy 2 cents.","commit_id":"80b452e7798feb0dd695e67af74a802abb289f66"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"95ab5d1432a13c91db74bec94a382fb2b7460394","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        # backed to make sure it\u0027s not calculated against the hypervisors"},{"line_number":1138,"context_line":"        # local disk usage."},{"line_number":1139,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1140,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1143,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_3628fd99","line":1140,"in_reply_to":"bacf61ea_b67b4df4","updated":"2016-08-05 17:59:17.000000000","message":"Yes, sorry I wasn\u0027t as clear as I intended to be. I understood and agree with your conclusion that, if anything, this should be only on the compute host. Based on what you originally said, I tried to think of an approach that would cover everything (placement, claim, and reporting).\n\nMy question was more like a sanity-check if the specific suggestion made sense and if querying for BDMs every update period would be acceptable as a workaround until resource providers. I think there might be something needed in claim calculation too, but usage + claims together should do it, I think.\n\nAs far as the importance, the other example I know of misreporting is for shared storage, where it reports more than what is available. The misreporting of this bug is reporting less than what is available. I think that\u0027s why this bug is more important for users, because it\u0027s denying scheduling instances when there actually is capacity left. For the shared storage misreporting, you won\u0027t fail scheduling until you actually fill up capacity (though when it is near full, it will report you have enough room).","commit_id":"80b452e7798feb0dd695e67af74a802abb289f66"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"142c18945aa3e52f2137524fb8a536409ea57362","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        # backed to make sure it\u0027s not calculated against the hypervisors"},{"line_number":1138,"context_line":"        # local disk usage."},{"line_number":1139,"context_line":"        if root_bdm is not None and root_bdm.is_volume:"},{"line_number":1140,"context_line":"            instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":1141,"context_line":""},{"line_number":1142,"context_line":"        instance_group \u003d self._get_requested_instance_group(context,"},{"line_number":1143,"context_line":"                                   filter_properties)"}],"source_content_type":"text/x-python","patch_set":19,"id":"bacf61ea_55f00ec9","line":1140,"in_reply_to":"bacf61ea_d4e524dc","updated":"2016-08-05 15:38:30.000000000","message":"We report incorrect data for a bunch of cases, including shared storage, ironic, and this. The resource-providers work is how we\u0027re planning to get out of this situation.\n\nThe debt this creates will last much longer than the time between now and when resource providers have solved the real problem for us. In two years, we\u0027ll still have instances that have their flavors mangled in the database that we\u0027ll have to be accounting for, or else we\u0027ll have to iterate every single one of them to undo the damage once it\u0027s no longer required, which will only be partially possible because the reference flavors can and will likely have changed.\n\nThis hack, introducing the debt it does, to work around a six year old problem for a short period of less than 12 months, with effects lasting years to come is, IMHO, not even remotely worthwhile.","commit_id":"80b452e7798feb0dd695e67af74a802abb289f66"}],"nova/compute/manager.py":[{"author":{"_account_id":13630,"name":"Luo Gangyi","email":"luogangyi@corp.netease.com","username":"luogangyi"},"change_message_id":"e8e549337b16c7ad8939d3f9d67079623b4bddba","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"            instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3442,"context_line":"            instance.vcpus \u003d instance_type.vcpus"},{"line_number":3443,"context_line":"            if self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3444,"context_line":"                instance.root_gb \u003d 0"},{"line_number":3445,"context_line":"            else:"},{"line_number":3446,"context_line":"                instance.root_gb \u003d instance_type.root_gb"},{"line_number":3447,"context_line":"            instance.ephemeral_gb \u003d instance_type.ephemeral_gb"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_c147f149","line":3444,"updated":"2015-09-02 06:19:48.000000000","message":"I think you should judge it by your logic, or maybe it is note the good place to do this, since using RPC here seems too costly.","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":13630,"name":"Luo Gangyi","email":"luogangyi@corp.netease.com","username":"luogangyi"},"change_message_id":"764c73f2e5fcee9493cf11ecec4aceca99325f32","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"            instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3442,"context_line":"            instance.vcpus \u003d instance_type.vcpus"},{"line_number":3443,"context_line":"            if self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3444,"context_line":"                instance.root_gb \u003d 0"},{"line_number":3445,"context_line":"            else:"},{"line_number":3446,"context_line":"                instance.root_gb \u003d instance_type.root_gb"},{"line_number":3447,"context_line":"            instance.ephemeral_gb \u003d instance_type.ephemeral_gb"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_7467c525","line":3444,"in_reply_to":"da20952f_140e89e5","updated":"2015-09-02 07:15:18.000000000","message":"I see. And I still think your previous idea(Move is_volume_backed_instance to compute.utils) is better as temporary solution :)","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"1b22be66175f45e52dab2b5476823944eb4e22ad","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"            instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3442,"context_line":"            instance.vcpus \u003d instance_type.vcpus"},{"line_number":3443,"context_line":"            if self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3444,"context_line":"                instance.root_gb \u003d 0"},{"line_number":3445,"context_line":"            else:"},{"line_number":3446,"context_line":"                instance.root_gb \u003d instance_type.root_gb"},{"line_number":3447,"context_line":"            instance.ephemeral_gb \u003d instance_type.ephemeral_gb"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_cebc7e6e","line":3444,"in_reply_to":"da20952f_6f591e8e","updated":"2015-09-04 15:55:04.000000000","message":"Correct, there is no RPC.\n\nI also like the idea of putting the logic on the instance object, but that should not block a bug fix.","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"bba303f907e9eedab5d50f54f6beb5f67c0b1ee0","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"            instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3442,"context_line":"            instance.vcpus \u003d instance_type.vcpus"},{"line_number":3443,"context_line":"            if self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3444,"context_line":"                instance.root_gb \u003d 0"},{"line_number":3445,"context_line":"            else:"},{"line_number":3446,"context_line":"                instance.root_gb \u003d instance_type.root_gb"},{"line_number":3447,"context_line":"            instance.ephemeral_gb \u003d instance_type.ephemeral_gb"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_6f591e8e","line":3444,"in_reply_to":"da20952f_7467c525","updated":"2015-09-02 13:05:56.000000000","message":"btw, i don\u0027t think that self.compute_api.is_volume_backed_instance is called through RPC","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b1bfb84daccfb2f649bb826139f4683cae7d3c46","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"            instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3442,"context_line":"            instance.vcpus \u003d instance_type.vcpus"},{"line_number":3443,"context_line":"            if self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3444,"context_line":"                instance.root_gb \u003d 0"},{"line_number":3445,"context_line":"            else:"},{"line_number":3446,"context_line":"                instance.root_gb \u003d instance_type.root_gb"},{"line_number":3447,"context_line":"            instance.ephemeral_gb \u003d instance_type.ephemeral_gb"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_140e89e5","line":3444,"in_reply_to":"da20952f_c147f149","updated":"2015-09-02 06:57:57.000000000","message":"I understand your concern. I thought about it, but i found [1] (see at L4883).\n\nAlso i wanted to move is_volume_backed_instance to nova.utils [2]\n\nBut maybe this function should be a method of Instance object. In this case it can be used for disk filters and move claim as well. I was waiting for the refactoring mentioned in an abandon comment of [2]. But now i think that we have no more time to wait, otherwise this bug will not be fixed in Mitaka. So i\u0027m going to ask core reviewers about that.\n\nBut we should understand, that using objects or [2] here may prevent the solution to be backported. Someone recently asked me about backporting...\n\n[2] https://review.openstack.org/#/c/203766/","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":13630,"name":"Luo Gangyi","email":"luogangyi@corp.netease.com","username":"luogangyi"},"change_message_id":"d7f8b6bd74cd4b92c059a1ad84774e466294c5cb","unresolved":false,"context_lines":[{"line_number":3441,"context_line":"            instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3442,"context_line":"            instance.vcpus \u003d instance_type.vcpus"},{"line_number":3443,"context_line":"            if self.compute_api.is_volume_backed_instance(context, instance):"},{"line_number":3444,"context_line":"                instance.root_gb \u003d 0"},{"line_number":3445,"context_line":"            else:"},{"line_number":3446,"context_line":"                instance.root_gb \u003d instance_type.root_gb"},{"line_number":3447,"context_line":"            instance.ephemeral_gb \u003d instance_type.ephemeral_gb"}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_917694a2","line":3444,"in_reply_to":"da20952f_cebc7e6e","updated":"2015-09-05 10:20:34.000000000","message":"@Feodor and Brian,\n\nif you look at method \"is_volume_backed_instance\"\n\n    def is_volume_backed_instance(self, context, instance, bdms\u003dNone):\n        if not instance.image_ref:\n            return True\n\n        if bdms is None:\n            bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid(\n                    context, instance.uuid)\n\n        root_bdm \u003d bdms.root_bdm()\n        if not root_bdm:\n            return False\n        return root_bdm.is_volume\n\nthe sentence \"objects.BlockDeviceMappingList.get_by_instance_uuid(\n                    context, instance.uuid)\" will use RPC to get result.\n\nBut, if you think that\u0027s OK, I can accept it too.","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b1bfb84daccfb2f649bb826139f4683cae7d3c46","unresolved":false,"context_lines":[{"line_number":4880,"context_line":"        :param dest_check_data: result of check_can_live_migrate_destination"},{"line_number":4881,"context_line":"        :returns: a dict containing migration info"},{"line_number":4882,"context_line":"        \"\"\""},{"line_number":4883,"context_line":"        is_volume_backed \u003d self.compute_api.is_volume_backed_instance(ctxt,"},{"line_number":4884,"context_line":"                                                                      instance)"},{"line_number":4885,"context_line":"        dest_check_data[\u0027is_volume_backed\u0027] \u003d is_volume_backed"},{"line_number":4886,"context_line":"        block_device_info \u003d self._get_instance_block_device_info("}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_6194e5e7","line":4883,"updated":"2015-09-02 06:57:57.000000000","message":"[1]","commit_id":"94da2333b019be1f7be6da062855a8dbc3aea955"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"ec92905ddc456c121360458f09167d8b38ab3fdf","unresolved":false,"context_lines":[{"line_number":3761,"context_line":"                self.volume_api.terminate_connection(context, bdm.volume_id,"},{"line_number":3762,"context_line":"                                                     connector)"},{"line_number":3763,"context_line":""},{"line_number":3764,"context_line":"    def _set_instance_info(self, context, instance, instance_type):"},{"line_number":3765,"context_line":"        instance.instance_type_id \u003d instance_type.id"},{"line_number":3766,"context_line":"        instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3767,"context_line":"        instance.vcpus \u003d instance_type.vcpus"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_17e1b39a","line":3764,"updated":"2016-06-23 17:33:44.000000000","message":"Why did you change this from a staticmethod? AFAICS, you don\u0027t use the \u0027self\u0027 reference.","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"5192cb396aeb3e397c7903f07d2c4c1eca62d85b","unresolved":false,"context_lines":[{"line_number":3761,"context_line":"                self.volume_api.terminate_connection(context, bdm.volume_id,"},{"line_number":3762,"context_line":"                                                     connector)"},{"line_number":3763,"context_line":""},{"line_number":3764,"context_line":"    def _set_instance_info(self, context, instance, instance_type):"},{"line_number":3765,"context_line":"        instance.instance_type_id \u003d instance_type.id"},{"line_number":3766,"context_line":"        instance.memory_mb \u003d instance_type.memory_mb"},{"line_number":3767,"context_line":"        instance.vcpus \u003d instance_type.vcpus"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_2df19f01","line":3764,"in_reply_to":"3aaa91ec_17e1b39a","updated":"2016-07-01 09:10:33.000000000","message":"Yes Ed Leafe you are right we don\u0027t need this change, Thank you.","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"132328322707e6ef2a3e9a076e62fe335ff86276","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_f1569228","line":3818,"updated":"2016-07-06 16:53:00.000000000","message":"++ to cfriesen\u0027s suggestion. I\u0027ve actually been using that pattern myself in updates to the resource tracker I\u0027ve been working on.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f94d5f2c6f5b3452ee59cbd83235199c5d55f162","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_e793a7f8","line":3818,"updated":"2016-07-11 16:46:38.000000000","message":"Hmm, yeah, I hadn\u0027t considered the exception-tracing argument, thanks for bringing that up,, Ankit. OK, I\u0027ll remove my -1 based on that feedback.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"083b48c7d81069b792cd88f86289e984de2cb62d","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_f7eef089","line":3818,"range":{"start_line":3818,"start_character":18,"end_line":3818,"end_character":65},"updated":"2016-07-04 21:32:16.000000000","message":"It doesn\u0027t feel quite right to me to add a passed-in context to determine something that is essentially internal to nova.  Can\u0027t we just use context.elevated() here?  This would save having to modify the function signature.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5634bb10e2550158e3350dff4fc85da1a2c4f051","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_7c49dcb6","line":3818,"range":{"start_line":3818,"start_character":18,"end_line":3818,"end_character":65},"in_reply_to":"1aa78d24_00c08fdf","updated":"2016-07-06 15:50:37.000000000","message":"Sorry, my previous suggestion didn\u0027t make sense.  Rather, I think the right thing to do would be to obtain an admin context by calling:\n\ncontext \u003d nova.context.get_admin_context()\n\nand then use that as the context in the call to is_volume_backed_instance().","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"ace4d2611314a94beb5ed7d93ef0cde03559cfa4","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_b1f8bd7d","line":3818,"range":{"start_line":3818,"start_character":18,"end_line":3818,"end_character":65},"in_reply_to":"1aa78d24_4820ec49","updated":"2016-07-11 16:09:59.000000000","message":"The exception tracing is a valid point...I\u0027m curious to see what Jay says about it.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"39c9992922959c6d18ee8ff98d9a5407822698b8","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_4820ec49","line":3818,"range":{"start_line":3818,"start_character":18,"end_line":3818,"end_character":65},"in_reply_to":"1aa78d24_7c49dcb6","updated":"2016-07-11 06:05:16.000000000","message":"Hi Chris, thanks for your review and help. Your suggestion to use nova.context.get_admin_context() works well except its impact on the request_id. If any exception occurs from is_volume_backed_instance() method then request_id available in this context will not match with the original context. So it will be difficult to trace error logs in case of exception.\n\n\nAlso _set_instance_info() is a private method called from this module only so there should be no harm to pass the request context to this method. Please let me know your opinion.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a7ba4e694744d95a8e032871a1867ad312f0b538","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_bf17c3a1","line":3818,"in_reply_to":"1aa78d24_e793a7f8","updated":"2016-07-12 08:27:42.000000000","message":"Actually, I have never though about it like that before. Its a very good point. And actually it makes sense of some confusion I hit in the logs a little while back.\n\nGiven we don\u0027t actually use context.elevated checks in the DB layer any more, well largely, there is no loss here.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"39fc42b489c7e4ccbe34f7d1949b6a29b862098e","unresolved":false,"context_lines":[{"line_number":3815,"context_line":"        # NOTE(tobasco): Set root_gb to 0 if the instance is volume"},{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_00c08fdf","line":3818,"range":{"start_line":3818,"start_character":18,"end_line":3818,"end_character":65},"in_reply_to":"1aa78d24_f7eef089","updated":"2016-07-05 05:36:32.000000000","message":"Hi Chris,\n\n\nIf you are asking not to modify \"_set_instance_info\" method signature and then pass context.elevated() to compute_utils.is_volume_backed_instance method, then on which object context\u0027s elevated method would get called.\n\n\nCould you please help me to understand this?","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0ef5081877de64ac528bc53fde281a2d5651144d","unresolved":false,"context_lines":[{"line_number":3816,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3817,"context_line":"        # hypervisors local disk usage."},{"line_number":3818,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3819,"context_line":"            instance.root_gb \u003d 0"},{"line_number":3820,"context_line":"        else:"},{"line_number":3821,"context_line":"            instance.root_gb \u003d instance_type.root_gb"},{"line_number":3822,"context_line":"        instance.ephemeral_gb \u003d instance_type.ephemeral_gb"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_b76eba2c","line":3819,"updated":"2016-07-12 13:45:40.000000000","message":"Again, I don\u0027t like to have that field set here.\n\nSee, if you get the correct instance from the ReqSpec in the compute.api.resize() method, you will also have root_gb\u003d0 then.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0421ddc178e2bc59e383f892bad2c7d55bb8c175","unresolved":false,"context_lines":[{"line_number":3841,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3842,"context_line":"        # hypervisors local disk usage."},{"line_number":3843,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3844,"context_line":"            instance.flavor.root_gb \u003d 0"},{"line_number":3845,"context_line":""},{"line_number":3846,"context_line":"    def _finish_resize(self, context, instance, migration, disk_info,"},{"line_number":3847,"context_line":"                       image_meta):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_4e866014","line":3844,"updated":"2016-08-03 05:52:35.000000000","message":"I don\u0027t understand why the changes in this file are needed if we have set new_instance_type.root_gb \u003d instance.flavor.root_gb in nova/compute/api.py. I thought instance.flavor.root_gb would already be 0 because of that.","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"657504557be9b196765586ac742d7c95a8872f6e","unresolved":false,"context_lines":[{"line_number":3841,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3842,"context_line":"        # hypervisors local disk usage."},{"line_number":3843,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3844,"context_line":"            instance.flavor.root_gb \u003d 0"},{"line_number":3845,"context_line":""},{"line_number":3846,"context_line":"    def _finish_resize(self, context, instance, migration, disk_info,"},{"line_number":3847,"context_line":"                       image_meta):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_65cb761f","line":3844,"in_reply_to":"bacf61ea_4e866014","updated":"2016-08-03 09:18:42.000000000","message":"afaik this was to support instance resize","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a5c4e69be057eab7922a5a1d883713170b637962","unresolved":false,"context_lines":[{"line_number":3841,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3842,"context_line":"        # hypervisors local disk usage."},{"line_number":3843,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3844,"context_line":"            instance.flavor.root_gb \u003d 0"},{"line_number":3845,"context_line":""},{"line_number":3846,"context_line":"    def _finish_resize(self, context, instance, migration, disk_info,"},{"line_number":3847,"context_line":"                       image_meta):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_8bab061e","line":3844,"in_reply_to":"bacf61ea_65cb761f","updated":"2016-08-03 15:37:44.000000000","message":"Yeah, it appears that way but from what I could see in the code the new_instance_type.root_gb \u003d 0 in the resize function in nova/compute/api.py would propagate through all the steps of resize to result in the instance maintaining root_gb \u003d 0 with the new flavor.\n\nI pulled this patch down and tried it with devstack, with the changes in this file reverted. I did a resize followed by a confirm resize and the root_gb of the flavor in the instance_extra table was 0 before confirm resize and after confirm resize. So, so far, I\u0027m not understanding what the changes in this file are intended to do.","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"75d767357a40bf39585b726f97e42e94b03cef4c","unresolved":false,"context_lines":[{"line_number":3841,"context_line":"        # backed to make sure it\u0027s not calculated against the"},{"line_number":3842,"context_line":"        # hypervisors local disk usage."},{"line_number":3843,"context_line":"        if compute_utils.is_volume_backed_instance(context, instance):"},{"line_number":3844,"context_line":"            instance.flavor.root_gb \u003d 0"},{"line_number":3845,"context_line":""},{"line_number":3846,"context_line":"    def _finish_resize(self, context, instance, migration, disk_info,"},{"line_number":3847,"context_line":"                       image_meta):"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_e1e581a8","line":3844,"in_reply_to":"bacf61ea_8bab061e","updated":"2016-08-03 16:05:12.000000000","message":"Agree that we shouldn\u0027t be doing this here. This helper method deciding to do something based on whether a thing is a volume is a terrible idea.","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"}],"nova/scheduler/utils.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0900945db9b0b211ce7a6336b35f93ee7d973ba2","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            # flavor object, just don\u0027t put it in the request spec"},{"line_number":75,"context_line":"            pass"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    if not instance.get(\u0027root_gb\u0027):"},{"line_number":78,"context_line":"        instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    request_spec \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_6df02a68","line":77,"updated":"2016-06-23 18:08:36.000000000","message":"The above will evaluate True when the \u0027root_gb\u0027 value of instance is 0, so you will just be setting it again to 0 in the next line. Better to do:\n\n if instance.get(\u0027root_gb\u0027) is None:","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"5192cb396aeb3e397c7903f07d2c4c1eca62d85b","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            # flavor object, just don\u0027t put it in the request spec"},{"line_number":75,"context_line":"            pass"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    if not instance.get(\u0027root_gb\u0027):"},{"line_number":78,"context_line":"        instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    request_spec \u003d {"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_ad746f35","line":77,"in_reply_to":"3aaa91ec_6df02a68","updated":"2016-07-01 09:10:33.000000000","message":"Hi Jay, I have added a comment to help reviewers about this change. We are updating the root_gb for instance_type based on the instance\u0027s root_gb here.","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"132328322707e6ef2a3e9a076e62fe335ff86276","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    # this value for calculating requested disk size for checking whether a"},{"line_number":79,"context_line":"    # particular compute host has enough disk space available or not."},{"line_number":80,"context_line":"    if instance.get(\u0027root_gb\u0027) \u003d\u003d 0:"},{"line_number":81,"context_line":"        instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    request_spec \u003d {"},{"line_number":84,"context_line":"            \u0027image\u0027: image or {},"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_d1539637","line":81,"updated":"2016-07-06 16:53:00.000000000","message":"Ugh, this is an ugly (but necessary) hack. In the future, I\u0027d like to see the BuildRequest object just have it\u0027s DISK_GB requested resource amount set to 0 and no need to \"pre-determine\" the instance.root_gb value just to set the instance_type.root_gb value later here.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ee339e4bad230ccbe439de8822be4761e7ba3357","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    # this value for calculating requested disk size for checking whether a"},{"line_number":79,"context_line":"    # particular compute host has enough disk space available or not."},{"line_number":80,"context_line":"    if instance.get(\u0027root_gb\u0027) \u003d\u003d 0:"},{"line_number":81,"context_line":"        instance_type[\u0027root_gb\u0027] \u003d 0"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    request_spec \u003d {"},{"line_number":84,"context_line":"            \u0027image\u0027: image or {},"}],"source_content_type":"text/x-python","patch_set":17,"id":"1aa78d24_14f4ec58","line":81,"in_reply_to":"1aa78d24_d1539637","updated":"2016-07-12 13:31:17.000000000","message":"That\u0027s honestly really crap. Why aren\u0027t we making sure that the RequestSpec correctly has the good flavor root_gb attribute ?\n\nI was about to remove that legacy_build_request_spec() method, tbh.","commit_id":"64ec977e4f80b6ec22f5447514d8ac045af342a9"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0900945db9b0b211ce7a6336b35f93ee7d973ba2","unresolved":false,"context_lines":[{"line_number":5416,"context_line":"        self._test_finish_revert_resize(power_on\u003dTrue)"},{"line_number":5417,"context_line":""},{"line_number":5418,"context_line":"    def test_finish_revert_resize_from_stopped(self):"},{"line_number":5419,"context_line":"        self._test_finish_revert_resize(power_on\u003dFalse, is_volume_backed\u003dTrue)"},{"line_number":5420,"context_line":""},{"line_number":5421,"context_line":"    def test_finish_revert_resize_from_stopped_remove_old_vm_state(self):"},{"line_number":5422,"context_line":"        # in  this case we resize from STOPPED but end up with ACTIVE"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_2de462aa","line":5419,"updated":"2016-06-23 18:08:36.000000000","message":"Please create a *new* unit test method test_finish_revert_resize_volume_backed() that only tests the is_volume_backed condition.","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":10485,"name":"Ankit Agrawal","email":"ankitagrawal8188@gmail.com","username":"ankitagrawal"},"change_message_id":"5192cb396aeb3e397c7903f07d2c4c1eca62d85b","unresolved":false,"context_lines":[{"line_number":5416,"context_line":"        self._test_finish_revert_resize(power_on\u003dTrue)"},{"line_number":5417,"context_line":""},{"line_number":5418,"context_line":"    def test_finish_revert_resize_from_stopped(self):"},{"line_number":5419,"context_line":"        self._test_finish_revert_resize(power_on\u003dFalse, is_volume_backed\u003dTrue)"},{"line_number":5420,"context_line":""},{"line_number":5421,"context_line":"    def test_finish_revert_resize_from_stopped_remove_old_vm_state(self):"},{"line_number":5422,"context_line":"        # in  this case we resize from STOPPED but end up with ACTIVE"}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_0d9ae361","line":5419,"in_reply_to":"3aaa91ec_2de462aa","updated":"2016-07-01 09:10:33.000000000","message":"Done","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0900945db9b0b211ce7a6336b35f93ee7d973ba2","unresolved":false,"context_lines":[{"line_number":7522,"context_line":"                    \u0027boot_index\u0027: 0,"},{"line_number":7523,"context_line":"                    \u0027volume_size\u0027: 10})])"},{"line_number":7524,"context_line":"        expected[\u0027root_gb\u0027] \u003d 0"},{"line_number":7525,"context_line":"        self.assertThat(expected, matchers.IsSubDictOf(instances[0]))"},{"line_number":7526,"context_line":""},{"line_number":7527,"context_line":"    def test_create_with_too_little_ram(self):"},{"line_number":7528,"context_line":"        # Test an instance type with too little memory."}],"source_content_type":"text/x-python","patch_set":16,"id":"3aaa91ec_0de1a69a","line":7525,"updated":"2016-06-23 18:08:36.000000000","message":"++ great unit test.","commit_id":"74bbcf28fa2af1739b43b6fe0adf6a8a8d3e64b2"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0421ddc178e2bc59e383f892bad2c7d55bb8c175","unresolved":false,"context_lines":[{"line_number":1752,"context_line":"        def do_test(mock_save, mock_volume):"},{"line_number":1753,"context_line":"            self.compute_api.resize(self.context, fake_inst,"},{"line_number":1754,"context_line":"                                    flavor_id\u003d\u0027flavor-id\u0027)"},{"line_number":1755,"context_line":"            mock_volume.assert_called_with(self.context, fake_inst)"},{"line_number":1756,"context_line":""},{"line_number":1757,"context_line":"        do_test()"},{"line_number":1758,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_6bfd166e","line":1755,"updated":"2016-08-03 05:52:35.000000000","message":"This change was required because the number of calls of compute_utils.is_volume_backed_instance increased from 1 to 2. If we make sure to call it only once in nova/compute/api.py, we can return this to assert_called_once_with.","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"657504557be9b196765586ac742d7c95a8872f6e","unresolved":false,"context_lines":[{"line_number":1752,"context_line":"        def do_test(mock_save, mock_volume):"},{"line_number":1753,"context_line":"            self.compute_api.resize(self.context, fake_inst,"},{"line_number":1754,"context_line":"                                    flavor_id\u003d\u0027flavor-id\u0027)"},{"line_number":1755,"context_line":"            mock_volume.assert_called_with(self.context, fake_inst)"},{"line_number":1756,"context_line":""},{"line_number":1757,"context_line":"        do_test()"},{"line_number":1758,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_b0ce4ab2","line":1755,"in_reply_to":"bacf61ea_6bfd166e","updated":"2016-08-03 09:18:42.000000000","message":"+1","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0421ddc178e2bc59e383f892bad2c7d55bb8c175","unresolved":false,"context_lines":[{"line_number":380,"context_line":"                                      id\u003di,"},{"line_number":381,"context_line":"                                      uuid\u003duuid.uuid4(),"},{"line_number":382,"context_line":"                                      image_ref\u003d\u0027image-ref\u0027,"},{"line_number":383,"context_line":"                                      root_gb\u003dinstance_type.root_gb,"},{"line_number":384,"context_line":"                                      flavor\u003dinstance_type) for i in range(2)]"},{"line_number":385,"context_line":"        instance_type_p \u003d obj_base.obj_to_primitive(instance_type)"},{"line_number":386,"context_line":"        instance_properties \u003d obj_base.obj_to_primitive(instances[0])"}],"source_content_type":"text/x-python","patch_set":18,"id":"bacf61ea_1fbad0c0","line":383,"updated":"2016-08-03 05:52:35.000000000","message":"What is this change for?","commit_id":"1a412888019c4d538806b5bb67749de91224bbb4"}]}
