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

[IPMITOOL] Always check state before power actions #382

Open
jacobweinstock opened this issue Jan 10, 2024 · 3 comments
Open

[IPMITOOL] Always check state before power actions #382

jacobweinstock opened this issue Jan 10, 2024 · 3 comments

Comments

@jacobweinstock
Copy link
Member

jacobweinstock commented Jan 10, 2024

It appears that with some vendors/models an ipmitool chassis power off call to an already off machine will cause an error: Set Chassis Power Control to Down/Off failed: Command not supported in present state. In testing, this was only with some Dell models. The HP and Supermicro's i tested against did not error like this. They returned successfully: Chassis Power Control: Down/Off.

We should consider adding chassis power status checks before running power on, off, reset, cycle commands.

@joelrebel i'm keen to know your opinion/experience here.

@nnuss
Copy link
Contributor

nnuss commented Jan 11, 2024

Seems like a revival of #223 / #259 ?

@chrisdoherty4
Copy link
Collaborator

chrisdoherty4 commented Jan 16, 2024

It looks like we could add back the following snippet and silently ignore if the device is off unlike previously where it errored.

s, err := i.IsOn(ctx)
if err != nil {
	return false, err
}

@joelrebel
Copy link
Member

Im a bit late to this, but yes to adding a check that makes bmclib more consistent across hardware.

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

4 participants