From 9ef8c437805e9f3e6d230c801c0c0e2fbeefdc52 Mon Sep 17 00:00:00 2001 From: Bjoern Teipel Date: Tue, 24 May 2016 15:20:06 -0500 Subject: [PATCH] Cleanup Nova console proxy git repos before updating it This fix removes /usr/share/spice-html5 and /usr/share/novnc before updating it in order to prevent git clone issues where simple git resets seem not clean enough. Change-Id: I8abdffc2377b68fc40a6a9b678f24eb99a0bc537 Closes-Bug: #1585331 --- .../nova-console-proxy-git-cleanup-cdeffd3f0d040275.yaml | 8 ++++++++ tasks/nova_console_novnc_install.yml | 8 ++++++++ tasks/nova_console_spice_install.yml | 7 +++++++ 3 files changed, 23 insertions(+) create mode 100644 releasenotes/notes/nova-console-proxy-git-cleanup-cdeffd3f0d040275.yaml diff --git a/releasenotes/notes/nova-console-proxy-git-cleanup-cdeffd3f0d040275.yaml b/releasenotes/notes/nova-console-proxy-git-cleanup-cdeffd3f0d040275.yaml new file mode 100644 index 00000000..112739b0 --- /dev/null +++ b/releasenotes/notes/nova-console-proxy-git-cleanup-cdeffd3f0d040275.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - Cleanup tasks are added to remove the nova console git + directories ``/usr/share/novnc`` and ``/usr/share/spice-html5``, + prior to cloning these inside the nova vnc and spice + console playbooks. This is necessary to guarantee + that local modifications do not break git clone + operations, especially during upgrades. diff --git a/tasks/nova_console_novnc_install.yml b/tasks/nova_console_novnc_install.yml index 5b3f419d..bee26b5d 100644 --- a/tasks/nova_console_novnc_install.yml +++ b/tasks/nova_console_novnc_install.yml @@ -13,6 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +- name: Remove old git directory + file: + path: "/usr/share/novnc" + state: "absent" + tags: + - nova-install + - nova-novnc-git + - name: Get package from git git: repo: "{{ nova_novncproxy_git_repo }}" diff --git a/tasks/nova_console_spice_install.yml b/tasks/nova_console_spice_install.yml index 353cde81..b64d2191 100644 --- a/tasks/nova_console_spice_install.yml +++ b/tasks/nova_console_spice_install.yml @@ -45,6 +45,13 @@ - nova-apt-packages - nova-spice-apt-packages +- name: Remove old git directory + file: + path: "/usr/share/spice-html5" + state: "absent" + tags: + - nova-spice-git + - name: Get package from git git: repo: "{{ nova_spicehtml5_git_repo }}"