diff options
| author | Doug Szumski <doug@stackhpc.com> | 2019-09-03 17:42:19 +0100 |
|---|---|---|
| committer | Doug Szumski <doug@stackhpc.com> | 2019-09-03 18:12:14 +0100 |
| commit | 7b636033ee5e40ba90bce1fa95fe5432e344acfc (patch) | |
| tree | 872b7c0508d9cd122767914fbdbda9b6dc4f238a /ansible | |
| parent | 92008433e5f1a166f47e6934b755c84ca22d7ff3 (diff) | |
| download | kolla-ansible-7b636033ee5e40ba90bce1fa95fe5432e344acfc.tar.gz kolla-ansible-7b636033ee5e40ba90bce1fa95fe5432e344acfc.zip | |
Fix Nova cell search
The output from `nova-manage cell_v2 list_cells --verbose` contains
an extra column, stating whether the cell is enabled or not. This means
that the regex never matches, so existing_cells is always empty.
This fix updates the regex by adding a match group for this field which
may be used in a later change.
Unfortuately the CLI doesn't output in JSON format, which would make
this a lot less messy.
Closes-Bug: #1842460
Change-Id: Ib6400b33785f3ef674bffc9329feb3e33bd3f9a3
Diffstat (limited to 'ansible')
| -rw-r--r-- | ansible/roles/nova/tasks/create_cells.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ansible/roles/nova/tasks/create_cells.yml b/ansible/roles/nova/tasks/create_cells.yml index c46e2b422..1da1188ab 100644 --- a/ansible/roles/nova/tasks/create_cells.yml +++ b/ansible/roles/nova/tasks/create_cells.yml @@ -55,10 +55,10 @@ # cell0), followed by two other columns, the first containing the transport # URL and the second the database connection. For example: # - # | None | 68a3f49e-27ec-422f-9e2e-2a4e5dc8291b | rabbit://openstack:password@1.2.3.4:5672 | mysql+pymysql://nova:password@1.2.3.4:3306/nova | + # | None | 68a3f49e-27ec-422f-9e2e-2a4e5dc8291b | rabbit://openstack:password@1.2.3.4:5672 | mysql+pymysql://nova:password@1.2.3.4:3306/nova | False | # # NOTE(priteau): regexp doesn't support passwords containing spaces - regexp: '\| +(?!00000000-0000-0000-0000-000000000000)([0-9a-f\-]+) +\| +([^ ]+) +\| +([^ ]+) +\|$' + regexp: '\| +(?!00000000-0000-0000-0000-000000000000)([0-9a-f\-]+) +\| +([^ ]+) +\| +([^ ]+) +\| +([^ ]+) +\|$' set_fact: existing_cells: "{{ existing_cells_list.stdout | regex_findall(regexp, multiline=True) }}" run_once: True |
