Merge "Install systemd-container package on minor update" into stable/wallaby
This commit is contained in:
commit
9a16379406
@ -352,6 +352,9 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
NovaLibvirtCommon:
|
||||
type: ../../nova/nova-libvirt-common.yaml
|
||||
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
@ -998,6 +1001,8 @@ outputs:
|
||||
sed -i -e 's/{{ old_virtlogd_image.stdout | regex_escape() }}/{{ virtlogd_image | regex_escape() }}/' /var/lib/container-config-scripts/virtlogd_wrapper
|
||||
when: old_virtlogd_image.stdout != virtlogd_image
|
||||
update_tasks:
|
||||
- name: nova_libvirt_container_tmpfile_cleanup
|
||||
when: step|int == 1
|
||||
block: *nova_libvirt_container_tmpfile_cleanup
|
||||
list_concat:
|
||||
- {get_attr: [NovaLibvirtCommon, update_tasks]}
|
||||
- - name: nova_libvirt_container_tmpfile_cleanup
|
||||
when: step|int == 1
|
||||
block: *nova_libvirt_container_tmpfile_cleanup
|
||||
|
@ -1485,7 +1485,47 @@ outputs:
|
||||
- name: create tempfiles
|
||||
command: systemd-tmpfiles --create
|
||||
- *nova_compute_host_prep_and_system_upgrade_post_tasks
|
||||
- - name: is Nova Resume Guests State On Host Boot enabled
|
||||
- - name: check systemd-container package installed or not
|
||||
package:
|
||||
name: systemd-container
|
||||
state: present
|
||||
check_mode: true
|
||||
register: is_systemd_container_package
|
||||
- name: get latest package from downloaded package versions
|
||||
shell: ls -1t /var/tmp/systemd-container* | head -1
|
||||
register: latest_systemd_container_package
|
||||
when: is_systemd_container_package.changed
|
||||
- name: Install systemd-container package on boot
|
||||
copy:
|
||||
dest: /etc/systemd/system/install-systemd-container.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Install systemd container package on system boot
|
||||
Before=tripleo_nova_virtqemud.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/rpm -ivh {{ latest_systemd_container_package.stdout }}
|
||||
ExecStartPost=rm -f /var/tmp/systemd-container*
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
when: is_systemd_container_package.changed
|
||||
- name: enable install-systemd-container on compute boot
|
||||
systemd:
|
||||
name: install-systemd-container
|
||||
state: stopped
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
when: is_systemd_container_package.changed
|
||||
- name: disable and mask install-systemd-container on compute boot
|
||||
systemd:
|
||||
name: install-systemd-container
|
||||
enabled: false
|
||||
masked: true
|
||||
daemon_reload: true
|
||||
when: not is_systemd_container_package.changed
|
||||
- name: is Nova Resume Guests State On Host Boot enabled
|
||||
set_fact:
|
||||
resume_guests_state_on_host_boot_enabled: {get_attr: [RoleParametersValue, value, resume_guests_state_on_host_boot]}
|
||||
- name: install libvirt-guests systemd unit file (docker)
|
||||
|
@ -173,4 +173,19 @@ outputs:
|
||||
template: "MEMORY_BACKING_DIR:MEMORY_BACKING_DIR"
|
||||
params:
|
||||
MEMORY_BACKING_DIR: {get_attr: [RoleParametersValue, value, 'nova::compute::libvirt::qemu::memory_backing_dir']}
|
||||
|
||||
update_tasks:
|
||||
description: Common update tasks for modular virt daemons
|
||||
value:
|
||||
- name: check systemd-container package present or not
|
||||
package:
|
||||
name: systemd-container
|
||||
state: present
|
||||
check_mode: true
|
||||
register: is_systemd_container_package
|
||||
- name: download systemd-container package if not present
|
||||
yum:
|
||||
name: systemd-container
|
||||
state: present
|
||||
download_only: true
|
||||
download_dir: '/var/tmp/'
|
||||
when: is_systemd_container_package.changed
|
||||
|
@ -1053,6 +1053,8 @@ outputs:
|
||||
sed -i -e 's|{{ old_virtlogd_image.stdout }}|{{ virtlogd_image }}|' /var/lib/container-config-scripts/virtlogd_wrapper
|
||||
when: old_virtlogd_image.stdout != virtlogd_image
|
||||
update_tasks:
|
||||
- name: nova_libvirt_container_tmpfile_cleanup
|
||||
when: step|int == 1
|
||||
block: *nova_libvirt_container_tmpfile_cleanup
|
||||
list_concat:
|
||||
- {get_attr: [NovaLibvirtCommon, update_tasks]}
|
||||
- - name: nova_libvirt_container_tmpfile_cleanup
|
||||
when: step|int == 1
|
||||
block: *nova_libvirt_container_tmpfile_cleanup
|
||||
|
Loading…
x
Reference in New Issue
Block a user