assisted-service icon indicating copy to clipboard operation
assisted-service copied to clipboard

Fix installation from a 4.17 hub with converged flow

Open carbonin opened this issue 1 year ago • 2 comments

This allows ironic inspector URL to be missing in ICC config secret.

In 4.17 this is expected to be missing as the inspector service as been removed.

If this URL is provided the agent will attempt to contact the inspector service when it shouldn't causing the install to fail.

In earlier versions the secret will not be present so the controller will continue to provide the inspector service URL as before.

List all the issues related to this PR

Resolves https://issues.redhat.com/browse/OCPBUGS-37472

  • [ ] New Feature
  • [ ] Enhancement
  • [x] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

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

How was this code tested?

Deployed a 4.17 hub cluster and installed a 4.17 SNO from assisted installed on it with this branch image.

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

Checklist

  • [x] Title and description added to both, commit and PR.
  • [x] Relevant issues have been associated (see [CONTRIBUTING] guide)
  • [x] This change does not require a documentation update (docstring, docs, README, etc)
  • [x] 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?

carbonin avatar Jul 31 '24 19:07 carbonin

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.55%. Comparing base (77c8d88) to head (68f14ea). Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6639   +/-   ##
=======================================
  Coverage   68.55%   68.55%           
=======================================
  Files         246      246           
  Lines       36684    36681    -3     
=======================================
- Hits        25148    25146    -2     
  Misses       9297     9297           
+ Partials     2239     2238    -1     
Files Coverage Δ
internal/controller/controllers/bmo_utils.go 70.83% <100.00%> (-1.17%) :arrow_down:

... and 2 files with indirect coverage changes

codecov[bot] avatar Jul 31 '24 20:07 codecov[bot]

Looks like this update is going to require us to bump go to 1.22...

[1/2] STEP 6/9: RUN cd cmd && CGO_ENABLED=1 GOFLAGS="" GO111MODULE=on go build -o /build/assisted-service
go: github.com/openshift/image-customization-controller in ../vendor/modules.txt requires go >= 1.22 (running go 1.21.11; GOTOOLCHAIN=local)

@adriengentil do you know if we have any immediate plans to do this? That would also effectively rule out a backport though ...

carbonin avatar Jul 31 '24 21:07 carbonin

please retitle and add MGMT-18505

gamli75 avatar Aug 01 '24 07:08 gamli75

@adriengentil do you know if we have any immediate plans to do this? That would also effectively rule out a backport though ...

not that I'm aware of but @danmanor is currently working at updating the build images, so it may be the opportunity to update go version as well: https://github.com/openshift/assisted-service/pull/6637/files

adriengentil avatar Aug 01 '24 08:08 adriengentil

Hum, what fails is the build of https://github.com/openshift/assisted-service/blob/master/Dockerfile.assisted-service.ocp#L2C1-L2C88

Opened: https://github.com/openshift/assisted-service/pull/6641 https://github.com/openshift/release/pull/55080

this issue with OCP build/branches shouldn't affect ocm branches, but we still may need to upgrade golang version there.

adriengentil avatar Aug 01 '24 08:08 adriengentil

Looks like this update is going to require us to bump go to 1.22...

[1/2] STEP 6/9: RUN cd cmd && CGO_ENABLED=1 GOFLAGS="" GO111MODULE=on go build -o /build/assisted-service
go: github.com/openshift/image-customization-controller in ../vendor/modules.txt requires go >= 1.22 (running go 1.21.11; GOTOOLCHAIN=local)

@adriengentil do you know if we have any immediate plans to do this? That would also effectively rule out a backport though ...

Yes, there is a task to do it https://issues.redhat.com/browse/MGMT-18384 @eifrach

gamli75 avatar Aug 01 '24 09:08 gamli75

Looks like this update is going to require us to bump go to 1.22...

The task was to update to 1.21, do we want to switch to 1.22? I assume if we do the assisted service we will also update all other related services

eifrach avatar Aug 01 '24 11:08 eifrach

Sorry for the confusion and how long it took me to update this, but I'm hoping the 4.16 branch will work. It also has the fix we need.

carbonin avatar Aug 01 '24 18:08 carbonin

@carbonin: This pull request references MGMT-18505 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to this:

This allows ironic inspector URL to be missing in ICC config secret.

In 4.17 this is expected to be missing as the inspector service as been removed.

If this URL is provided the agent will attempt to contact the inspector service when it shouldn't causing the install to fail.

In earlier versions the secret will not be present so the controller will continue to provide the inspector service URL as before.

List all the issues related to this PR

Resolves https://issues.redhat.com/browse/OCPBUGS-37472

  • [ ] New Feature
  • [ ] Enhancement
  • [x] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

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

How was this code tested?

Deployed a 4.17 hub cluster and installed a 4.17 SNO from assisted installed on it with this branch image.

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

Checklist

  • [x] Title and description added to both, commit and PR.
  • [x] Relevant issues have been associated (see [CONTRIBUTING] guide)
  • [x] This change does not require a documentation update (docstring, docs, README, etc)
  • [x] 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?

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 openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Aug 01 '24 19:08 openshift-ci-robot

@carbonin: This pull request references MGMT-18505 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to this:

This allows ironic inspector URL to be missing in ICC config secret.

In 4.17 this is expected to be missing as the inspector service as been removed.

If this URL is provided the agent will attempt to contact the inspector service when it shouldn't causing the install to fail.

In earlier versions the secret will not be present so the controller will continue to provide the inspector service URL as before.

List all the issues related to this PR

Resolves https://issues.redhat.com/browse/MGMT-18505

  • [ ] New Feature
  • [ ] Enhancement
  • [x] Bug fix
  • [ ] Tests
  • [ ] Documentation
  • [ ] CI/CD

What environments does this code impact?

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

How was this code tested?

Deployed a 4.17 hub cluster and installed a 4.17 SNO from assisted installed on it with this branch image.

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

Checklist

  • [x] Title and description added to both, commit and PR.
  • [x] Relevant issues have been associated (see [CONTRIBUTING] guide)
  • [x] This change does not require a documentation update (docstring, docs, README, etc)
  • [x] 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?

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 openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Aug 01 '24 19:08 openshift-ci-robot

@carbonin: all tests passed!

Full PR test history. Your PR dashboard.

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-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Aug 01 '24 21:08 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adriengentil, carbonin

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [adriengentil,carbonin]

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

openshift-ci[bot] avatar Aug 02 '24 08:08 openshift-ci[bot]

[ART PR BUILD NOTIFIER]

Distgit: ose-agent-installer-api-server This PR has been included in build ose-agent-installer-api-server-container-v4.18.0-202408021115.p0.ga53b0e2.assembly.stream.el9. All builds following this will include this PR.

openshift-bot avatar Aug 02 '24 12:08 openshift-bot

We need to backport this so I'll create a custom backport PR that includes this as well as the original change

carbonin avatar Aug 02 '24 12:08 carbonin