411-alter-handler: properly handle corrupted timestamp file

file /tmp/411-alert-handler.pkl can get corrupted in which case
it has to be removed

http://marc.info/?l=npaci-rocks-discussion&m=137225454531298&w=2

Reported-by: Bjorn-Helge Mevik <b.h.mevik@usit.uio.no>
add appliance: now supports specification of a distribution

the rocks add appliance now supports the specification of the
distribution you want to use with the specific appliance.

We can now have different distribution used by different node in the
same cluster. See Phil explanation on how to do this:

--------------------------------------------------------------------

The default distribution (rocks-dist) looks at the enabled rolls in
the database.

You can build an alternate distribution, but have to specify the rolls
to include. That "solves" the
first problem but not the second.

The second issue is defining a membership. A membership is really a
tuple that is (Appliance, Distribution).  We don't (but should) have a
rocks command to do that (it happens in some sequel code with rocks
add appliance)

1. add a distribution to the database
$ rocks add distribution vsmp-dist
2.  add an appliance to the database (this will create a membership)
$ rocks add appliance vsmp-compute membership=VSMP-COMPUTE node=compute
$ os=linux
3.  Using SQL, adjust the distribution
$ /opt/rocks/bin/mysql -u apache cluster
mysql> update memberships set Distribution=(select ID from
distributions where name="vsmp-dist") where Name="VSMP-COMPUTE";

At this point, you have created a membership called VSMP-COMPUTE.
It's vsmp-compute appliance, which starts its graph evaluation at the
compute.xml node in the graph.

Now that you have the membership defined, you can change the
membership of a node
$ rocks set  host membership compute-0-0 membershp=VSMP-COMPUTE

finally, you have to create the vsmp-dist, explicitly naming the rolls
and versions.
$ cd /export/rocks/install
$ rocks create distro dist=vsmp-dist rolls="base,6.1 kernel,6.1 ...."

-------------------------------------------------------------------
create distro: fix bug when two rpm have similar timestamp

When two rpm have similar time stamp rocks create distro uses the
rpm build time to pick the most recent.

http://marc.info/?l=npaci-rocks-discussion&m=136908797302036&w=2

Reported-by: Philip Papadopoulos <philip.papadopoulos@gmail.com>
kickstart.cgi: verify URL input arguments before placing them in a shell

This is a security fix, to block user form run arbitrary command on
the frontend simply crafting URL.

Reported-by: Scott Sakai <ssakai@sdsc.edu>