@@ -21,7 +21,6 @@ import (
21
21
crctls "github.com/crc-org/crc/v2/pkg/crc/tls"
22
22
"github.com/crc-org/crc/v2/pkg/crc/validation"
23
23
crcstrings "github.com/crc-org/crc/v2/pkg/strings"
24
- "github.com/pborman/uuid"
25
24
)
26
25
27
26
// #nosec G101
@@ -285,32 +284,6 @@ func RemoveOldRenderedMachineConfig(ocConfig oc.Config) error {
285
284
return nil
286
285
}
287
286
288
- func EnsureClusterIDIsNotEmpty (ctx context.Context , ocConfig oc.Config ) error {
289
- if err := WaitForOpenshiftResource (ctx , ocConfig , "clusterversion" ); err != nil {
290
- return err
291
- }
292
-
293
- stdout , stderr , err := ocConfig .RunOcCommand ("get" , "clusterversion" , "version" , "-o" , `jsonpath="{['spec']['clusterID']}"` )
294
- if err != nil {
295
- return fmt .Errorf ("Failed to get clusterversion %v: %s" , err , stderr )
296
- }
297
- if strings .TrimSpace (stdout ) != "" {
298
- return nil
299
- }
300
-
301
- logging .Info ("Updating cluster ID..." )
302
- clusterID := uuid .New ()
303
- cmdArgs := []string {"patch" , "clusterversion" , "version" , "-p" ,
304
- fmt .Sprintf (`'{"spec":{"clusterID":"%s"}}'` , clusterID ), "--type" , "merge" }
305
-
306
- _ , stderr , err = ocConfig .RunOcCommand (cmdArgs ... )
307
- if err != nil {
308
- return fmt .Errorf ("Failed to update cluster ID %v: %s" , err , stderr )
309
- }
310
-
311
- return nil
312
- }
313
-
314
287
func AddProxyConfigToCluster (ctx context.Context , sshRunner * ssh.Runner , ocConfig oc.Config , proxy * httpproxy.ProxyConfig ) error {
315
288
type trustedCA struct {
316
289
Name string `json:"name"`
0 commit comments