From f40abfa2f413476802c50bd502e9694640ca2550 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 12 Apr 2022 13:06:44 +0200 Subject: [PATCH] Replace glance_nfs_client We should reflect changes introduced in dependant patch for CI to test new variable properly. Until this patch gets merged dependant patch runs compatability mode check (testing old glance_nfs_client). All futher checks would run with new glance_remote_client variable defined. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_glance/+/837550 Change-Id: I381752ac0bcd7faf5bbdc2d929ce2a9a0a3f1488 --- ...penstack_user_config.yml.multibond.example | 21 ++++++++----------- .../openstack_user_config.yml.pod.example | 21 ++++++++----------- .../openstack_user_config.yml.prod.example | 21 ++++++++----------- ...tack_user_config.yml.provnet-group.example | 21 ++++++++----------- ...enstack_user_config.yml.singlebond.example | 21 ++++++++----------- playbooks/os-glance-install.yml | 8 +++---- .../templates/user_variables_nfs.yml.j2 | 7 +++---- 7 files changed, 52 insertions(+), 68 deletions(-) diff --git a/etc/openstack_deploy/openstack_user_config.yml.multibond.example b/etc/openstack_deploy/openstack_user_config.yml.multibond.example index 5ed6f845c2..097892d58b 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.multibond.example +++ b/etc/openstack_deploy/openstack_user_config.yml.multibond.example @@ -156,30 +156,27 @@ image_hosts: ip: 172.29.236.11 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra2: ip: 172.29.236.12 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra3: ip: 172.29.236.13 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" diff --git a/etc/openstack_deploy/openstack_user_config.yml.pod.example b/etc/openstack_deploy/openstack_user_config.yml.pod.example index f4cb758b20..321a6d9767 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.pod.example +++ b/etc/openstack_deploy/openstack_user_config.yml.pod.example @@ -355,30 +355,27 @@ image_hosts: ip: 172.29.236.11 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra2: ip: 172.29.236.12 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra3: ip: 172.29.236.13 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" diff --git a/etc/openstack_deploy/openstack_user_config.yml.prod.example b/etc/openstack_deploy/openstack_user_config.yml.prod.example index 6592b11681..ee1aa5cb83 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.prod.example +++ b/etc/openstack_deploy/openstack_user_config.yml.prod.example @@ -141,30 +141,27 @@ image_hosts: ip: 172.29.236.11 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra2: ip: 172.29.236.12 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra3: ip: 172.29.236.13 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" diff --git a/etc/openstack_deploy/openstack_user_config.yml.provnet-group.example b/etc/openstack_deploy/openstack_user_config.yml.provnet-group.example index 1f6826adaf..ed9e82d991 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.provnet-group.example +++ b/etc/openstack_deploy/openstack_user_config.yml.provnet-group.example @@ -194,30 +194,27 @@ image_hosts: ip: 172.29.236.11 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra2: ip: 172.29.236.12 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra3: ip: 172.29.236.13 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" diff --git a/etc/openstack_deploy/openstack_user_config.yml.singlebond.example b/etc/openstack_deploy/openstack_user_config.yml.singlebond.example index 9ec44eba2b..b8be2d4d0d 100644 --- a/etc/openstack_deploy/openstack_user_config.yml.singlebond.example +++ b/etc/openstack_deploy/openstack_user_config.yml.singlebond.example @@ -156,30 +156,27 @@ image_hosts: ip: 172.29.236.11 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra2: ip: 172.29.236.12 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" infra3: ip: 172.29.236.13 container_vars: limit_container_types: glance - glance_nfs_client: - - server: "172.29.244.15" - remote_path: "/images" - local_path: "/var/lib/glance/images" + glance_remote_client: + - what: "172.29.244.15:/images" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 37c70b42e0..73f45f32b1 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -47,20 +47,20 @@ - "'glance_api' in group_names" - "groups['glance_api'] | length > 1" - - name: Configure container (non-nfs) + - name: Configure container (local storage bind mount from host) include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: list_of_bind_mounts: "{{ glance_container_bind_mounts }}" when: - not is_metal - glance_default_store == "file" - - (glance_nfs_client is not defined) or (glance_nfs_client | length == 0) + - (glance_remote_client is not defined) or (glance_remote_client | length == 0) - - name: Configure container (nfs) + - name: Configure container (remote storage) include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" when: - not is_metal - - (glance_default_store != "file") or (glance_nfs_client is defined) + - (glance_default_store != "file") or (glance_remote_client is defined) - include_tasks: common-tasks/unbound-clients.yml when: diff --git a/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 index 2c39a75894..c68fc85fed 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 @@ -1,9 +1,8 @@ --- glance_default_store: file -glance_nfs_client: - - server: "172.29.244.100" - remote_path: "/srv/nfs/glance" - local_path: "/var/lib/glance/images" +glance_remote_client: + - what: "172.29.244.100:/srv/nfs/glance" + where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto"