blob: a67e837dfdc1d0b43cba16da88229ab82a4876e4 [file] [log] [blame]
---
# platform-check/tasks/main.yml
- name: Ensure br-int exists on all compute nodes (check VTN)
shell: ansible -i /etc/maas/ansible/pod-inventory compute -u ubuntu -m shell -s -a "ovs-vsctl br-exists br-int"
register: result
until: result | success
retries: 6
delay: 10
ignore_errors: yes
tags:
- skip_ansible_lint # running a sub job
# Work around issues with ONOS intialization
- name: Restart ONOS when VTN initialization failed
when: result | failed
shell: docker-compose stop; docker-compose rm -f; docker-compose up -d
args:
chdir: "{{ onos_cord_dest }}"
tags:
- skip_ansible_lint
- name: Tell XOS to refresh VTN Service and compute nodes
when: result | failed
xostosca:
url: "http://xos.{{ site_suffix }}:{{ xos_ui_port }}/api/utility/tosca/run/"
user: "{{ xos_admin_user }}"
password: "{{ xos_admin_pass }}"
recipe: "{{ lookup('file', cord_profile_dir + '/' + item ) }}"
with_items:
- openstack.yaml
- openstack-compute.yaml
- vtn-service.yaml
- name: Pause to work around race in VTN or ONOS synchronizers
pause:
seconds: 20
- name: Enable VTN for OpenStack Compute nodes
when: result | failed
xostosca:
url: "http://xos.{{ site_suffix }}:{{ xos_ui_port }}/api/utility/tosca/run/"
user: "{{ xos_admin_user }}"
password: "{{ xos_admin_pass }}"
recipe: "{{ lookup('file', cord_profile_dir + '/' + item ) }}"
with_items:
- openstack-compute-vtn.yaml
- name: Ensure br-int exists on all compute nodes (check VTN #2)
when: result | failed
shell: ansible -i /etc/maas/ansible/pod-inventory compute -u ubuntu -m shell -s -a "ovs-vsctl br-exists br-int"
register: result2
until: result2 | success
retries: 12
delay: 10
tags:
- skip_ansible_lint # running a sub job