Chapter 8. Using the vSphere Problem Detector Operator
You can use the vSphere Problem Detector Operator to check a cluster that you deployed on VMware vSphere for common installation and misconfiguration issues that relate to storage.
8.1. About the vSphere Problem Detector Operator Copy linkLink copied to clipboard!
The vSphere Problem Detector Operator checks a cluster that you deployed on VMware vSphere for common installation and configuration issues that relate to storage.
After the Cluster Storage Operator starts and determines that a cluster runs on VMware vSphere, the Cluster Storage Operator launches the vSphere Problem Detector Operator. When the vSphere Problem Detector Operator starts, the Operator immediately runs the checks. The vSphere Problem Detector Operator communicates with the vSphere vCenter Server to find the virtual machines in the cluster, the default datastore, and other information about the vSphere vCenter Server configuration. The Operator uses the credentials from the Cloud Credential Operator to connect to vSphere.
The Operator runs the checks according to the following schedule:
- The checks run every hour.
- If any check fails, the Operator runs the checks again in intervals of 1 minute, 2 minutes, 4, 8, and so on. The Operator doubles the interval up to a maximum interval of 8 hours.
- When all checks pass, the schedule returns to an hour interval.
After a failure, the Operator increases its check frequency to quickly report success when the failure condition gets resolved. You can run the Operator manually for immediate troubleshooting information.
8.2. Running the vSphere Problem Detector Operator checks Copy linkLink copied to clipboard!
You can override the schedule for running the vSphere Problem Detector Operator checks and run the checks immediately.
The vSphere Problem Detector Operator automatically runs the checks every hour. After the Operator starts, the Operator runs the checks immediately. After the Cluster Storage Operator starts and determines that a cluster runs on VMware vSphere, the Cluster Storage Operator starts the vSphere Problem Detector Operator. To run the checks immediately, you can scale the vSphere Problem Detector Operator to 0
and back to 1
so that the Cluster Storage Operator restarts the vSphere Problem Detector Operator.
Prerequisites
-
Access to the cluster as a user with the
cluster-admin
role.
Procedure
Scale the Operator to
0
:oc scale deployment/vsphere-problem-detector-operator --replicas=0 \ -n openshift-cluster-storage-operator
$ oc scale deployment/vsphere-problem-detector-operator --replicas=0 \ -n openshift-cluster-storage-operator
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the pods have restarted by running the following command:
oc -n openshift-cluster-storage-operator get pod -l name=vsphere-problem-detector-operator -w
$ oc -n openshift-cluster-storage-operator get pod -l name=vsphere-problem-detector-operator -w
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME READY STATUS RESTARTS AGE vsphere-problem-detector-operator-77486bd645-9ntpb 1/1 Running 0 11s
NAME READY STATUS RESTARTS AGE vsphere-problem-detector-operator-77486bd645-9ntpb 1/1 Running 0 11s
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The
AGE
field must indicate that the pod restarted.
Next steps
- Viewing the events from the vSphere Problem Detector Operator
- Viewing the logs from the vSphere Problem Detector Operator
8.3. Viewing the events from the vSphere Problem Detector Operator Copy linkLink copied to clipboard!
After the vSphere Problem Detector Operator runs and performs the configuration checks, the Operator creates events that you can view from the command-line interface (CLI) or from the OpenShift Container Platform web console.
Prerequisites
- The vSphere Problem Detector Operator ran checks on your cluster.
Procedure
To view the events by using the CLI, run the following command:
oc get event -n openshift-cluster-storage-operator \ --sort-by={.metadata.creationTimestamp}
$ oc get event -n openshift-cluster-storage-operator \ --sort-by={.metadata.creationTimestamp}
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
16m Normal Started pod/vsphere-problem-detector-operator-xxxxx Started container vsphere-problem-detector 16m Normal Created pod/vsphere-problem-detector-operator-xxxxx Created container vsphere-problem-detector 16m Normal LeaderElection configmap/vsphere-problem-detector-lock vsphere-problem-detector-operator-xxxxx became leader
16m Normal Started pod/vsphere-problem-detector-operator-xxxxx Started container vsphere-problem-detector 16m Normal Created pod/vsphere-problem-detector-operator-xxxxx Created container vsphere-problem-detector 16m Normal LeaderElection configmap/vsphere-problem-detector-lock vsphere-problem-detector-operator-xxxxx became leader
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
To view the events by using the OpenShift Container Platform web console, navigate to Home
Events and select openshift-cluster-storage-operator
from the Project menu.
8.4. Viewing the logs from the vSphere Problem Detector Operator Copy linkLink copied to clipboard!
After the vSphere Problem Detector Operator runs and performs the configuration checks, the Operator creates log records that you can view from the command-line interface (CLI) or from the OpenShift Container Platform web console. Log lines that indicate passed
means that you do not need to perform any actions.
The ideal output for a log line indicates passed
or 0 problems
. If a log line indicates failure
or 1 or more problems, see the information in the "Configuration checks run by the vSphere Problem Detector Operator" document.
Prerequisites
- The vSphere Problem Detector Operator ran checks on your cluster.
Procedure
To view the logs by using the CLI, run the following command. A log line that shows
passed
in the output means that you must analyze the log output and resolve the issue.oc logs deployment/vsphere-problem-detector-operator \ -n openshift-cluster-storage-operator
$ oc logs deployment/vsphere-problem-detector-operator \ -n openshift-cluster-storage-operator
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To view the Operator logs with the OpenShift Container Platform web console, perform the following steps:
-
Navigate to Workloads
Pods. -
Select
openshift-cluster-storage-operator
from the Projects menu. -
Click the link for the
vsphere-problem-detector-operator
pod. - Click the Logs tab on the Pod details page to view the logs.
-
Navigate to Workloads
8.5. Configuration checks run by the vSphere Problem Detector Operator Copy linkLink copied to clipboard!
The following tables identify the configuration checks that the vSphere Problem Detector Operator runs. Some checks verify the configuration of the cluster. Other checks verify the configuration of each node in the cluster.
Name | Description |
---|---|
| Verifies that the default datastore name in the VMware vSphere configuration is short enough for use with dynamic provisioning. If this check fails, you can expect the following:
If this check fails, reconfigure vSphere with a shorter name for the default datastore. |
|
Verifies the permission to list volumes in the default datastore. You must enable the permission to create volumes. The Operator verifies the permission by listing the If this check fails, review the required permissions for the vCenter account that you specified during the OpenShift Container Platform installation. |
| Verifies the following:
|
| Verifies the permission to list recent tasks and datastores. |
| Collects the cluster version and UUID from vSphere vCenter. |
Name | Description |
---|---|
|
Verifies that all the vSphere virtual machines include the
If this check fails, see the How to check |
|
Verifies that all nodes have the oc get nodes -o custom-columns=NAME:.metadata.name,PROVIDER_ID:.spec.providerID,UUID:.status.nodeInfo.systemUUID
If this check fails, reference the vSphere product documentation on how to set the provider ID for each node in the cluster. |
| Reports the version of the ESXi hosts that run nodes. |
| Reports the virtual machine hardware version for a node. |
8.6. About the storage class configuration check Copy linkLink copied to clipboard!
The datastore name and cluster ID relate to the names for persistent volumes that use VMware vSphere storage. After the creation of a persistent volume, systemd
creates a mount unit for the persistent volume.
The systemd
process has a 255 character limit for the length of the fully qualified path to the virtual machine disk (VMDK) file. This path follows the naming conventions for systemd
and vSphere. The naming conventions use the following example pattern:
/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[<datastore>] 00000000-0000-0000-0000-000000000000/<cluster_id>-dynamic-pvc-00000000-0000-0000-0000-000000000000.vmdk
/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[<datastore>] 00000000-0000-0000-0000-000000000000/<cluster_id>-dynamic-pvc-00000000-0000-0000-0000-000000000000.vmdk
- The naming conventions require 205 characters of the 255 character limit.
- The depolyment determines the datastore name and the cluster ID.
-
The datastore name and cluster ID substitute into the example pattern. The fully qualified path gets processed with the
systemd-escape
command to escape special characters. For example, after the escape operation, a hyphen character uses four characters, such as\x2d
. -
After the
systemd-escape
CLI processes the VMDK file path, the length of the path must not be lower than 255 characters. This criteria ensures that thesystemd
process can access the fully qualified VMDK file path.
8.7. Metrics for the vSphere Problem Detector Operator Copy linkLink copied to clipboard!
The vSphere Problem Detector Operator exposes the following metrics for use by the OpenShift Container Platform monitoring stack.
Name | Description |
---|---|
| Cumulative number of cluster-level checks that the vSphere Problem Detector Operator performed. This count includes both successes and failures. |
|
Number of failed cluster-level checks that the vSphere Problem Detector Operator performed. For example, a value of |
| Counts the number of ESXi hosts with a specific version. Note that if a host runs more than one node, the vSphere Problem Detector Operator counts the host only once. |
| Cumulative number of node-level checks that the vSphere Problem Detector Operator performed. This count includes both successes and failures. |
|
Counts the number of failed node-level checks that the vSphere Problem Detector Operator performed. For example, a value of |
| Number of vSphere nodes with a specific hardware version. |
| Information about the vSphere vCenter Server. |