Bug 1911728

Summary: In "Restoring a cluster to a previous state" crictl ps | grep etcd can give false-negative with etcd-operator.
Product: OpenShift Container Platform Reporter: Tom Dale <tdale>
Component: DocumentationAssignee: Vikram Goyal <vigoyal>
Status: CLOSED CURRENTRELEASE QA Contact: Xiaoli Tian <xtian>
Severity: low Docs Contact: Vikram Goyal <vigoyal>
Priority: unspecified    
Version: 4.7CC: aos-bugs, cbaus, danili, jokerman, tdale
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-24 18:50:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1903544    

Description Tom Dale 2020-12-30 21:01:58 UTC
Document URL:  https://docs.openshift.com/container-platform/4.6/post_installation_configuration/cluster-tasks.html#dr-scenario-2-restoring-cluster-state_post-install-cluster-tasks

Section Number and Name: 
4c and 4e 

Describe the issue: 
In doc section 4c, when checking that respective etcd pod is properly stopped it is stated:
"[core@ip-10-0-154-194 ~]$ sudo crictl ps | grep etcd
The output of this command should be empty. If it is not empty, wait a few minutes and check again."
This could give a false negative if the etcd-operator is running on that node. The ouput will not be empty it will contain etcd-operato.

The same issue occurs in section 4e with "sudo crictl ps | grep kube-apiserver".
Again if the kube-apiserver-operator pod is running on that node then grep will not return empty as expected.

Suggestions for improvement: 
Instead use commmand: sudo crictl ps | grep 'etcd '
with the space in quotes. This will verify that etcd-operator does not match the grep command. Do the same with kube-apiserver

Or you could just specify that the *-operator pods are not important here.

Comment 1 Dan Li 2021-01-13 15:15:28 UTC
We are leaving this to the documentation team but it may need to be further looked at by the Multi-Arch team

Comment 2 Tom Dale 2021-06-24 18:50:30 UTC
Closing this old bug as I see the documentation has been updated to use the command "sudo crictl ps | grep etcd | grep -v operator". This fixes the problem. Thanks!