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
Bug 1810469: The disaster recovery scripts need simplification #220
Bug 1810469: The disaster recovery scripts need simplification #220
Conversation
4e12940
to
5093343
Compare
5093343
to
63e7ef9
Compare
bindata/etcd/etcd-restore-backup.sh
Outdated
echo 'Path to the directory containing backup files is required: ./etcd-snapshot-restore.sh <path-to-backup>' | ||
exit 1 | ||
function usage { | ||
echo 'Path to the directory containing backup files is required: ./etcd-snapshot-restore.sh <path-to-backup>' |
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.
this isn't descriptive enough for me. What content is expected here
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.
Well, our current backup is expected to be in a directory containing two components:
- etcd snapshot
- Bundle of Static POD resources (which includes kube-apiserver's static pod resources, that may include encryption key)
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.
Well, our current backup is expected to be in a directory containing two components:
- etcd snapshot
- Bundle of Static POD resources (which includes kube-apiserver's static pod resources, that may include encryption key)
don't tell me, write in the usage for everyone :)
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.
Added to the usage.
253a5f1
to
1c67ced
Compare
Currently, the scripts assume that the following variables come from etcd.env file:
|
1c67ced
to
1c97918
Compare
1c97918
to
40896ff
Compare
40896ff
to
9dd3672
Compare
00c5f41
to
c879118
Compare
echo "etcd snapshot ${SNAPSHOT_FILE} does not exist." | ||
exit 1 | ||
fi | ||
|
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.
out of curiosity, why do we not care to check if BACKUP_FILE
is not empty?
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.
Well. We didn't have the size check in the past scripts :-). I was just trying to simplify the existing scripts.
|
||
|
||
# Restore static pod resources | ||
tar -C ${CONFIG_FILE_DIR} -xzf ${BACKUP_FILE} static-pod-resources |
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.
again just curious: should moving kube static pod be after etcd is moved few lines below?
That way when kube-apiserver is started it will have an etcd to talk to, or we have made an effort for etcd to exist :)
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.
I can move it below. In the older scripts, we stopped kubelet, and restarted kubelet at the end. But based on David's comments, we let the kubelet be dirty.
c879118
to
4a3e968
Compare
/retest |
1 similar comment
/retest |
/test e2e-gcp |
@retroflexer: This pull request references Bugzilla bug 1810469, which is valid. 3 validation(s) were run on this bug
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. |
4a3e968
to
0531dc4
Compare
/retest |
2 similar comments
/retest |
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hexfusion, retroflexer 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
1 similar comment
/retest |
@retroflexer: 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. 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. I understand the commands that are listed here. |
/cherrypick release-4.4 |
@hexfusion: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you. 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. |
@retroflexer: All pull requests linked via external trackers have merged. Bugzilla bug 1810469 has been moved to the MODIFIED state. 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. |
@hexfusion: #220 failed to apply on top of branch "release-4.4":
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. |
With the introduction of cluster-etcd-operator, much of the functionality in the old scripts is no longer needed. Therefore the scripts needed to be trimmed down and simplified. This PR attempts to achieve that goal.