-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change Rook Ceph MON replacement section #382
Draft
DebakelOrakel
wants to merge
1
commit into
master
Choose a base branch
from
rook/replca-mons
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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 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 |
---|---|---|
|
@@ -50,29 +50,42 @@ kubectl --as=cluster-admin -n syn-rook-ceph-cluster patch cephcluster cluster -- | |
}]' | ||
---- | ||
|
||
. Cordon node(s) to {mon-operation} | ||
+ | ||
[source,bash,subs="attributes+"] | ||
---- | ||
for node in $(echo -n {mon-replace-list}); do | ||
kubectl --as=cluster-admin cordon "${node}" | ||
done | ||
---- | ||
+ | ||
. For every id in `$MON_IDS` replace the MON pod | ||
+ | ||
[source,bash] | ||
[source,bash,subs="attributes+"] | ||
---- | ||
mon_id=<MON_ID> | ||
kubectl --as=cluster-admin -n syn-rook-ceph-cluster delete pod \ | ||
-l app=rook-ceph-mon,ceph_daemon_id="${mon_id}" | ||
|
||
# Scale operator down | ||
kubectl --as=cluster-admin syn-rook-ceph-operator scale deploy/rook-ceph-operator --replicas=0 | ||
storage_node=<STORAGE_NODE> | ||
|
||
# Get name of storage node | ||
kubectl -n syn-rook-ceph-cluster get po -l ceph_daemon_id="${mon_id}" -owide | ||
|
||
# Remove MON to replace from ConfigMap | ||
# | ||
# data: | ||
# csi-cluster-config-json: '[{"clusterID":"syn-rook-ceph-cluster","monitors":["194.182.183.35:6789","194.182.180.80:6789","194.182.181.220:6789"],"cephFS":{"netNamespaceFilePath":"","subvolumeGroup":"","kernelMountOptions":"","fuseMountOptions":""},"rbd":{"netNamespa ceFilePath":"","radosNamespace":""},"nfs":{"netNamespaceFilePath":""},"readAffinity":{"enabled":false,"crushLocationLabels":null},"namespace":""}]' | ||
# data: h=194.182.183.35:6789,j=194.182.180.80:6789,i=194.182.181.220:6789 | ||
# mapping: '{"node":{"h":{"Name":"storage-efb1","Hostname":"storage-efb1","Address":"194.182.183.35"},"i":{"Name":"storage-8bb1","Hostname":"storage-8bb1","Address":"194.182.181.220"},"j":{"Name":"storage-a79d","Hostname":"storage-a79d","Address":"194.182.180.80"}}}' | ||
kubectl --as=cluster-admin -n syn-rook-ceph-cluster edit cm rook-ceph-mon-endpoints | ||
# data: | ||
# csi-cluster-config-json: '[{"clusterID":"syn-rook-ceph-cluster","monitors":["194.182.180.80:6789","194.182.181.220:6789"],"cephFS":{"netNamespaceFilePath":"","subvolumeGroup":"","kernelMountOptions":"","fuseMountOptions":""},"rbd":{"netNamespa ceFilePath":"","radosNamespace":""},"nfs":{"netNamespaceFilePath":""},"readAffinity":{"enabled":false,"crushLocationLabels":null},"namespace":""}]' | ||
# data: j=194.182.180.80:6789,i=194.182.181.220:6789 | ||
# mapping: '{"node":{"i":{"Name":"storage-8bb1","Hostname":"storage-8bb1","Address":"194.182.181.220"},"j":{"Name":"storage-a79d","Hostname":"storage-a79d","Address":"194.182.180.80"}}}' | ||
Comment on lines
+66
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we actually want to make this the process, this must be a |
||
|
||
# Scale operator up | ||
kubectl --as=cluster-admin syn-rook-ceph-operator scale deploy/rook-ceph-operator --replicas=0 | ||
|
||
# Wait until new MON is scheduled | ||
kubectl --as=cluster-admin -n syn-rook-ceph-cluster get pods -w | ||
kubectl -n syn-rook-ceph-cluster get pods -l app=rook-ceph-mon -w | ||
|
||
# Wait until the cluster has regained full quorum | ||
kubectl --as=cluster-admin -n syn-rook-ceph-cluster exec -it deploy/rook-ceph-tools -- \ | ||
ceph status | ||
kubectl --as=cluster-admin -n syn-rook-ceph-cluster exec -it deploy/rook-ceph-tools -- ceph status | ||
|
||
# Cordon node of old MON | ||
kubectl --as=cluster-admin cordon ${storage_node} | ||
|
||
# Repeat for all other $MON_IDS | ||
---- | ||
|
You are viewing a condensed version of this merge commit. You can view the full changes here.
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.
Why didn't this work (anymore)? I'm not happy with replacing a simple step which should trigger the rook operator to do the right thing with a fully manual step that can cause massive chaos.