• Leigh Stoller's avatar
    Some whacking of the event system. I have implemented the addressing · 8305021f
    Leigh Stoller authored
    scheme that we discussed in email. Notifications and subscriptions now
    take an "address_tuple" argument (I know, crappy name) that is a
    structure that looks like this:
    
    	char		*site;		/* Which Emulab site. God only */
    	char		*expt;		/* Project and experiment IDs */
    	char		*group;		/* User defined group of nodes */
    	char		*host;		/* A specific host */
    	char		*objtype;	/* LINK, TRAFGEN, etc ... */
            char		*objname;	/* link0, cbr0, cbr1, etc ... */
            char		*eventtype;	/* START, STOP, UP, DOWN, etc ... */
    
    These can be a specific value, ADDRESSTUPLE_ANY if you are a
    subscriber, or ADDRESSTUPLE_ALL if you are a producer. The reason for
    the distinction is that you can optimize the match expression with the
    extra bit of information, and the above structure can make for a
    fairly lengthy match expression, which takes more time of course.
    You should use address_tuple_alloc() and address_tuple_free() rather
    than allocating them yourself. Note that host above is actually the
    ipaddr of control interface. This turns out to be more convenient
    since free nodes do not have virtual names.
    
    Also added a new tbgen directly. This directory includes 3 programs in
    the making:
    
    tbmevd: Is the Testbed Master Event Daemon, to be run on boss and will
    handle TBCONTROL events (reboot, reload, etc). It is just a shell of a
    program right now, that takes the events but does not do anything
    useful with them. Have not defined what the events are, and what DB
    state will be modified.
    
    tbmevc: Is the Testbed Master Event Client (akin to tmcc). It
    generates TBCONTROL events which the tbmevd will pick up and do
    something useful with. This program is intended to be wrapped by a
    perl script that will ask the tmcd for the name of the boss (running
    the event daemon).
    
    sample-client: This is a little client to demonstrate how to connect
    to the event system and use the address tuple to subscribe to events,
    and then how to get information out of notifications.
    
    Note that I have not created a proper build environment yet, so new
    programs should probably go in the event dir for now, and link using
    the same approach as in tbgen/GNUmakefile.in.
    8305021f
Name
Last commit
Last update
apache Loading commit data...
assign Loading commit data...
autoconf Loading commit data...
capture Loading commit data...
db Loading commit data...
dhcpd Loading commit data...
discvr Loading commit data...
doc Loading commit data...
event Loading commit data...
hw_config Loading commit data...
ipod Loading commit data...
lib Loading commit data...
os Loading commit data...
pxe Loading commit data...
rc.d Loading commit data...
rpms Loading commit data...
security Loading commit data...
sensors Loading commit data...
sql Loading commit data...
sysadmin Loading commit data...
tbsetup Loading commit data...
testsuite Loading commit data...
tip Loading commit data...
tmcd Loading commit data...
utils Loading commit data...
vis Loading commit data...
www Loading commit data...
xmlrpc Loading commit data...
BUGS Loading commit data...
GNUmakefile.in Loading commit data...
GNUmakerules Loading commit data...
Makeconf.in Loading commit data...
PROJECTS Loading commit data...
config.h.in Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
defs-calfeld-emulab Loading commit data...
defs-default Loading commit data...
defs-mini Loading commit data...
defs-neo-paper Loading commit data...
defs-newbold-emulab Loading commit data...
defs-ricci-emulab Loading commit data...
defs-ricci-neo-paper Loading commit data...
defs-stoller-emulab Loading commit data...
defs-stoller-home Loading commit data...