Refactor definition of lock path

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/819300
Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/819298
Change-Id: I0fb662cc3fe241bf3934306b7ee8a3c8fdbcf747
This commit is contained in:
Dmitriy Rabotyagov 2021-11-30 13:46:01 +02:00 committed by Andrew Bonney
parent 019bea7ce8
commit ae6f549766
5 changed files with 9 additions and 12 deletions

View File

@ -68,9 +68,10 @@ zun_system_group_name: zun
zun_system_shell: /bin/false zun_system_shell: /bin/false
zun_system_comment: zun system user zun_system_comment: zun system user
zun_system_home_folder: "/var/lib/{{ zun_system_user_name }}" zun_system_home_folder: "/var/lib/{{ zun_system_user_name }}"
zun_system_slice_name: zun
zun_log_dir: "/var/log/zun" zun_log_dir: "/var/log/zun"
zun_lock_path: "/var/lock/zun" zun_lock_dir: "{{ openstack_lock_dir | default('/run/lock') }}"
## Kuryr user information ## Kuryr user information
zun_kuryr_system_user_name: kuryr zun_kuryr_system_user_name: kuryr
@ -80,8 +81,6 @@ zun_kuryr_system_comment: kuryr system user
zun_kuryr_system_home_folder: "/var/lib/{{ zun_kuryr_system_user_name }}" zun_kuryr_system_home_folder: "/var/lib/{{ zun_kuryr_system_user_name }}"
zun_kuryr_log_dir: "/var/log/kuryr" zun_kuryr_log_dir: "/var/log/kuryr"
zun_kuryr_lock_path: "/var/lock/kuryr"
## Docker setup information ## Docker setup information
zun_docker_package_version: "{{ _zun_docker_package_version }}" zun_docker_package_version: "{{ _zun_docker_package_version }}"
zun_containerd_package_version: "{{ _zun_containerd_package_version }}" zun_containerd_package_version: "{{ _zun_containerd_package_version }}"

View File

@ -156,8 +156,8 @@
systemd_user_name: "{{ zun_system_user_name }}" systemd_user_name: "{{ zun_system_user_name }}"
systemd_group_name: "{{ zun_system_group_name }}" systemd_group_name: "{{ zun_system_group_name }}"
systemd_tempd_prefix: openstack systemd_tempd_prefix: openstack
systemd_slice_name: zun systemd_slice_name: "{{ zun_system_slice_name }}"
systemd_lock_path: "{{ zun_lock_path }}" systemd_lock_dir: "{{ zun_lock_dir }}"
systemd_CPUAccounting: true systemd_CPUAccounting: true
systemd_BlockIOAccounting: true systemd_BlockIOAccounting: true
systemd_MemoryAccounting: true systemd_MemoryAccounting: true

View File

@ -64,14 +64,12 @@
- { path: "/etc/zun", mode: "0750" } - { path: "/etc/zun", mode: "0750" }
- { path: "/etc/zun/rootwrap.d", owner: "root", group: "root" } - { path: "/etc/zun/rootwrap.d", owner: "root", group: "root" }
- { path: "/etc/sudoers.d", mode: "0750", owner: "root", group: "root" } - { path: "/etc/sudoers.d", mode: "0750", owner: "root", group: "root" }
- { path: "/var/cache/zun" }
- { path: "{{ zun_system_home_folder }}" } - { path: "{{ zun_system_home_folder }}" }
- { path: "{{ zun_system_home_folder }}/.ssh", mode: "0700" } - { path: "{{ zun_system_home_folder }}/.ssh", mode: "0700" }
- { path: "{{ zun_system_home_folder }}/cache/api" } - { path: "{{ zun_system_home_folder }}/cache/api" }
- { path: "{{ zun_system_home_folder }}/instances" } - { path: "{{ zun_system_home_folder }}/instances" }
- { path: "{{ zun_system_home_folder }}/volumes" } - { path: "{{ zun_system_home_folder }}/volumes" }
- { path: "{{ zun_lock_path }}" } - { path: "{{ zun_system_home_folder }}/images" }
- { path: "/var/run/zun" }
tags: tags:
- zun-dirs - zun-dirs

View File

@ -12,4 +12,4 @@ fi
docker image prune -f docker image prune -f
# Clear old images from Zun cache directory # Clear old images from Zun cache directory
find /var/cache/zun -amin +1440 -type f -exec rm -fv {} \; find {{ zun_system_home_folder }}/images -amin +1440 -type f -exec rm -fv {} \;

View File

@ -36,7 +36,7 @@ docker_remote_api_version = {{ zun_docker_api_version }}
{% endif %} {% endif %}
[glance] [glance]
images_directory = /var/cache/zun/images images_directory = {{ zun_system_home_folder }}/images
[glance_client] [glance_client]
@ -80,7 +80,7 @@ insecure = {{ keystone_service_adminuri_insecure | bool }}
[oslo_concurrency] [oslo_concurrency]
lock_path = /var/lib/zun/tmp lock_path = {{ zun_lock_dir }}/{{ zun_system_slice_name }}
[oslo_messaging_notifications] [oslo_messaging_notifications]
@ -116,7 +116,7 @@ enabled_filters = {{ zun_scheduler_default_filters }}
[volume] [volume]
use_multipath = true use_multipath = true
driver_list = cinder,local driver_list = cinder,local
volume_dir = /var/lib/{{ zun_system_user_name }}/volumes volume_dir = {{ zun_system_home_folder }}/volumes
[compute] [compute]