attempt to auto drain/re-add openshift nodes on vhost_reboot
Signed-off-by: Rick Elrod <relrod@redhat.com>
This commit is contained in:
parent
df29fee84c
commit
fe33d75cbf
1 changed files with 16 additions and 0 deletions
|
@ -44,6 +44,11 @@
|
||||||
serial: 1
|
serial: 1
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: drain OS node if necessary
|
||||||
|
command: oc adm drain {{inventory_hostname }} --ignore-daemonsets --delete-local-data
|
||||||
|
delegate_to: os-master01{{env_suffix}.phx2.fedoraproject.org
|
||||||
|
when: inventory_hostname.startswith('os-node')
|
||||||
|
|
||||||
- name: schedule regular host downtime
|
- name: schedule regular host downtime
|
||||||
nagios: action=downtime minutes=30 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
nagios: action=downtime minutes=30 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
||||||
delegate_to: noc01.phx2.fedoraproject.org
|
delegate_to: noc01.phx2.fedoraproject.org
|
||||||
|
@ -102,6 +107,17 @@
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when: nonagios is not defined or not nonagios
|
when: nonagios is not defined or not nonagios
|
||||||
|
|
||||||
|
- name: post reboot tasks
|
||||||
|
hosts: newvmlist
|
||||||
|
user: root
|
||||||
|
gather_facts: False
|
||||||
|
serial: 1
|
||||||
|
|
||||||
|
- name: Add back to openshift
|
||||||
|
command: oc adm uncordon {{inventory_hostname}}
|
||||||
|
delegate_to: os-master01{{env_suffix}.phx2.fedoraproject.org
|
||||||
|
when: inventory_hostname.startswith('os-node')
|
||||||
|
|
||||||
# Call out to that dns playbook. Put proxies back in now that they're back
|
# Call out to that dns playbook. Put proxies back in now that they're back
|
||||||
- import_playbook: update-proxy-dns.yml status=enable proxies=myvms_new:&proxies
|
- import_playbook: update-proxy-dns.yml status=enable proxies=myvms_new:&proxies
|
||||||
when: nodns is not defined or not nodns
|
when: nodns is not defined or not nodns
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue