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

OCM-4783 | feat: display warnings after cluster creation #588

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

renan-campos
Copy link
Collaborator

Demo:

[rcampos@rcampos-thinkpadt14sgen2i ocm-cli]$ ./ocm create cluster -i
? cluster name rc-test
? Subscription type: standard (Annual: Fixed capacity subscription from Red Hat)
? Cloud provider: gcp
? CCS: Yes
? Service account file: REDACTED
? Multiple AZ: No
? Secure boot support for Shielded VMs: No
? Region: us-east4
? OpenShift version: 4.14.6
? Compute machine type: custom-4-16384
? Enable autoscaling: No
? Compute nodes: 2
? Install into an existing VPC (optional): No
? Machine CIDR: 10.0.0.0/16
? Service CIDR: 172.30.0.0/16
? Pod CIDR: 10.128.0.0/14
? Host prefix: 23
? Private cluster (optional): No

ID:                     REDACTED
External ID:
Name:                   rc-test
Display Name:           rc-test
State:                  validating
API URL:
API Listening:          external
Console URL:
Control Plane:
        Replicas: 3
Infra:
        Replicas: 2
Compute:
        Replicas: 2
Product:                osd
Subscription type:      standard
Provider:               gcp
Version:
Region:                 us-east4
Multi-az:               false
CCS:                    true
HCP:                    false
Subnet IDs:             []
PrivateLink:            false
STS:                    false
Existing VPC:           unsupported
Channel Group:          stable
Cluster Admin:          true
Organization:           REDACTED
Creator:                REDACTED
Email:                  rcampos@redhat.com
AccountNumber:          REDACTED
Created:                2023-12-20T19:58:20Z
Shard:                  REDACTED

⚠️ WARNING:
Please enable the Org Policy API for the GCP project 'REDACTED'
Without the GCP Org Policy API enabled, OCM is unable to determine whether the GCP project contains any policies that would affect the in
stallation

Demo:
```
[rcampos@rcampos-thinkpadt14sgen2i ocm-cli]$ ./ocm create cluster -i
? cluster name rc-test
? Subscription type: standard (Annual: Fixed capacity subscription from Red Hat)
? Cloud provider: gcp
? CCS: Yes
? Service account file: REDACTED
? Multiple AZ: No
? Secure boot support for Shielded VMs: No
? Region: us-east4
? OpenShift version: 4.14.6
? Compute machine type: custom-4-16384
? Enable autoscaling: No
? Compute nodes: 2
? Install into an existing VPC (optional): No
? Machine CIDR: 10.0.0.0/16
? Service CIDR: 172.30.0.0/16
? Pod CIDR: 10.128.0.0/14
? Host prefix: 23
? Private cluster (optional): No

ID:                     REDACTED
External ID:
Name:                   rc-test
Display Name:           rc-test
State:                  validating
API URL:
API Listening:          external
Console URL:
Control Plane:
        Replicas: 3
Infra:
        Replicas: 2
Compute:
        Replicas: 2
Product:                osd
Subscription type:      standard
Provider:               gcp
Version:
Region:                 us-east4
Multi-az:               false
CCS:                    true
HCP:                    false
Subnet IDs:             []
PrivateLink:            false
STS:                    false
Existing VPC:           unsupported
Channel Group:          stable
Cluster Admin:          true
Organization:           REDACTED
Creator:                REDACTED
Email:                  rcampos@redhat.com
AccountNumber:          REDACTED
Created:                2023-12-20T19:58:20Z
Shard:                  REDACTED

⚠️ WARNING:
Please enable the Org Policy API for the GCP project 'REDACTED'
Without the GCP Org Policy API enabled, OCM is unable to determine whether the GCP project contains any policies that would affect the in
stallation
```
return err
}
serviceLogs.Items().Each(func(entry *slv1.LogEntry) bool {
if entry.Severity() == slv1.SeverityWarning {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we have other warnings we currently send as service logs. What if the customer would like to not be bothered about it 🤔 . Should this be behind some flag within describe? like --warnings

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We do send other warnings as service logs, but none of them come through immediately after installation. I agree that constantly receiving warnings would be a bad user experience. Ultimately it is a BU decision whether warnings get displayed or not. I think they should be displayed by default, with the policy that if the user is seeing the warning, then it describes an action that the user can take to get rid of the warning. In the one shown here, the user can alleviate it by enabling the Org Policy API.

If it helps push this PR forward, I can add a --quiet flag for users that do not want to see any warnings. We can also filter the service logs to only show warnings of type "Cluster Lifecycle" if needed. Please let me know.

@gdbranco gdbranco merged commit 2114ef6 into openshift-online:main Dec 21, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants