-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix master scaleup #6793
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
Merged
openshift-merge-robot
merged 1 commit into
openshift:master
from
mgugino-upstream-stage:fix-master-scaleup
Jan 22, 2018
Merged
Fix master scaleup #6793
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,43 @@ | ||
| --- | ||
| - import_playbook: ../init/evaluate_groups.yml | ||
|
|
||
| - name: Ensure there are new_masters or new_nodes | ||
| - name: Ensure there are new_masters and new_nodes | ||
| hosts: localhost | ||
| connection: local | ||
| gather_facts: no | ||
| tasks: | ||
| - fail: | ||
| # new_masters must be part of new_nodes as well; otherwise if new_nodes | ||
| # is not present, oo_nodes_to_config will contain all existing nodes. | ||
| 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 | ||
| - g_new_node_hosts | default([]) | length == 0 | ||
| Detected no new_masters and/or no new_nodes in inventory. New | ||
| masters must be part of both new_masters and new_nodes groups. | ||
| If you are adding just new_nodes, use the | ||
| playbooks/openshift-node/scaleup.yml play. | ||
| when: > | ||
| g_new_master_hosts | default([]) | length == 0 | ||
| or g_new_node_hosts | default([]) | length == 0 | ||
|
|
||
| # Need a better way to do the above check for node without | ||
| # running evaluate_groups and init/main.yml | ||
| - import_playbook: ../init/main.yml | ||
| - name: Ensure there are new_masters and new_nodes | ||
| hosts: oo_masters_to_config | ||
| connection: local | ||
| gather_facts: no | ||
| tasks: | ||
| - fail: | ||
| # new_masters must be part of new_nodes as well; | ||
| msg: > | ||
| Each host in new_masters must also appear in new_nodes | ||
| when: inventory_hostname not in groups['oo_nodes_to_config'] | ||
|
|
||
| - import_playbook: ../prerequisites.yml | ||
| vars: | ||
| l_scale_up_hosts: "oo_nodes_to_config:oo_masters_to_config" | ||
| l_init_fact_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config:oo_nodes_to_config" | ||
| l_sanity_check_hosts: "{{ groups['oo_nodes_to_config'] | union(groups['oo_masters_to_config']) }}" | ||
|
|
||
| - import_playbook: ../init/version.yml | ||
| vars: | ||
| l_openshift_version_set_hosts: "oo_masters_to_config:oo_nodes_to_config:!oo_first_master" | ||
| l_openshift_version_check_hosts: "oo_masters_to_config:oo_nodes_to_config" | ||
|
|
||
| - import_playbook: private/scaleup.yml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why wouldn't
scaleupdisallow scaling up dedicated mastersThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our masters must be nodes for various reasons, mainly they need to be on the SDN but in 3.9 masters will actually be expected to run the console pods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually run the node scaleup playbook to complete the node specific tasks or do we need to document the need to run node scaleup too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sdodson this openshift-master/private/scaleup.yml and openshift-node/private/scaleup.yml both call openshift-node/private/config.yml. There is no need to run openshift-node/scaleup in addition to this play if you're adding both masters and nodes. The nodes were already being configured at the same time as masters, according to our plays.
If one is adding nodes and 0 masters, then they can run openshift-node/scaleup.yml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see, makes sense.
Yes, the node is being setup there