Skip to content

Commit 452023a

Browse files
committed
cleaning-crio-storage: update docs to protect against removing network plugins first
crictl is not smart enough to wait to remove the network plugin pods first. To work around this, the caller must remove non-HostNetwork pods first, then remove the HostNetwork ones. Signed-off-by: Peter Hunt~ <[email protected]>
1 parent 21d6fb8 commit 452023a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

modules/cleaning-crio-storage.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ $ sudo -i
6969
----
7070
+
7171
. Stop the containers and pods:
72+
73+
.. Use the following command to stop the pods that are not in the `HostNetwork`. They must be removed first because their removal relies on the networking plugin pods, which are in the `HostNetwork`.
74+
[source, terminal]
75+
+
76+
----
77+
.. for pod in $(crictl pods -q); do if [[ "$(crictl inspectp $pod | jq -r .status.linux.namespaces.options.network)" != "NODE" ]]; then crictl rmp -f $pod; fi; done
78+
----
79+
80+
.. Stop all other pods:
7281
[source, terminal]
7382
+
7483
----

0 commit comments

Comments
 (0)