-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Updated commands to oc adm drain node
#5709
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
Conversation
@pravisankar PTAL |
admin_guide/manage_nodes.adoc
Outdated
@@ -245,22 +245,19 @@ To list pods that will be migrated without actually performing the evacuation, | |||
use the `--dry-run` option: | |||
|
|||
---- | |||
$ oadm manage-node <node1> <node2> \ | |||
--evacuate --dry-run [--pod-selector=<pod_selector>] | |||
$ oadm drain <node1> <node2> --dry-run [--pod-selector=<pod_selector>] |
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.
--pod-selector is not a valid option for oadm drain
.
Supported options:
Usage:
oadm drain NODE [options]
Examples:
# Drain node "foo", even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet on it.
$ oadm drain foo --force
# As above, but abort if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet, and use a grace period of 15 minutes.
$ oadm drain foo --grace-period=900
Options:
--delete-local-data=false: Continue even if there are pods using emptyDir (local data that will be deleted when the node is drained).
--dry-run=false: If true, only print the object that would be sent, without sending it.
--force=false: Continue even if there are pods not managed by a ReplicationController, ReplicaSet, Job, DaemonSet or StatefulSet.
--grace-period=-1: Period of time in seconds given to each pod to terminate gracefully. If negative, the default value specified in the pod will be used.
--ignore-daemonsets=false: Ignore DaemonSet-managed pods.
--timeout=0s: The length of time to wait before giving up, zero means infinite
c66c5a2
to
2b0f879
Compare
@pravisankar Thanks for your guidance. This is now updated. 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.
I'm not sure if this doc holds true for enterprise 3.5, 3.6, 3.7 and 3.9.
At least latest origin code (3.9) currently does not show --dry-run
option but 3.9 is not released yet. Currently k8s rebase is in progress (openshift/origin#17576) and we may have --pod-selector
and selector
options (openshift/origin#17616) and also --dry-run
option (openshift/origin#16333).
I would recommend holding off publishing this change for 3.9 until we have final build ready and make sure all the oadm drain
flags are same in 3.5, 3.6 and 3.7.
admin_guide/manage_nodes.adoc
Outdated
---- | ||
|
||
If `dry-run` is set to `true`, you only print the object that would be sent, | ||
without sending it. | ||
|
||
To actually evacuate all or selected pods on one or more nodes: |
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.
To actually evacuate all pods on one or more nodes:
(currently there is no option to select pods)
@pravisankar Okay, thanks. I will check back in later on this. |
admin_guide/manage_nodes.adoc
Outdated
@@ -245,27 +245,45 @@ To list pods that will be migrated without actually performing the evacuation, | |||
use the `--dry-run` option: | |||
|
|||
---- | |||
$ oadm manage-node <node1> <node2> \ | |||
--evacuate --dry-run [--pod-selector=<pod_selector>] | |||
$ oadm drain <node1> --dry-run=true |
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.
oadm
has been removed: openshift/origin#17396
it's being re-added already but with a fat decprecated warning though
oc adm
is preferred
👍 I've just received complaints about this from a customer. I'm pleased to see it being fixed. |
@ahardin-rh Any update on this? I have a bug that is related: https://bugzilla.redhat.com/show_bug.cgi?id=1477380 Cc: @vikram-redhat |
@tmorriso-rh Per discussion earlier in this PR, we decided to hold off on merging this until there is a final build ready so that we can confirm that |
This is how
3.7 release:
3.8 release:
3.9 release:
|
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.
We have enough information now to doc this command. Provided needed details
2b0f879
to
eca6ab2
Compare
oadm drain node
oc adm drain node
@pravisankar Thanks for your guidance! PTAL. This PR addresses 3.5 and 3.6. I will open companion PRs for 3.7 and 3.9 to add in the additional details for each. We are not releasing docs for 3.8, but it's interesting seeing the evolution. Thanks again for all of your help in getting this moved along! |
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.
Minor nit otherwise LGTM
admin_guide/manage_nodes.adoc
Outdated
@@ -241,31 +241,49 @@ controller] can be evacuated; the replication controllers create new pods on | |||
other nodes and remove the existing pods from the specified node(s). Bare pods, | |||
meaning those not backed by a replication controller, are unaffected by default. | |||
|
|||
To list pods that will be migrated without actually performing the evacuation, | |||
use the `--dry-run` option: | |||
To actually evacuate all or selected pods on one or more nodes: |
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.
To actually evacuate one or more nodes:
[Selecting pods needs --pod-selector
and this option is not available in 3.5/3.6]
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.
@pravisankar Updated. Thank you!
eca6ab2
to
5d9f491
Compare
Updated per feedback. I will merge this and build off of it for 3.7 and 3.9 docs in separate PRs. Revision histories for each will be applied in the cherry-pick PRs. |
/cherrypick enterprise-3.5 |
@ahardin-rh: new pull request created: #7874 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. |
/cherrypick enterprise-3.6 |
@ahardin-rh: new pull request created: #7875 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. |
Addresses #5613
@pravisankar Can you please check the syntax here?