)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":14200,"name":"Maksim Malchuk","email":"maksim.malchuk@gmail.com","username":"mmalchuk"},"change_message_id":"c26f2313c656d0b528963b9a35daa2fba2f46c8b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4e649753_598b9f64","updated":"2025-09-17 15:59:53.000000000","message":"lets check it again","commit_id":"e4bce3aa1dea3c76f44a5bffe39e6cc29d7872a2"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"0a085714f6fb4d00361267ffe0bb1da2333c56d9","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"14ea85ca_fe40baf6","updated":"2025-09-18 07:30:24.000000000","message":"maybe this would also be worth a small release note?","commit_id":"e4bce3aa1dea3c76f44a5bffe39e6cc29d7872a2"},{"author":{"_account_id":22629,"name":"Michal Nasiadka","email":"mnasiadka@gmail.com","username":"mnasiadka"},"change_message_id":"5bce94187e8ff78182918770747516d41e57c55f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0410596e_43ad11b0","in_reply_to":"14ea85ca_fe40baf6","updated":"2026-01-15 13:32:22.000000000","message":"Done","commit_id":"e4bce3aa1dea3c76f44a5bffe39e6cc29d7872a2"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"5539f48864b7d4bdea3c5356697a2b6fb6e28bef","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9c415d2f_72059cfc","updated":"2026-01-22 15:10:52.000000000","message":"recheck failures are likely unrelated. setting W-1 anyway to allow for closer checking before this gets merged","commit_id":"6ae9840673fb1bc298b6b984a3c9cd377567002e"}],"ansible/group_vars/all.yml":[{"author":{"_account_id":32553,"name":"Sven Kieske","email":"sven_oss@posteo.de","username":"skieske"},"change_message_id":"40c9ad6da2789c62c1cad840ef47e43157e06a25","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"40803563_e09b0bcb","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"updated":"2024-09-13 16:01:08.000000000","message":"I\u0027m not sure that is correct. \"unless stopped\" roughly translates to: restart this service, unless it exited cleanly.\n\nLooking at the systemd-docs we find:\n\nhttps://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Restart\u003d\n\nTakes one of no, on-success, on-failure, on-abnormal, on-watchdog, on-abort, or always. If set to no (the default), the service will not be restarted. If set to on-success, it will be restarted only when the service process exits cleanly. In this context, a clean exit means any of the following:\n\nexit code of 0;\nfor types other than Type\u003doneshot, one of the signals SIGHUP, SIGINT, SIGTERM, or SIGPIPE;\nexit statuses and signals specified in SuccessExitStatus\u003d.\n\nIf set to on-failure, the service will be restarted when the process exits with a non-zero exit code, is terminated by a signal (including on core dump, but excluding the aforementioned four signals)[...]\n\n\nso you might want just to use `on-failure` for systemd instead?","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":36702,"name":"Roman Krcek","display_name":"Roman Krček","email":"roman.krcek@tietoevry.com","username":"r-krcek"},"change_message_id":"0396d1739424ca96e99f5b811d71dd0c3df74415","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"dffea211_02a47794","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"004859b7_b7a9293a","updated":"2024-09-24 11:08:10.000000000","message":"## Environment\nOpenStack deployed with kolla-ansible@master\n\nI modified file `/etc/systemd/system/kolla-horizon-container.service` so that I simulate when user chooses to set `docker_restart_policy: \"unless-stopped\"`\n```\n# kolla-horizon-container.service\n# autogenerated by Kolla-Ansible\n\n[Unit]\nDescription\u003ddocker kolla-horizon-container.service\nAfter\u003ddocker.service\nWants\u003ddocker.service\nStartLimitInterval\u003d120\nStartLimitBurst\u003d10\n\n[Service]\nExecStart\u003d/usr/bin/docker start -a horizon\nExecStop\u003d/usr/bin/docker stop horizon -t 60\nRestart\u003don-failure                             # \u003c-- replaces \"unless-stopped\" for systemd\nRestartSec\u003d11\nSuccessExitStatus\u003d143\n\n[Install]\nWantedBy\u003dmulti-user.target\n```\n\n## Behavior\nAll commands were run after one another and then their behavior is explained\n\n`docker kill horizon` -\u003e simulates unclean exit of service, exits with code 137, gets restarted by systemd automatically, status of kolla-horizon-container.service:\n```\n● kolla-horizon-container.service - docker kolla-horizon-container.service\n     Loaded: loaded (/etc/systemd/system/kolla-horizon-container.service; enabled; vendor preset: enabled)\n     Active: activating (auto-restart) (Result: exit-code) since Tue 2024-09-24 12:59:20 CEST; 8s ago\n    Process: 148708 ExecStart\u003d/usr/bin/docker start -a horizon (code\u003dexited, status\u003d137)\n   Main PID: 148708 (code\u003dexited, status\u003d137)\n        CPU: 53m\n```\n\n`docker stop horizon` -\u003e clean stop, exits with code 0, container stays stopped, however service kolla-horizon-container.service is now in the following state\n```\n○ kolla-horizon-container.service - docker kolla-horizon-container.service\n     Loaded: loaded (/etc/systemd/system/kolla-horizon-container.service; enabled; vendor preset: enabled)\n     Active: inactive (dead) since Tue 2024-09-24 12:58:05 CEST; 879ms ago\n    Process: 1023 ExecStart\u003d/usr/bin/docker start -a horizon (code\u003dexited, status\u003d0/SUCCESS)\n    Process: 142988 ExecStop\u003d/usr/bin/docker stop horizon -t 60 (code\u003dexited, status\u003d0/SUCCESS)\n   Main PID: 1023 (code\u003dexited, status\u003d0/SUCCESS)\n        CPU: 129ms\n```\n\n`docker start horizon` -\u003e starts the horizon container, however it doesn\u0027t reactivate the service\n\n`docker kill horizon` -\u003e simulate another unclean exit of the container, exit-code 137, this time the container stays killed and does not restart\n\n`systemctl start kolla-horizon-container.service` -\u003e now the service is reactivated and the container is started","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":36702,"name":"Roman Krcek","display_name":"Roman Krček","email":"roman.krcek@tietoevry.com","username":"r-krcek"},"change_message_id":"bf22e824f5602e49235de61ac11e52cebc334f5a","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"926b4bf7_05cea88e","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"03251e2b_d8d479e2","updated":"2025-02-27 16:48:33.000000000","message":"Bump :)","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":14200,"name":"Maksim Malchuk","email":"maksim.malchuk@gmail.com","username":"mmalchuk"},"change_message_id":"e75a3dcd8a541d61a21a72dcef16766248e0d672","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"004859b7_b7a9293a","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"0a895f9b_c6afc4a3","updated":"2024-09-24 10:17:52.000000000","message":"I see container loop in restarts if failed. in my case. with \u0027unless-stopped\u0027","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":14200,"name":"Maksim Malchuk","email":"maksim.malchuk@gmail.com","username":"mmalchuk"},"change_message_id":"0ed87d94df5f3f06ccf9ff1419b7d7e67ea68849","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"fcdabeb1_f10dd390","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"1de14449_4edd2cb9","updated":"2024-09-18 08:54:14.000000000","message":"yes, and we need \u0027unless-stopped\u0027 to have the ability to stop container, with \u0027always\u0027 there only way to stop container is \u0027docker rm -f container\u0027 is a bad idea.","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":36702,"name":"Roman Krcek","display_name":"Roman Krček","email":"roman.krcek@tietoevry.com","username":"r-krcek"},"change_message_id":"78557cacfcf4884049e867738f370ca6d4fc5f94","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1de14449_4edd2cb9","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"40803563_e09b0bcb","updated":"2024-09-18 08:48:21.000000000","message":"I tend to disagree, as I think that \"unless-stopped\" for docker means restart always, unless someone uses `docker stop \u003ccont\u003e`\n\nYou can run container with `sudo docker run --restart unless-stopped ubuntu` That container exits with code 0 and still gets restarted.\n\nhttps://stackoverflow.com/questions/61725195/difference-in-docker-restart-policy-between-on-failure-and-unless-stopped","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":14200,"name":"Maksim Malchuk","email":"maksim.malchuk@gmail.com","username":"mmalchuk"},"change_message_id":"a0acad6c51af1a33cd07d3860a4f19435069aa0e","unresolved":false,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"228fae4c_a0d92044","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"926b4bf7_05cea88e","updated":"2025-06-14 22:16:17.000000000","message":"it didn\u0027t work on Xena at that time ;)","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":14200,"name":"Maksim Malchuk","email":"maksim.malchuk@gmail.com","username":"mmalchuk"},"change_message_id":"debc898dd30ff0f0f5318fee4cb2ac7634deb5dd","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"03251e2b_d8d479e2","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"dffea211_02a47794","updated":"2024-09-24 12:31:07.000000000","message":"interesting. will check later on my deployment.\nnever use \u0027docker kill\u0027 in kolla... \u0027docker stop\u0027 for graceful stop service only.","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"},{"author":{"_account_id":36702,"name":"Roman Krcek","display_name":"Roman Krček","email":"roman.krcek@tietoevry.com","username":"r-krcek"},"change_message_id":"b3f28cff46b248154b86123cf32ad8728100453d","unresolved":true,"context_lines":[{"line_number":115,"context_line":"docker_log_max_size: \"50m\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"# Valid options are [ no, on-failure, always, unless-stopped ]"},{"line_number":118,"context_line":"# NOTE(r-krcek): Since systemd does not have equivalent to \"unless-stopped\""},{"line_number":119,"context_line":"# that option will be converted by kolla_systemd_worker to \"always\""},{"line_number":120,"context_line":"docker_restart_policy: \"always\""},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"# \u00270\u0027 means unlimited retries (applies only to \u0027on-failure\u0027 policy)"},{"line_number":123,"context_line":"docker_restart_policy_retry: \"10\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"0a895f9b_c6afc4a3","line":120,"range":{"start_line":118,"start_character":0,"end_line":120,"end_character":31},"in_reply_to":"fcdabeb1_f10dd390","updated":"2024-09-24 09:32:16.000000000","message":"Okay, I see your point. I tested this and it introduces one issue. If you were to change the current \"always\" to \"on-failure\" when you run `docker stop` the container is stopped, but the service enters `inactive (dead)` state. Which means to recover from `docker stop` you would need to run `systemctl start kolla-\u003cservice\u003e` simply running `docker start` starts the container, but if the container were to exit in the future with non-zer0 code, it would not be restarted.","commit_id":"f9f4a4641fbe24af1cccf3a1c4de30b73074ff6b"}],"ansible/module_utils/kolla_container_worker.py":[{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"2bf12ea26c2ed3cca5ec4c0f19c187e6e7884e90","unresolved":true,"context_lines":[{"line_number":376,"context_line":"        This includes the restart policy itself and restart retries."},{"line_number":377,"context_line":"        \"\"\""},{"line_number":378,"context_line":"        new_policy \u003d self.params.get(\u0027restart_policy\u0027)"},{"line_number":379,"context_line":"        old_policy \u003d self.systemd.container_dict[\u0027restart_policy\u0027]"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        new_policy_retry \u003d self.params.get(\u0027restart_retries\u0027)"},{"line_number":382,"context_line":"        old_policy_retry \u003d self.systemd.container_dict[\u0027restart_retries\u0027]"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        # NOTE(r-krcek): Since systemd does not have equivalent"},{"line_number":385,"context_line":"        # to \"unless-stopped\", that option will be converted"}],"source_content_type":"text/x-python","patch_set":5,"id":"e583d549_52df24a5","line":382,"range":{"start_line":379,"start_character":8,"end_line":382,"end_character":73},"updated":"2026-01-22 17:58:38.000000000","message":"old_policy \u003d self.systemd.container_dict.get(\u0027restart_policy\u0027, \u0027no\u0027)\n...\nold_policy_retry \u003d self.systemd.container_dict.get(\u0027restart_retries\u0027, 0)\n\n??\n\nWe should use .get(\u0027restart_policy\u0027, \u0027no\u0027) and .get(\u0027restart_retries\u0027, 0) here. If a container was deployed with an older version of Kolla that didn\u0027t store these keys in the systemd unit\u0027s container_dict, the current code will raise a KeyErrorThis will cause the Ansible module to crash and fail the entire deployment or upgrade process prematurely for the operator ??","commit_id":"6ae9840673fb1bc298b6b984a3c9cd377567002e"},{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"2bf12ea26c2ed3cca5ec4c0f19c187e6e7884e90","unresolved":true,"context_lines":[{"line_number":390,"context_line":"        if old_policy \u003d\u003d \u0027unless-stopped\u0027:"},{"line_number":391,"context_line":"            old_policy \u003d \u0027always\u0027"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"        return (new_policy !\u003d old_policy or"},{"line_number":394,"context_line":"                new_policy_retry !\u003d old_policy_retry)"},{"line_number":395,"context_line":""},{"line_number":396,"context_line":"    def parse_image(self):"},{"line_number":397,"context_line":"        full_image \u003d self.params.get(\u0027image\u0027)"},{"line_number":398,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"30bc3e31_eec416ff","line":395,"range":{"start_line":393,"start_character":8,"end_line":395,"end_character":0},"updated":"2026-01-22 17:58:38.000000000","message":"return (new_policy !\u003d old_policy or\n                int(new_policy_retry) !\u003d int(old_policy_retry))\n\n??\n\nIt\u0027s safer to cast new_policy_retry and old_policy_retry to int() before comparison. Ansible might pass these as strings, while systemd-parsed values might be integers (or vice-versa), which would trigger unnecessary container restarts due to type mismatch??","commit_id":"6ae9840673fb1bc298b6b984a3c9cd377567002e"}],"releasenotes/notes/kolla_container-restart-policy-723c4b09dd8cd232.yaml":[{"author":{"_account_id":37306,"name":"Piotr Milewski","display_name":"Piotr Milewski","email":"vurmil@gmail.com","username":"vurmil"},"change_message_id":"2bf12ea26c2ed3cca5ec4c0f19c187e6e7884e90","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Adds support for ``kolla_container`` Ansible module to detect if the"},{"line_number":5,"context_line":"    restart policy or restart retries changed in order to restart the container"},{"line_number":6,"context_line":"    to apply the new settings."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"a58bb029_08c3f422","line":3,"updated":"2026-01-22 17:58:38.000000000","message":"I believe that since this change enables checking a parameter that was previously ignored, the first run of upgrade or reconfigure after merging this will trigger a restart of all managed containers to synchronize their state. We should explicitly warn about this \u0027one-time mass restart\u0027 in the release notes so that operators are not caught by surprise","commit_id":"6ae9840673fb1bc298b6b984a3c9cd377567002e"}]}
