@@ -26,7 +26,6 @@ import (
26
26
crctls "github.com/crc-org/crc/v2/pkg/crc/tls"
27
27
"github.com/crc-org/crc/v2/pkg/crc/validation"
28
28
crcstrings "github.com/crc-org/crc/v2/pkg/strings"
29
- "github.com/pborman/uuid"
30
29
)
31
30
32
31
// #nosec G101
@@ -324,32 +323,6 @@ func RemoveOldRenderedMachineConfig(ocConfig oc.Config) error {
324
323
return nil
325
324
}
326
325
327
- func EnsureClusterIDIsNotEmpty (ctx context.Context , ocConfig oc.Config ) error {
328
- if err := WaitForOpenshiftResource (ctx , ocConfig , "clusterversion" ); err != nil {
329
- return err
330
- }
331
-
332
- stdout , stderr , err := ocConfig .RunOcCommand ("get" , "clusterversion" , "version" , "-o" , `jsonpath="{['spec']['clusterID']}"` )
333
- if err != nil {
334
- return fmt .Errorf ("Failed to get clusterversion %v: %s" , err , stderr )
335
- }
336
- if strings .TrimSpace (stdout ) != "" {
337
- return nil
338
- }
339
-
340
- logging .Info ("Updating cluster ID..." )
341
- clusterID := uuid .New ()
342
- cmdArgs := []string {"patch" , "clusterversion" , "version" , "-p" ,
343
- fmt .Sprintf (`'{"spec":{"clusterID":"%s"}}'` , clusterID ), "--type" , "merge" }
344
-
345
- _ , stderr , err = ocConfig .RunOcCommand (cmdArgs ... )
346
- if err != nil {
347
- return fmt .Errorf ("Failed to update cluster ID %v: %s" , err , stderr )
348
- }
349
-
350
- return nil
351
- }
352
-
353
326
func AddProxyConfigToCluster (ctx context.Context , sshRunner * ssh.Runner , ocConfig oc.Config , proxy * httpproxy.ProxyConfig ) error {
354
327
type trustedCA struct {
355
328
Name string `json:"name"`
0 commit comments