Skip to content

Commit

Permalink
#820 Dry-run for MCO
Browse files Browse the repository at this point in the history
  • Loading branch information
fketelaars committed Dec 3, 2024
1 parent cd915ba commit cfa3881
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@
- not _mco_exists
- _existing_ocp_infra_type != 'ibm-roks'

- name: Pause the MachineConfig operator to disable rebooting of compute nodes
shell: |
oc patch --type=merge --patch='{"spec":{"paused":true}}' machineconfigpool/worker
- include_role:
name: run-command
vars:
_p_command_description: Pause the MachineConfig operator to disable rebooting of compute nodes
_p_command: oc patch --type=merge --patch='{"spec":{"paused":true}}' machineconfigpool/worker
when:
- _mco_exists
- _existing_ocp_infra_type != 'aws-rosa'

- include_tasks: non-mco-prepare-node-settings.yml
when: not _mco_exists
when:
- not _mco_exists
- not cpd_dry_run
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
- name: Apply the node settings if the Machine Config Operator does not exist
include_tasks: non-mco-apply-node-settings.yml
when:
- not _mco_exists
- not _mco_exists
- not cpd_dry_run
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
- name: Allow MachineConfig operator to reboot compute nodes again
shell: |
oc patch --type=merge --patch='{"spec":{"paused":false}}' machineconfigpool/worker
- include_role:
name: run-command
vars:
_p_command_description: Allow MachineConfig operator to reboot compute nodes again
_p_command: oc patch --type=merge --patch='{"spec":{"paused":false}}' machineconfigpool/worker

- name: Get number of compute nodes
shell: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
shell: |
oc get -n openshift-ingress-operator ingresscontrollers/default -o jsonpath='{.spec.defaultCertificate.name}'
register: _current_ingress_certificate_result
failed_when: False

- set_fact:
_current_certificate: "{{ _current_ingress_certificate_result.stdout }}"
Expand Down

0 comments on commit cfa3881

Please sign in to comment.