Skip to content

Commit

Permalink
kolla: add play to fix long service restarts while using systemd (#404)
Browse files Browse the repository at this point in the history
Necessary when upgrading from OSISM 6 to OSISM 7.

Closes osism/issues#973

Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored May 2, 2024
1 parent 8d25864 commit a13d516
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions playbooks/kolla-fix-gh973.yml
40 changes: 40 additions & 0 deletions playbooks/kolla/fix-gh973.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# https://github.com/osism/issues/issues/973
# https://bugs.launchpad.net/kolla-ansible/+bug/2048130
# https://review.opendev.org/c/openstack/kolla-ansible/+/904805
---
- name: Fix for osism/issues#973
hosts: "{{ hosts_fix_973|default('common') }}"

vars:
unit_files:
- kolla-cron-container.service
- kolla-designate_producer-container.service
- kolla-keystone_fernet-container.service
- kolla-letsencrypt_lego-container.service
- kolla-magnum_api-container.service
- kolla-mariadb_clustercheck-container.service
- kolla-neutron_l3_agent-container.service
- kolla-openvswitch_db-container.service
- kolla-openvswitch_vswitchd-container.service
- kolla-proxysql-container.service

tasks:
- name: Check the unit files to be repaired
ansible.builtin.stat:
path: "/etc/systemd/system/{{ item }}"
loop: "{{ unit_files }}"
register: result

- name: Repair unit file
become: true
ansible.builtin.lineinfile:
path: "/etc/systemd/system/{{ item.item }}"
insertafter: "^RestartSec="
line: "SuccessExitStatus=143"
loop: "{{ result.results }}"
when: item["stat"].exists | bool

- name: Reload systemd daemon
become: true
ansible.builtin.systemd:
daemon_reload: true

0 comments on commit a13d516

Please sign in to comment.