Unmount NFS shares before launching LEAPP

There is an inhibitor which will stop upgrade if there are NFS shares
mounted.

Change-Id: Ifb44c70e8becc94453b0c086858985d76b2455a6
Closes-Bug: 1884926
This commit is contained in:
Giulio Fidente 2020-07-03 14:10:33 +02:00
parent c21cc82e0b
commit 4157d58320
1 changed files with 19 additions and 3 deletions

View File

@ -51,6 +51,11 @@ parameters:
echo "and passed the upstream name (rocky, stein, train) of the release as first argument"
exit 1
type: string
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
@ -215,19 +220,30 @@ outputs:
- never
- system_upgrade
- system_upgrade_prepare
when: step|int == 4
when:
- 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: set leapp options
shell: >
leapp answer --section remove_pam_pkcs11_module_check.confirm=True --add
when: upgrade_leapp_enabled
- name: run leapp upgrade (download packages)
shell: >
{% if upgrade_leapp_devel_skip|default(false) %}{{ upgrade_leapp_devel_skip }}{% endif %}
leapp upgrade
{% if upgrade_leapp_debug|default(true) %}--debug{% endif %}
{% if upgrade_leapp_command_options|default(false) %}{{ upgrade_leapp_command_options }}{% endif %}
when: upgrade_leapp_enabled
- name: system_upgrade_run step 4
tags: