• Mike Hibler's avatar
    Phase II in disk state saving for swapout. · ed0d25b4
    Mike Hibler authored
    Exec summary: after this checkin, the infrastructure exists (once enabled)
    to create swapout-time "delta" images for all machines in experiments.
    There is only a single, cumulative swap image per node (i.e., all diffs
    are from the base image, not from the previous swap).
    
    What doesn't yet exist, is the mechanism for reloading the delta at
    swapin time.  That is Phase III.
    
    The nitty-gritty:
    
    1. Keep disk image signature files for all nodes in an experiment.
    
       New fields in the DB to track, for each disk partition, what image the
       partition was loaded from.  This enables us at swapin or os_load time to
       create signature files in /proj/<pid>/exp/<eid>/swapinfo for the current
       contents of a node disk/partition.  All nodes with the same image loaded
       will share (via symlink) the same signature file.  TODO: no longer
       referenced signature files should be removed.
    
       Signature info is only collected in the swapinfo directory if the
       experiment is set to have disk state saving enabled (see #5 below).
       Info consists of the <vname>.sig file, which is the file created
       by imagehash, and <vname>.part which says what the root disk is
       for the node and whether to look at the whole disk or just a single
       partition when crafting the delta image.
    
    2. Swapout-time hook for creating swapout image.
    
       If the experiment is marked as allowing disk state saving, tbswap
       will arrange to run and then monitor the create-swapimage command
       on each node.  This script will run the modified version of imagezip
       which uses the signature file to create a delta image.
    
       The command to run and maximum timeout are specified via sitevars
       (previously checked in).  Note that the tbswap script currently has
       special knowledge of /usr/local/bin/create-swapimage as a swapout
       time script.  If the swap/swapout_command sitevar is set to that,
       Magic Stuff shall occur (i.e. it will monitor the command and make
       periodic reports of progress).  The sitevars are a total hack and
       will disappear at some point.
    
    3. Client-side script for creating swapout image.
    
       os/create-swapimage, very similar to create-image.  Uses the info
       stashed in /proj/..blahblah../swapinfo to create a delta image.
    
       XXX fer now hack: the script first looks in /proj/<pid>/bin for an
       imagezip binary to use.  Failing that, it uses the one in the MFS.
       This allows for easier development of the imagezip changes (i.e.,
       don't have to update the MFS every time.
    
    4. Auto creation of signature files for new images.
    
       The create_image script (the one that runs on boss when creating images
       for users) has been modified to automatically create a signature via
       imagehash.  The .sig file winds up in /usr/testbed/images/sigs or
       in /proj/<pid>/images/sigs.  From there it will be copied at swapin/os_load
       time to the per-expt swapinfo directory for any node that uses the images.
    
       The process for creating standard system images (aka, "Mike") has not
       yet been modified.  When the image creation/installation procedure
       is formalized into a script, this will be done.
    
    5. Web changes to set/clear saving of disk state at swapout time.
    
       Add a checkbox to the experiment create page to allow setting "save
       swap state".  Also added to the experiment modify page, but currently
       "if (0)"ed out as it will need some additional support.  The showstuff
       page will show it.
    
       Taking a page from Leigh's hack book, if EXPOSESTATESAVE in defs.php3
       is set to zero (as it is now), then the checkbox doesn't appear in the
       create experiment page except for STUDLY users.
    ed0d25b4
Name
Last commit
Last update
account Loading commit data...
apache Loading commit data...
assign Loading commit data...
autoconf Loading commit data...
bugdb Loading commit data...
capture Loading commit data...
cdrom Loading commit data...
collab Loading commit data...
daikon Loading commit data...
db Loading commit data...
delay/linux Loading commit data...
dhcpd Loading commit data...
discvr Loading commit data...
doc Loading commit data...
event Loading commit data...
firewall Loading commit data...
hw_config Loading commit data...
hyperviewer Loading commit data...
image-test Loading commit data...
install Loading commit data...
ipod Loading commit data...
lib Loading commit data...
mote Loading commit data...
named Loading commit data...
os Loading commit data...
patches Loading commit data...
pxe Loading commit data...
rc.d Loading commit data...
robots Loading commit data...
rpms Loading commit data...
security Loading commit data...
sensors Loading commit data...
sql Loading commit data...
ssl Loading commit data...
sysadmin Loading commit data...
tbsetup Loading commit data...
testsuite Loading commit data...
tip Loading commit data...
tmcd Loading commit data...
tools Loading commit data...
utils Loading commit data...
vis Loading commit data...
wiki Loading commit data...
www Loading commit data...
xmlrpc Loading commit data...
.loc-ignore Loading commit data...
BUGS Loading commit data...
GNUmakefile.in Loading commit data...
GNUmakerules Loading commit data...
GPL-COPYING Loading commit data...
LGPL-COPYING Loading commit data...
LICENSE Loading commit data...
Makeconf.in Loading commit data...
README Loading commit data...
TODO Loading commit data...
TODO.plab Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
defs-aerolab Loading commit data...
defs-calfeld-emulab Loading commit data...
defs-davidand-emulab Loading commit data...
defs-default Loading commit data...
defs-duerig-emulab Loading commit data...
defs-elabinelab Loading commit data...
defs-example Loading commit data...
defs-fish-emulab Loading commit data...
defs-gatech Loading commit data...
defs-johnsond-emulab Loading commit data...
defs-kwebb-emulab Loading commit data...
defs-newbold-emulab Loading commit data...
defs-newbold-macdb Loading commit data...
defs-ricci-emulab Loading commit data...
defs-shash-emulab Loading commit data...
defs-stoller-emulab Loading commit data...
defs-stoller-home Loading commit data...
defs-stoller-lbsdb Loading commit data...
defs-uky Loading commit data...
defs-wide Loading commit data...