From 21ccae12f7937201cff2f4cf08deefe57b7594e2 Mon Sep 17 00:00:00 2001 From: Ana Peric Date: Wed, 17 Feb 2021 20:09:45 +0100 Subject: [PATCH] chronyd crash loop if Debian server is rebooted This patch fixes the constant chrony container crash loop after (Debian 10) server is rebooted, as described in Bug-ID: #1915528. Due to permissions issue, before this fix is applied chronyd process will be exiting with root cause error message: Fatal error : Could not open configuration file /etc/chrony/chrony.conf : Permission denied This has to do with priviledges we configured for chrony. Relaxing them fixes the issue. Tested on top of stable/victoria and Debian 10 Buster. Not tested on CentOS/RHEL. If this does not work well on RHEL/CentOS we can maybe parametrise the owner and make it configurable (just one idea). Closes-Bug: #1915528 Change-Id: I71f45ba5b9d1d2227c95633d3de51e2ccd42a467 --- ansible/roles/chrony/templates/chrony.json.j2 | 4 ++-- ...5528-chronyd-crash-loop-if-server-is-rebooted-debian.yaml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1915528-chronyd-crash-loop-if-server-is-rebooted-debian.yaml diff --git a/ansible/roles/chrony/templates/chrony.json.j2 b/ansible/roles/chrony/templates/chrony.json.j2 index 9322451f33..a5c5f35461 100644 --- a/ansible/roles/chrony/templates/chrony.json.j2 +++ b/ansible/roles/chrony/templates/chrony.json.j2 @@ -4,8 +4,8 @@ { "source": "{{ container_config_directory }}/chrony.conf", "dest": "/etc/chrony/chrony.conf", - "owner": "chrony", - "perm": "0600" + "owner": "root", + "perm": "0644" } ], "permissions": [ diff --git a/releasenotes/notes/bug-1915528-chronyd-crash-loop-if-server-is-rebooted-debian.yaml b/releasenotes/notes/bug-1915528-chronyd-crash-loop-if-server-is-rebooted-debian.yaml new file mode 100644 index 0000000000..ee43c7fb5f --- /dev/null +++ b/releasenotes/notes/bug-1915528-chronyd-crash-loop-if-server-is-rebooted-debian.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + chronyd crash loop if server is rebooted (Debian) + `LP#1915528 `__