)]}'
{"nova/objects/pci_device.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a86e002c00a3182de593e08d6a84580ee6e28780","unresolved":false,"context_lines":[{"line_number":292,"context_line":"    fields \u003d {"},{"line_number":293,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027PciDevice\u0027),"},{"line_number":294,"context_line":"        }"},{"line_number":295,"context_line":"    # NOTE(danms): PciDevice was at 1.1 before we added this"},{"line_number":296,"context_line":"    obj_relationships \u003d {"},{"line_number":297,"context_line":"        \u0027objects\u0027: [(\u00271.0\u0027, \u00271.1\u0027), (\u00271.1\u0027, \u00271.2\u0027), (\u00271.2\u0027, \u00271.3\u0027),"},{"line_number":298,"context_line":"                    (\u00271.3\u0027, \u00271.4\u0027)],"},{"line_number":299,"context_line":"        }"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_8c0cd643","line":298,"range":{"start_line":295,"start_character":0,"end_line":298,"end_character":36},"updated":"2015-12-01 13:38:33.000000000","message":"I don\u0027t think we use these anymore so no need for this.","commit_id":"fc4901b37a98f94671e5cad3c561464265326aa1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"153230f559494c30ddf8895ddcf13b205f8f01bc","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            else:"},{"line_number":138,"context_line":"                # Note (yjiang5) extra_info.update does not update"},{"line_number":139,"context_line":"                # obj_what_changed, set it explicitely"},{"line_number":140,"context_line":"                extra_info \u003d self.extra_info"},{"line_number":141,"context_line":"                extra_info.update({k: v})"},{"line_number":142,"context_line":"                self.extra_info \u003d extra_info"},{"line_number":143,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_c4bc9e6e","line":140,"range":{"start_line":140,"start_character":16,"end_line":140,"end_character":26},"updated":"2015-12-14 12:28:50.000000000","message":"So currently we will have a physcial address here but it\u0027s called phys_address (this is passed in from libvirt).\n\nWe will want to set it when creating the DB entry.","commit_id":"26c8294aca0a9873348ec040216883ac79c876cd"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"153230f559494c30ddf8895ddcf13b205f8f01bc","unresolved":false,"context_lines":[{"line_number":292,"context_line":"    fields \u003d {"},{"line_number":293,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027PciDevice\u0027),"},{"line_number":294,"context_line":"        }"},{"line_number":295,"context_line":"    # NOTE(danms): PciDevice was at 1.1 before we added this"},{"line_number":296,"context_line":"    obj_relationships \u003d {"},{"line_number":297,"context_line":"        \u0027objects\u0027: [(\u00271.0\u0027, \u00271.1\u0027), (\u00271.1\u0027, \u00271.2\u0027), (\u00271.2\u0027, \u00271.3\u0027),"},{"line_number":298,"context_line":"                    (\u00271.3\u0027, \u00271.4\u0027)],"},{"line_number":299,"context_line":"        }"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a740942_4403ce42","line":298,"range":{"start_line":295,"start_character":1,"end_line":298,"end_character":36},"updated":"2015-12-14 12:28:50.000000000","message":"As discussed on the previous patch - we don\u0027t need this anymore.","commit_id":"26c8294aca0a9873348ec040216883ac79c876cd"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f2d483645589cb36bf4175c3cd057f1eaf7c3d4e","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                # Note (yjiang5) extra_info.update does not update"},{"line_number":139,"context_line":"                # obj_what_changed, set it explicitly"},{"line_number":140,"context_line":"                extra_info \u003d self.extra_info"},{"line_number":141,"context_line":"                extra_info.update({k: v})"},{"line_number":142,"context_line":"                self.extra_info \u003d extra_info"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_14c06a29","line":141,"range":{"start_line":141,"start_character":16,"end_line":141,"end_character":41},"updated":"2015-12-18 17:42:35.000000000","message":"this is where we would store physical_address in extra info, and with the libvirt change you did we no longer do this.\n\nWe use this information when building the devspec here: \n\nhttps://github.com/openstack/nova/blob/83189e00be00f908478e5a0d7043027e0163e8b0/nova/pci/devspec.py#L169\n\nso we either have to change that code, but even that may leave us with inconsistencies related to the records already in the DB","commit_id":"c7430ed3238784b2bb8b9201b22fac1233aa86d0"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f2d483645589cb36bf4175c3cd057f1eaf7c3d4e","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            else:"},{"line_number":277,"context_line":"                instance.pci_devices.objects.remove(existed)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def is_free(self):"},{"line_number":280,"context_line":"        return self.status \u003d\u003d fields.PciDeviceStatus.AVAILABLE"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_74dbee4f","line":279,"range":{"start_line":279,"start_character":11,"end_line":279,"end_character":15},"updated":"2015-12-18 17:42:35.000000000","message":"why not call this is_avalable to avoid confusion :)","commit_id":"c7430ed3238784b2bb8b9201b22fac1233aa86d0"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f2d483645589cb36bf4175c3cd057f1eaf7c3d4e","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027PciDevice\u0027),"},{"line_number":294,"context_line":"        }"},{"line_number":295,"context_line":"    # NOTE(danms): PciDevice was at 1.1 before we added this"},{"line_number":296,"context_line":"    obj_relationships \u003d {"},{"line_number":297,"context_line":"        \u0027objects\u0027: [(\u00271.0\u0027, \u00271.1\u0027), (\u00271.1\u0027, \u00271.2\u0027), (\u00271.2\u0027, \u00271.3\u0027),"},{"line_number":298,"context_line":"                    (\u00271.3\u0027, \u00271.4\u0027)],"},{"line_number":299,"context_line":"        }"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def __init__(self, *args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_d40c22ef","line":298,"range":{"start_line":296,"start_character":3,"end_line":298,"end_character":36},"updated":"2015-12-18 17:42:35.000000000","message":"We don\u0027t use these anymore - you should drop this","commit_id":"c7430ed3238784b2bb8b9201b22fac1233aa86d0"},{"author":{"_account_id":16929,"name":"Giridhar Jayavelu","email":"gjayavelu@vmware.com","username":"gjayavelu"},"change_message_id":"f0060ce57204b312636e1735fb8bc379c0ec302e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # Note(yjiang5): status/instance_uuid should only be updated by"},{"line_number":124,"context_line":"        # functions like claim/allocate etc. The id is allocated by"},{"line_number":125,"context_line":"        # database. The extra_info is created by the object."},{"line_number":126,"context_line":"        no_changes \u003d (\u0027status\u0027, \u0027instance_uuid\u0027, \u0027id\u0027, \u0027extra_info\u0027)"},{"line_number":127,"context_line":"        map(lambda x: dev_dict.pop(x, None),"},{"line_number":128,"context_line":"            [key for key in no_changes])"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_bc85995a","line":126,"updated":"2016-01-06 08:18:11.000000000","message":"shouldn\u0027t this include parent_addr in order to update the db in the next save() call? especially when line 162-164 gets executed in upgrade scenarios.","commit_id":"a5462368a1159085f519de650feb2cfe736eecf7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"88e15c112c1af526bc48331068b05d77699ba203","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        # Note(yjiang5): status/instance_uuid should only be updated by"},{"line_number":124,"context_line":"        # functions like claim/allocate etc. The id is allocated by"},{"line_number":125,"context_line":"        # database. The extra_info is created by the object."},{"line_number":126,"context_line":"        no_changes \u003d (\u0027status\u0027, \u0027instance_uuid\u0027, \u0027id\u0027, \u0027extra_info\u0027)"},{"line_number":127,"context_line":"        map(lambda x: dev_dict.pop(x, None),"},{"line_number":128,"context_line":"            [key for key in no_changes])"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_93aafb83","line":126,"in_reply_to":"fa69d971_bc85995a","updated":"2016-01-06 12:13:50.000000000","message":"So this is run with dev_dict we get from the driver, so this code should just set it as the attribute of the object so we want it in the dev_dict.","commit_id":"a5462368a1159085f519de650feb2cfe736eecf7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"88e15c112c1af526bc48331068b05d77699ba203","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def _from_db_object(context, pci_device, db_dev):"},{"line_number":153,"context_line":"        for key in pci_device.fields:"},{"line_number":154,"context_line":"            if key !\u003d \u0027extra_info\u0027:"},{"line_number":155,"context_line":"                if key \u003d\u003d \"parent_addr\" and db_dev.get(key) is None:"},{"line_number":156,"context_line":"                    continue"},{"line_number":157,"context_line":"                setattr(pci_device, key, db_dev[key])"},{"line_number":158,"context_line":"            else:"},{"line_number":159,"context_line":"                extra_info \u003d db_dev.get(\"extra_info\")"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_53d563e5","line":156,"range":{"start_line":155,"start_character":17,"end_line":156,"end_character":28},"updated":"2016-01-06 12:13:50.000000000","message":"So this is a minor bug. parent_addr can be None as a valid value, but we will not set in in that case (this code will leave it unset).\n\nThis is not what we want.","commit_id":"a5462368a1159085f519de650feb2cfe736eecf7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"88e15c112c1af526bc48331068b05d77699ba203","unresolved":false,"context_lines":[{"line_number":290,"context_line":"    # Version 1.1: PciDevice 1.2"},{"line_number":291,"context_line":"    # Version 1.2: PciDevice 1.3"},{"line_number":292,"context_line":"    # Version 1.3: PciDevice 1.4"},{"line_number":293,"context_line":"    VERSION \u003d \u00271.3\u0027"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    fields \u003d {"},{"line_number":296,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027PciDevice\u0027),"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa69d971_6e719c75","line":293,"range":{"start_line":293,"start_character":15,"end_line":293,"end_character":18},"updated":"2016-01-06 12:13:50.000000000","message":"this is not needed because of the related object since we have manifests, but is needed because of the new method, so we should fix the comment","commit_id":"a5462368a1159085f519de650feb2cfe736eecf7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3627ce3cc7d40ad9eedc4ffffe35e9ae47ad8153","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    # Version 1.1: String attributes updated to support unicode"},{"line_number":86,"context_line":"    # Version 1.2: added request_id field"},{"line_number":87,"context_line":"    # Version 1.3: Added field to represent PCI device NUMA node"},{"line_number":88,"context_line":"    # Version 1.4: Added parent_addr filed"},{"line_number":89,"context_line":"    VERSION \u003d \u00271.4\u0027"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_05c9d658","line":88,"range":{"start_line":88,"start_character":37,"end_line":88,"end_character":42},"updated":"2016-01-06 15:28:55.000000000","message":"Should be \"field\"","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"38d74ee16ede02dd298972e84bb555d38e8a83cc","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    # Version 1.1: String attributes updated to support unicode"},{"line_number":86,"context_line":"    # Version 1.2: added request_id field"},{"line_number":87,"context_line":"    # Version 1.3: Added field to represent PCI device NUMA node"},{"line_number":88,"context_line":"    # Version 1.4: Added parent_addr filed"},{"line_number":89,"context_line":"    VERSION \u003d \u00271.4\u0027"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_57af857c","line":88,"range":{"start_line":88,"start_character":37,"end_line":88,"end_character":42},"in_reply_to":"fa69d971_05c9d658","updated":"2016-01-06 15:39:18.000000000","message":"Done","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3627ce3cc7d40ad9eedc4ffffe35e9ae47ad8153","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            else:"},{"line_number":162,"context_line":"                extra_info \u003d db_dev.get(\"extra_info\")"},{"line_number":163,"context_line":"                extra_info_dict \u003d jsonutils.loads(extra_info)"},{"line_number":164,"context_line":"                pci_device.extra_info \u003d extra_info_dict"},{"line_number":165,"context_line":"        pci_device._context \u003d context"},{"line_number":166,"context_line":"        pci_device.obj_reset_changes()"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_850aa688","line":164,"updated":"2016-01-06 15:28:55.000000000","message":"This change isn\u0027t necessary, right?","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"38d74ee16ede02dd298972e84bb555d38e8a83cc","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            else:"},{"line_number":162,"context_line":"                extra_info \u003d db_dev.get(\"extra_info\")"},{"line_number":163,"context_line":"                extra_info_dict \u003d jsonutils.loads(extra_info)"},{"line_number":164,"context_line":"                pci_device.extra_info \u003d extra_info_dict"},{"line_number":165,"context_line":"        pci_device._context \u003d context"},{"line_number":166,"context_line":"        pci_device.obj_reset_changes()"},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_37c9b159","line":164,"in_reply_to":"fa69d971_850aa688","updated":"2016-01-06 15:39:18.000000000","message":"Done","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3627ce3cc7d40ad9eedc4ffffe35e9ae47ad8153","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        pci_device.obj_reset_changes()"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        pf_extra \u003d pci_device.extra_info.pop(\"phys_function\", None)"},{"line_number":169,"context_line":"        # NOTE (ndipanov): Never overwrite an acual value with legacy"},{"line_number":170,"context_line":"        #                  data from \u0027extra_info\u0027"},{"line_number":171,"context_line":"        if pci_device.parent_addr is None and pf_extra is not None:"},{"line_number":172,"context_line":"            pci_device.parent_addr \u003d pf_extra"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_8531465c","line":169,"range":{"start_line":169,"start_character":46,"end_line":169,"end_character":51},"updated":"2016-01-06 15:28:55.000000000","message":"Should be \"actual\"","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"38d74ee16ede02dd298972e84bb555d38e8a83cc","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        pci_device.obj_reset_changes()"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        pf_extra \u003d pci_device.extra_info.pop(\"phys_function\", None)"},{"line_number":169,"context_line":"        # NOTE (ndipanov): Never overwrite an acual value with legacy"},{"line_number":170,"context_line":"        #                  data from \u0027extra_info\u0027"},{"line_number":171,"context_line":"        if pci_device.parent_addr is None and pf_extra is not None:"},{"line_number":172,"context_line":"            pci_device.parent_addr \u003d pf_extra"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_37f7718c","line":169,"range":{"start_line":169,"start_character":46,"end_line":169,"end_character":51},"in_reply_to":"fa69d971_8531465c","updated":"2016-01-06 15:39:18.000000000","message":"Done","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3627ce3cc7d40ad9eedc4ffffe35e9ae47ad8153","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if pci_device.parent_addr is None and pf_extra is not None:"},{"line_number":172,"context_line":"            pci_device.parent_addr \u003d pf_extra"},{"line_number":173,"context_line":"            # Make sure the next save updates this in addition to numa_node"},{"line_number":174,"context_line":"            pci_device._changed_fields.add(\u0027extra_info\u0027)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        return pci_device"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_e570420d","line":174,"updated":"2016-01-06 15:28:55.000000000","message":"Don\u0027t you want to save this regardless of whether we overwrite the parent_addr with it?","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"38d74ee16ede02dd298972e84bb555d38e8a83cc","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        if pci_device.parent_addr is None and pf_extra is not None:"},{"line_number":172,"context_line":"            pci_device.parent_addr \u003d pf_extra"},{"line_number":173,"context_line":"            # Make sure the next save updates this in addition to numa_node"},{"line_number":174,"context_line":"            pci_device._changed_fields.add(\u0027extra_info\u0027)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"        return pci_device"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_7737294d","line":174,"in_reply_to":"fa69d971_e570420d","updated":"2016-01-06 15:39:18.000000000","message":"so this gets saved only because we popped an actual value out of it and it should not live there anymore (if pf_extra is not None) so in this case we always want to save it to not leave data in it\u0027s old place.","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3627ce3cc7d40ad9eedc4ffffe35e9ae47ad8153","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                                      self.parent_addr is None)"},{"line_number":216,"context_line":"                if (\u0027parent_addr\u0027 not in updates and"},{"line_number":217,"context_line":"                        pf_extra is not None and update_parent_addr):"},{"line_number":218,"context_line":"                    updates[\u0027parent_addr\u0027] \u003d pf_extra"},{"line_number":219,"context_line":"                updates[\u0027extra_info\u0027] \u003d jsonutils.dumps(updates[\u0027extra_info\u0027])"},{"line_number":220,"context_line":"            if updates:"},{"line_number":221,"context_line":"                db_pci \u003d db.pci_device_update(self._context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_b77a8186","line":218,"updated":"2016-01-06 15:28:55.000000000","message":"So, at the beginning of this cycle, we said we were going to get any and all online data migrations to respect the service version as a valve for determining when to do these sorts of things.\n\nAs this code stands, it will lock us into having to upgrade all control services at the same time. Meaning, we can\u0027t upgrade one conductor, then the other, and API is tied in with this as well. We added API service records early so that we could do this.\n\nUnless there is some good reason not to, I think we should stick to that goal here and not actually do the migration on save until we can tell that all the conductor and API services have been upgraded.","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"38d74ee16ede02dd298972e84bb555d38e8a83cc","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                                      self.parent_addr is None)"},{"line_number":216,"context_line":"                if (\u0027parent_addr\u0027 not in updates and"},{"line_number":217,"context_line":"                        pf_extra is not None and update_parent_addr):"},{"line_number":218,"context_line":"                    updates[\u0027parent_addr\u0027] \u003d pf_extra"},{"line_number":219,"context_line":"                updates[\u0027extra_info\u0027] \u003d jsonutils.dumps(updates[\u0027extra_info\u0027])"},{"line_number":220,"context_line":"            if updates:"},{"line_number":221,"context_line":"                db_pci \u003d db.pci_device_update(self._context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa69d971_7785e9cc","line":218,"in_reply_to":"fa69d971_b77a8186","updated":"2016-01-06 15:39:18.000000000","message":"makes sense - let me see how this can be done...","commit_id":"cc2ee1ccab6170461cd1c28e5b63dda627c8147b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2d9f8928c1e5e852fce9cf3c3839acf7482a7fec","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                return"},{"line_number":65,"context_line":"            return f(obj, *args, **kwargs)"},{"line_number":66,"context_line":"        return inner"},{"line_number":67,"context_line":"    return _decorator"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_1cf7ec8b","line":67,"updated":"2016-01-06 18:20:17.000000000","message":"This is nice, and probably a good pattern to follow elsewhere. However, see below.","commit_id":"15d7884393a873cff3ac605569adcc1a912794cb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2d9f8928c1e5e852fce9cf3c3839acf7482a7fec","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    @run_if_services_version_least([\u0027conductor\u0027, \u0027api\u0027], 4)"},{"line_number":224,"context_line":"    def _migrate_parent_addr(self, updates):"},{"line_number":225,"context_line":"        # NOTE (ndipanov): Migrate all parent_addr form it\u0027s old home"},{"line_number":226,"context_line":"        # in extra_info[\u0027phys_function\u0027], when saving, but never"},{"line_number":227,"context_line":"        # overwrite new value"},{"line_number":228,"context_line":"        pf_extra \u003d updates[\u0027extra_info\u0027].pop(\u0027phys_function\u0027, None)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_7ca4e8b8","line":225,"range":{"start_line":225,"start_character":51,"end_line":225,"end_character":55},"updated":"2016-01-06 18:20:17.000000000","message":"Should be \"from\"","commit_id":"15d7884393a873cff3ac605569adcc1a912794cb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2d9f8928c1e5e852fce9cf3c3839acf7482a7fec","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            db.pci_device_destroy(self._context, self.compute_node_id,"},{"line_number":240,"context_line":"                                  self.address)"},{"line_number":241,"context_line":"        elif self.status !\u003d fields.PciDeviceStatus.DELETED:"},{"line_number":242,"context_line":"            updates \u003d self.obj_get_changes()"},{"line_number":243,"context_line":"            if \u0027extra_info\u0027 in updates:"},{"line_number":244,"context_line":"                self._migrate_parent_addr(updates)"},{"line_number":245,"context_line":"                updates[\u0027extra_info\u0027] \u003d jsonutils.dumps(updates[\u0027extra_info\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_dcd5d4e4","line":242,"updated":"2016-01-06 18:20:17.000000000","message":"This can have parent_addr set in it, which will end up writing the value to the database in the new location. Since you don\u0027t remove it if we\u0027re not doing migrations yet, we\u0027ll leave it in extra_info. Other nodes will read the thing from the database and honor what is in extra_info. If they were to change it, that would make your newer code here ignore that change because the newer attribute is set.\n\nNow, I think that this value changing on PCI devices probably can\u0027t (or doesn\u0027t) happen, but I think it\u0027s probably not a good idea to not handle this here, at least not without a giant comment.\n\nIf we\u0027re not going to do the migration, can\u0027t we just make sure to stuff any value set for the newer property back into extra_info and not write it out as the proper attribute until we\u0027re ready to do the migration? I know that makes your decorator approach a little less clean/easy, but...","commit_id":"15d7884393a873cff3ac605569adcc1a912794cb"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"ec85f8bbd057806547e14bf68d5b37c722e4700b","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            db.pci_device_destroy(self._context, self.compute_node_id,"},{"line_number":240,"context_line":"                                  self.address)"},{"line_number":241,"context_line":"        elif self.status !\u003d fields.PciDeviceStatus.DELETED:"},{"line_number":242,"context_line":"            updates \u003d self.obj_get_changes()"},{"line_number":243,"context_line":"            if \u0027extra_info\u0027 in updates:"},{"line_number":244,"context_line":"                self._migrate_parent_addr(updates)"},{"line_number":245,"context_line":"                updates[\u0027extra_info\u0027] \u003d jsonutils.dumps(updates[\u0027extra_info\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa69d971_64250609","line":242,"in_reply_to":"fa69d971_dcd5d4e4","updated":"2016-01-07 15:10:28.000000000","message":"I will update this patch for clarity - but it;s worth noting that\n\n * Objects can\u0027t handle different versions of conductors so the only service that could be behind is the API\n * parent address can actually never change, if it does, it\u0027s due to hw reconfig which will result in a new entry in the db and the old one being gone so this whole discussion is moot.","commit_id":"15d7884393a873cff3ac605569adcc1a912794cb"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7753283e42a7ddfc28e037f97217936cac4f0daa","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        min_deployed \u003d min(objects.Service.get_minimum_version("},{"line_number":119,"context_line":"            context.get_admin_context(), \u0027nova-\u0027 + service)"},{"line_number":120,"context_line":"            for service in services)"},{"line_number":121,"context_line":"        return min_deployed \u003e\u003d min_parent_addr_version"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":124,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_751fe1b7","line":121,"updated":"2016-01-07 19:40:09.000000000","message":"The entire method above should be removed. What purpose does it serve? This code is only ever running on the conductor, never on the API server.","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"02524d8680df619bd343d2585d789f611b0959a0","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        min_deployed \u003d min(objects.Service.get_minimum_version("},{"line_number":119,"context_line":"            context.get_admin_context(), \u0027nova-\u0027 + service)"},{"line_number":120,"context_line":"            for service in services)"},{"line_number":121,"context_line":"        return min_deployed \u003e\u003d min_parent_addr_version"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def obj_make_compatible(self, primitive, target_version):"},{"line_number":124,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_53a515b3","line":121,"in_reply_to":"fa69d971_751fe1b7","updated":"2016-01-07 20:19:26.000000000","message":"This is here to allow for a partial upgrade of conductor services. If you read the previous comments I had on this set I think it\u0027ll be clear what we\u0027re trying to achieve here. The plan in Tokyo was for any new online data migrations to do this in order to avoid requiring an atomic upgrade of services.\n\nIf API accesses this data at all (including through the object layer) then we need to include the api service check here).","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"02524d8680df619bd343d2585d789f611b0959a0","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                                  self.address)"},{"line_number":215,"context_line":"        elif self.status !\u003d fields.PciDeviceStatus.DELETED:"},{"line_number":216,"context_line":"            updates \u003d self.obj_get_changes()"},{"line_number":217,"context_line":"            if not self._migrate_parent_addr():"},{"line_number":218,"context_line":"                # NOTE(ndipanov): If we are not migrating data yet, make sure"},{"line_number":219,"context_line":"                # that any changes to parent_addr are also in the old location"},{"line_number":220,"context_line":"                # in extra_info"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_b3f7b18b","line":217,"updated":"2016-01-07 20:19:26.000000000","message":"This introduces two separate hits to the database any time we run save(), even if we\u0027re not going to make a change to the affected fields.\n\nIn other code where we use the service version, we cache the result of a given service (compute in those examples) until we receive a SIGHUP, at which point we invalidate it. I think we potentially have a lot of PCI devices and thus a lot of saves, right? This seems like something we should optimize here...\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L729-L732","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e4ecb27e3bc29a5e91ce81336767c521857cef11","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                                  self.address)"},{"line_number":215,"context_line":"        elif self.status !\u003d fields.PciDeviceStatus.DELETED:"},{"line_number":216,"context_line":"            updates \u003d self.obj_get_changes()"},{"line_number":217,"context_line":"            if not self._migrate_parent_addr():"},{"line_number":218,"context_line":"                # NOTE(ndipanov): If we are not migrating data yet, make sure"},{"line_number":219,"context_line":"                # that any changes to parent_addr are also in the old location"},{"line_number":220,"context_line":"                # in extra_info"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_7d6d4a31","line":217,"in_reply_to":"fa69d971_b3f7b18b","updated":"2016-01-08 11:56:32.000000000","message":"I mean, sure yeah - we should not suck....\n\nDerailing unrelated work because we lack infra in the code to do things we kind of sort of agreed to do in a session at the summit... let\u0027s just put it this way: it\u0027s \"very Nova\"\n\nI\u0027ll see if I can find a reasonable place to cache this data.","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"02524d8680df619bd343d2585d789f611b0959a0","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                # that any changes to parent_addr are also in the old location"},{"line_number":220,"context_line":"                # in extra_info"},{"line_number":221,"context_line":"                if \u0027parent_addr\u0027 in updates:"},{"line_number":222,"context_line":"                    extra_update \u003d updates.get(\u0027extra_info\u0027, {})"},{"line_number":223,"context_line":"                    extra_update[\u0027phys_function\u0027] \u003d updates[\u0027parent_addr\u0027]"},{"line_number":224,"context_line":"                    updates[\u0027extra_info\u0027] \u003d extra_update"},{"line_number":225,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_d33b4537","line":222,"updated":"2016-01-07 20:19:26.000000000","message":"if \u0027extra_info\u0027 isn\u0027t in updates, we\u0027ll overwrite the database with just the key below, right? Like, if I do this:\n\n o \u003d objects.PCIDevice(id\u003d123)\n o.parent_addr \u003d \u0027123\u0027\n o.save()\n\nI\u0027ll clobber extra_info in the database.","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"82ecffb28eaf5b8e37d43f6740b7bbc9a7c171ab","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                # that any changes to parent_addr are also in the old location"},{"line_number":220,"context_line":"                # in extra_info"},{"line_number":221,"context_line":"                if \u0027parent_addr\u0027 in updates:"},{"line_number":222,"context_line":"                    extra_update \u003d updates.get(\u0027extra_info\u0027, {})"},{"line_number":223,"context_line":"                    extra_update[\u0027phys_function\u0027] \u003d updates[\u0027parent_addr\u0027]"},{"line_number":224,"context_line":"                    updates[\u0027extra_info\u0027] \u003d extra_update"},{"line_number":225,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_36adaf88","line":222,"in_reply_to":"fa69d971_7d5eaa46","updated":"2016-01-08 12:39:17.000000000","message":"OK I see what you mean. We do not want to clobber any other data that might be in extra_info. Done","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e4ecb27e3bc29a5e91ce81336767c521857cef11","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                # that any changes to parent_addr are also in the old location"},{"line_number":220,"context_line":"                # in extra_info"},{"line_number":221,"context_line":"                if \u0027parent_addr\u0027 in updates:"},{"line_number":222,"context_line":"                    extra_update \u003d updates.get(\u0027extra_info\u0027, {})"},{"line_number":223,"context_line":"                    extra_update[\u0027phys_function\u0027] \u003d updates[\u0027parent_addr\u0027]"},{"line_number":224,"context_line":"                    updates[\u0027extra_info\u0027] \u003d extra_update"},{"line_number":225,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_7d5eaa46","line":222,"in_reply_to":"fa69d971_d33b4537","updated":"2016-01-08 11:56:32.000000000","message":"This really never happens in the code.","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7753283e42a7ddfc28e037f97217936cac4f0daa","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            else:"},{"line_number":312,"context_line":"                instance.pci_devices.objects.remove(existed)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def is_available(self):"},{"line_number":315,"context_line":"        return self.status \u003d\u003d fields.PciDeviceStatus.AVAILABLE"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_75760108","line":314,"updated":"2016-01-07 19:40:09.000000000","message":"Consider making this a @property","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"581243c6ab05e36b83024fe4971c216c53dc3ada","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    }"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    @staticmethod"},{"line_number":112,"context_line":"    def _migrate_parent_addr():"},{"line_number":113,"context_line":"        # NOTE(ndipanov): Only migrate parent_addr if all services are up to at"},{"line_number":114,"context_line":"        # least version 4"},{"line_number":115,"context_line":"        services \u003d (\u0027conductor\u0027, \u0027api\u0027)"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_a42b97ea","line":112,"updated":"2016-01-08 18:03:45.000000000","message":"Nit: I wonder if this should really be a helper method on the service object?","commit_id":"4640d07d85670a1bc6856406bcb381bf3be4cd70"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"5f172f74244b4ba18c2dffba06bc385cc5ae972b","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                # plane has been upgraded - aggressively migrate on every save"},{"line_number":230,"context_line":"                pf_extra \u003d self.extra_info.pop(\u0027phys_function\u0027, None)"},{"line_number":231,"context_line":"                if pf_extra:"},{"line_number":232,"context_line":"                    updates[\u0027parent_addr\u0027] \u003d pf_extra"},{"line_number":233,"context_line":"                updates[\u0027extra_info\u0027] \u003d self.extra_info"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            if \u0027extra_info\u0027 in updates:"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa69d971_221c7412","line":232,"updated":"2016-01-08 18:07:03.000000000","message":"should we only do this if \u0027parent_addr\u0027 not in updates? otherwise we might over-write updated data?","commit_id":"4640d07d85670a1bc6856406bcb381bf3be4cd70"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"03083cdccbb28c3a6f9198d138e4ef9b43b5072c","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                # NOTE(ndipanov): Once we start migrating, meaning all control"},{"line_number":229,"context_line":"                # plane has been upgraded - aggressively migrate on every save"},{"line_number":230,"context_line":"                pf_extra \u003d self.extra_info.pop(\u0027phys_function\u0027, None)"},{"line_number":231,"context_line":"                if pf_extra:"},{"line_number":232,"context_line":"                    updates[\u0027parent_addr\u0027] \u003d pf_extra"},{"line_number":233,"context_line":"                updates[\u0027extra_info\u0027] \u003d self.extra_info"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_62b90c79","line":231,"updated":"2016-01-08 18:15:47.000000000","message":"still worried about this bit, when updates include \"parent_addr\"","commit_id":"eed61ad7b7ec019f69ebf6cf7417a4a31b752954"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"54aba03e23386730203ba8a255f8f324bdb27034","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                # NOTE(ndipanov): Once we start migrating, meaning all control"},{"line_number":229,"context_line":"                # plane has been upgraded - aggressively migrate on every save"},{"line_number":230,"context_line":"                pf_extra \u003d self.extra_info.pop(\u0027phys_function\u0027, None)"},{"line_number":231,"context_line":"                if pf_extra:"},{"line_number":232,"context_line":"                    updates[\u0027parent_addr\u0027] \u003d pf_extra"},{"line_number":233,"context_line":"                updates[\u0027extra_info\u0027] \u003d self.extra_info"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_9650020c","line":231,"in_reply_to":"fa69d971_62b90c79","updated":"2016-01-08 19:44:10.000000000","message":"well this can\u0027t happen currently ever because we never really update pf_address but I guess I can guard against it so that we don\u0027t implicitly rely on this (very unlikely to change) behavior.","commit_id":"eed61ad7b7ec019f69ebf6cf7417a4a31b752954"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fd621e5b4341342565aa2128753b7b2d5d91ce88","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            del primitive[\u0027request_id\u0027]"},{"line_number":127,"context_line":"        if target_version \u003c (1, 4) and \u0027parent_addr\u0027 in primitive:"},{"line_number":128,"context_line":"            if primitive[\u0027parent_addr\u0027] is not None:"},{"line_number":129,"context_line":"                extra_info \u003d primitive.get(\u0027extra_info\u0027, {})"},{"line_number":130,"context_line":"                extra_info[\u0027phys_function\u0027] \u003d primitive[\u0027parent_addr\u0027]"},{"line_number":131,"context_line":"            del primitive[\u0027parent_addr\u0027]"},{"line_number":132,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"fa69d971_a73d998f","line":129,"updated":"2016-01-11 15:00:32.000000000","message":"If extra_info is not in the primitive and you add it, then something else could save this and clobber what is in the database later. Now, they\u0027d have to make it appear changed, and if they did that by inserting something into it themselves, then they\u0027d have caused the same problem even without this.\n\nMy point being, we probably don\u0027t need to push the phys_function into extra_info if extra_info isn\u0027t in the primitive. However, since it probably requires another bug to trigger we can leave this, but just FYI for the future if we see a bug like that.","commit_id":"50355c4595e08f293f610da32247e405b20c1c5b"}],"nova/tests/unit/objects/test_pci_device.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7753283e42a7ddfc28e037f97217936cac4f0daa","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        _fake_db_dev[\u0027parent_addr\u0027] \u003d None"},{"line_number":152,"context_line":"        _fake_db_dev[\u0027extra_info\u0027] \u003d \u0027{\"phys_function\": \"0000:0a:11.0\"}\u0027"},{"line_number":153,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":154,"context_line":"        self.mox.StubOutWithMock(db, \u0027pci_device_get_all_by_instance_uuid\u0027)"},{"line_number":155,"context_line":"        db.pci_device_get_all_by_instance_uuid(ctxt, \u00271\u0027).AndReturn("},{"line_number":156,"context_line":"            [_fake_db_dev])"},{"line_number":157,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_75fb6148","line":154,"updated":"2016-01-07 19:40:09.000000000","message":"mock please, not mox.","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e4ecb27e3bc29a5e91ce81336767c521857cef11","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        _fake_db_dev[\u0027parent_addr\u0027] \u003d None"},{"line_number":152,"context_line":"        _fake_db_dev[\u0027extra_info\u0027] \u003d \u0027{\"phys_function\": \"0000:0a:11.0\"}\u0027"},{"line_number":153,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":154,"context_line":"        self.mox.StubOutWithMock(db, \u0027pci_device_get_all_by_instance_uuid\u0027)"},{"line_number":155,"context_line":"        db.pci_device_get_all_by_instance_uuid(ctxt, \u00271\u0027).AndReturn("},{"line_number":156,"context_line":"            [_fake_db_dev])"},{"line_number":157,"context_line":"        self.mox.ReplayAll()"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa69d971_00ff0102","line":154,"in_reply_to":"fa69d971_75fb6148","updated":"2016-01-08 11:56:32.000000000","message":"This test is actuially basicallya duplicate of the one I added below. I will remove it.","commit_id":"1e79f521d27c489f4bffabdaeb5465fd1b16e73d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"03083cdccbb28c3a6f9198d138e4ef9b43b5072c","unresolved":false,"context_lines":[{"line_number":256,"context_line":"    def test_save_migrate_parent_addr(self, get_min_ver_mock):"},{"line_number":257,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":258,"context_line":"        dev \u003d pci_device.PciDevice._from_db_object("},{"line_number":259,"context_line":"            ctxt, pci_device.PciDevice(), fake_db_dev_old)"},{"line_number":260,"context_line":"        with mock.patch.object(db, \u0027pci_device_update\u0027,"},{"line_number":261,"context_line":"                               return_value\u003dfake_db_dev_old) as update_mock:"},{"line_number":262,"context_line":"            dev.save()"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_82ee8089","line":259,"updated":"2016-01-08 18:15:47.000000000","message":"What if we set parent_addr to something here, like \"doh!\"?","commit_id":"eed61ad7b7ec019f69ebf6cf7417a4a31b752954"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"03083cdccbb28c3a6f9198d138e4ef9b43b5072c","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            dev.save()"},{"line_number":263,"context_line":"            update_mock.assert_called_once_with("},{"line_number":264,"context_line":"                ctxt, dev.compute_node_id, dev.address,"},{"line_number":265,"context_line":"                {\u0027extra_info\u0027: \u0027{}\u0027, \u0027parent_addr\u0027: \u0027blah\u0027})"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    @mock.patch.object(objects.Service, \u0027get_minimum_version\u0027, return_value\u003d2)"},{"line_number":268,"context_line":"    def test_save_dont_migrate_parent_addr(self, get_min_ver_mock):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_026e102f","line":265,"updated":"2016-01-08 18:15:47.000000000","message":"I think here we should get the new value \"doh!\", but currently it copies over the old value. But I could be reading this wrongly.","commit_id":"eed61ad7b7ec019f69ebf6cf7417a4a31b752954"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"54aba03e23386730203ba8a255f8f324bdb27034","unresolved":false,"context_lines":[{"line_number":262,"context_line":"            dev.save()"},{"line_number":263,"context_line":"            update_mock.assert_called_once_with("},{"line_number":264,"context_line":"                ctxt, dev.compute_node_id, dev.address,"},{"line_number":265,"context_line":"                {\u0027extra_info\u0027: \u0027{}\u0027, \u0027parent_addr\u0027: \u0027blah\u0027})"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    @mock.patch.object(objects.Service, \u0027get_minimum_version\u0027, return_value\u003d2)"},{"line_number":268,"context_line":"    def test_save_dont_migrate_parent_addr(self, get_min_ver_mock):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa69d971_96ec822a","line":265,"in_reply_to":"fa69d971_026e102f","updated":"2016-01-08 19:44:10.000000000","message":"OK will update the check and add a test - but again - current PCI code does not allow for this ever.","commit_id":"eed61ad7b7ec019f69ebf6cf7417a4a31b752954"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"f2d483645589cb36bf4175c3cd057f1eaf7c3d4e","unresolved":false,"context_lines":[{"line_number":4836,"context_line":"                            fun_cap.device_addrs[0][3])"},{"line_number":4837,"context_line":"                        return {"},{"line_number":4838,"context_line":"                            \u0027dev_type\u0027: fields.PciDeviceType.SRIOV_VF,"},{"line_number":4839,"context_line":"                            \u0027parent_addr\u0027: phys_address,"},{"line_number":4840,"context_line":"                        }"},{"line_number":4841,"context_line":"            return {\u0027dev_type\u0027: fields.PciDeviceType.STANDARD}"},{"line_number":4842,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_37c7a897","line":4839,"range":{"start_line":4839,"start_character":29,"end_line":4839,"end_character":40},"updated":"2015-12-18 17:42:35.000000000","message":"we likely can\u0027t rename this - see my comment on the objects/pci_device.py","commit_id":"c7430ed3238784b2bb8b9201b22fac1233aa86d0"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a17a188f99ec7751296701756c2e70024bf065fa","unresolved":false,"context_lines":[{"line_number":4836,"context_line":"                            fun_cap.device_addrs[0][3])"},{"line_number":4837,"context_line":"                        return {"},{"line_number":4838,"context_line":"                            \u0027dev_type\u0027: fields.PciDeviceType.SRIOV_VF,"},{"line_number":4839,"context_line":"                            \u0027parent_addr\u0027: phys_address,"},{"line_number":4840,"context_line":"                        }"},{"line_number":4841,"context_line":"            return {\u0027dev_type\u0027: fields.PciDeviceType.STANDARD}"},{"line_number":4842,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_1efd273a","line":4839,"range":{"start_line":4839,"start_character":29,"end_line":4839,"end_character":40},"updated":"2015-12-24 12:41:49.000000000","message":"So if we do this - we need to have a compatibility layer in objects that will migrate the data from it\u0027s old place (in extra_info into this field.\n\nThis is absolutely a requirement, because in case there are records in the DB already, after this commit is applied, they will be treated wrongly by the pci.manager._initial_instance_usage method","commit_id":"98d091202258b939f8ed5a61c8379e3d73d1819e"}]}
