Merge "Reintroduce NFS mounts after leapp upgrade" into stable/wallaby
This commit is contained in:
commit
6f73b77032
@ -261,32 +261,38 @@ outputs:
|
||||
data:
|
||||
multiconfig: {get_param: CephExternalMultiConfig}
|
||||
|
||||
cinder_volume_host_prep_and_system_upgrade_post_tasks:
|
||||
description: Common host_prep and system_upgrade post tasks for cinder-volume
|
||||
value: &cinder_volume_host_prep_and_system_upgrade_post_tasks
|
||||
- name: Support using an NFS share for cinder image conversion
|
||||
vars:
|
||||
image_conversion_nfs_enabled: {if: [cinder_nfs_conversion_dir_enabled, true, false]}
|
||||
when:
|
||||
- image_conversion_nfs_enabled|bool
|
||||
block:
|
||||
- name: Create cinder image conversion directory
|
||||
file:
|
||||
path: *cinder_image_conversion_nfs_dir
|
||||
state: directory
|
||||
- name: Mount cinder's image conversion NFS share
|
||||
vars:
|
||||
image_conversion_nfs_share: {get_param: CinderImageConversionNfsShare}
|
||||
image_conversion_nfs_options: {get_param: CinderImageConversionNfsOptions}
|
||||
mount:
|
||||
path: *cinder_image_conversion_nfs_dir
|
||||
state: mounted
|
||||
fstype: nfs4
|
||||
src: "{{ image_conversion_nfs_share }}"
|
||||
opts: "{{ image_conversion_nfs_options }}"
|
||||
# TODO: LVM doesn't work after Leapp
|
||||
|
||||
cinder_volume_host_prep_tasks:
|
||||
description: Host prep tasks for the cinder-volume service (HA or non-HA)
|
||||
value:
|
||||
list_concat:
|
||||
- *cinder_common_host_prep_tasks
|
||||
- - name: Support using an NFS share for cinder image conversion
|
||||
vars:
|
||||
image_conversion_nfs_enabled: {if: [cinder_nfs_conversion_dir_enabled, true, false]}
|
||||
when:
|
||||
- image_conversion_nfs_enabled|bool
|
||||
block:
|
||||
- name: Create cinder image conversion directory
|
||||
file:
|
||||
path: *cinder_image_conversion_nfs_dir
|
||||
state: directory
|
||||
- name: Mount cinder's image conversion NFS share
|
||||
vars:
|
||||
image_conversion_nfs_share: {get_param: CinderImageConversionNfsShare}
|
||||
image_conversion_nfs_options: {get_param: CinderImageConversionNfsOptions}
|
||||
mount:
|
||||
path: *cinder_image_conversion_nfs_dir
|
||||
state: mounted
|
||||
fstype: nfs4
|
||||
src: "{{ image_conversion_nfs_share }}"
|
||||
opts: "{{ image_conversion_nfs_options }}"
|
||||
- name: cinder_configure_lvm fact
|
||||
- *cinder_volume_host_prep_and_system_upgrade_post_tasks
|
||||
- - name: cinder_configure_lvm fact
|
||||
set_fact:
|
||||
cinder_configure_lvm: {if: [cinder_configure_lvm, true, false]}
|
||||
- when: cinder_configure_lvm|bool
|
||||
@ -358,6 +364,40 @@ outputs:
|
||||
enabled: yes
|
||||
daemon_reload: yes
|
||||
|
||||
cinder_volume_upgrade_tasks:
|
||||
description: Upgrade tasks for the cinder-volume service (HA or non-HA)
|
||||
value:
|
||||
- name: cinder-volume pre system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 3
|
||||
- upgrade_leapp_enabled
|
||||
block:
|
||||
- name: Unmount cinder's image conversion NFS share
|
||||
vars:
|
||||
image_conversion_nfs_share: {get_param: CinderImageConversionNfsShare}
|
||||
image_conversion_nfs_options: {get_param: CinderImageConversionNfsOptions}
|
||||
image_conversion_nfs_enabled: {if: [cinder_nfs_conversion_dir_enabled, true, false]}
|
||||
when: image_conversion_nfs_enabled|bool
|
||||
mount:
|
||||
path: *cinder_image_conversion_nfs_dir
|
||||
state: absent
|
||||
fstype: nfs4
|
||||
- name: cinder-volume post system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 5
|
||||
- upgrade_leapp_enabled
|
||||
block: *cinder_volume_host_prep_and_system_upgrade_post_tasks
|
||||
|
||||
cinder_volume_config_settings:
|
||||
description: Config settings for the cinder-volume container (HA or non-HA)
|
||||
value:
|
||||
|
@ -352,6 +352,7 @@ outputs:
|
||||
volumes: {get_attr: [CinderCommon, cinder_volume_volumes]}
|
||||
environment: {get_attr: [CinderCommon, cinder_volume_environment]}
|
||||
host_prep_tasks: {get_attr: [CinderCommon, cinder_volume_host_prep_tasks]}
|
||||
upgrade_tasks: {get_attr: [CinderCommon, cinder_volume_upgrade_tasks]}
|
||||
external_upgrade_tasks:
|
||||
- when:
|
||||
- step|int == 1
|
||||
|
@ -468,6 +468,37 @@ resources:
|
||||
ContainerGlanceApiConfigImage: {get_param: ContainerGlanceApiConfigImage}
|
||||
|
||||
outputs:
|
||||
glance_api_host_prep_and_system_upgrade_post_tasks:
|
||||
description: Common host_prep and system_upgrade post tasks for glance_api
|
||||
value: &glance_api_host_prep_and_system_upgrade_post_tasks
|
||||
- name: Mount NFS on host
|
||||
vars:
|
||||
nfs_backend_enabled: {get_param: GlanceNfsEnabled}
|
||||
glance_netapp_nfs_enabled: {get_param: GlanceNetappNfsEnabled}
|
||||
glance_nfs_share: {get_param: GlanceNfsShare}
|
||||
netapp_share_location: {get_param: NetappShareLocation}
|
||||
nfs_share: "{{ glance_nfs_share if (glance_nfs_share) else netapp_share_location }}"
|
||||
nfs_options: {get_param: GlanceNfsOptions}
|
||||
mount:
|
||||
name: /var/lib/glance/images
|
||||
state: mounted
|
||||
fstype: nfs
|
||||
src: "{{nfs_share}}"
|
||||
opts: "{{nfs_options}}"
|
||||
when: nfs_backend_enabled or glance_netapp_nfs_enabled
|
||||
- name: Mount Node Staging Location
|
||||
vars:
|
||||
glance_node_staging_uri: {get_param: GlanceNodeStagingUri}
|
||||
glance_staging_nfs_share: {get_param: GlanceStagingNfsShare}
|
||||
glance_nfs_options: {get_param: GlanceStagingNfsOptions}
|
||||
# Gleaning mount point by stripping "file://" prefix from staging uri
|
||||
mount:
|
||||
name: "{{glance_node_staging_uri[7:]}}"
|
||||
state: mounted
|
||||
fstype: nfs
|
||||
src: "{{glance_staging_nfs_share}}"
|
||||
opts: "{{glance_nfs_options}}"
|
||||
when: glance_staging_nfs_share != ''
|
||||
role_data:
|
||||
description: Role data for the Glance API role.
|
||||
value:
|
||||
@ -856,34 +887,8 @@ outputs:
|
||||
host_prep_tasks:
|
||||
list_concat:
|
||||
- {get_attr: [GlanceLogging, host_prep_tasks]}
|
||||
- - name: Mount NFS on host
|
||||
vars:
|
||||
nfs_backend_enabled: {get_param: GlanceNfsEnabled}
|
||||
glance_netapp_nfs_enabled: {get_param: GlanceNetappNfsEnabled}
|
||||
glance_nfs_share: {get_param: GlanceNfsShare}
|
||||
netapp_share_location: {get_param: NetappShareLocation}
|
||||
nfs_share: "{{ glance_nfs_share if (glance_nfs_share) else netapp_share_location }}"
|
||||
nfs_options: {get_param: GlanceNfsOptions}
|
||||
mount:
|
||||
name: /var/lib/glance/images
|
||||
state: mounted
|
||||
fstype: nfs
|
||||
src: "{{nfs_share}}"
|
||||
opts: "{{nfs_options}}"
|
||||
when: nfs_backend_enabled or glance_netapp_nfs_enabled
|
||||
- name: Mount Node Staging Location
|
||||
vars:
|
||||
glance_node_staging_uri: {get_param: GlanceNodeStagingUri}
|
||||
glance_staging_nfs_share: {get_param: GlanceStagingNfsShare}
|
||||
glance_nfs_options: {get_param: GlanceStagingNfsOptions}
|
||||
# Gleaning mount point by stripping "file://" prefix from staging uri
|
||||
mount:
|
||||
name: "{{glance_node_staging_uri[7:]}}"
|
||||
state: mounted
|
||||
fstype: nfs
|
||||
src: "{{glance_staging_nfs_share}}"
|
||||
opts: "{{glance_nfs_options}}"
|
||||
when: glance_staging_nfs_share != ''
|
||||
- *glance_api_host_prep_and_system_upgrade_post_tasks
|
||||
-
|
||||
- name: ensure ceph configurations exist
|
||||
file:
|
||||
path: {get_param: CephConfigPath}
|
||||
@ -894,6 +899,45 @@ outputs:
|
||||
state: directory
|
||||
setype: container_file_t
|
||||
- {get_attr: [CinderNVMeOF, cinder_nvmeof_host_prep_tasks]}
|
||||
upgrade_tasks:
|
||||
- name: glance-api pre system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 3
|
||||
- upgrade_leapp_enabled
|
||||
block:
|
||||
- name: Unmount and remove NFS glance entry
|
||||
vars:
|
||||
nfs_backend_enabled: {get_param: GlanceNfsEnabled}
|
||||
glance_netapp_nfs_enabled: {get_param: GlanceNetappNfsEnabled}
|
||||
mount:
|
||||
name: /var/lib/glance/images
|
||||
fstype: nfs
|
||||
state: absent
|
||||
when: nfs_backend_enabled or glance_netapp_nfs_enabled
|
||||
- name: Unmount and remove NFS glance-staging entry
|
||||
vars:
|
||||
glance_node_staging_uri: {get_param: GlanceNodeStagingUri}
|
||||
glance_staging_nfs_share: {get_param: GlanceStagingNfsShare}
|
||||
mount:
|
||||
name: "{{glance_node_staging_uri[7:]}}"
|
||||
fstype: nfs
|
||||
state: absent
|
||||
when: glance_staging_nfs_share != ''
|
||||
- name: glance-api post system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 5
|
||||
- upgrade_leapp_enabled
|
||||
block: *glance_api_host_prep_and_system_upgrade_post_tasks
|
||||
metadata_settings:
|
||||
get_attr: [TLSProxyBase, role_data, metadata_settings]
|
||||
external_upgrade_tasks:
|
||||
|
@ -178,6 +178,22 @@ resources:
|
||||
ContainerGnocchiConfigImage: {get_param: ContainerGnocchiConfigImage}
|
||||
|
||||
outputs:
|
||||
gnocchi_api_host_prep_and_system_upgrade_post_tasks:
|
||||
description: Common host_prep and system_upgrade post tasks for gnocchi_api
|
||||
value: &gnocchi_api_host_prep_and_system_upgrade_post_tasks
|
||||
- name: Mount Gnocchi NFS on host
|
||||
vars:
|
||||
nfs_backend_enabled: {get_param: GnocchiNfsEnabled}
|
||||
nfs_share: {get_param: GnocchiNfsShare}
|
||||
nfs_options: {get_param: GnocchiNfsOptions}
|
||||
file_base_path: {get_param: GnocchiFileBasePath}
|
||||
mount:
|
||||
name: "{{file_base_path}}"
|
||||
state: mounted
|
||||
src: "{{nfs_share}}"
|
||||
fstype: nfs
|
||||
opts: "{{nfs_options}}"
|
||||
when: nfs_backend_enabled
|
||||
role_data:
|
||||
description: Role data for the gnocchi API role.
|
||||
value:
|
||||
@ -434,38 +450,56 @@ outputs:
|
||||
environment:
|
||||
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
|
||||
host_prep_tasks:
|
||||
- name: create logs directory
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
setype: "{{ item.setype }}"
|
||||
mode: "{{ item.mode|default(omit) }}"
|
||||
with_items:
|
||||
- { 'path': /var/log/containers/gnocchi, 'setype': container_file_t, 'mode': '0750' }
|
||||
- { 'path': /var/log/containers/httpd/gnocchi-api, 'setype': container_file_t, 'mode': '0750' }
|
||||
- name: Mount Gnocchi NFS on host
|
||||
vars:
|
||||
nfs_backend_enabled: {get_param: GnocchiNfsEnabled}
|
||||
nfs_share: {get_param: GnocchiNfsShare}
|
||||
nfs_options: {get_param: GnocchiNfsOptions}
|
||||
file_base_path: {get_param: GnocchiFileBasePath}
|
||||
mount:
|
||||
name: "{{file_base_path}}"
|
||||
state: mounted
|
||||
src: "{{nfs_share}}"
|
||||
fstype: nfs
|
||||
opts: "{{nfs_options}}"
|
||||
when: nfs_backend_enabled
|
||||
- name: ensure GnocchiFileBasePath exists
|
||||
file:
|
||||
path: {get_param: GnocchiFileBasePath}
|
||||
state: directory
|
||||
setype: container_file_t
|
||||
- name: ensure ceph configurations exist
|
||||
file:
|
||||
path: {get_param: CephConfigPath}
|
||||
state: directory
|
||||
upgrade_tasks: []
|
||||
list_concat:
|
||||
- - name: create logs directory
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
setype: "{{ item.setype }}"
|
||||
mode: "{{ item.mode|default(omit) }}"
|
||||
with_items:
|
||||
- { 'path': /var/log/containers/gnocchi, 'setype': container_file_t, 'mode': '0750' }
|
||||
- { 'path': /var/log/containers/httpd/gnocchi-api, 'setype': container_file_t, 'mode': '0750' }
|
||||
- *gnocchi_api_host_prep_and_system_upgrade_post_tasks
|
||||
- - name: ensure GnocchiFileBasePath exists
|
||||
file:
|
||||
path: {get_param: GnocchiFileBasePath}
|
||||
state: directory
|
||||
setype: container_file_t
|
||||
- name: ensure ceph configurations exist
|
||||
file:
|
||||
path: {get_param: CephConfigPath}
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: gnocchi-api pre system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 3
|
||||
- upgrade_leapp_enabled
|
||||
block:
|
||||
- name: Unmount Gnocchi NFS share
|
||||
vars:
|
||||
nfs_backend_enabled: {get_param: GnocchiNfsEnabled}
|
||||
file_base_path: {get_param: GnocchiFileBasePath}
|
||||
mount:
|
||||
name: "{{file_base_path}}"
|
||||
state: absent
|
||||
fstype: nfs
|
||||
when: nfs_backend_enabled
|
||||
- name: gnocchi-api post system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 5
|
||||
- upgrade_leapp_enabled
|
||||
block: *gnocchi_api_host_prep_and_system_upgrade_post_tasks
|
||||
metadata_settings:
|
||||
get_attr: [ApacheServiceBase, role_data, metadata_settings]
|
||||
deploy_steps_tasks:
|
||||
|
@ -1116,6 +1116,22 @@ resources:
|
||||
ContainerNovaLibvirtConfigImage: {get_param: ContainerNovaLibvirtConfigImage}
|
||||
|
||||
outputs:
|
||||
nova_compute_host_prep_and_system_upgrade_post_tasks:
|
||||
description: Common host_prep and system_upgrade post tasks for nova_compute
|
||||
value: &nova_compute_host_prep_and_system_upgrade_post_tasks
|
||||
- name: Mount Nova NFS Share
|
||||
vars:
|
||||
nfs_backend_enable: {get_attr: [RoleParametersValue, value, nfs_backend_enable]}
|
||||
nfs_share: {get_attr: [RoleParametersValue, value, nfs_share]}
|
||||
nfs_options: {get_attr: [RoleParametersValue, value, nfs_options]}
|
||||
nfs_vers: {get_attr: [RoleParametersValue, value, nfs_vers]}
|
||||
mount:
|
||||
name: /var/lib/nova/instances
|
||||
state: mounted
|
||||
fstype: nfs4
|
||||
src: "{{nfs_share}}"
|
||||
opts: "_netdev,bg,{{nfs_options}},nfsvers={{nfs_vers}}"
|
||||
when: nfs_backend_enable|bool
|
||||
role_data:
|
||||
description: Role data for the Nova Compute service.
|
||||
value:
|
||||
@ -1468,20 +1484,8 @@ outputs:
|
||||
d /run/nova 0777 root root - -
|
||||
- name: create tempfiles
|
||||
command: systemd-tmpfiles --create
|
||||
- name: Mount Nova NFS Share
|
||||
vars:
|
||||
nfs_backend_enable: {get_attr: [RoleParametersValue, value, nfs_backend_enable]}
|
||||
nfs_share: {get_attr: [RoleParametersValue, value, nfs_share]}
|
||||
nfs_options: {get_attr: [RoleParametersValue, value, nfs_options]}
|
||||
nfs_vers: {get_attr: [RoleParametersValue, value, nfs_vers]}
|
||||
mount:
|
||||
name: /var/lib/nova/instances
|
||||
state: mounted
|
||||
fstype: nfs4
|
||||
src: "{{nfs_share}}"
|
||||
opts: "_netdev,bg,{{nfs_options}},nfsvers={{nfs_vers}}"
|
||||
when: nfs_backend_enable|bool
|
||||
- name: is Nova Resume Guests State On Host Boot enabled
|
||||
- *nova_compute_host_prep_and_system_upgrade_post_tasks
|
||||
- - 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)
|
||||
@ -1733,6 +1737,34 @@ outputs:
|
||||
state: removed
|
||||
failed_when: false
|
||||
when: step|int == 2
|
||||
- name: nova_compute pre system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 3
|
||||
- upgrade_leapp_enabled
|
||||
block:
|
||||
- name: Unmount Nova NFS Share
|
||||
vars:
|
||||
nfs_backend_enable: {get_attr: [RoleParametersValue, value, nfs_backend_enable]}
|
||||
mount:
|
||||
name: /var/lib/nova/instances
|
||||
state: absent
|
||||
fstype: nfs4
|
||||
when: nfs_backend_enable|bool
|
||||
- name: nova_compute post system_upgrade tasks
|
||||
tags:
|
||||
- never
|
||||
- system_upgrade
|
||||
- system_upgrade_run
|
||||
- system_upgrade_nfsmounts
|
||||
when:
|
||||
- step|int == 5
|
||||
- upgrade_leapp_enabled
|
||||
block: *nova_compute_host_prep_and_system_upgrade_post_tasks
|
||||
update_tasks:
|
||||
- name: Remove openstack-nova-compute and python-nova package during upgrade
|
||||
package:
|
||||
|
@ -31,11 +31,6 @@ parameters:
|
||||
default: 'false'
|
||||
description: Set to true to enable package installation at deploy time
|
||||
type: boolean
|
||||
GlanceNodeStagingUri:
|
||||
default: 'file:///var/lib/glance/staging'
|
||||
description: >
|
||||
URI that specifies the staging location to use when importing images
|
||||
type: string
|
||||
UpgradeLeappEnabled:
|
||||
description: Use Leapp for operating system upgrade
|
||||
type: boolean
|
||||
@ -299,17 +294,6 @@ outputs:
|
||||
- step|int == 4
|
||||
- upgrade_leapp_enabled
|
||||
block:
|
||||
- name: unmount and remove nfs glance entry
|
||||
mount: path=/var/lib/glance/images state=absent
|
||||
ignore_errors: true
|
||||
- name: unmount and remove nfs glance staging entry
|
||||
vars:
|
||||
glance_node_staging_uri: {get_param: GlanceNodeStagingUri}
|
||||
mount: path="{{glance_node_staging_uri[7:]}}" state=absent
|
||||
ignore_errors: true
|
||||
- name: unmount and remove nfs nova entry
|
||||
mount: path=/var/lib/nova/instances state=absent
|
||||
ignore_errors: true
|
||||
- name: "Delete the kernel modules in Leapp database (device_driver_deprecation_data.json)"
|
||||
vars:
|
||||
modules_to_unload: { get_attr: [RoleParametersValue, value, 'upgrade_leapp_modules_to_unload']}
|
||||
|
Loading…
x
Reference in New Issue
Block a user