diff --git a/cmd/support-callhome-set.go b/cmd/support-callhome-set.go index 99c85268..26595b4c 100644 --- a/cmd/support-callhome-set.go +++ b/cmd/support-callhome-set.go @@ -113,7 +113,7 @@ func configureSubnetWebhook(aliasedURL string, enable bool) { apiKey := getSubnetAPIKeyFromConfig(alias) if len(apiKey) == 0 { - e := fmt.Errorf("Please register the cluster first by running 'mc admin subnet register %s'", alias) + e := fmt.Errorf("Please register the cluster first by running 'mc support register %s'", alias) fatalIf(probe.NewError(e), "Cluster not registered.") } diff --git a/cmd/support-diag.go b/cmd/support-diag.go index 265a81e1..eda52e62 100644 --- a/cmd/support-diag.go +++ b/cmd/support-diag.go @@ -299,6 +299,11 @@ func prepareDiagUploadURL(alias string, clusterName string, filename string, lic if len(apiKey) == 0 { license = getSubnetLicenseFromConfig(alias) + if len(license) == 0 { + // Both api key and license not available. Ask user to register the cluster first + e := fmt.Errorf("Please register the cluster first by running 'mc support register %s', or use --airgap flag", alias) + fatalIf(probe.NewError(e), "Cluster not registered.") + } } }