automated installations (16)

Last weeks presentation on my new server install system (see automated installations) went very well. I had managed to scrap only 4 pages of text together, but I did a 2.5 hour presentation with that.

It's possible that I'll get the chance to do another presentation about this, for a much bigger audience. This system could prove useful in other departments :)

After my demo, my boss was surprised at how easy an installation was. It boots, shows a little menu with 8 questions (which contains reasonable default values that get regenerated when you change one of the values), and then it starts installing. The rest of the installation process is fully automagic and the next thing you'll see on screen is the login prompt.

Since he claims he knows nothing of unix systems, my boss wanted to try it. "If I can do it, anyone can". So I allocated a new machine for a test-install. He put in the CD, booted it up and filled in the values.
After that, the installer should have autodetected which network card to use, but it failed there ;)
*embarassing*

To detect which network card to use, the installer brings up each interface in turn, configured it with the given IP and tries to connect to the FTP-server. If it succeeds, that network card is used. One of the problems I had when programming this system was that everything needed to happen in a limited shell environment. There was no perl, no libc, nothing. All I had to test was netcat and that one didn't even support all the options a normal netcat does.

So how can I detect when a connect is not happening ? Simple, I can read the return code from netcat. If it's 0, it succeeded, otherwise it failed. The problem is that when it fails, it will hang forever and we don't want that. So before the netcat does its test, I set a timer for 3 seconds after which the netcat is killed.

And that was the problem. In VMWare, 3 seconds of virtual time is like 15 or 20 seconds real time. When testing on the real server, the network test was killed before it could report a working connection.

I fixed the problem and (my boss) will run a new test today.