)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":37598,"name":"Ivan Anfimov","display_name":"Ivan Anfimov","email":"lazekteam@gmail.com","username":"anfimovir"},"change_message_id":"1c0659a1452df0802dbbcbc99bd75a3659421d29","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9365a563_52b7b5c2","updated":"2026-04-23 10:52:10.000000000","message":"@wchy1001@gmail.com hello, please look it.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"2e4a8b8a47fdc7ef800dc9bebb6a6934437ba9db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"124e499a_c1939d02","updated":"2026-05-09 06:39:42.000000000","message":"Hello, I tested this feature in my development environment. The scenario was upgrading from PostgreSQL 16 to PostgreSQL 17. After the upgrade, the new instances failed to connect to the database, likely because the root password was changed.\nAdditionally, according to the PostgreSQL documentation, performing a major version upgrade requires running the `pg_upgrade` binary first. For this reason, the current patch may not be appropriate.\n\nDo you think we need to put in the effort to perfect this feature?\n\nhttps://www.postgresql.org/docs/17/pgupgrade.html","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"e94c56be112afbb916c845916719936f979eaddf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"e7bcf92b_4bd459bf","in_reply_to":"03273484_9ef02803","updated":"2026-05-09 08:43:07.000000000","message":"make sense.  It’s reasonable to avoid major version upgrades, however we should add a check for this in the current code. \n\nFor PostgreSQL datastore image tags, e.g. `postgresql:17`, it should always target the latest minor version. That’s why minor version tags were dropped a few years ago. \n\nYou may have maintained separate datastores for each minor version. However, I think in-place upgrades within the same major version should also be allowed.\nFor example: if an existing instance is running datastore version 16 and upgrades to the same major version 16 again, it should trigger a forced image pull before database startup. This is because the 16 tag no longer points to the same minor release as before.\nWhat do you think about this scenario?","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"9f281428b1457e925231d4acaff485862d7a1fab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"eb924bc8_9ed16efe","in_reply_to":"124e499a_c1939d02","updated":"2026-05-09 07:08:49.000000000","message":"Hi!\n\nThe PostgreSQL upgrade should be performed only between minor versions, e.g. from 16.20 to 16.22.\n\nThe point of this patch is to fix a bug. Right now, you can run a PostgreSQL upgrade, it will report that the upgrade has completed, and Trove will change the datastore version for the database, but nothing else will actually happen. The database itself will continue running the same version as before. This is definitely a bug in my opinion.\n\nIf you think we should add some failsafes for certain databases, e.g. forbid upgrades between major PostgreSQL versions, IMO it would be better to implement that in a separate task. However, it would be a very complicated task and probably not very useful. I think DBAs should be responsible for managing and upgrading their own databases. We should just warn them that this operation may be unsafe.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"80eab358b30ea9b5cf2124d02618f78c93a79b03","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"534a8e3e_7a4961f7","in_reply_to":"9365a563_52b7b5c2","updated":"2026-04-28 13:31:37.000000000","message":"ok, I need to test this in my local environment.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"c36bdd6d7fb02db0fbea0bfd898fd43d5575a9e9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"cc19d98c_0c8c3c63","in_reply_to":"b42093dd_8c3bd8eb","updated":"2026-05-11 07:33:45.000000000","message":"Wait, but we do remove the container and prune images in the `PgSqlApp.upgrade` method:\n\n```\nLOG.info(\u0027Deleting db container for upgrade\u0027)\ndocker_util.remove_container(self.docker_client)\n\nLOG.info(\u0027Remove unused images before starting new db container\u0027)\ndocker_util.prune_images(self.docker_client)\n```\n\nAfter that, we start the container again, and Docker is forced to pull a new image, provided as the upgrade image, because it doesn\u0027t have any cached images.\nOr maybe I can\u0027t see your point.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"ff62a010609502f9dee27949b65b05575f7e1440","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"bc33e09e_d8277058","in_reply_to":"cc19d98c_0c8c3c63","updated":"2026-05-11 09:32:07.000000000","message":"Great catch! I hadn\u0027t noticed this detail. Yes, after pruning the dangling images, Docker will pull the latest images.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"a4bae235e6c236637a36c69d39a9c7c60bc3a6e4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"eece9d58_3a1df2c3","in_reply_to":"e7bcf92b_4bd459bf","updated":"2026-05-09 09:28:16.000000000","message":"Yes, that\u0027s a good point. \n\nWith the proposed patch, such in-place upgrades would be possible due to the lack of a check that the upgrade is done with the same datastore version.\n\nAlso, for implementing this behavior in MySQL, there is a [separate patch](https://review.opendev.org/c/openstack/trove/+/981109).\n\n\nWe actually use minor versions for PostgreSQL in our production. We considered that using the major version only is unclear and may lead to issues with end-user instances. Also, we have custom plugins for each PostgreSQL datastore version, and a compatibility chart. Using a single major datastore version will bring a mess to this feature, because some plugins may not be present in the old minor version images and vice versa.\nI think it is best to support both modes in Trove: single image version and separate, and cloud operators will decide for themselves which suits them better.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"e1f9572135eca715dd41bd8b54d7afe31dd5db81","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"03273484_9ef02803","in_reply_to":"eb924bc8_9ed16efe","updated":"2026-05-09 07:15:44.000000000","message":"Also, the official PostgreSQL recommendation is to run your database on the latest minor version. New PostgreSQL versions are also released quite frequently, so keeping up with the latest minor releases is a common task for DBAs and cloud operators.\n\nThat is why the PostgreSQL upgrade operation is crucial, but unfortunately it is currently broken in Trove.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"4f678751c3c7518f4e226009a4ccbb625e5a72f9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b42093dd_8c3bd8eb","in_reply_to":"eece9d58_3a1df2c3","updated":"2026-05-11 06:20:38.000000000","message":"Yes, Both modes are useful. However, the current code should not work properly with `network_isolation\u003dfalse`, as the [client.containers.run(image, **kwargs)](https://github.com/openstack/trove/blob/master/trove/guestagent/utils/docker.py#L177) doesn\u0027t force pulling the image if it already exists. \n\nDo you think we need to remove the `network_isolation\u003dfalse` and clean the relevant codes in the future?","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"65a28ea6f2911d5383f3132746a03ae10fc7d031","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"04a2d382_1780764c","updated":"2026-05-13 02:39:23.000000000","message":"tests passed， but there is a small bug in trove-tempest-plugin, I will fix it later","commit_id":"8ec77c99bcee93183510bbc79177346d314fb366"}],"trove/guestagent/datastore/postgres/service.py":[{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"bf56dce9450a8c374979498aa552c6e5df969a80","unresolved":true,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":352,"context_line":"        self.stop_db()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        LOG.info(\u0027Deleting db container for upgrade\u0027)"},{"line_number":355,"context_line":"        docker_util.remove_container(self.docker_client)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bdc3e120_a2c0f2fa","line":353,"updated":"2026-05-11 09:33:49.000000000","message":"Now you only need to add a major version check.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"e757c3b0c28f3708db4428739d3a2a286f2e9e0d","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":352,"context_line":"        self.stop_db()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        LOG.info(\u0027Deleting db container for upgrade\u0027)"},{"line_number":355,"context_line":"        docker_util.remove_container(self.docker_client)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"f10a7229_d6b66093","line":353,"in_reply_to":"31a47739_b51685d0","updated":"2026-05-11 10:29:57.000000000","message":"Sounds good, that\u0027s better.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"68939e0c924b1c023e4d4d4e693bf2338ca60022","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":352,"context_line":"        self.stop_db()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        LOG.info(\u0027Deleting db container for upgrade\u0027)"},{"line_number":355,"context_line":"        docker_util.remove_container(self.docker_client)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"0f9b35ae_c321de24","line":353,"in_reply_to":"91e2bdeb_ddef3e62","updated":"2026-05-11 12:09:52.000000000","message":"Good idea. Exposing the error message in the guest agent makes no sense. It would be more meaningful to expose it to the API caller instead.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"feaf50ad302a995a84884e3716e84392aae9e5b5","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":352,"context_line":"        self.stop_db()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        LOG.info(\u0027Deleting db container for upgrade\u0027)"},{"line_number":355,"context_line":"        docker_util.remove_container(self.docker_client)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"31a47739_b51685d0","line":353,"in_reply_to":"bdc3e120_a2c0f2fa","updated":"2026-05-11 09:37:39.000000000","message":"Ok, that may be a handy safeguard.\n\nMaybe we should add the same safeguard for MySQL too? In [this](https://review.opendev.org/c/openstack/trove/+/981109) patchest for MySQL?","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"aa40b26d997919cc95b256f84b4a8ace8b501e2e","unresolved":false,"context_lines":[{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":352,"context_line":"        self.stop_db()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        LOG.info(\u0027Deleting db container for upgrade\u0027)"},{"line_number":355,"context_line":"        docker_util.remove_container(self.docker_client)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"91e2bdeb_ddef3e62","line":353,"in_reply_to":"f10a7229_d6b66093","updated":"2026-05-11 11:26:07.000000000","message":"Here are the manual testing results for the latest Patchset #4 from my DevStack:\nhttps://paste.opendev.org/show/bBkui5yU8XUzruRFfYYN/\n\nRight now, it works as intended.\n\nI can see a window for an improvement here: it\u0027s better to return an error message from the API call to the user if the upgrade was prevented, but I propose to resolve this in a separate patch, when both PostgreSQL and MySQL patches will be merged.","commit_id":"4573969ea724e421c4265b6a1854dc2ceb538724"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"69183204d74ddd844aa64092fa8575eb4972caa5","unresolved":true,"context_lines":[{"line_number":348,"context_line":"        \"\"\"Upgrade the database.\"\"\""},{"line_number":349,"context_line":"        new_version \u003d upgrade_info.get(\u0027datastore_version\u0027)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        guestagent_utils.prevent_major_version_upgrade("},{"line_number":352,"context_line":"            CONF.datastore_version,"},{"line_number":353,"context_line":"            new_version)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":356,"context_line":"        self.stop_db()"},{"line_number":357,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"cfe1fa8e_e63ef345","line":354,"range":{"start_line":351,"start_character":0,"end_line":354,"end_character":0},"updated":"2026-05-11 12:13:15.000000000","message":"Hi, what would happen when the upgrade operation completes? Will `CONF.datastore_version` be changed?","commit_id":"8ec77c99bcee93183510bbc79177346d314fb366"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"f87833e3180b39a8c03f9fd024e653642fc2f4e0","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        \"\"\"Upgrade the database.\"\"\""},{"line_number":349,"context_line":"        new_version \u003d upgrade_info.get(\u0027datastore_version\u0027)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        guestagent_utils.prevent_major_version_upgrade("},{"line_number":352,"context_line":"            CONF.datastore_version,"},{"line_number":353,"context_line":"            new_version)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":356,"context_line":"        self.stop_db()"},{"line_number":357,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ddc46d97_779eee01","line":354,"range":{"start_line":351,"start_character":0,"end_line":354,"end_character":0},"in_reply_to":"8355a811_e0c263b1","updated":"2026-05-11 12:25:36.000000000","message":"I\u0027ve added two items to the Etherpad list for future improvements to the Upgrade() methods. I think this patchset already includes enough changes.","commit_id":"8ec77c99bcee93183510bbc79177346d314fb366"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"b522a23e37aef0666dfc79b47c7fda1a4ab6cb36","unresolved":true,"context_lines":[{"line_number":348,"context_line":"        \"\"\"Upgrade the database.\"\"\""},{"line_number":349,"context_line":"        new_version \u003d upgrade_info.get(\u0027datastore_version\u0027)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        guestagent_utils.prevent_major_version_upgrade("},{"line_number":352,"context_line":"            CONF.datastore_version,"},{"line_number":353,"context_line":"            new_version)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":356,"context_line":"        self.stop_db()"},{"line_number":357,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"8355a811_e0c263b1","line":354,"range":{"start_line":351,"start_character":0,"end_line":354,"end_character":0},"in_reply_to":"cfe1fa8e_e63ef345","updated":"2026-05-11 12:21:11.000000000","message":"No, there is no mechanism in the current guestagent code database to change the contents of `/etc/trove/trove-guestagent.conf`.\n\nIn the new SSL feature, I\u0027ve [added](https://review.opendev.org/c/openstack/trove/+/988059/comment/46b2a251_3d3540bb/) a new method for doing that, so we\u0027ll need to utilize it in the future.","commit_id":"8ec77c99bcee93183510bbc79177346d314fb366"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"039b1e70acd520ba1030e667223e03784fb36169","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        \"\"\"Upgrade the database.\"\"\""},{"line_number":349,"context_line":"        new_version \u003d upgrade_info.get(\u0027datastore_version\u0027)"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"        guestagent_utils.prevent_major_version_upgrade("},{"line_number":352,"context_line":"            CONF.datastore_version,"},{"line_number":353,"context_line":"            new_version)"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        LOG.info(\u0027Stopping db container for upgrade\u0027)"},{"line_number":356,"context_line":"        self.stop_db()"},{"line_number":357,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"cee2368e_e071d89d","line":354,"range":{"start_line":351,"start_character":0,"end_line":354,"end_character":0},"in_reply_to":"ddc46d97_779eee01","updated":"2026-05-11 13:54:17.000000000","message":"Yes, but I\u0027ll run a test for this change first. Please wait for my test results.","commit_id":"8ec77c99bcee93183510bbc79177346d314fb366"}]}
