-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
openshift/installer: add IaaS-agnostic E2E test #4148
Conversation
set -eux | ||
target=$(awk < /usr/local/e2e-targets \ | ||
--assign "r=$RANDOM" \ | ||
'BEGIN { r /= 32767 } (r -= $1) <= 0 { print $2; exit }') |
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.
@bbguimaraes curious - what does 32767 represent? in other words how you picked this value ?
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.
https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-RANDOM
RANDOM
Each time this parameter is referenced, a random integer between 0 and 32767 is generated. Assigning a value to this variable seeds the random number generator.
We want a value in the range [0, 1]
because that's how the ratios are expressed in the ConfigMap
. That is accomplished by dividing the value we get from $RANDOM
by the maximum value we can get — note: bash
doesn't do floating point math.
awk
has a rand
function, but it has to be seeded; we could also do this:
awk < /usr/local/e2e-targets \
--assign "r=$RANDOM" \
'BEGIN { srand(r); r = rand() } …'
I propose to add it to the post-#4143 core-services dir and track the changes with config-updater. |
If we want to make the version in
Using |
=( |
@wking, @abhinavdahiya, @cuppett: PTAL. |
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.
Impl here LGTM -- @bbguimaraes feel free to /hold cancel
whenever you feel like you've gotten a sufficient amount of other reviews
/lgtm
/approve
/hold
/lgtm |
Hmm… /retest |
/retest |
Tests in the staging namespace succeeded with /hold cancel |
/hold I want to retest this in light of yesterday's "incident". |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, bbguimaraes, stevekuznetsov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
@bbguimaraes: Updated the following 3 configmaps:
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
… Random Azure regions Shard over four regions to increase our capacity, because Azure allows auto-bumps for vCPU limits up to 200 in each region, but it's a longer process to get the limits raised beyond that in a single region. This sets us up for more lease-restriction relaxing after 78ade84 (Prow: drop max azure CI clusters to 5, 2019-09-18, openshift#5074) and 594930f (Prow: increase max Azure CI clusters to 20, 2019-09-18, openshift#5084). We may want per-region quotas, but for the moment I'm just hoping that our random choices are even enough that an Azure-wide quota is sufficient. And conveniently, $RANDOM runs from 0 through 32767 [1], so our modulo 4 value is evenly weighted :). The change to Bash is because Bash supports $RANDOM [1], but POSIX does not [2]. We already use RANDOM in openshift-installer-master-presubmits.yaml since ca464ed (openshift/installer: add IaaS-agnostic E2E test, 2019-06-20, openshift#4148). Ideally we'd be loading the set of region choices (and possibly weights) from some shared location somewhat like ca464ed has things. And we'd be reporting the chosen region in a structured way for convenient monitoring. But the plan is to break up these templates into more composable chunks soon anyway, so I'm ok if we aren't all that DRY in the short term. [1]: https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#index-RANDOM [2]: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_05_03
Generated using openshift/ci-tools#6.
I've created the CM manually until we decide how to manage it: