Andy Bavier | 8cdaa5f | 2016-12-07 12:32:16 -0500 | [diff] [blame] | 1 | --- |
| 2 | # platform-check/tasks/main.yml |
| 3 | |
| 4 | - name: Ensure br-int exists on all compute nodes (check VTN) |
| 5 | shell: ansible -i /etc/maas/ansible/pod-inventory compute -u ubuntu -m shell -s -a "ovs-vsctl br-exists br-int" |
| 6 | register: result |
| 7 | until: result | success |
| 8 | retries: 6 |
| 9 | delay: 10 |
| 10 | ignore_errors: yes |
| 11 | tags: |
| 12 | - skip_ansible_lint # running a sub job |
| 13 | |
| 14 | # Work around issues with ONOS intialization |
| 15 | - name: Restart ONOS when VTN initialization failed |
| 16 | when: result | failed |
| 17 | shell: docker-compose stop; docker-compose rm -f; docker-compose up -d |
| 18 | args: |
| 19 | chdir: "{{ onos_cord_dest }}" |
| 20 | tags: |
| 21 | - skip_ansible_lint |
| 22 | |
| 23 | - name: Tell XOS to refresh VTN configuration |
| 24 | when: result | failed |
| 25 | make: |
| 26 | chdir: "{{ service_profile_repo_dest }}/{{ xos_configuration }}" |
| 27 | target: vtn |
| 28 | |
| 29 | - name: Ensure br-int exists on all compute nodes (check VTN #2) |
| 30 | when: result | failed |
| 31 | shell: ansible -i /etc/maas/ansible/pod-inventory compute -u ubuntu -m shell -s -a "ovs-vsctl br-exists br-int" |
| 32 | register: result2 |
| 33 | until: result2 | success |
| 34 | retries: 12 |
| 35 | delay: 10 |
| 36 | tags: |
| 37 | - skip_ansible_lint # running a sub job |
| 38 | |