On Sun, 2010-03-28 at 12:31 +0200, Piotr Jaroszyński wrote: > > Take a cluster booting after a power failure: > > > > waitfor DHCP_SERVER_IP A_LATE_STARTING_SERVICE 0 > > dhcp net0 > > waitfor SAN_SERVER_IP A_LATE_STARTING_SERVICE 0 > > chain <some cryptic SAN rune> > > > > My only concern would be it would need to have an ASCII spin thingi or > > some other indication that its not just locked up :-) > > > > Others might not agree that the logic is friendly or even that the idea > > is good ? > > Perhaps a command like "keeptrying <command> [<interval>]" would be > more generic? It would just keep retrying <command> unless it succeeds > every <interval> seconds. OTOH with commands returning whether they > worked or not and conditionals it could be implemented as a simple > loop. > With it, your example could be implemented as: > > keeptrying dhcp net0 > keeptrying chain <some cryptic SAN rune> 15 > > I think it more closely reflects what you are after. You don't really > care whether A_LATE_STARTING_SERVICE is up, you just want to get your > ip from dhcp and then boot from iscsi or something. (And btw. you > can't do waitfor ip port w/o an IP address in the first place :) >
I was thinking more like a single global timeout variable, default is zero (forever) but settable at any point and respected by each operation. dhcp net0 timeout 30s chain http://ip:8080/some_boot_file chain http://anotherip:8080/some_boot_file But as I said, this adds fallbacks to every operation - could end up with nobody sure how a box booted, or even worse any number of subtle gotchas in scripting ! Cheers, Jon _______________________________________________ gPXE mailing list [email protected] http://etherboot.org/mailman/listinfo/gpxe
