-
Notifications
You must be signed in to change notification settings - Fork 2.1k
DR snapshot restore: assemble etcd connection string on first master #3919
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
DR snapshot restore: assemble etcd connection string on first master #3919
Conversation
7b50694 to
fcb7649
Compare
ce1db6b to
7c94cc3
Compare
|
/retest |
7c94cc3 to
a6d8c5c
Compare
|
/test pj-rehearse ssh-bastion remove failed |
c02234d to
701d530
Compare
|
/test pj-rehearse |
|
Flakes /test pj-rehearse |
|
/test pj-rehearse |
|
Additional masters didn't come up /test pj-rehearse |
|
/test pj-rehearse |
252acaf to
a014af5
Compare
/test pj-rehearse |
|
@vrutkovs: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. I understand the commands that are listed here. |
|
/cc @hexfusion @runcom PTAL, this fixes etcd restore tests - see https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/openshift_release/3919/rehearse-3919-pull-ci-openshift-machine-config-operator-master-e2e-restore-cluster-state/30
|
`bastion_ssh` output may be mangled, so it should not be used to set var values. Instead first master should collect necessary info without passing it back to `test` container
a014af5 to
4d491ba
Compare
| echo "Assemble etcd connection string" | ||
| bastion_ssh "core@${FIRST_MASTER}" 'rm -rf /tmp/etcd/connstring && mapfile -t MASTERS < <(ls /tmp/etcd) && echo ${MASTERS[@]} && for master in "${MASTERS[@]}"; do echo -n "$(cat /tmp/etcd/${master}/etcd_name)=$(cat /tmp/etcd/${master}/etcd_uri)," >> /tmp/etcd/connstring; done && sed -i '"'$ s/.$//'"' /tmp/etcd/connstring' | ||
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.
Since etcd is running we can use it to generate this list. We don't need to change it now but just a talking point. Not perfect but this is one idea.
etcdctl member list -w json | jq -r '.members[] | [.name,.peerURLs[0]] | "(.[0])=(.[1])" ' | xargs | sed -e 's/ /,/g'
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.
Yeah, so I'll be rewriting this into a proper golang e2e test - hopefully we'd have better instruments than cat and would be able to rework this
|
/lgtm |
abhinavdahiya
left a comment
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.
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, hexfusion, vrutkovs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@vrutkovs: Updated the following 2 configmaps:
DetailsIn 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. |
bastion_sshoutput may be mangled, so it should not be used to set varvalues. Instead first master should collect necessary info without
passing it back to
testcontainer