How to increase logs verbosity for machine API.

Solution Verified - Updated

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4

Issue

  • How to increase logs verbosity for machine API.
  • Debug log level for openshift-machine-api.

Resolution

  1. Unmanage machine-api-operator.
$ oc patch clusterversion/version --type json -p '[{"op":"add","path":"/spec/overrides","value":[{"kind":"Deployment","group":"apps","name":"machine-api-operator","namespace":"openshift-machine-api","unmanaged":true}]}]'
  1. Scale down machine-api-operator. But before scaling down the deployment/machine-api-operator replicas=0 check the replicas count. then proceed with below.
$ oc -n openshift-machine-api scale deployment/machine-api-operator --replicas=0
  1. Edit machine-api-controllers deployment and replace any --v=3 (3 may be a lower number) with --v=8 (it can be seen as part of different args: arrays).
$ oc -n openshift-machine-api edit deployment/machine-api-controllers
  1. Wait until the new machine-api-controllers pod starts. Then scale-up again the deployment/machine-api-operator replicas and patch the clusterversion/version again to manage.
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.