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

Node shutdown not implemented sufficiently #72

Open
Gerrit91 opened this issue May 30, 2023 · 2 comments
Open

Node shutdown not implemented sufficiently #72

Gerrit91 opened this issue May 30, 2023 · 2 comments

Comments

@Gerrit91
Copy link
Contributor

I saw in #71 that we implemented machine shutdown like:

// InstanceShutdown returns true if the instance is shutdown according to the cloud provider.
// Use the node.name or node.spec.providerID field to find the node in the cloud provider.
func (i *InstancesController) InstanceShutdown(ctx context.Context, node *v1.Node) (bool, error) {
	klog.Infof("InstanceShutdown: node %q", node.GetName())
	machine, err := i.MetalService.GetMachineFromProviderID(ctx, node.Spec.ProviderID)
	if err != nil || machine.Allocation == nil {
		return true, err
	}
	return false, nil
}

We can really tell if a machine is shut down through the machine IPMI information now, so we could adjust that information.

@majst01
Copy link
Contributor

majst01 commented May 30, 2023

I am not sure if this is better, from the kubernetes perspective a machine without a allocation is not usable anymore. If it is powered down it might come back ??

@Gerrit91
Copy link
Contributor Author

Gerrit91 commented Jun 1, 2023

I think so. Why the interface has this function I am not sure, but from their tests it looks like this is the information they want to have (e.g. https://github.com/kubernetes/cloud-provider/blob/4aee77fb09241781309a244eea3b6bd4bd26b0c3/controllers/nodelifecycle/node_lifecycle_controller_test.go#LL650C10-L650C83).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants