Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Fixed some issues with startup and shutdown scripts.
Browse files Browse the repository at this point in the history
This addresses #8
  • Loading branch information
rmkraus committed May 8, 2020
1 parent c61eedd commit aa5d66e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/plugins/callback/my_dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,6 @@ def v2_playbook_on_stats(self, stats):


# When using -vv or higher, simply do the default action
if display.verbosity >= 2:
if display.verbosity >= 0:
CallbackModule = CallbackModule_default

10 changes: 10 additions & 0 deletions app/roles/hypervisor/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@
# shell alternative:
# nmcli -f ipv4 con sh eno1 | grep -v '\-\-' | sed 's/(.*)//g;s/: */ /g;s/\n/ /g' | tr '\n' ' ' | xargs nmcli con mod farosbr0

- name: ensure no dhcp booting
shell: nmcli con mod farosbr0 "{{ key }}" "{{ target }}"
loop:
- key: ipv4.method
target: manual
when:
- br_facts != []
- br_facts[0][item.key] != item.target
notify: restart networking

- name: disable the default interface
shell: nmcli con mod {{ hypervisor_network_interface }} "{{ item.key }}" "{{ item.target }}"
loop:
Expand Down
2 changes: 1 addition & 1 deletion app/roles/ocp-reset-csrs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
delegate_to: localhost
become: no

- name: wait for operators to repair
- name: wait for operators to trigger repair
pause:
seconds: 30

Expand Down
38 changes: 37 additions & 1 deletion app/startup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,50 @@
management_pass: "{{ mgmt_password }}"
register: poweron

- name: wait for 3 minutes for nodes to come back up
- name: wait 3 minutes for nodes to come back up
pause:
minutes: 3
when: poweron is changed

- name: wait for control plane nodes to come back
wait_for_connection:

- name: restart the cluster
hosts: localhost
gather_facts: no
become: no

tasks:
- name: wait for cluster to be responsive
shell: >
oc --kubeconfig='/data/openshift-installer/auth/kubeconfig'
get nodes
register: get_nodes
until: get_nodes is not failed
retries: 60
delay: 5
delegate_to: localhost
become: no
run_once: yes
changed_when: no

- name: wait 1 minute for the cluster operators to start healing
pause:
minutes: 1

- name: wait for cluster operators to recover
k8s_info:
kubeconfig: /data/openshift-installer/auth/kubeconfig
api_version: config.openshift.io/v1
kind: ClusterOperator
register: get_co
until: get_co.resources | ClusterOpCheck
retries: 60
delay: 5
delegate_to: localhost
become: no
run_once: yes

- name: get pending CSRs
k8s_info:
kubeconfig: /data/openshift-installer/auth/kubeconfig
Expand Down

0 comments on commit aa5d66e

Please sign in to comment.