Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

_maintain function in hil.api doesn't do anything. #1035

Open
zenhack opened this issue Sep 4, 2018 · 2 comments
Open

_maintain function in hil.api doesn't do anything. #1035

zenhack opened this issue Sep 4, 2018 · 2 comments

Comments

@zenhack
Copy link
Contributor

zenhack commented Sep 4, 2018

I was starting to pick at removing the legacy obm stuff, and came across this:

hil/hil/api.py

Line 1463 in 83c8f6d

return

The _maintain function validates the config, aborts if a maintenance_project is specified but doesn't exist, and then just returns. The latter half of the function is dead code.

This also raises the concern that what it's supposed to be doing is a bit fiddly with the new structure: power_off just does a redirect now, and when _maintain gets run the obm will be disabled.

Obviously we should make the latter half of the function not-dead code, and we should probably write some integration tests for it. I'm half tempted to just not power off the node automatically; skipping this massively simplifies HIL, and it's functionality that can easily be implemented outside of HIL. It would also be good to be dogfooding this API; we clearly haven't actually been using it thus far :/.

Edit by naved: put the permalink for the line (since after merging #1034 the lines changed).

@naved001
Copy link
Contributor

naved001 commented Sep 5, 2018

skipping this massively simplifies HIL, and it's functionality that can easily be implemented outside of HIL.

Yeah, I am fine with it since it can be implemented outside of HIL.

@zenhack
Copy link
Contributor Author

zenhack commented Sep 6, 2018

Ok. In that case I'll probably just drop the check as part of removing the legacy stuff, and we can do the rest of the fix for this separately.

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

No branches or pull requests

2 participants