This repository has been archived by the owner on Feb 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 266
Conversation
This file contains 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
Can one of the admins verify this patch? |
cpanato
changed the title
[WIP] tests: add master and worker role
tests: add master and worker role
Mar 21, 2018
enxebre
approved these changes
Mar 21, 2018
wking
added a commit
to wking/openshift-installer
that referenced
this pull request
Aug 24, 2018
I'm not authorized to assume roles in the teamcoreservices account, and the assume-role call errors out with: An error occurred (AccessDenied) when calling the AssumeRole operation: Not authorized to perform sts:AssumeRole That's fine though; I can still launch the cluster with my usual access. This commit makes the role assumption optional. I've made setting up the AWS_* access variables conditional on successful role assumption, because setting them based on an empty $RES wouldn't work ;). Using the && chain with a terminal || keeps the script from dying on this assume-role failure. From the 'set -e' docs [1]: The shell does not exit if the command that fails is ... part of any command executed in a && or || list except the command following the final && or ||... I'm also only setting iamRoleName configs if assume-role succeeded. We've been setting iamRoleName since the script landed in a2405e4 (run smoke tests with bash script, 2018-06-18, coreos/tectonic-installer#3284) and possibly before that since 82daae1 (tests: add etcd role, 2018-03-14, coreos/tectonic-installer#3074). I don't see anything in those commits or PRs to motivate the iamRoleName entries, but I'd guess they, like the tf-tectonic-installer role, are specific to the Jenkins setup. I've tied them together with CONFIGURE_AWS_ROLES based on that similarity, although in theory you may be able to toggle the iamRoleName settings independently of assume-role success. Even though the &&/|| chain sets CONFIGURE_AWS_ROLES=False when assume-role failes, I'm using ${CONFIGURE_AWS_ROLES:-False} in the Python script. That way, future versions of this script that support libvirt (or other backends) won't need to bother setting CONFIGURE_AWS_ROLES and will still get valid Python here. The :- syntax is specified in [2], and my expansion defaults to False if CONFIGURE_AWS_ROLES is unset or empty. [1]: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html [2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
wking
added a commit
to wking/openshift-installer
that referenced
this pull request
Aug 24, 2018
I'm not authorized to assume roles in the teamcoreservices account, and the assume-role call errors out with: An error occurred (AccessDenied) when calling the AssumeRole operation: Not authorized to perform sts:AssumeRole That's fine though; I can still launch the cluster with my usual access. This commit makes the role assumption optional. I've made setting up the AWS_* access variables conditional on successful role assumption, because setting them based on an empty $RES wouldn't work ;). Using the && chain with a terminal || keeps the script from dying on this assume-role failure. From the 'set -e' docs [1]: The shell does not exit if the command that fails is ... part of any command executed in a && or || list except the command following the final && or ||... I'm also only setting iamRoleName configs if assume-role succeeded. We've been setting iamRoleName since the script landed in a2405e4 (run smoke tests with bash script, 2018-06-18, coreos/tectonic-installer#3284) and possibly before that since 82daae1 (tests: add etcd role, 2018-03-14, coreos/tectonic-installer#3074). I don't see anything in those commits or PRs to motivate the iamRoleName entries, but I'd guess they, like the tf-tectonic-installer role, are specific to the Jenkins setup. I've tied them together with CONFIGURE_AWS_ROLES based on that similarity, although in theory you may be able to toggle the iamRoleName settings independently of assume-role success. Even though the &&/|| chain sets CONFIGURE_AWS_ROLES=False when assume-role failes, I'm using ${CONFIGURE_AWS_ROLES:-False} in the Python script. That way, future versions of this script that support libvirt (or other backends) won't need to bother setting CONFIGURE_AWS_ROLES and will still get valid Python here. The :- syntax is specified in [2], and my expansion defaults to False if CONFIGURE_AWS_ROLES is unset or empty. [1]: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html [2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
wking
added a commit
to wking/openshift-installer
that referenced
this pull request
Aug 24, 2018
I'm not authorized to assume roles in the teamcoreservices account, and the assume-role call errors out with: An error occurred (AccessDenied) when calling the AssumeRole operation: Not authorized to perform sts:AssumeRole That's fine though; I can still launch the cluster with my usual access. This commit makes the role assumption optional. I've made setting up the AWS_* access variables conditional on successful role assumption, because setting them based on an empty $RES wouldn't work ;). Using the && chain with a terminal || keeps the script from dying on this assume-role failure. From the 'set -e' docs [1]: The shell does not exit if the command that fails is ... part of any command executed in a && or || list except the command following the final && or ||... I'm also only setting iamRoleName configs if assume-role succeeded. We've been setting iamRoleName since the script landed in a2405e4 (run smoke tests with bash script, 2018-06-18, coreos/tectonic-installer#3284) and possibly before that since 82daae1 (tests: add etcd role, 2018-03-14, coreos/tectonic-installer#3074). I don't see anything in those commits or PRs to motivate the iamRoleName entries, but I'd guess they, like the tf-tectonic-installer role, are specific to the Jenkins setup. I've tied them together with CONFIGURE_AWS_ROLES based on that similarity, although in theory you may be able to toggle the iamRoleName settings independently of assume-role success. Even though the &&/|| chain sets CONFIGURE_AWS_ROLES=False when assume-role failes, I'm using ${CONFIGURE_AWS_ROLES:-False} in the Python script. That way, future versions of this script that support libvirt (or other backends) won't need to bother setting CONFIGURE_AWS_ROLES and will still get valid Python here. The :- syntax is specified in [2], and my expansion defaults to False if CONFIGURE_AWS_ROLES is unset or empty. [1]: https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html [2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
fixes: INST-972