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