Things to fix or improve in the JumpStart scripts


Think about splitting start
There might be some merit to splitting start into two scripts. One would remain as start and would be used just to start a JumpStart on a machine. It would do the checking to make sure no one is logged on, no do_not_jumpstart file, etc. The other script would take the responsibilites of checking on the status of machines while they are jumpstarting and updating the status file. It might be sufficient to just add an option to start which would tell it not to check on the status. I.e. once it starts a machine or group of machines it would exit instead of waiting for them to finish.
Get the NIS master hostname from ypwhich -m
Currently the hostname of the NIS master is hardcoded in config and start. It would probably be better to get it from a ypwhich -m.
Make $NUMFORKS dynamic
Currently the number of forks that start uses is hard coded as a constant at the top of the script. The problem with this is that if you have more forks than hosts the extra forking and stuff is wasted. It would be nicer if $NUMFORKS were determined dynamically. Perhaps instead you would defined $MAX_NUM_FORKS. Then if there were fewer hosts then $MAX_NUM_FORKS start would create a fork for each host. Otherwise it would create $MAX_NUM_FORKS and do the division of the hosts among the forks that it currently does. Something around 10 or 20 would probably be a good number for $MAX_NUM_FORKS.
Have the bootservers subroutine cache the list of bootservers in memory.
Currently config has to cache the list of bootservers in memory itself. It would be nicer to have the bootservers subroutine do it and then config could just call the subroutine whenever it needed the list. This would echo the philosophy of all of the subroutines in info.pl.
Cleanup the format of the status file
Currently the status file has eight fields: hostname, IP address, ethernet address, kernel architecture, new or down, building, room and status code. With the advent of info.pl it really is only necessary for the status file to have the hostname and status code. The other stuff is still there for historical reasons. Removing the other fields would make it a lot easier to look at the status file and would remove extraneous information.
Allow default option for kernel architecture field in profiles.pl
Currently you can only specify default for the subimage field when defining profiles in profiles.pl. Since most of our images don't have different paths for different kernel architectures (sun4m, sun4u) it would be nice to allow default for that field as well. That would eliminate much of the duplication of lines in profiles.pl. This just requires changing one or two of the subroutines at the top of the file.
We should start inetd from /sbin/sysconfig instead of /sbin/rcS
This isn't directly part of the JumpStart scripts but is relevant nevertheless. I modify the JumpStart root images so that inetd is started during the JumpStart. This allows start to rsh into the machine and check on its progress. For historical reasons I have always added an entry for inetd to /sbin/rcS in the root image. However, it would be more appropriate to uncomment the line that Sun already has in /sbin/sysconfig.
Finish the checkrules subroutine so that it supports the full rules file syntax.
Currently the checkrules subroutine supports most but not all of the rules file syntax. It would be nice to have it support the full syntax. This is documented in the comments at the top of checkrules.pl. One keyword that we don't support is the arch keyword. FYI the arch can be determined from either uname -p or /usr/ucb/mach.
Clean up rogue bootparam server reporting in config
When config finds rogue bootparams servers it tries to display them to the user. I don't think it does it very well. It should do a nicer job, as well as provide a pointer to some documentation about why they are a problem and how to get rid of them.
Actually implement restarting in start
An advertised feature of start is that when specifying one of -f or -F that one of those should restart any machines that are currently in the middle of a JumpStart. This would be useful if something goes wrong with a JumpStart and all of the machines are paused waiting for input or something. I.e. if the rules file were missing and they all started the interactive install. This feature was never implemented however.
Document how one goes about defining a new image in profiles.pl
I've never documented this process. I've just told people to cut and paste an existing entry. It should be documented somewhere.
Start should not give up the superlock like it does
Currently start gives up the superlock while the forks are gathering information and reaquires it when they are ready to write out their updates. There is the possibility that something else will write changes in that intervening period and they will be lost. Start should not give up the superlock during that period. The current behavior was an experiment in attempting to improve the performance of the status CGI script.
Config should ensure that the latest image is on the install server and that the correct boot block is on the boot server
Config just checks that the root, install and install_config directories exist on the install server. It does not even check to see if anything is in them. It probably should check them a little better. Also, it just checks to see if a file exists in /tftpboot on the boot server with the name it expects for the boot block (inetboot file). It does not check to see that it is the right file. Maybe it should do something like a checksum of it versus the one on the master server.