Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail scaleup configuration when there are no new_nodes or new_masters #4784

Merged
merged 1 commit into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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