-
Notifications
You must be signed in to change notification settings - Fork 79
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
Set NodeSet.Status.DeployedVersion when update service is complete #899
Set NodeSet.Status.DeployedVersion when update service is complete #899
Conversation
pkg/openstack/dataplane.go
Outdated
|
||
// DataplaneNodesetsUpdated returns true if all nodesets are deployed with the latest version | ||
func DataplaneNodesetsUpdated(ctx context.Context, helper *helper.Helper, version *corev1beta1.OpenStackVersion, dataplaneNodesets *dataplanev1.OpenStackDataPlaneNodeSetList) bool { |
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.
this will get called repeatedly during a minor update until it reconciles. while this may work in some cases it also depends on DataplaneNodeSet to trigger a reconcile loop on OpenStackVersion (this is the only resource we are watching) and it is not as efficient as perhaps just having the OpenStackDataplaneNodeset controller do it (since it already watches Deployment anyway).
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.
Ok, I have reworked it to set a condition on the NodeSet instead, and just updated the func here to check that condition.
c108b57
to
c19f8a1
Compare
pkg/openstack/dataplane.go
Outdated
@@ -62,7 +62,7 @@ func DataplaneNodesetsDeployed(version *corev1beta1.OpenStackVersion, dataplaneN | |||
if !nodeset.IsReady() { | |||
return false | |||
} | |||
if nodeset.Status.DeployedVersion != version.Spec.TargetVersion { | |||
if !nodeset.Status.Conditions.IsTrue(dataplanev1.NodeSetMinorUpdateReadyCondition) { |
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 think we might need to check both of these right?
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.
The version check has already been done in the nodeset controller before the condition is set.
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.
while that may be true, this function gets executed from the openstackversion side of things which could bump targetVersion. I am trying to guard against the case where the version changes, but in the interim this condition hasn't yet been reset
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.
Reworked so that this "if" condition will work without any changes.
c19f8a1
to
cfb4154
Compare
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/032fdd4ff74b42548c172f28d801871d ❌ openstack-k8s-operators-content-provider FAILURE in 7m 51s |
faacaa8
to
4837c75
Compare
Changes setting NodeSet.Status.DeployedVersion to be only when a Deployment has completed that contains a service where EDPMServiceType == 'update'. When satisfied, the Deployment's Status.DeployedVersion will be copied to NodeSet.Status.DeployedVersion. Jira: https://issues.redhat.com/browse/OSPRH-8176 Signed-off-by: James Slagle <[email protected]>
4837c75
to
c884797
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprince, slagle 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 |
06baa21
into
openstack-k8s-operators:main
Set NodeSet.Status.DeployedVersion when update service is complete
Changes setting NodeSet.Status.DeployedVersion to be only when a
Deployment has completed that contains a service where EDPMServiceType
== 'update'. When satisfied, the Deployment's Status.DeployedVersion
will be copied to NodeSet.Status.DeployedVersion.
Jira: https://issues.redhat.com/browse/OSPRH-8176
Signed-off-by: James Slagle [email protected]