Skip to content

MGMT-12471: Don't wait for console if it is disabled - #4594

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
jhernand:dont_wait_for_console_if_disabled
Dec 13, 2022
Merged

MGMT-12471: Don't wait for console if it is disabled#4594
openshift-merge-robot merged 1 commit into
openshift:masterfrom
jhernand:dont_wait_for_console_if_disabled

Conversation

@jhernand

@jhernand jhernand commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Tested manually creating a cluster with the console disabled and waiting for the installation to complete.

$ cat > disable-console.json <<.
{
  "capabilities": {
    "baselineCapabilitySet": "None",
    "additionalEnabledCapabilities": [
      "baremetal"
    ]
  }
}
.

$ cat disable-console.json | jq -sR > disable-console.patch

$ ocm patch /api/assisted-install/v2/clusters/.../install-config --body disable-console.patch

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci openshift-ci Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 8, 2022
@openshift-ci
openshift-ci Bot requested review from avishayt and mkowalski November 8, 2022 15:44
@openshift-ci

openshift-ci Bot commented Nov 8, 2022

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhernand

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2022
@jhernand jhernand changed the title Dont wait for console if disabled MGMT-12471: Don't wait for console if disabled Nov 8, 2022
@jhernand jhernand changed the title MGMT-12471: Don't wait for console if disabled MGMT-12471: Don't wait for console if it is disabled Nov 8, 2022
@codecov

codecov Bot commented Nov 8, 2022

Copy link
Copy Markdown

Codecov Report

Merging #4594 (7bf4c68) into master (46d5090) will increase coverage by 0.08%.
The diff coverage is n/a.

❗ Current head 7bf4c68 differs from pull request most recent head 24b5d95. Consider uploading reports for the commit 24b5d95 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4594      +/-   ##
==========================================
+ Coverage   66.95%   67.03%   +0.08%     
==========================================
  Files         200      200              
  Lines       28436    28179     -257     
==========================================
- Hits        19040    18891     -149     
+ Misses       7662     7590      -72     
+ Partials     1734     1698      -36     
Impacted Files Coverage Δ
internal/oc/release.go 77.19% <0.00%> (-1.17%) ⬇️
internal/host/monitor.go 77.84% <0.00%> (-0.14%) ⬇️
internal/common/common.go 32.08% <0.00%> (ø)
internal/ignition/ignition.go 58.05% <0.00%> (ø)
internal/operators/lvm/config.go 100.00% <0.00%> (ø)
internal/host/hostutil/test_utils.go 11.28% <0.00%> (+0.05%) ⬆️
internal/bminventory/inventory.go 69.37% <0.00%> (+0.11%) ⬆️
...oller/controllers/agentserviceconfig_controller.go 85.59% <0.00%> (+0.73%) ⬆️
internal/operators/lso/ls_operator.go 11.42% <0.00%> (+0.90%) ⬆️
internal/host/hostcommands/install_cmd.go 83.88% <0.00%> (+1.42%) ⬆️
... and 6 more

@jhernand

Copy link
Copy Markdown
Contributor Author

/test edge-e2e-metal-assisted

@jhernand
jhernand force-pushed the dont_wait_for_console_if_disabled branch from fc21688 to c708295 Compare November 16, 2022 18:02
@jhernand

Copy link
Copy Markdown
Contributor Author

@avishayt @mkowalski the bot assigned you as reviewers, I'd appreciate your input.

@iranzo iranzo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just a small nit from my PoV

Comment thread internal/bminventory/inventory.go Outdated
@iranzo iranzo removed their assignment Nov 24, 2022
@jhernand
jhernand force-pushed the dont_wait_for_console_if_disabled branch from c708295 to 24b5d95 Compare November 24, 2022 13:22
@jhernand

Copy link
Copy Markdown
Contributor Author

/test edge-e2e-metal-assisted

@jhernand

Copy link
Copy Markdown
Contributor Author

Dear reviewers (@avishayt and @mkowalski) I need your input to move this forward.

Comment thread internal/bminventory/inventory.go Outdated
@avishayt

Copy link
Copy Markdown
Contributor

Looks good to me but would prefer another set of eyes.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 6, 2022
@filanov

filanov commented Dec 6, 2022

Copy link
Copy Markdown
Contributor

/assign @eranco74
/assign @tsorya

@eranco74 eranco74 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good, just nit

Comment thread internal/bminventory/inventory.go Outdated
Comment thread internal/bminventory/inventory.go Outdated
Comment thread internal/bminventory/inventory.go Outdated
Comment thread internal/bminventory/inventory.go Outdated
Comment thread internal/bminventory/inventory.go Outdated
@jhernand
jhernand force-pushed the dont_wait_for_console_if_disabled branch from 24b5d95 to 113675e Compare December 7, 2022 13:48
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 7, 2022
@jhernand

jhernand commented Dec 7, 2022

Copy link
Copy Markdown
Contributor Author

/hold I having an issue when testing this manually, will unhold when I understand/fix it.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 7, 2022
@jhernand
jhernand force-pushed the dont_wait_for_console_if_disabled branch from 113675e to a5ff743 Compare December 7, 2022 19:38
@jhernand
jhernand force-pushed the dont_wait_for_console_if_disabled branch from a5ff743 to f1590bd Compare December 7, 2022 19:38
@jhernand

jhernand commented Dec 9, 2022

Copy link
Copy Markdown
Contributor Author

@eranco74 @tsorya while testing this I realized that capabilities are supported since 4.11, but the console capability is only supported since 4.12. I changed the patch accordingly.

While testing with 4.11 I also detected that there is a potential crash in the controller. I am trying to address it here: openshift/assisted-installer#589.

I think this is ready for review again.

@jhernand

jhernand commented Dec 9, 2022

Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 9, 2022

@eranco74 eranco74 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@eranco74

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2022
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 13, 2022
Currently the service keeps for each cluster a list of the operators
that it will wait for before considering the cluster installed. This
list includes the console operator. But since version 4.11 that can be
disabled via the `capabilities` section of the installer configuration
file. For example:

```yaml
capabilities:
  baselineCapabilitySet: None
  additionalEnabledCapabilities:
  - baremetal
```

That will configure the cluster so that only the `baremetal` optional
capability will be installed, which effectively disables the `Console`
capability.

This patch changes the service so that it removes the console operator
from that list when this kind of update is made to the installer
configuration.

Related: https://issues.redhat.com/browse/MGMT-12471
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
@jhernand
jhernand force-pushed the dont_wait_for_console_if_disabled branch from f1590bd to a76bedf Compare December 13, 2022 08:12
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 13, 2022
@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2022
@jhernand

Copy link
Copy Markdown
Contributor Author

@eranco74 @tsorya I had to rebase this, the only change was in go.sum, it needs the /lgtm again.

@tsorya

tsorya commented Dec 13, 2022

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2022
@eranco74

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Dec 13, 2022

Copy link
Copy Markdown
Contributor

@jhernand: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot
openshift-merge-robot merged commit f814368 into openshift:master Dec 13, 2022
@jhernand
jhernand deleted the dont_wait_for_console_if_disabled branch December 13, 2022 11:09
jhernand added a commit to jhernand/assisted-service that referenced this pull request Feb 14, 2023
This is a backport of MGMT-12471 for ACM 2.7. It contains the changes in
pull request openshift#4594.

Currently the service keeps for each cluster a list of the operators
that it will wait for before considering the cluster installed. This
list includes the console operator. But since version 4.11 that can be
disabled via the `capabilities` section of the installer configuration
file. For example:

```yaml
capabilities:
  baselineCapabilitySet: None
  additionalEnabledCapabilities:
  - baremetal
```

That will configure the cluster so that only the `baremetal` optional
capability will be installed, which effectively disables the `Console`
capability.

This patch changes the service so that it removes the console operator
from that list when this kind of update is made to the installer
configuration.

Related: https://issues.redhat.com/browse/MGMT-13664
Related: https://issues.redhat.com/browse/MGMT-12471
Related: openshift#4594
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>

Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
jhernand added a commit to jhernand/assisted-service that referenced this pull request Feb 15, 2023
This is a backport of MGMT-12471 for ACM 2.6. It includes the changes
from pull request openshift#4594.

Currently the service keeps for each cluster a list of the operators
that it will wait for before considering the cluster installed. This
list includes the console operator. But since version 4.11 that can be
disabled via the `capabilities` section of the installer configuration
file. For example:

```yaml
capabilities:
  baselineCapabilitySet: None
  additionalEnabledCapabilities:
  - baremetal
```

That will configure the cluster so that only the `baremetal` optional
capability will be installed, which effectively disables the `Console`
capability.

This patch changes the service so that it removes the console operator
from that list when this kind of update is made to the installer
configuration.

Related: https://issues.redhat.com/browse/MGMT-13657
Related: https://issues.redhat.com/browse/MGMT-12471
Related: openshift#4594
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
openshift-merge-robot pushed a commit that referenced this pull request Feb 16, 2023
This is a backport of MGMT-12471 for ACM 2.6. It includes the changes
from pull request #4594.

Currently the service keeps for each cluster a list of the operators
that it will wait for before considering the cluster installed. This
list includes the console operator. But since version 4.11 that can be
disabled via the `capabilities` section of the installer configuration
file. For example:

```yaml
capabilities:
  baselineCapabilitySet: None
  additionalEnabledCapabilities:
  - baremetal
```

That will configure the cluster so that only the `baremetal` optional
capability will be installed, which effectively disables the `Console`
capability.

This patch changes the service so that it removes the console operator
from that list when this kind of update is made to the installer
configuration.

Related: https://issues.redhat.com/browse/MGMT-13657
Related: https://issues.redhat.com/browse/MGMT-12471
Related: #4594

Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
openshift-merge-robot pushed a commit that referenced this pull request Feb 20, 2023
This is a backport of MGMT-12471 for ACM 2.7. It contains the changes in
pull request #4594.

Currently the service keeps for each cluster a list of the operators
that it will wait for before considering the cluster installed. This
list includes the console operator. But since version 4.11 that can be
disabled via the `capabilities` section of the installer configuration
file. For example:

```yaml
capabilities:
  baselineCapabilitySet: None
  additionalEnabledCapabilities:
  - baremetal
```

That will configure the cluster so that only the `baremetal` optional
capability will be installed, which effectively disables the `Console`
capability.

This patch changes the service so that it removes the console operator
from that list when this kind of update is made to the installer
configuration.

Related: https://issues.redhat.com/browse/MGMT-13664
Related: https://issues.redhat.com/browse/MGMT-12471
Related: #4594

Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants