-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Separating out proxy deprovision from gather to ensure tear down can occur #11556
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
ewolinetz:logging_cleanup_trap
Sep 2, 2020
Merged
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
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,13 +1,10 @@ | ||
| ref: | ||
| as: gather-proxy | ||
| from_image: | ||
| namespace: ocp | ||
| name: "4.5" | ||
| tag: upi-installer | ||
| from: upi-installer | ||
| commands: gather-proxy-commands.sh | ||
| resources: | ||
| requests: | ||
| cpu: 300m | ||
| memory: 300Mi | ||
| documentation: |- | ||
| The gather step collects journal logs from the proxy and deprovisions it. | ||
| The gather step collects journal logs from the proxy. |
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
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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| approvers: | ||
| - wking | ||
| - ewolinetz |
30 changes: 30 additions & 0 deletions
30
ci-operator/step-registry/ipi/deprovision/proxy/ipi-deprovision-proxy-commands.sh
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 |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/bin/bash | ||
| set -o nounset | ||
| set -o errexit | ||
| set -o pipefail | ||
|
|
||
| trap 'CHILDREN=$(jobs -p); if test -n "${CHILDREN}"; then kill ${CHILDREN} && wait; fi' TERM | ||
|
|
||
| export AWS_SHARED_CREDENTIALS_FILE="${CLUSTER_PROFILE_DIR}/.awscred" | ||
|
|
||
| if test ! -f "${SHARED_DIR}/proxyregion" | ||
| then | ||
| echo "No proxyregion, so unknown AWS region, so unable to tear down." | ||
| exit 0 | ||
| fi | ||
|
|
||
| REGION="$(cat "${SHARED_DIR}/proxyregion")" | ||
| PROXY_NAME="${NAMESPACE}-${JOB_NAME_HASH}" | ||
| STACK_NAME="${PROXY_NAME}-proxy" | ||
|
|
||
| # cleaning up after ourselves | ||
| if aws --region "${REGION}" s3api head-bucket --bucket "${PROXY_NAME}" > /dev/null 2>&1 | ||
| then | ||
| aws --region "${REGION}" s3 rb "s3://${PROXY_NAME}" --force | ||
| fi | ||
|
|
||
| aws --region "${REGION}" cloudformation delete-stack --stack-name "${STACK_NAME}" & | ||
| wait "$!" | ||
|
|
||
| aws --region "${REGION}" cloudformation wait stack-delete-complete --stack-name "${STACK_NAME}" & | ||
| wait "$!" |
13 changes: 13 additions & 0 deletions
13
ci-operator/step-registry/ipi/deprovision/proxy/ipi-deprovision-proxy-ref.yaml
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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ref: | ||
| as: ipi-deprovision-proxy | ||
| from_image: | ||
| namespace: ocp | ||
| name: "4.5" | ||
| tag: upi-installer | ||
| commands: ipi-deprovision-proxy-commands.sh | ||
| resources: | ||
| requests: | ||
| cpu: 300m | ||
| memory: 300Mi | ||
| documentation: |- | ||
| The deprovision step tears down the proxy and removes its s3 ignition config. | ||
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.
Hmm, we must be pinning this because of the aws client? Looks like yes: openshift/installer#3292. Can we call that out in the commit message? And maybe drop the 4.5-pinning for gather-proxy-ref.yaml now that it no longer uses aws?