Do you need something to help you study for the RHCE exam?  Trouble-Maker is going to help you break stuff!

Acid Lemon

Installing Trouble-Maker

As Trouble-maker is intended to be a cross-platform project, there will be no OS specific packages provided. Instead, the system will be made available as a .tar.gz file. To install it, cd to / and issue tar xvfz /path/to/trouble-maker-version.tgz. This will install the system in /usr/local/trouble-maker/. While this is nonstandard for production systems:
  1. This system should never be installed on a production system.
  2. This keeps the executable out of the path, to help prevent accidental execution.
To simplify installation, Trouble-Maker has been designed in such a way to require as few libraries as possible. However, we feel that if we use a few libraries it becomes far easier to develop modules for it. After all, what would be the point of a test system without tests? Thus, we require two Perl libraries: Archive-Tar and YAML. So, if your base distribution does not include both of these modules, please install them prior to running Trouble-Maker. System specific information follows:


RHEL_5 HowTo:
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm yum install perl-Archive-Tar perl-YAML cd /tmp wget http://sourceforge.net/projects/trouble-maker/files/trouble-maker/0.07/trouble-maker-0.07.tgz/download cd / tar -zxvf /tmp/trouble-maker-0.07.tgz /usr/local/trouble-maker/bin/trouble-maker.pl --version=RHEL_5 Fedora_13 HowTo:
yum install perl-Archive-Tar perl-YAML cd /tmp wget http://sourceforge.net/projects/trouble-maker/files/trouble-maker/0.07/trouble-maker-0.07.tgz/download cd / tar -zxvf /tmp/trouble-maker-0.07.tgz /usr/local/trouble-maker/bin/trouble-maker.pl --version=Fedora_13

Top

Running Trouble-Maker

The default mode for trouble-maker is easy to use. Simply run trouble-maker with the version flag. For example, on RedHat Enterprise Linux 5, run /usr/local/trouble-maker/bin/trouble-maker.pl --version=RHEL_5 This will randomly select a trouble from the kitbag and apply it to your system. The following versions exist:


Once the system has run, it will display a message on the console as if the user were reporting the problem. At this point, you should reboot your system and attempt to solve the problem. If you get stuck, the /tmp/trouble-maker directory exists to help you out. The following files are used:


After running trouble-maker and solving the problem, be sure to remove /tmp/trouble-maker/ so that you may re-run trouble-maker later. This prevents trouble-maker from accidentally overwriting key backup files from an earlier problem. The burden is on the user to verify that a problem is actually solved before re-running trouble-maker.


Top

Fancy options

The --selection switch allows you to select troubles in different ways. If it is not specified, or specified as random, it will randomly select a trouble module. conversely, you may specify a file name as the argument. If the file name matches a file in /usr/local/trouble-maker/kitbag, it will load that module. If the file name matches that of a YAML configuration file, it will take those arguments as an ordered list of problems to apply. As each problem is applied, it will be marked as inactive. This behavior can be used in training scenarios.
The --backupdir switch can be used to change the location of the backup directory. If it is not specified, it defaults to /tmp/trouble-maker/backup.
The --rescuedir switch can be used to change the location of the rescue directory. If it is not specified, it defaults to /tmp/trouble-maker/rescue.
The --kitbag switch can be used to change the location of the kitbag. If it is not specified, it defaults to /usr/local/trouble-maker/kitbag.

Top

Frequently Asked Questions

Design

  • Why is trouble-maker written in Perl?
    Perl was chosenbecause it was available on all of the initial target systems, and had a minimal amount of module dependencies for the planned development.
  • Do all of the trouble scripts have to be written in Perl?
    No. You may write a trouble script in whatever language you choose. Perl, shell, python, and ruby are the most popular.
  • Why are the troubles in the kitbag packed with tar but not compressed?
    As uncompressing files takes time, and compression does not provide large gains for small files, we felt it was unnecessary to compress the trouble modules. Additionally, this would require installing more Perl modules.

Annoyances

  • Why is trouble-maker installed in /usr/local/trouble-maker?
    /usr/local/trouble-maker was chosen as an install location because it is a somewhat standard place to put non-system files and because it is unlikely to be in the path. This protects against accidental execution. If it bothers you, you can add /usr/local/trouble-maker to your path.
  • Why do I have to type 'yes' every time I run trouble-maker?
    This step prevents against accidental execution. You may bypass the check by editing trouble-maker.pl and changing the value of $bypass from 0 to 1
  • Why do I have to delete /tmp/trouble-maker every time?
    This step protects against running trouble-maker twice before solving the first problem. A second run will overwrite the backup and rescue files.

Top