-
Notifications
You must be signed in to change notification settings - Fork 212
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
ACM-14502: Allow updates to InfraEnv version #6808
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
@carbonin: This pull request references Jira Issue OCPBUGS-42151, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
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. |
/test ? |
@carbonin: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
In response to this:
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. |
@carbonin: This pull request references ACM-14502 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.18.0" version, but no target version was set. In response to this:
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. |
/test edge-subsystem-kubeapi-aws |
/test edge-subsystem-aws |
6d5ccff
to
89fe66c
Compare
/test edge-subsystem-kubeapi-aws |
@carbonin: This pull request references ACM-14502 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.18.0" version, but no target version was set. In response to this:
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. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6808 +/- ##
==========================================
- Coverage 68.73% 68.73% -0.01%
==========================================
Files 249 249
Lines 37278 37299 +21
==========================================
+ Hits 25624 25636 +12
- Misses 9373 9377 +4
- Partials 2281 2286 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
73d2e61
to
cc8f9fe
Compare
This function is related only towards validating the data against the cluster rather than generally for the infraenv. Additionally when the version is updated that should be used for validation against the cluster.
Previously this was only validated after the new data was saved to the database and the new image URL was being built.
@@ -4988,7 +4998,7 @@ func (b *bareMetalInventory) UpdateInfraEnvInternal(ctx context.Context, params | |||
cluster = nil | |||
} | |||
} | |||
if err = validateArchitectureAndVersion(b.versionsHandler, cluster, infraEnv.CPUArchitecture, infraEnv.OpenshiftVersion); err != nil { | |||
if err = validateClusterArchitectureAndVersion(b.versionsHandler, cluster, infraEnv.CPUArchitecture, openshiftVersion); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if it's a late-binding infraEnv? Would we still want to validate the version with this function or does it not matter if the infraEnv isn't bound to a cluster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. IIRC we don't actually require someone to have defined cluster image sets (for the kubeapi case) before defining the infraenv. I'd rather leave that validation to the cluster API rather than tie infraenv and cluster concerns more tightly together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, we don't require a cluster image set for InfraEnv creation. That makes sense. Thanks!
@carbonin: The following test failed, say
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carbonin, CrystalChun 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:
Approvers can indicate their approval by writing |
Allow updating the InfraEnv OpenshiftVersion in both the REST and kube APIs.
This is useful when after initial install a user wants to add a new node to a cluster, but the cluster has been upgraded between install and the scale out. Previously a user would need to create a new infraenv with identical settings to the old one and a newer version.
With this change users will be able to update the infraenv os image version just like other attributes.
For some background:
The field was added to the InfraEnv CR in #5365 for https://issues.redhat.com//browse/MGMT-14923 and I don't see any discussion there about updates.
Based on the PR that added infraenv update (#2319) the update params were originally created without the version with no discussion I could find.
Based on these it doesn't seem like this was an intentional omission, so it should be safe to add it here.
List all the issues related to this PR
What environments does this code impact?
How was this code tested?
Deployed assisted service kube-api, created an infraenv, updated
osImageVersion
several times.Observed the URL change accordingly each time and an error in the infraenv status when a non-existent version was requested.
Additionally subsystem tests were added to cover this.
Checklist
docs
, README, etc)Reviewers Checklist