Skip to content

Commit

Permalink
Add warning to network verification that HCPs are unsupported. (#579)
Browse files Browse the repository at this point in the history
* Add warning to network verification that HCPs are unsupported.

Its not widely know, that network verifier is unable to run against
HCPs.
This can lead to red herring situations and a warning is needed.

* add prompt to network verifier hcp warning

* add explanation about inability to verify egress for HCP
  • Loading branch information
RaphaelBut authored Jun 3, 2024
1 parent 87fd275 commit d58ed21
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/network/verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package network
import (
"bytes"
"context"
"errors"
"fmt"
"log"
"os"
Expand Down Expand Up @@ -218,6 +219,16 @@ func (e *EgressVerification) setup(ctx context.Context) (*aws.Config, error) {
e.log.Debug(ctx, "cluster %s found from OCM: %s", e.ClusterId, cluster.ID())
e.cluster = cluster

// We currently have insufficient permissions to run network verifier on ROSA HCP
// We can update or, if applicable, remove this warning after https://issues.redhat.com/browse/XCMSTRAT-245
if e.cluster.Hypershift().Enabled() {
e.log.Warn(ctx, "Generally, SRE has insufficient AWS permissions"+
" to run network verifier on hosted control plane clusters. Run anyway?")
if !utils.ConfirmPrompt() {
return nil, errors.New("You can try the network verifier script in ops-sop/hypershift/utils/verify-egress.sh")
}
}

e.log.Info(ctx, "getting AWS credentials from backplane-api")
cfg, err := osdCloud.CreateAWSV2Config(ocmClient, cluster)
if err != nil {
Expand Down

0 comments on commit d58ed21

Please sign in to comment.