Distribution and Method

Statement against using Bash scripts and Rsync to maintain similar workstations.

For one year, I have maintained nearly forty Gentoo workstations in COSI using previously written Bash scripts and Rsync. The general idea is in syncing a client's whole filesystem to a server. Some computers had custom configuration requirements. The customizations were set in post-sync and boot-up Bash scripts. The scripts required various maintenance and enhancements. With this practical experience, I feel that I have the right to express my opinion on usefulness of Rsync and Bash scripts for maintaining a lab.

The two tools have their limitations. In particular, the relaxed type and variable-existence checking in Bash forces one to write sloppy scripts. This is never good for maintaining our number of workstations in a public lab.

Although rsync has been developed for a long time, and is used on smaller scale in some professional projects, it is unsuitable for distributing a whole file-system over many workstations. The main limitation of rsync that is clearly visible to me is in the fact that it does not support autonomous writing. That is, if it is interrupted before finishing writing, the job will be left half-done. The better kind of behavior would be constituted by either writing all changes, or not writing anything at all. Also, rsync does not support multicasting, which is more of a convenience issue, rather than a problem.

The method of distributing one image over the network of forty heterogeneous workstations and performing customizations from a Bash script has proven to be an error-prone practice. Often, we had machines that behaved absolutely unpredictably for unknown reasons. For example, sometimes workstations would reboot while a user is logged in, though scripts are supposed to perform a check for users.

I believe that using Fedora's Stateless Linux would take off much of the burden of making sure all machines are up-to-date, and teach maintainers valuable skills of using the distribution that is the base of RHEL, the de-facto standard (along with Novell's SLES) for enterprise Linux solutions. This is also a great opportunity for newcomers to get involved with an existing open-source project, and "learn from the pros."

To summarize, the main disadvantage of Bash in mission-critical applications is in its lack of comprehensive error checking and strong typing. Rsync does not provide multicasting and has error-prone transfer. The method of distributing one image over a number of heterogeneous computers is upsetting. Rsync can still be used on smaller scale and maybe not in mission-critical applications, but we definitely have to move away from Bash scripts. I believe Fedora's Stateless Linux to be the solution to our problems.

Unfortunately for this statement, I do not have solid figures. I was not trying to break Rsync and Bash. I was doing the opposite: trying to work with them, and found that they do not satisfy COSI lab's requirements.


Last edited by Rouslan Solomakhin on December 8, 2005.