)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"e9c2354518813b738aa395457f5863e105c8a91d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f6d07844_c38ecb8a","updated":"2024-03-08 08:43:39.000000000","message":"Hi, could you please check this code as I think i little bit fixed you implementation","commit_id":"4733620ec5c45233317324d4be3cb1f934fa10e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"775044ef98e1ebc1debcbb1c3e36a238ebc4b22d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"adfcc374_1d5ec143","updated":"2024-03-08 09:06:00.000000000","message":"yes this is required, could you please make the changes as below;\n\u0027\u0027\u0027\n\ndiff --git a/glance/sqlite_migration.py b/glance/sqlite_migration.py\nindex b79fedaee..8e06f9cdd 100644\n--- a/glance/sqlite_migration.py\n+++ b/glance/sqlite_migration.py\n@@ -33,15 +33,18 @@ CONF.import_opt(\"image_cache_sqlite_db\", \"glance.image_cache.drivers.sqlite\")\n \n \n def can_migrate_to_central_db():\n+    # Return immediately if cache is disabled\n+    if not (CONF.paste_deploy.flavor and \u0027cache\u0027 in CONF.paste_deploy.flavor):\n+        return False\n+\n+    is_centralized_db_driver \u003d CONF.image_cache_driver \u003d\u003d \"centralized_db\"\n     # Check worker_self_reference_url is set if cache is enabled and\n     # cache driver is centralized_db\n-    is_centralized_db_driver \u003d CONF.image_cache_driver \u003d\u003d \"centralized_db\"\n-    if CONF.paste_deploy.flavor and \u0027cache\u0027 in CONF.paste_deploy.flavor:\n-        if is_centralized_db_driver and not CONF.worker_self_reference_url:\n-            msg \u003d _(\"\u0027worker_self_reference_url\u0027 needs to be set \"\n-                    \"if `centralized_db` is defined as cache driver \"\n-                    \"for image_cache_driver config option.\")\n-            raise RuntimeError(msg)\n+    if is_centralized_db_driver and not CONF.worker_self_reference_url:\n+        msg \u003d _(\"\u0027worker_self_reference_url\u0027 needs to be set \"\n+                \"if `centralized_db` is defined as cache driver \"\n+                \"for image_cache_driver config option.\")\n+        raise RuntimeError(msg)\n \n     return is_centralized_db_driver\n \ndiff --git a/glance/tests/unit/test_sqlite_migration.py b/glance/tests/unit/test_sqlite_migration.py\nindex b878eb4b7..1a0047908 100644\n--- a/glance/tests/unit/test_sqlite_migration.py\n+++ b/glance/tests/unit/test_sqlite_migration.py\n@@ -101,10 +101,16 @@ class TestMigrate(test_utils.BaseTestCase):\n         self.config(image_cache_driver\u003d\"sqlite\")\n         self.assertFalse(sqlite_migration.migrate_if_required())\n \n+    def test_migrate_if_required_cache_disabled(self):\n+        self.config(flavor\u003d\"keystone\", group\u003d\"paste_deploy\")\n+        self.config(image_cache_driver\u003d\"centralized_db\")\n+        self.assertFalse(sqlite_migration.migrate_if_required())\n+\n     @mock.patch(\u0027os.path.exists\u0027)\n     @mock.patch(\u0027os.path.join\u0027, new\u003dmock.MagicMock())\n     def test_migrate_if_required_db_not_found(self, mock_exists):\n         mock_exists.return_value \u003d False\n+        self.config(flavor\u003d\"keystone+cache\", group\u003d\"paste_deploy\")\n         self.config(image_cache_driver\u003d\"centralized_db\")\n         with mock.patch.object(sqlite_migration, \u0027LOG\u0027) as mock_log:\n             sqlite_migration.migrate_if_required()\n\u0027\u0027\u0027\n\nThis will fix test and introduce additional test as well","commit_id":"4733620ec5c45233317324d4be3cb1f934fa10e0"},{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"d68d8ed29401abb827cbc96c272c631e7443550b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4a86b1b9_53dcdda5","in_reply_to":"45139779_4ff1a416","updated":"2024-03-08 09:36:40.000000000","message":"Thanks, updated, let\u0027s see..","commit_id":"4733620ec5c45233317324d4be3cb1f934fa10e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"839c6bc3ae142152af8a7312c6b843800382616a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"45139779_4ff1a416","in_reply_to":"adfcc374_1d5ec143","updated":"2024-03-08 09:08:02.000000000","message":"Sorry that pasted horribly;\n\nhttps://paste.opendev.org/show/bKSEpxpKiABl2AYe8sor/","commit_id":"4733620ec5c45233317324d4be3cb1f934fa10e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"319bf4542a202a07690ee30566740e20afedc982","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"d3f5c43b_ba2675c0","updated":"2024-03-08 09:47:54.000000000","message":"Thank you!","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"},{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"4b0660a0370ad1612ed550ac67a5cd8356767253","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4cd75ebb_08746a9f","updated":"2024-03-08 09:48:39.000000000","message":"btw, does it mean that from caracal the glance cache will be required ? or not ? asking if we should change the code of Kolla-Ansible to switch the flavor for paste_deployment... Thanks !","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7d6d44f66a8e7fbb71a7df653d6606813b618090","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"77321879_16ee8560","updated":"2024-03-08 14:49:35.000000000","message":"recheck","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"},{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"d59520aa741d31d21beba7944ee4104fff0daaa8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"89b57b61_582c4b82","updated":"2024-03-08 12:56:50.000000000","message":"recheck failed tests are not related to this change","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"},{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"be95cc1a5082b52ecfe3cc775b05eaab38676b69","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6dbfb444_fe2e1eab","updated":"2024-03-08 17:22:54.000000000","message":"recheck fails not related","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"},{"author":{"_account_id":27339,"name":"Michal Arbet","email":"michal.arbet@ultimum.io","username":"michalarbet"},"change_message_id":"cd092d4027c67048af9835bbba699588b46ce7f8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f4a24ea9_6c0c7e4a","updated":"2024-03-08 19:37:11.000000000","message":"recheck non related fail again","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"38a44cd84cc20980d345a589b3da914e79ec1e6c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cdad5157_891bc0ac","updated":"2024-03-08 12:14:58.000000000","message":"recheck volume fails to reach expected state","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c23a84ca188b6e0f39350055f2369a5f2742fb4a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"937a8f51_368b1d9c","in_reply_to":"4cd75ebb_08746a9f","updated":"2024-03-08 10:04:12.000000000","message":"No it is not mandatory to have caching enabled.","commit_id":"309ca3aec26b6dd49b8d955c4900a5c390d14537"}]}
