Code review comment for ~ltrager/maas:lp1730524

Revision history for this message
Andres Rodriguez (andreserl) wrote :

I agree with Blake in that while this seems to be a good change, I'm not quite sure it will address the issue.

So, I investigate this issue before and the real issue is not exactly what Blake is describing. The IPMI discover script already ensures that if there's an error updating the password on the BMC, that it won't update the password on MAAS.

However, the issue is different. What happens is that while or right before MAAS is to run the IPMI discovery script, a different error could cause MAAS to mark a machine failed commissioning. Doing so, doesn't prevent the machine from continueing on running the IPMI discovery, as such, the BMC password gets changed, and even though MAAS had already amrked the machine failed commissioning, MAAS never stops running any remaining script.

This is because cloud-init runs the scripts. So this would be:

1. cloud-init starts
2. cloud-init sends failure message
3. right after the message, maas starts ipmi discovery and changes password
4. Howeve5r before password has been sent to MAAS, MAAS processes 2 above and marks machine failed commissioning
5. cloud-init continues running ipmi discover, resets password on BMC and attempts to send it back to MAAS, but fails because MAAS has already marked the machine as failed commissioning and removes the token.
6. cloud-init continues running other parts of its scripts.

« Back to merge proposal