I think having the provisioning modules call post_load() will allow for the
greatest flexibility. Since it shouldn't be much of an imposition and matches
how capture() works, I'll work on coding the following changes:
-call to $os->post_load() removed from new.pm
-call to $os->post_load() added to each provisioning module's load() sub
-code removed in provisioning modules which waits for computer to respond
-code which waits for the computer to respond added to each OS module's
post_load() sub
After thinking about it, I don't see the need for new.pm to do any looping. It
should call the provisioning module's load() sub once and check the return
value. The provisioning modules can implement repeated attempts as necessary
within the load() sub.
It is useful the $os->post_load() to know if it's being run for the first time
or a repeat attempt. It could increase its timeouts if it's a repeated attempt.
I will have the provisioning modules pass it the attempt number.
A looping subroutine would be useful in many cases. Good idea. It may be
better to create such a sub in Module.pm so that all types of modules have
access to it. I'm thinking of creating a sub which you pass a code reference
and some timeout parameters. It attempts to run the code until it returns true
up until the timeout is reached.
Thanks,
Andy
Sean Dilda wrote:
I don't think having $provisioning->load() call $os->post_load() would
be such an imposition. However, if you want to have multiple attempts
at $os->post_load() as was mentioned in an earlier email, it'd be nice
to have a function defined in the OS module to do that looping.
I haven't used the xCAT module. What does makesshgkh do?