From af2acb25e5c216461ae21b47841ab51b5ce6404a Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 20 Feb 2017 01:03:11 +0800 Subject: [PATCH] Do not failed when there is no nova-compute is running In ironic environment deployment, the compute nodes info will be empty until ironic node is created. There are also some case that user just want deploy without any nova-compute. Also enable auto discover hosts feature. This is useful for small environment. Closes-Bug: #1666031 Change-Id: I6f3d1c3668452a404875aa5621ee99b2b41e28f0 --- ansible/roles/nova/tasks/simple_cell_setup.yml | 3 +++ ansible/roles/nova/templates/nova.conf.j2 | 1 + 2 files changed, 4 insertions(+) diff --git a/ansible/roles/nova/tasks/simple_cell_setup.yml b/ansible/roles/nova/tasks/simple_cell_setup.yml index 14d0112bde..30c5e70d17 100644 --- a/ansible/roles/nova/tasks/simple_cell_setup.yml +++ b/ansible/roles/nova/tasks/simple_cell_setup.yml @@ -26,5 +26,8 @@ changed_when: - cell_setup | success - '"Cell0 is already setup" not in cell_setup.stdout' + failed_when: + - cell_setup.rc != 0 + - '"No hosts found to map to cell, exiting." not in cell_setup.stdout' run_once: True delegate_to: "{{ groups['nova-api'][0] }}" diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index 6b91bd0cc0..478dfddf47 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -229,6 +229,7 @@ api_paste_config = /etc/nova/api-paste.ini [scheduler] max_attempts = 10 +discover_hosts_in_cells_interval = 60 # TODO(sdake): rework this hacky workaround after the placement API is # implemented in the Kolla-kubernetes deliverable.