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

Bug 1852959: Add ProviderID #83

Merged
merged 1 commit into from Jul 10, 2020

Conversation

hardys
Copy link

@hardys hardys commented Jul 6, 2020

The cluster autoscaler expects this to be set on both machines and nodes, and typically the cluster-api provider will set the
value in the spec for the machine e.g

https://github.com/openshift/cluster-api-provider-aws/blob/master/pkg/actuators/machine/reconciler.go#L280

In the baremetal case though there's no "provider" to set the value on the node, so we also update that correspondingly (TODO)

https://bugzilla.redhat.com/show_bug.cgi?id=1852959

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Jul 6, 2020
@openshift-ci-robot
Copy link

@hardys: This pull request references Bugzilla bug 1852959, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1852959: WIP Add ProviderID

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jul 6, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 6, 2020
@openshift-ci-robot
Copy link

@hardys: This pull request references Bugzilla bug 1852959, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1852959: WIP Add ProviderID

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.

1 similar comment
@openshift-ci-robot
Copy link

@hardys: This pull request references Bugzilla bug 1852959, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1852959: WIP Add ProviderID

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.

@hardys
Copy link
Author

hardys commented Jul 6, 2020

WIP as this doesn't yet set the node ProviderID - I'm not certain of the best approach there, is it reasonable to just wait for the node reference to appear on the machine, then write the ProviderID in the actuator update when that happens, e.g same place this is currently setting the machine ProviderID?

Also not yet tested but feedback welcome.

@hardys
Copy link
Author

hardys commented Jul 6, 2020

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 6, 2020
pkg/cloud/baremetal/actuators/machine/actuator.go Outdated Show resolved Hide resolved
pkg/cloud/baremetal/actuators/machine/actuator.go Outdated Show resolved Hide resolved
pkg/cloud/baremetal/actuators/machine/actuator.go Outdated Show resolved Hide resolved
@hardys
Copy link
Author

hardys commented Jul 10, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 10, 2020
The cluster autoscaler expects this to be set on both machines
and nodes, and typically the cluster-api provider will set the
value in the spec for the machine e.g

https://github.com/openshift/cluster-api-provider-aws/blob/master/pkg/actuators/machine/reconciler.go#L280

In the baremetal case though there's no "provider" to set the value
on the node, so we also update that correspondingly

https://bugzilla.redhat.com/show_bug.cgi?id=1852959
@hardys hardys changed the title Bug 1852959: WIP Add ProviderID Bug 1852959: Add ProviderID Jul 10, 2020
if err != nil {
if errors.IsNotFound(err) {
log.Printf("Not setting Node ProviderID - Node does not yet exist for Machine %s", machine.Name)
return nil

Choose a reason for hiding this comment

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

What causes the controller to try again if the node isn't there? Does the controller watch Nodes as well as Machines?

Copy link
Member

Choose a reason for hiding this comment

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

It does watch Nodes, looks for the machine annotation on the Node, and queues the corresponding Machine for reconciliation. The annotation itself gets added by the nodelink controller.

Choose a reason for hiding this comment

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

Thanks, TIL

@dhellmann
Copy link

/approve
/lgtm

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, hardys, mhrivnak

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 [dhellmann,hardys,mhrivnak]

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2020
@openshift-merge-robot openshift-merge-robot merged commit 6b76dcf into openshift:master Jul 10, 2020
@openshift-ci-robot
Copy link

@hardys: All pull requests linked via external trackers have merged: openshift/cluster-api-provider-baremetal#83. Bugzilla bug 1852959 has been moved to the MODIFIED state.

In response to this:

Bug 1852959: Add ProviderID

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.

honza pushed a commit to honza/cluster-api-provider-baremetal that referenced this pull request Feb 7, 2022
🏃 refactor code to replace bmm by m3m
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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants