)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"13f78b145f3f2db2e83fb1319083b275b7d68c31","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"bd6fd064_c8a7856d","updated":"2025-02-17 12:11:13.000000000","message":"I went back to my original env that reproduced the issue and tested the following scenarios with the patches in this series:\n* train VM, train nova-compute, victoria controller with the patches. Compute startup migrates the object properly, VM hard reboot works.\n* train VM, train nova-compute, victoria controller without the patches. Compute startup half migrates the object (data is on 1.6 version string is 1.4). Then patches applied to the victoria controller, now compute startup finishes the migration. VM hard reboot works.","commit_id":"9507b7b92f9bcfff755ebef9fc6b115ef0b1167f"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"43f908a44058f1db0c21c15ae0b2e181cecfec5c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"b93b7b8b_7e1347b3","updated":"2025-02-12 15:09:22.000000000","message":"Looking at that patch, just out of curiosity. At first, I thought I wouldn’t be able to understand it, but thanks to the detailed information and clearly separated cases, I managed to grasp it.\n\nI have two questions for my own understanding—if you can answer them, that would be great. Otherwise, everything looks good to me.","commit_id":"9507b7b92f9bcfff755ebef9fc6b115ef0b1167f"}],"nova/objects/instance_numa.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a13434b2b67cd669d6d3486b4ef50c1bf4226f2f","unresolved":true,"context_lines":[{"line_number":197,"context_line":"                LOG.warning("},{"line_number":198,"context_line":"                    \"InstanceNUMACell %s for instance %s has too old version \""},{"line_number":199,"context_line":"                    \"in the DB, don\u0027t know how to update, ignoring.\","},{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"}],"source_content_type":"text/x-python","patch_set":4,"id":"4666712a_ff8e34b3","line":200,"range":{"start_line":200,"start_character":20,"end_line":200,"end_character":43},"updated":"2025-02-07 15:24:50.000000000","message":"I\u0027m not sure how I feel about logging JSON objects like this. Potentially helpful for forensics, but looks messy to me and I\u0027m not sure it adds actionable information (especially if it keeps logging this since it takes no corrective action). Anyway, not saying you should change it, I\u0027m just not sure it\u0027s the right thing to do.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"675f82bd658a13d6503c0e3de2c30f4ab3d103b6","unresolved":true,"context_lines":[{"line_number":197,"context_line":"                LOG.warning("},{"line_number":198,"context_line":"                    \"InstanceNUMACell %s for instance %s has too old version \""},{"line_number":199,"context_line":"                    \"in the DB, don\u0027t know how to update, ignoring.\","},{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"}],"source_content_type":"text/x-python","patch_set":4,"id":"59998846_23809960","line":200,"range":{"start_line":200,"start_character":20,"end_line":200,"end_character":43},"in_reply_to":"09b62b80_e4147839","updated":"2025-02-10 11:31:44.000000000","message":"i have a patch up to implement __repl__ by serialsiing to json but dan didnt liek that either.\n\npersonlay i prefer the json serialisation but yes we shoudl pick that upand make these properly printable.\n\nim fine with cell.obj_to_primitive(),\n\nhttps://review.opendev.org/c/openstack/nova/+/898057/3/nova/objects/base.py\n\ni never got around to printing it the ovo way.\n\nwe could jsut print the object in its current form and pack back up my orginal patch and fiture out how to print it in a way we all agree with","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"25a80fe0e466d78f2e5cc4cd28a5f640ab9a4bac","unresolved":true,"context_lines":[{"line_number":197,"context_line":"                LOG.warning("},{"line_number":198,"context_line":"                    \"InstanceNUMACell %s for instance %s has too old version \""},{"line_number":199,"context_line":"                    \"in the DB, don\u0027t know how to update, ignoring.\","},{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"}],"source_content_type":"text/x-python","patch_set":4,"id":"09b62b80_e4147839","line":200,"range":{"start_line":200,"start_character":20,"end_line":200,"end_character":43},"in_reply_to":"4666712a_ff8e34b3","updated":"2025-02-10 11:02:57.000000000","message":"The reason of logging primitives is that is actually logs the object version along with the data. If this feels wrong then I can try to enhance ``__repl__ / __str__`` to be more informative by encoding the version. However I feel that will be equally messy.\n\nAlso I\u0027m OK to start adding forward porting logic of the object from 1.3 to 1.6. I was just lazy thinking about it given how old that version is. It was mentally a lot cheaper to log the warning and keep the existing behavior. \n\nI\u0027m pretty sure that if warning case is hit due to a compute requesting this object that compute will fail later on this old data as we don\u0027t have the client code written in a way to work with older than 1.6 if code is on 1.6. So this log will be very handy.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9e4c77aeac9841cf558753e62afabf0279461dfb","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                LOG.warning("},{"line_number":198,"context_line":"                    \"InstanceNUMACell %s for instance %s has too old version \""},{"line_number":199,"context_line":"                    \"in the DB, don\u0027t know how to update, ignoring.\","},{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"}],"source_content_type":"text/x-python","patch_set":4,"id":"ac5ec45c_083ab5a3","line":200,"range":{"start_line":200,"start_character":20,"end_line":200,"end_character":43},"in_reply_to":"4c581c0f_293e2acf","updated":"2025-02-12 12:56:34.000000000","message":"Done","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"157c2ec01501593f2b22094b7c3a07141e472af5","unresolved":true,"context_lines":[{"line_number":197,"context_line":"                LOG.warning("},{"line_number":198,"context_line":"                    \"InstanceNUMACell %s for instance %s has too old version \""},{"line_number":199,"context_line":"                    \"in the DB, don\u0027t know how to update, ignoring.\","},{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"}],"source_content_type":"text/x-python","patch_set":4,"id":"dbfaaeaf_9591eefc","line":200,"range":{"start_line":200,"start_character":20,"end_line":200,"end_character":43},"in_reply_to":"59998846_23809960","updated":"2025-02-10 15:16:24.000000000","message":"Dumping something non-trivial in JSON to the logs just feels a bit like dumping a traceback there.. I think it looks messy and is unlikely to be of use to an operator. It definitely would be to developers if they\u0027re trying to track this down (hence the forensic value) I\u0027m just not sure that\u0027s likely enough to warrant the mess.\n\nBut, if you both think it\u0027s that important to dump the whole thing instead of just the relevant fields/version then I won\u0027t stand in the way.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9f07725a68253b5dec09297d09b19d9e7142de93","unresolved":true,"context_lines":[{"line_number":197,"context_line":"                LOG.warning("},{"line_number":198,"context_line":"                    \"InstanceNUMACell %s for instance %s has too old version \""},{"line_number":199,"context_line":"                    \"in the DB, don\u0027t know how to update, ignoring.\","},{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"}],"source_content_type":"text/x-python","patch_set":4,"id":"4c581c0f_293e2acf","line":200,"range":{"start_line":200,"start_character":20,"end_line":200,"end_character":43},"in_reply_to":"dbfaaeaf_9591eefc","updated":"2025-02-11 11:59:45.000000000","message":"OK. I can compromise on printing the relevant ovo along with its version.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"cc8362740b0a217d9dbecd1a94a1792a9d9c1fca","unresolved":true,"context_lines":[{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"},{"line_number":204,"context_line":"                cell.cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.DEDICATED and"},{"line_number":205,"context_line":"                (cell.cpuset or not cell.pcpuset)"},{"line_number":206,"context_line":"            ):"},{"line_number":207,"context_line":"                LOG.warning("},{"line_number":208,"context_line":"                    \"InstanceNUMACell %s is inconsistent as the version is \""},{"line_number":209,"context_line":"                    \"1.5 or greater, cpu_policy is dedicated, but cpuset is \""},{"line_number":210,"context_line":"                    \"not empty or pcpuset is empty.\", cell.obj_to_primitive())"},{"line_number":211,"context_line":"                continue"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"            # NOTE(gibi): The data migration between 1.4. and 1.5 populates the"},{"line_number":214,"context_line":"            # pcpuset field that is new in version 1.5. However below we bump"},{"line_number":215,"context_line":"            # the object version to 1.6 directly. This is intentional. The"}],"source_content_type":"text/x-python","patch_set":4,"id":"c9947215_653e76d9","line":212,"range":{"start_line":203,"start_character":0,"end_line":212,"end_character":0},"updated":"2025-02-07 12:42:55.000000000","message":"This is should not happen. But as there was existing unit test cases with such setup I added a warning to detect these if this ever happens on the field. (and fixed the wrong pre-condition in those unit tests)","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9e4c77aeac9841cf558753e62afabf0279461dfb","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                    cell.obj_to_primitive(), obj.instance_uuid)"},{"line_number":201,"context_line":"                continue"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"            if (version \u003e\u003d (1, 5) and"},{"line_number":204,"context_line":"                cell.cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.DEDICATED and"},{"line_number":205,"context_line":"                (cell.cpuset or not cell.pcpuset)"},{"line_number":206,"context_line":"            ):"},{"line_number":207,"context_line":"                LOG.warning("},{"line_number":208,"context_line":"                    \"InstanceNUMACell %s is inconsistent as the version is \""},{"line_number":209,"context_line":"                    \"1.5 or greater, cpu_policy is dedicated, but cpuset is \""},{"line_number":210,"context_line":"                    \"not empty or pcpuset is empty.\", cell.obj_to_primitive())"},{"line_number":211,"context_line":"                continue"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"            # NOTE(gibi): The data migration between 1.4. and 1.5 populates the"},{"line_number":214,"context_line":"            # pcpuset field that is new in version 1.5. However below we bump"},{"line_number":215,"context_line":"            # the object version to 1.6 directly. This is intentional. The"}],"source_content_type":"text/x-python","patch_set":4,"id":"66346367_6fa6a11d","line":212,"range":{"start_line":203,"start_character":0,"end_line":212,"end_character":0},"in_reply_to":"c9947215_653e76d9","updated":"2025-02-12 12:56:34.000000000","message":"Done","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a13434b2b67cd669d6d3486b4ef50c1bf4226f2f","unresolved":true,"context_lines":[{"line_number":229,"context_line":"                        update_db \u003d True"},{"line_number":230,"context_line":"                    else:"},{"line_number":231,"context_line":"                        # This data was already migrated to 1.6 format but the"},{"line_number":232,"context_line":"                        # version string wasn\u0027t bumped to 1.6. This happened"},{"line_number":233,"context_line":"                        # before the fix"},{"line_number":234,"context_line":"                        # https://bugs.launchpad.net/nova/+bug/2097360"},{"line_number":235,"context_line":"                        # Only bump the version string."}],"source_content_type":"text/x-python","patch_set":4,"id":"7953e762_39050bc9","line":232,"range":{"start_line":232,"start_character":48,"end_line":232,"end_character":54},"updated":"2025-02-07 15:24:50.000000000","message":"Again I advocate for \"updated\" here (also in the comments above and below). I dunno how important this is, but \"bump\" to me means the developer-time operation of increasing the version, and \"update\" to me means changing a given instance of a data structure. Maybe I\u0027m the only one.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"25a80fe0e466d78f2e5cc4cd28a5f640ab9a4bac","unresolved":true,"context_lines":[{"line_number":229,"context_line":"                        update_db \u003d True"},{"line_number":230,"context_line":"                    else:"},{"line_number":231,"context_line":"                        # This data was already migrated to 1.6 format but the"},{"line_number":232,"context_line":"                        # version string wasn\u0027t bumped to 1.6. This happened"},{"line_number":233,"context_line":"                        # before the fix"},{"line_number":234,"context_line":"                        # https://bugs.launchpad.net/nova/+bug/2097360"},{"line_number":235,"context_line":"                        # Only bump the version string."}],"source_content_type":"text/x-python","patch_set":4,"id":"c5b994cf_522f444a","line":232,"range":{"start_line":232,"start_character":48,"end_line":232,"end_character":54},"in_reply_to":"7953e762_39050bc9","updated":"2025-02-10 11:02:57.000000000","message":"I intended to fix all all the places I used \"bump\" before. I missed these. Fixed now.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"157c2ec01501593f2b22094b7c3a07141e472af5","unresolved":false,"context_lines":[{"line_number":229,"context_line":"                        update_db \u003d True"},{"line_number":230,"context_line":"                    else:"},{"line_number":231,"context_line":"                        # This data was already migrated to 1.6 format but the"},{"line_number":232,"context_line":"                        # version string wasn\u0027t bumped to 1.6. This happened"},{"line_number":233,"context_line":"                        # before the fix"},{"line_number":234,"context_line":"                        # https://bugs.launchpad.net/nova/+bug/2097360"},{"line_number":235,"context_line":"                        # Only bump the version string."}],"source_content_type":"text/x-python","patch_set":4,"id":"4ba8663d_ecb4cea1","line":232,"range":{"start_line":232,"start_character":48,"end_line":232,"end_character":54},"in_reply_to":"c5b994cf_522f444a","updated":"2025-02-10 15:16:24.000000000","message":"Acknowledged","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"181fd1ea00e974b6776ce2bafc924e1435527b43","unresolved":true,"context_lines":[{"line_number":235,"context_line":"                        # Only bump the version string."},{"line_number":236,"context_line":"                        cell.VERSION \u003d \u00271.6\u0027"},{"line_number":237,"context_line":"                        update_db \u003d True"},{"line_number":238,"context_line":"                elif cell.cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.SHARED:"},{"line_number":239,"context_line":"                    # no data migration needed just add the new field and"},{"line_number":240,"context_line":"                    # stamp the new version in the DB"},{"line_number":241,"context_line":"                    cell.pcpuset \u003d set()"}],"source_content_type":"text/x-python","patch_set":4,"id":"efc7870b_00d2a3d7","line":238,"updated":"2025-02-09 01:40:14.000000000","message":"if we are going to do it this way we need to test for shared or None i think\n\nthere are two ways to have floating cpus explictly requst shared of dont set cpu_policy at all.\n\ni would have to check but im not sure if we will actully set it to shared when its not specified in the image or flavor at all.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9e4c77aeac9841cf558753e62afabf0279461dfb","unresolved":false,"context_lines":[{"line_number":235,"context_line":"                        # Only bump the version string."},{"line_number":236,"context_line":"                        cell.VERSION \u003d \u00271.6\u0027"},{"line_number":237,"context_line":"                        update_db \u003d True"},{"line_number":238,"context_line":"                elif cell.cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.SHARED:"},{"line_number":239,"context_line":"                    # no data migration needed just add the new field and"},{"line_number":240,"context_line":"                    # stamp the new version in the DB"},{"line_number":241,"context_line":"                    cell.pcpuset \u003d set()"}],"source_content_type":"text/x-python","patch_set":4,"id":"21a1b7dd_b2f4663d","line":238,"in_reply_to":"6056da75_010ec37a","updated":"2025-02-12 12:56:34.000000000","message":"Done","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"25a80fe0e466d78f2e5cc4cd28a5f640ab9a4bac","unresolved":true,"context_lines":[{"line_number":235,"context_line":"                        # Only bump the version string."},{"line_number":236,"context_line":"                        cell.VERSION \u003d \u00271.6\u0027"},{"line_number":237,"context_line":"                        update_db \u003d True"},{"line_number":238,"context_line":"                elif cell.cpu_policy \u003d\u003d obj_fields.CPUAllocationPolicy.SHARED:"},{"line_number":239,"context_line":"                    # no data migration needed just add the new field and"},{"line_number":240,"context_line":"                    # stamp the new version in the DB"},{"line_number":241,"context_line":"                    cell.pcpuset \u003d set()"}],"source_content_type":"text/x-python","patch_set":4,"id":"6056da75_010ec37a","line":238,"in_reply_to":"efc7870b_00d2a3d7","updated":"2025-02-10 11:02:57.000000000","message":"you are right we need to consider cell.cpu_policy \u003d None here based on the usage pattern of the field e.g. in https://github.com/openstack/nova/blob/e27bbe72e0d293e55c30d4f90ca0afcf47427419/nova/compute/manager.py#L955-L958\n\nFixed now.","commit_id":"2955f6f4b6589ac7280d55d3562958d1745cf669"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"43f908a44058f1db0c21c15ae0b2e181cecfec5c","unresolved":true,"context_lines":[{"line_number":181,"context_line":"    # TODO(huaqiang): Remove after Wallaby once we are sure these objects have"},{"line_number":182,"context_line":"    # been loaded at least once."},{"line_number":183,"context_line":"    @classmethod"},{"line_number":184,"context_line":"    def _migrate_legacy_dedicated_instance_cpuset(cls, obj):"},{"line_number":185,"context_line":"        # NOTE(huaqiang): We may meet some topology object with the old version"},{"line_number":186,"context_line":"        # \u0027InstanceNUMACell\u0027 cells, in that case, the \u0027dedicated\u0027 CPU is kept"},{"line_number":187,"context_line":"        # in \u0027InstanceNUMACell.cpuset\u0027 field, but it should be kept in"}],"source_content_type":"text/x-python","patch_set":6,"id":"123154d7_2653eaed","line":184,"range":{"start_line":184,"start_character":50,"end_line":184,"end_character":53},"updated":"2025-02-12 15:09:22.000000000","message":"2 questions from my knowledge:\n\n- Is there a reason why this is a classmethod and not a staticmethod ? As attribute cls is not used below.\n\n- This is checked each time we get data from the db ? Correct ?\n  Was it done this way because we did not want to touch at the object by providing\n  a new version and fix that in a db migration ?","commit_id":"9507b7b92f9bcfff755ebef9fc6b115ef0b1167f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23c9d311a2d35e6ceb879b28909430df6206656d","unresolved":true,"context_lines":[{"line_number":181,"context_line":"    # TODO(huaqiang): Remove after Wallaby once we are sure these objects have"},{"line_number":182,"context_line":"    # been loaded at least once."},{"line_number":183,"context_line":"    @classmethod"},{"line_number":184,"context_line":"    def _migrate_legacy_dedicated_instance_cpuset(cls, obj):"},{"line_number":185,"context_line":"        # NOTE(huaqiang): We may meet some topology object with the old version"},{"line_number":186,"context_line":"        # \u0027InstanceNUMACell\u0027 cells, in that case, the \u0027dedicated\u0027 CPU is kept"},{"line_number":187,"context_line":"        # in \u0027InstanceNUMACell.cpuset\u0027 field, but it should be kept in"}],"source_content_type":"text/x-python","patch_set":6,"id":"6861a3cd_e3e37780","line":184,"range":{"start_line":184,"start_character":50,"end_line":184,"end_character":53},"in_reply_to":"123154d7_2653eaed","updated":"2025-02-12 16:27:51.000000000","message":"\u003e - Is there a reason why this is a classmethod and not a staticmethod ? As attribute cls is not used below.\n\nMaybe not strictly necessary in this case as it currently stands, but it\u0027s called from classmethods, so generally sort of makes sense. It would also probably be most correct to checkout \"current max version\" by using `cls.VERSION` so we could be subclassed later. That\u0027s not done here, but could be by some migration in the future.\n\n\u003e - This is checked each time we get data from the db ? Correct ?\n\u003e   Was it done this way because we did not want to touch at the object by providing\n\u003e   a new version and fix that in a db migration ?\n\nThese sorts of things are very expensive to do in a db migration, and also would break the ability we currently have to apply schema migrations before we actually migrate the data. While alembic has a \"now migrate the data\" phase ability, we\u0027ve always done these in the objects as we load them since that has existed from before we used alembic. It\u0027s much more efficient to just migrate if/when we need the data. We have a way to push all these sorts of data migrations from nova-manage in cases where we need to make sure we converge (such as before the next upgrade).","commit_id":"9507b7b92f9bcfff755ebef9fc6b115ef0b1167f"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"0d7483869aede4db08b3cbb3e3bc55f1189430dc","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    # TODO(huaqiang): Remove after Wallaby once we are sure these objects have"},{"line_number":182,"context_line":"    # been loaded at least once."},{"line_number":183,"context_line":"    @classmethod"},{"line_number":184,"context_line":"    def _migrate_legacy_dedicated_instance_cpuset(cls, obj):"},{"line_number":185,"context_line":"        # NOTE(huaqiang): We may meet some topology object with the old version"},{"line_number":186,"context_line":"        # \u0027InstanceNUMACell\u0027 cells, in that case, the \u0027dedicated\u0027 CPU is kept"},{"line_number":187,"context_line":"        # in \u0027InstanceNUMACell.cpuset\u0027 field, but it should be kept in"}],"source_content_type":"text/x-python","patch_set":6,"id":"ce7cfb00_25d6a7bb","line":184,"range":{"start_line":184,"start_character":50,"end_line":184,"end_character":53},"in_reply_to":"6861a3cd_e3e37780","updated":"2025-02-12 17:56:55.000000000","message":"Hi Dan, thank you very much for the explanations. 💪👍️\nI have just realized that alembic was not used before. 🤦\n`It\u0027s much more efficient to just migrate if/when we need the data.` that\u0027s smart, and I recall some projects I worked on previously on which we would have done that instead of waiting hours to migrate data of huge SQL tables.","commit_id":"9507b7b92f9bcfff755ebef9fc6b115ef0b1167f"}],"nova/tests/unit/objects/test_instance_numa.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"47624e3fc403123f96997f1547afe94dfcd379df","unresolved":true,"context_lines":[{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    def test__migrate_legacy_dedicated_instance_cpuset_dedicated_half_migrated("},{"line_number":490,"context_line":"        self"},{"line_number":491,"context_line":"    ):"},{"line_number":492,"context_line":"        # Before the fix for https://bugs.launchpad.net/nova/+bug/2097360"},{"line_number":493,"context_line":"        # landed Nova only half migrated the InstanceNUMACell from 1.4 to 1.6"},{"line_number":494,"context_line":"        # by doing the data move but not updating the version string in the DB."}],"source_content_type":"text/x-python","patch_set":2,"id":"4ce0ad22_b1ca62c8","line":491,"updated":"2025-02-15 18:58:12.000000000","message":"+1 for covering thsi thanks.","commit_id":"ac10db0d6d6f6563fa9b5cfcfc8fc0a6a2d3df59"}]}
