Skip to content

Instantly share code, notes, and snippets.

@therevoman
Forked from williamcaban/OCP Random Notes.md
Created December 1, 2020 06:09
Show Gist options
  • Select an option

  • Save therevoman/c581b7d9f030a4fe7415ca22192f07b2 to your computer and use it in GitHub Desktop.

Select an option

Save therevoman/c581b7d9f030a4fe7415ca22192f07b2 to your computer and use it in GitHub Desktop.
# list nodes
oc get nodes

# list cluster operators and their state
oc get co

# show cluster version and error messages
oc get clusterversion
oc get clusterversion -o jsonpath='{.items[*].status}'

#
oc get mcp
oc get mcp -o jsonpath='{range .items[*]}{"\n\n"}{@.metadata.name}:{.status.conditions}'

Update stuck due to a previous partial update

# erase the pending status entry on masters
journalctl --vacuum-time=1m

# identify the MCD of the node
oc get pods -o wide -n openshift-machine-config-operator | grep machine-config-daemon
# delete the MCD of the node
oc delete pod machine-config-daemon-<id>

# Alternative, force an update by creating a /run/machine-config-daemon-force file on each failing node
touch /run/machine-config-daemon-force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment