@@ -95,8 +95,8 @@ func getPureWorkerNodes(nodes []corev1.Node) []corev1.Node {
9595}
9696
9797const (
98- // debugNamespace is the namespace for debug pods
99- debugNamespace = "openshift-machine-config-operator"
98+ // DebugNamespace is the namespace for debug pods
99+ DebugNamespace = "openshift-machine-config-operator"
100100 // cnvNamespace is the namespace for CNV operator
101101 cnvNamespace = "openshift-cnv"
102102 // cnvOperatorGroup is the name of the CNV operator group
@@ -158,7 +158,7 @@ func getCNVWorkerNodeName(ctx context.Context, oc *exutil.CLI) string {
158158
159159// ExecOnNodeWithChroot runs a command on a node using oc debug with chroot /host
160160func ExecOnNodeWithChroot (oc * exutil.CLI , nodeName string , cmd ... string ) (string , error ) {
161- args := append ([]string {"node/" + nodeName , "-n" + debugNamespace , "--" , "chroot" , "/host" }, cmd ... )
161+ args := append ([]string {"node/" + nodeName , "-n" + DebugNamespace , "--" , "chroot" , "/host" }, cmd ... )
162162 stdOut , _ , err := oc .AsAdmin ().WithoutNamespace ().Run ("debug" ).Args (args ... ).Outputs ()
163163 return stdOut , err
164164}
@@ -167,7 +167,7 @@ func ExecOnNodeWithChroot(oc *exutil.CLI, nodeName string, cmd ...string) (strin
167167// This is needed for swap operations (swapon/swapoff) that require direct namespace access
168168func ExecOnNodeWithNsenter (oc * exutil.CLI , nodeName string , cmd ... string ) (string , error ) {
169169 nsenterCmd := append ([]string {"nsenter" , "-a" , "-t" , "1" }, cmd ... )
170- args := append ([]string {"node/" + nodeName , "-n" + debugNamespace , "--" }, nsenterCmd ... )
170+ args := append ([]string {"node/" + nodeName , "-n" + DebugNamespace , "--" }, nsenterCmd ... )
171171 stdOut , _ , err := oc .AsAdmin ().WithoutNamespace ().Run ("debug" ).Args (args ... ).Outputs ()
172172 return stdOut , err
173173}
0 commit comments