Skip to content

Commit

Permalink
Merge pull request #4784 from abutcher/noop-scaleup
Browse files Browse the repository at this point in the history
Fail scaleup configuration when there are no new_nodes or new_masters
  • Loading branch information
sdodson authored Aug 18, 2017
2 parents ea491f0 + eec2f31 commit d44838a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions playbooks/byo/openshift-master/scaleup.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
---
- include: ../openshift-cluster/initialize_groups.yml

- name: Ensure there are new_masters
hosts: localhost
connection: local
become: no
gather_facts: no
tasks:
- fail:
msg: >
Detected no new_masters or no new_nodes in inventory. Please
add hosts to the new_masters and new_nodes host groups to add
masters.
when:
- (g_new_master_hosts | default([]) | length == 0) or (g_new_node_hosts | default([]) | length == 0)

- include: ../../common/openshift-master/scaleup.yml
vars:
openshift_cluster_id: "{{ cluster_id | default('default') }}"
Expand Down
13 changes: 13 additions & 0 deletions playbooks/byo/openshift-node/scaleup.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
---
- include: ../openshift-cluster/initialize_groups.yml

- name: Ensure there are new_nodes
hosts: localhost
connection: local
become: no
gather_facts: no
tasks:
- fail:
msg: >
Detected no new_nodes in inventory. Please add hosts to the
new_nodes host group to add nodes.
when:
- g_new_node_hosts | default([]) | length == 0

- include: ../../common/openshift-node/scaleup.yml
vars:
openshift_cluster_id: "{{ cluster_id | default('default') }}"
Expand Down

0 comments on commit d44838a

Please sign in to comment.