Skip to content

Commit 8cf32ed

Browse files
Merge pull request #338 from RaphaelBut/osd-27300
Align network misconfig LS message
2 parents dfb5022 + 2d8564b commit 8cf32ed

File tree

3 files changed

+6
-28
lines changed

3 files changed

+6
-28
lines changed

pkg/investigations/chgm/chgm.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ var (
3232
Description: "Your cluster is no longer checking in with Red Hat OpenShift Cluster Manager. Possible causes include stopped instances or a networking misconfiguration. If you have stopped the cluster instances, please start them again - stopping instances is not supported. If you intended to terminate this cluster then please delete the cluster in the Red Hat console",
3333
InternalOnly: false,
3434
}
35+
36+
egressLS = ocm.LimitedSupportReason{
37+
Summary: "Cluster is in Limited Support due to unsupported cloud provider configuration",
38+
Details: "Your cluster requires you to take action. SRE has observed that there have been changes made to the network configuration which impacts normal working of the cluster, including lack of network egress to internet-based resources which are required for the cluster operation and support. Please revert changes, and refer to documentation regarding firewall requirements for PrivateLink clusters: https://access.redhat.com/documentation/en-us/red_hat_openshift_service_on_aws/4/html/prepare_your_environment/rosa-sts-aws-prereqs#osd-aws-privatelink-firewall-prerequisites_rosa-sts-aws-prereqs#",
39+
}
3540
)
3641

3742
// Investigate runs the investigation for a triggered chgm pagerduty event
@@ -82,7 +87,7 @@ func Investigate(r *investigation.Resources) error {
8287
logging.Infof("Network verifier reported failure: %s", failureReason)
8388

8489
if strings.Contains(failureReason, "nosnch.in") {
85-
err := r.OcmClient.PostLimitedSupportReason(createEgressLS(failureReason), r.Cluster.ID())
90+
err := r.OcmClient.PostLimitedSupportReason(&egressLS, r.Cluster.ID())
8691
if err != nil {
8792
return err
8893
}

pkg/investigations/chgm/util.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,3 @@ func createEgressSL(blockedUrls string) *ocm.ServiceLog {
1919

2020
return &egressSL
2121
}
22-
23-
func createEgressLS(blockedUrls string) *ocm.LimitedSupportReason {
24-
details := fmt.Sprintf("Your cluster requires you to take action. SRE has observed that there have been changes made to the network configuration which impacts normal working of the cluster, including lack of network egress to these internet-based resources which are required for the cluster operation and support: %s. Please revert changes, and refer to documentation regarding firewall requirements for PrivateLink clusters: https://access.redhat.com/documentation/en-us/red_hat_openshift_service_on_aws/4/html/prepare_your_environment/rosa-sts-aws-prereqs#osd-aws-privatelink-firewall-prerequisites_rosa-sts-aws-prereqs#", blockedUrls)
25-
26-
egressLS := ocm.LimitedSupportReason{
27-
Summary: "Cluster is in Limited Support due to unsupported cloud provider configuration",
28-
Details: details,
29-
}
30-
31-
return &egressLS
32-
}

pkg/investigations/chgm/util_test.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,3 @@ func TestCreateEgressSL(t *testing.T) {
2929
result := createEgressSL(blockedUrls)
3030
assert.Equal(t, *expected, *result)
3131
}
32-
33-
// TestCreateEgressLS tests the createEgressLS function
34-
func TestCreateEgressLS(t *testing.T) {
35-
expectedDetails := fmt.Sprintf(
36-
"Your cluster requires you to take action. SRE has observed that there have been changes made to the network configuration which impacts normal working of the cluster, including lack of network egress to these internet-based resources which are required for the cluster operation and support: %s. Please revert changes, and refer to documentation regarding firewall requirements for PrivateLink clusters: https://access.redhat.com/documentation/en-us/red_hat_openshift_service_on_aws/4/html/prepare_your_environment/rosa-sts-aws-prereqs#osd-aws-privatelink-firewall-prerequisites_rosa-sts-aws-prereqs#",
37-
blockedUrls,
38-
)
39-
40-
expected := &ocm.LimitedSupportReason{
41-
Summary: "Cluster is in Limited Support due to unsupported cloud provider configuration",
42-
Details: expectedDetails,
43-
}
44-
45-
result := createEgressLS(blockedUrls)
46-
assert.Equal(t, *expected, *result)
47-
}

0 commit comments

Comments
 (0)