@@ -26,7 +26,6 @@ import (
2626 crctls "github.com/crc-org/crc/v2/pkg/crc/tls"
2727 "github.com/crc-org/crc/v2/pkg/crc/validation"
2828 crcstrings "github.com/crc-org/crc/v2/pkg/strings"
29- "github.com/pborman/uuid"
3029)
3130
3231// #nosec G101
@@ -324,32 +323,6 @@ func RemoveOldRenderedMachineConfig(ocConfig oc.Config) error {
324323 return nil
325324}
326325
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-
353326func AddProxyConfigToCluster (ctx context.Context , sshRunner * ssh.Runner , ocConfig oc.Config , proxy * httpproxy.ProxyConfig ) error {
354327 type trustedCA struct {
355328 Name string `json:"name"`
0 commit comments