)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"46268ef6a48951a27c24d9e7164781cad1f22ad3","unresolved":false,"context_lines":[{"line_number":16,"context_line":"a round-trip later (assuming this instance is passed to the compute node"},{"line_number":17,"context_line":"for create and/or that the field is specified in a later call under"},{"line_number":18,"context_line":"expected_attrs)."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I29bc317f990bfa0f01b4f9615699debcc3a3c2c6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3afc51ec_92799e96","line":19,"updated":"2016-03-12 15:37:25.000000000","message":"We should also mark this as Partial-Bug: #1540526","commit_id":"d9b34394174754d878ecbce684c11d48739bd57e"}],"nova/cells/scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0bc63f4a984a178cf6f7919bc7de2aba11aef2e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        instance_values.pop(\u0027pci_requests\u0027, None)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        # FIXME(danms): Same for ec2_ids"},{"line_number":85,"context_line":"        instance_values.pop(\u0027ec2_ids\u0027, None)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        instances \u003d []"},{"line_number":88,"context_line":"        num_instances \u003d len(instance_uuids)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_a90d1639","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":44},"updated":"2016-03-14 18:31:06.000000000","message":"Unit test for this?  I started working on one this weekend but it failed in some weird way so I gave up on it. It would go here:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/unit/cells/test_cells_scheduler.py#L93\n\nI guess we can see if this makes the cells job pass and it does, we should add to that unit test for this.","commit_id":"f5355b43e62b75fb9e425409726b85f53c1d4384"}],"nova/objects/instance.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"da9762b085c4017c28338c2056e9c74a131ffd3f","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            updates[\u0027extra\u0027][\u0027vcpu_model\u0027] \u003d None"},{"line_number":464,"context_line":"        db_inst \u003d db.instance_create(self._context, updates)"},{"line_number":465,"context_line":"        self._from_db_object(self._context, self, db_inst, expected_attrs)"},{"line_number":466,"context_line":"        self._load_ec2_ids()"},{"line_number":467,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afc51ec_dfad028a","line":466,"updated":"2016-03-11 20:38:18.000000000","message":"Should probably have a comment in here about why we\u0027re doing this up front.","commit_id":"d9b34394174754d878ecbce684c11d48739bd57e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ca2034b3a1c6a4a6b08720f85532d5afc692293a","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            updates[\u0027extra\u0027][\u0027vcpu_model\u0027] \u003d None"},{"line_number":464,"context_line":"        db_inst \u003d db.instance_create(self._context, updates)"},{"line_number":465,"context_line":"        self._from_db_object(self._context, self, db_inst, expected_attrs)"},{"line_number":466,"context_line":"        self._load_ec2_ids()"},{"line_number":467,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afc51ec_0e79b0c8","line":466,"in_reply_to":"3afc51ec_613690e7","updated":"2016-03-14 18:29:09.000000000","message":"Good point.","commit_id":"d9b34394174754d878ecbce684c11d48739bd57e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f509b0ed54f932e32a62bd5cb55c2930eccf318e","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            updates[\u0027extra\u0027][\u0027vcpu_model\u0027] \u003d None"},{"line_number":464,"context_line":"        db_inst \u003d db.instance_create(self._context, updates)"},{"line_number":465,"context_line":"        self._from_db_object(self._context, self, db_inst, expected_attrs)"},{"line_number":466,"context_line":"        self._load_ec2_ids()"},{"line_number":467,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afc51ec_613690e7","line":466,"in_reply_to":"3afc51ec_922b5e82","updated":"2016-03-14 15:46:22.000000000","message":"force_config_drive is a virt-level config variable, which would mean if people don\u0027t have it set in their API config (which I think would be reasonable) then they won\u0027t get the desired behavior.","commit_id":"d9b34394174754d878ecbce684c11d48739bd57e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"618bd94c668a0abe9fcb9c5607b75d7762d8964d","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            updates[\u0027extra\u0027][\u0027vcpu_model\u0027] \u003d None"},{"line_number":464,"context_line":"        db_inst \u003d db.instance_create(self._context, updates)"},{"line_number":465,"context_line":"        self._from_db_object(self._context, self, db_inst, expected_attrs)"},{"line_number":466,"context_line":"        self._load_ec2_ids()"},{"line_number":467,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afc51ec_922b5e82","line":466,"in_reply_to":"3afc51ec_dfad028a","updated":"2016-03-12 15:33:58.000000000","message":"Also, should we only do this if self.config_drive is True or CONF.force_config_drive is True? That\u0027s roughly the logic in the configdrive builder.","commit_id":"d9b34394174754d878ecbce684c11d48739bd57e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f423288655020dbf0a4241dd6485be74331ee625","unresolved":false,"context_lines":[{"line_number":463,"context_line":"            updates[\u0027extra\u0027][\u0027vcpu_model\u0027] \u003d None"},{"line_number":464,"context_line":"        db_inst \u003d db.instance_create(self._context, updates)"},{"line_number":465,"context_line":"        self._from_db_object(self._context, self, db_inst, expected_attrs)"},{"line_number":466,"context_line":"        self._load_ec2_ids()"},{"line_number":467,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":2,"id":"3afc51ec_c9106204","line":466,"range":{"start_line":466,"start_character":8,"end_line":466,"end_character":28},"updated":"2016-03-14 18:36:11.000000000","message":"Can you put a comment by this explaining why we\u0027re doing it on create? Because in a year from now someone (like me) might wonder if this was intentional or not.","commit_id":"f5355b43e62b75fb9e425409726b85f53c1d4384"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"d10d70a562d96b8fdefde63635067e804e594e98","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        # to avoid them being missing and having to be loaded later, we"},{"line_number":469,"context_line":"        # load them once here on create now that the instance record is"},{"line_number":470,"context_line":"        # created."},{"line_number":471,"context_line":"        self._load_ec2_ids()"},{"line_number":472,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_d6585859","line":471,"updated":"2016-03-15 16:13:34.000000000","message":"since _from_db_object() calls _loads_ec2_ids() if ec2_ids in expected_attrs, could we just add them in the expected attrs instead of doing this ?","commit_id":"c5a5a7f322e2b2f76dab2647af2f15f88c2abac3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"296566358f7a2d5e42bd60f5fd36eb0a4ebf6f0f","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        # to avoid them being missing and having to be loaded later, we"},{"line_number":469,"context_line":"        # load them once here on create now that the instance record is"},{"line_number":470,"context_line":"        # created."},{"line_number":471,"context_line":"        self._load_ec2_ids()"},{"line_number":472,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_1c3adf36","line":471,"in_reply_to":"1af94dfe_410f64e1","updated":"2016-03-15 16:37:11.000000000","message":"Not sure I made a clear comment, I\u0027m okay with the change, I was just thinking of just adding ec2_ids in the expected attrs between L464 and L465 above (ie. right before calling _from_db_obj()).\n\nThat was just for not having that to be so special here, but since I don\u0027t want to stop now, it\u0027s fine.","commit_id":"c5a5a7f322e2b2f76dab2647af2f15f88c2abac3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b3f933def01e21b609e4462bda4ef842bc519383","unresolved":false,"context_lines":[{"line_number":468,"context_line":"        # to avoid them being missing and having to be loaded later, we"},{"line_number":469,"context_line":"        # load them once here on create now that the instance record is"},{"line_number":470,"context_line":"        # created."},{"line_number":471,"context_line":"        self._load_ec2_ids()"},{"line_number":472,"context_line":"        self.obj_reset_changes([\u0027ec2_ids\u0027])"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"    @base.remotable"}],"source_content_type":"text/x-python","patch_set":3,"id":"1af94dfe_410f64e1","line":471,"in_reply_to":"1af94dfe_d6585859","updated":"2016-03-15 16:18:15.000000000","message":"We could, but we don\u0027t actually expect the ec2_ids anywhere in the API when creating the instance. The ec2_ids are a weird case in that they are created on first access (get or create), and that happens down in the virt layer when building the config drive. So the point is to avoid the round-trip to the DB from the compute and just load these up early.","commit_id":"c5a5a7f322e2b2f76dab2647af2f15f88c2abac3"}],"nova/tests/unit/objects/test_instance.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"da9762b085c4017c28338c2056e9c74a131ffd3f","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        inst \u003d objects.Instance(context\u003dself.context)"},{"line_number":921,"context_line":"        inst.create()"},{"line_number":922,"context_line":"        self.assertEqual(self.fake_instance[\u0027id\u0027], inst.id)"},{"line_number":923,"context_line":"        self.assertIsNotNone(inst.ec2_ids)"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def test_create_with_values(self):"},{"line_number":926,"context_line":"        inst1 \u003d objects.Instance(context\u003dself.context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3afc51ec_7f230e06","line":923,"updated":"2016-03-11 20:38:18.000000000","message":"Above db.instance_create is mocked out, I guess we don\u0027t care about mocking out the ec2/s3 mapping stuff that will get created in the DB as part of this? As long as this is a NoDBTestCase it should be fine.","commit_id":"d9b34394174754d878ecbce684c11d48739bd57e"}]}
