blob: bd9347e2b9eea8c9e79bd71b3100720395203d97 [file] [log] [blame]
Andy Bavier8cdaa5f2016-12-07 12:32:16 -05001---
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:
Zack Williamsc989f262017-05-11 13:02:59 -070019 chdir: "{{ head_onos_cord_dir }}"
Andy Bavier8cdaa5f2016-12-07 12:32:16 -050020 tags:
21 - skip_ansible_lint
22
Zack Williamsa2763112017-01-03 11:38:38 -070023- name: Tell XOS to refresh VTN Service and compute nodes
Andy Bavier8cdaa5f2016-12-07 12:32:16 -050024 when: result | failed
Zack Williamsa2763112017-01-03 11:38:38 -070025 xostosca:
26 url: "http://xos.{{ site_suffix }}:{{ xos_ui_port }}/api/utility/tosca/run/"
27 user: "{{ xos_admin_user }}"
28 password: "{{ xos_admin_pass }}"
Zack Williamsc989f262017-05-11 13:02:59 -070029 recipe: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
Zack Williamsa2763112017-01-03 11:38:38 -070030 with_items:
31 - openstack.yaml
32 - openstack-compute.yaml
33 - vtn-service.yaml
34
35- name: Pause to work around race in VTN or ONOS synchronizers
36 pause:
37 seconds: 20
38
39- name: Enable VTN for OpenStack Compute nodes
40 when: result | failed
41 xostosca:
42 url: "http://xos.{{ site_suffix }}:{{ xos_ui_port }}/api/utility/tosca/run/"
43 user: "{{ xos_admin_user }}"
44 password: "{{ xos_admin_pass }}"
Zack Williamsc989f262017-05-11 13:02:59 -070045 recipe: "{{ lookup('file', head_cord_profile_dir + '/' + item ) }}"
Zack Williamsa2763112017-01-03 11:38:38 -070046 with_items:
47 - openstack-compute-vtn.yaml
Andy Bavier8cdaa5f2016-12-07 12:32:16 -050048
49- name: Ensure br-int exists on all compute nodes (check VTN #2)
50 when: result | failed
51 shell: ansible -i /etc/maas/ansible/pod-inventory compute -u ubuntu -m shell -s -a "ovs-vsctl br-exists br-int"
52 register: result2
53 until: result2 | success
54 retries: 12
55 delay: 10
56 tags:
57 - skip_ansible_lint # running a sub job
58