Skip to content
Snippets Groups Projects
Commit 233f2b6d authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Update simple_cell_setup to manual creation"

parents a910be91 5dfb81ef
No related branches found
No related tags found
No related merge requests found
--- ---
#- name: Waiting for nova-compute service up - name: Create cell0 mappings
# command: > command: >
# docker exec kolla_toolbox openstack docker exec nova_api nova-manage cell_v2 map_cell0
# --os-interface internal register: map_cell0
# --os-auth-url {{ keystone_admin_url }} changed_when:
# --os-identity-api-version 3 - map_cell0 | success
# --os-project-domain-name default - '"Cell0 is already setup" not in map_cell0.stdout'
# --os-tenant-name admin failed_when:
# --os-username admin - map_cell0.rc != 0
# --os-password {{ keystone_admin_password }} run_once: True
# --os-user-domain-name default delegate_to: "{{ groups['nova-api'][0] }}"
# compute service list -f json --service nova-compute
# register: nova_compute_services - include: bootstrap_service.yml
# changed_when: false when: map_cell0.changed
# run_once: True
# delegate_to: "{{ groups['nova-api'][0] }}"
# retries: 20
# delay: 10
# until:
# - nova_compute_services | success
# - nova_compute_services.stdout | from_json | length != 0
# NOTE (egonzalez) Remove after service-list is fixed - name: Create base cell for legacy instances
- name: TMP Waiting for nova-compute service up
command: > command: >
docker exec kolla_toolbox mysql docker exec nova_api nova-manage cell_v2 create_cell
-unova -p{{ nova_database_password }} register: base_cell
-h {{ database_address }} nova changed_when:
-e "SELECT topic from services WHERE topic = 'compute'"; - base_cell | success
failed_when:
- base_cell.rc != 0
- '"already exists" not in base_cell.stdout'
run_once: True
delegate_to: "{{ groups['nova-api'][0] }}"
- name: Waiting for nova-compute service up
command: >
docker exec kolla_toolbox openstack
--os-interface internal
--os-auth-url {{ keystone_admin_url }}
--os-identity-api-version 3
--os-project-domain-name default
--os-tenant-name admin
--os-username admin
--os-password {{ keystone_admin_password }}
--os-user-domain-name default
compute service list -f json --service nova-compute
register: nova_compute_services register: nova_compute_services
changed_when: false changed_when: false
run_once: True run_once: True
...@@ -36,16 +46,12 @@ ...@@ -36,16 +46,12 @@
delay: 10 delay: 10
until: until:
- nova_compute_services | success - nova_compute_services | success
- nova_compute_services.stdout | length != 0 - nova_compute_services.stdout | from_json | length != 0
- name: Running nova simple cell setup - name: Discovering nova hosts
command: docker exec nova_api nova-manage cell_v2 simple_cell_setup command: >
register: cell_setup docker exec nova_api nova-manage cell_v2 discover_hosts
changed_when: register: discover_hosts
- cell_setup | success changed_when: False
- '"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 run_once: True
delegate_to: "{{ groups['nova-api'][0] }}" delegate_to: "{{ groups['nova-api'][0] }}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment