Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning to network verification that HCPs are unsupported. #579

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small conversation about this here: https://redhat-internal.slack.com/archives/CMD1L32M9/p1717424955110269

We may want to additionally

  1. Take that bash script and just make it a new osdctl command (for another PR, not here 😄 )
  2. Leave comments here explaining why HCPs aren't supported, and when we can remove this block of code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestions thanks! Will add the info from the thread.

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