Run kolla-ansible limit on compute node cause creating Nova databases

Bug #1739721 reported by Zhijiang Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Confirmed
Medium
Unassigned

Bug Description

I would like to let kolla-ansible run plays for compute nodes only without touching existing control nodes(which are not deployed by kolla-ansible).
But if I run kolla-ansible with --limit compute_node, The ansible tasks of creating Nova databases still run which seems wrong, and I got failure like the following if I erase all control nodes from inventory file.

TASK [nova : include] ***********************************************************************************************************************************************************
included: /home/huzhj/daisy4nfv_inner_repo/daisy4nfv/kolla-ansible/ansible/roles/nova/tasks/bootstrap.yml for tanabata

TASK [nova : Creating Nova databases] *******************************************************************************************************************************************
fatal: [tanabata]: FAILED! => {"failed": true, "msg": "list object has no element 0"}

NO MORE HOSTS LEFT **************************************************************************************************************************************************************
        to retry, use: --limit @/home/huzhj/daisy4nfv_inner_repo/daisy4nfv/kolla-ansible/ansible/site.retry

PLAY RECAP **********************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0
tanabata : ok=30 changed=19 unreachable=0 failed=1

Command failed ansible-playbook -i ./ansible/inventory/multinode -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e action=deploy /home/huzhj/daisy4nfv_inner_repo/daisy4nfv/kolla-ansible/ansible/site.yml

My inventory file is like this:

[control]

[network]

[compute]
tanabata

[monitoring]

[storage]

[deployment]
localhost ansible_connection=local
...

I took a look at ansible/roles/nova/tasks/deploy.yml, it shows that bootstrap.yml runs for both nova-api and compute groups, why we need to do like this? I thought bootstrap.yml is for nova-api group only, isn't it?

- include: bootstrap.yml
  when: inventory_hostname in groups['nova-api'] or
        inventory_hostname in groups['compute']

Tags: nova
Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

we may should add "when" to creating database tasks.

Changed in kolla-ansible:
status: New → Confirmed
importance: Undecided → Medium
Tom Fifield (fifieldt)
tags: added: nova
Revision history for this message
Roman Krček (r-krcek) wrote :

This issue can be solved by setting "use_preconfigured_databases" to "yes" in "share/kolla-ansible/ansible/group_vars/all.yml" this way, the deployment won't access the control nodes and the deployment with your mentioned inventory file will succeed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.