From 33bd2fd85402dfcd8862fb0434aeb7a0b06e9374 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Tue, 23 May 2017 09:58:09 +0100 Subject: [PATCH] Get Cell UUID based on Cell name variable In I751ea370819379687b04f06e71afa68579bcbc69 we added steps to check for cell1 UUID and then map instances accordingly. We should do this based on the name variable and not a forced "cell1" value. Change-Id: Iee6d6a80fa487ea00055edaef389047d80687c06 --- tasks/nova_db_post_setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/nova_db_post_setup.yml b/tasks/nova_db_post_setup.yml index e7a38b95..96c18103 100644 --- a/tasks/nova_db_post_setup.yml +++ b/tasks/nova_db_post_setup.yml @@ -27,7 +27,7 @@ # When upgrading we need to map existing instances to the new cell1 # To do this we need the cell UUID. - name: Get UUID of new Nova Cell - shell: "{{ nova_bin }}/nova-manage --config-file /etc/nova/nova.conf cell_v2 list_cells | awk '/cell1/ {print $4}'" + shell: "{{ nova_bin }}/nova-manage --config-file /etc/nova/nova.conf cell_v2 list_cells | awk '/{{ nova_cell1_name }}/ {print $4}'" become: yes become_user: "{{ nova_system_user_name }}" when: "{{ nova_cell1_create.rc == 0 }}"