1. 19 Jan, 2005 1 commit
  2. 18 Jan, 2005 7 commits
    • Timothy Stack's avatar
      Initialize the camera boundaries. · cb66c26d
      Timothy Stack authored
      cb66c26d
    • Timothy Stack's avatar
      Fix subtle dependency problem with tevc and libevent.a, building tevc · 1803d68f
      Timothy Stack authored
      is apparently what triggers libevent.a to be built in the ../lib
      directory.
      1803d68f
    • Leigh Stoller's avatar
      Here is a checkpoint of the admission control stuff I have been working on. · 54f55585
      Leigh Stoller authored
      The last part is the stuff to hook it in from assign_wrapper, and some
      additional support in assign that Rob is adding for me. This comment is
      from the top of new file db/libadminctrl.pm.in and describes everything in
      detail.
      
      # Admission control policies. These are the ones I could think of, although
      # not all of these are implemented.
      #
      #  * Number of experiments per type/class (only one expt using robots).
      #
      #  * Number of experiments per project
      #  * Number of experiments per subgroup
      #  * Number of experiments per user
      #
      #  * Number of nodes per project      (nodes really means pc testnodes)
      #  * Number of nodes per subgroup
      #  * Number of nodes per user
      #
      #  * Number of nodes of a class per project
      #  * Number of nodes of a class per group
      #  * Number of nodes of a class per user
      #
      #  * Number of nodes of a type per project
      #  * Number of nodes of a type per group
      #  * Number of nodes of a type per user
      #
      #  * Number of nodes with attribute(s) per project
      #  * Number of nodes with attribute(s) per group
      #  * Number of nodes with attribute(s) per user
      #
      # So we have group (pid/gid) policies and user policies. These are stored
      # into two different tables, group_policies and user_policies, indexed in
      # the obvious manner. Each row of the table defines a count (experiments,
      # nodes, etc) and a type of thing being counted (experiments, nodes, types,
      # classes, etc). When we test for admission, we look for each matching row
      # and test each condition. All conditions must pass. No conditions means a
      # pass. There is also some "auxdata" which holds extra information needed
      # for the policy (say, the type of node being restricted).
      #
      #      uid:     a uid
      #   policy:     'experiments', 'nodes', 'type', 'class', 'attribute'
      #    count:     a number
      #  auxdata:     a string (optional)
      #
      # Example: A user policy of ('mike', 'nodes', 10) says that poor mike is
      # not allowed to have more 10 nodes at a time, while ('mike', 'type',
      # '10', 'pc850') says that mike cannot allocate more than 10 pc850s.
      #
      # The group_policies table:
      #
      #      pid:     a pid
      #      gid:     a gid
      #   policy:     'experiments', 'nodes', 'type', 'class', 'attribute'
      #    count:     a number
      #  auxdata:     a string (optional)
      #
      # Example: A project policy of ('testbed', 'testbed', 'experiments', 10)
      # says that the testbed project may not have more then 10 experiments
      # swapped in at a time, while ('testbed', 'TG1', 'nodes', 10) says that the
      # TG1 subgroup of the testbed project may not use more than 10 nodes at
      # time.
      #
      # In addition to group and user policies (which are policies that apply to
      # specific users/projects/subgroups), we also need policies that apply to
      # all users/projects/subgroups (ie: do not want to specify a particular
      # restriction for every user!). To indicate such a policy, we use a special
      # tag in the tables (for the user or pid/gid):
      #
      #      '+'  -  The policy applies to all users (or project/groups).
      #
      # Example: ('+','experiments',10) says that no user may have more then 10
      # experiments swapped in at a time. The rule overrides anything more
      # specific (say a particular user is restricted to 20 experiments; the above
      # rule overrides that and the user (all users) is restricted to 10.
      #
      # Sometimes, you want one of these special rules to apply to everyone, but
      # *allow* it to be overridden by a more specific rule. For that we use:
      #
      #      '-'  -  The policy applies to all users (or project/groups),
      #              but can be overridden by a more specific rule.
      #
      # Example: The rules:
      #
      #	('-','type',0, 'garcia')
      #       ('testbed', 'testbed', 'type', 10, 'garcia')
      #
      # says that no one is allowed to allocate garcias, unless there is specific
      # rule that allows it; in this case the testbed project can allocate them.
      #
      # There are other global policies we would like to enforce. For example,
      # "only one experiment can be using the robot testbed." Encoding this kind
      # of policy is harder, and leads down a path that can get arbitrarily
      # complex. Tha path leads to ruination, and so we want to avoid it at
      # all costs.
      #
      # Instead we define a simple global policies table that applies to all
      # experiments currently active on the testbed:
      #
      #   policy:     'nodes', 'type', 'class', 'attribute'
      #     test:     'max', others I cannot think of right now ...
      #    count:     a number
      #  auxdata:     a string
      #
      # Example: A global policy of ('nodes', 'max', 10, '') say that the maximum
      # number of nodes that may be allocated across the testbed is 10. Thats not
      # a very realistic policy of course, but ('type', 'max', 1, 'garcia') says
      # that a max of one garcia can be allocated across the testbed, which
      # effectively means only one experiment will be able to use them at once.
      # This is of course very weak, but I want to step back and give it some
      # more thought before I redo this part.
      #
      # Is that clear? Hope so, cause it gets more complicated. Some admission
      # control tests can be done early in the swap phase, before we really do
      # anything (before assign_wrapper). Others (type and class) tests cannot
      # be done here; only assign can figure out how an experiment is going to map
      # to physical nodes (remember virtual types too), and in that case we need
      # to tell assign what the "constraints" are and let it figure out what is
      # possible.
      #
      # So, in addition to the simple checks we can do, we also generate an array
      # to return to assign_wrapper with the maximum counts of each node type and
      # class that is limited by the policies. assign_wrapper will dump those
      # values into the ptop file so that assign can enforce those maximum values
      # regardless of what hardware is actually available to use. As per discussion
      # with Rob, that will look like:
      #
      #	set-type-limit <type> <limit>
      #
      # and assign will spit out a new type of violation that assign_wrapper will
      # parse.
      #
      # NOTES:
      #
      #  1) Admission control is skipped in admin mode; returns okay.
      #  2) Admission control is skipped when the pid is emulab-ops; returns okay.
      #  3) When calculating current usage, nodes reserved to emulab-ops are
      #     ignored.
      #  4) The sitevar "swap/use_admission_control" controls the use of admission
      #     control; defaults to 1 (on).
      #  5) The current policies can be viewed in the web interface. See
      #     https://www.emulab.net/showpolicies.php3
      #  6) The global policy stuff is weak. I plan to step back and think about it
      #     some more before redoing it, but it will tide us over for now.
      #
      54f55585
    • Mike Hibler's avatar
      602e1c6d
    • Mike Hibler's avatar
    • Timothy Stack's avatar
      More tweaks and some comments. · c8defd13
      Timothy Stack authored
      c8defd13
    • Leigh Stoller's avatar
      443582dc
  3. 17 Jan, 2005 4 commits
    • Timothy Stack's avatar
      · 1e18722e
      Timothy Stack authored
      More robot tweaks:
      
      	* event/sched/event-sched.c: Start rmcd, then vmcd.
      
      	* event/sched/rpc.cc: Add camera dimensions to the config file.
      
      	* robots/emc/emcd.c: Add camera dimensions to the config file and
      	destroy vmc's position_list when it disconnects.
      
      	* robots/mtp/mtp.x, robots/mtp/mtp.c: Add dimensions to the camera
      	config and add a command_id field to the update_position packet.
      
      	* robots/primotion/garcia-pilot.cc: Move the decl of the acpGarcia
      	object below daemon(3) since it doesn't seem to like it when the
      	parent process dies and fix the log file creation.
      
      	* robots/primotion/pilotClient.cc: Pass the command_id back in any
      	update_position packets.
      
      	* robots/rmcd/rmcd.c: Use the command-id to distinguish between
      	STOPs for the sake of a GOTO and a wiggle.
      
      	* robots/vmcd/visionTrack.h, robots/vmcd/visionTrack.c: Only
      	coalesce packets from different cameras (duh) and mess with the
      	tolerances a little more.
      
      	* xmlrpc/emulabserver.py.in: Add some rough camera dimensions.
      1e18722e
    • Timothy Stack's avatar
      · 11cceda4
      Timothy Stack authored
      Some cleanup to the vision system and make wiggle work, although it is still
      a bit glitchy.  This checkin is enough to identify the robots in their
      pens and move them to their initial positions.
      
      	* robots/emc/emcd.h, robots/emc/emcd.c: When rmc connects, send
      	GOTOs with the initial positions given in the config file.  If rmc
      	requests a vision update and one isn't available, queue the
      	request and send a reply when an update does come in.
      
      	* robots/mtp/GNUmakefile.in, robots/mtp/listNode.h,
      	robots/mtp/listNode.c: Add amiga-style linked list node functions,
      	tim always needs these.
      
      	* robots/mtp/mtp.h, robots/mtp/mtp.c: Add mtp_theta function that
      	produces a sane theta value between -M_PI and M_PI.
      
      	* robots/mtp/mtp.x: Add MTP_WIGGLE_START type which causes the
      	robots to stop in their tracks waiting for a real wiggle type
      	(e.g. 180 deg turn).
      
      	* robots/rmcd/rmcd.c: Tweaks, add support for MTP_WIGGLE_START.
      
      	* robots/vmcd/GNUmakefile.in, robots/vmcd/robotObject.h,
      	robots/vmcd/robotObject.c, robots/vmcd/visionTrack.h,
      	robots/vmcd/visionTrack.c, robots/vmcd.c: Cleanup and make wiggle
      	work.
      
      	* robots/vmcd/vmc-client.c: If there are no objects detected in a
      	camera send an error packet instead of nothing, so vmcd can keep
      	in sync with the frames.
      11cceda4
    • Timothy Stack's avatar
      · bf489797
      Timothy Stack authored
      More robot integration and some event system updates.
      
      	* configure, configure.in: Detect rsync for loghole and add
      	utils/loghole to the list of template files.
      
      	* db/libdb.pm.in, db/xmlconvert.in: Add virt_node_startloc to the
      	list of virtual tables.
      
      	* event/lib/event.h, event/lib/event.c, event/lib/tbevent.py.tail:
      	Add event_stop_main function to break out of the event_main()
      	loop.  Add timeline to the address tuple.
      
      	* event/sched/GNUmakefile.in, event/sched/error-record.h,
      	event/sched/error-record.c, event/sched/event-sched.8,
      	event/sched/event-sched.h, event/sched/event-sched.c,
      	event/sched/group-agent.h, event/sched/group-agent.c,
      	event/sched/listNode.h, event/sched/listNode.c,
      	event/sched/local-agent.h, event/sched/local-agent.c,
      	event/sched/node-agent.h, event/sched/node-agent.cc,
      	event/sched/queue.c, event/sched/rpc.h, event/sched/rpc.cc,
      	event/sched/simulator-agent.h, event/sched/simulator-agent.c,
      	event/sched/timeline-agent.h, event/sched/timeline-agent.c:
      	Updated event scheduler, not completely finished, but well enough
      	along for the robots.
      
      	* lib/libtb/GNUmakefile.in, lib/libtb/popenf.h,
      	lib/libtb/popenf.c, lib/libtb/systemf.h, lib/libtb/systemf.c: Add
      	some handy versions of system/popen that take format arguments.
      
      	* lib/libtb/tbdefs.h, lib/libtb/tbdefs.c: Add some more event and
      	object types.
      
      	* tbsetup/assign_wrapper.in: Add the virt_node_startloc building
      	to desires string for a node.
      
      	* tbsetup/ptopgen.in: Add a node's location to the feature list.
      
      	* tbsetup/tbreport.in: Display the timeline/sequence an event is a
      	part of.
      
      	* tbsetup/ns2ir/GNUmakefile.in: Add timeline, sequence, and
      	topography files.
      
      	* tbsetup/ns2ir/node.tcl: Add initial position for nodes and allow
      	them to be attached to "topographys".
      
      	* tbsetup/ns2ir/parse-ns.in: Make a hwtype_class array with a
      	node_type's class.  Make an 'areas' array that holds the
      	buildings where nodes are located.  Make an 'obstacles' table
      	with any obstacles in the building.
      
      	* tbsetup/ns2ir/parse.tcl.in: Move named-args function from
      	tb_compat.tcl to here.  Add reltime-to-secs function that converts
      	time given in a format like "10h2m1s" to a seconds value, used in
      	"$ns at" so its easier to write time values.  Add "K", "Kb", and
      	"Kbps" as possible units for bandwidth (only the lowercase
      	versions were available before).
      
      	* tbsetup/ns2ir/program.tcl: Add "dir" and "timeout" attributes,
      	although they don't go anywhere at the moment.
      
      	* tbsetup/ns2ir/sequence.tcl, tbsetup/ns2ir/timeline.tcl,
      	tbsetup/ns2ir/topography.tcl: Initial versions.
      
      	* tbsetup/ns2ir/sim.tcl.in: Add support for timelines and
      	sequences.  Add 'node-config' method to change the default
      	configuration for nodes produced by the Simulator object.  Send an
      	initial MODIFY event to any trafgen objects so their configuration
      	gets through, even when there are no start/stop events.  Move
      	event parsing to the 'make_event' method.
      
      	* utils/loghole.1, utils/loghole.in: Loghole utility, used for
      	retrieving logs from experimental nodes and creating archives of
      	the logs.
      
      	* xmlrpc/emulabclient.py.in: Escape any strange characters in the
      	output field.
      
      	* xmlrpc/emulabserver.py.in: Add virt_node_startloc to the list of
      	virtual_tables.  Add emulab.vision_config and
      	emulab.obstacle_config methods for getting information pertaining
      	to the robots.  Change the OSID listing to include more fields.
      	Add a "physical" aspect to experiment.info to get information
      	about the physical nodes.  Add parent field to the events in the
      	array returned by eventlist.  Add sshdescription to get extra
      	information needed to log into a vnode.  Add node.statewait so you
      	can wait for nodes to come up.
      bf489797
    • Timothy Stack's avatar
      Some more event types. · 0d031e0b
      Timothy Stack authored
      0d031e0b
  4. 15 Jan, 2005 4 commits
  5. 14 Jan, 2005 11 commits
    • Kirk Webb's avatar
      Get rid of some debugging stuff. · 231845af
      Kirk Webb authored
      231845af
    • Russ Fish's avatar
      Work over the accounts and mounts part of the CygWinXP port. · 8c98fc4b
      Russ Fish authored
      Use cygrunsrv -i on sshd to "allow the service to interact with the desktop."
      Now that the sshd daemon has a desktop session context that is inherited by
      the client shell, remote home directories can work.  They start with a blank
      Windows mount context, but once a single Samba connection is made during
      login, it enables all UNC //machine/path mounts to work.  Hence the home
      directories are now CygWin mount points (no longer symlinks) to UNC paths, set
      up by rc.mounts and then shared through CygWin to all of the user logins.
      
      Get rid of the previous horrible (and fragile) hack to set up an auto-login by
      the swapin user which then automatically started a user sshd on port 2222.
      
      tmcd.c - Arrange for tmcd to provide the public key data when a special argument is
      given as "tmcc accounts pubkeys".
      
      rc.accounts - Due to permissions problems with remote-mounted authorized_keys
      files, sshd_config now uses "AuthorizedKeysFile /sshkeys/%u/authorized_keys",
      which is where rc.accounts puts the public key data.
      
      Since root, Administrator, and even SYSTEM can be locked out by permissions on
      NT, WINDOWS() variant logic to set ownership and modes on authorized_keys
      files had to be added to rc.accounts.  There is also a bug in the sshd
      "privilege separation" setreuid() dance that requires the authorized_keys
      files to be owned by SYSTEM (or be mode 644, which is slightly worse.)
      
      cygwinxp/liblocsetup.pm - Pay attention to the users' shell preferences in
      generating /etc/passwd.  Make warnings more uniform.
      8c98fc4b
    • Kirk Webb's avatar
      0e27c632
    • Timothy Stack's avatar
      4a9b0bc5
    • Mike Hibler's avatar
      Dinks. I'm done dinkin now. Really. · 32beb94b
      Mike Hibler authored
      32beb94b
    • Timothy Stack's avatar
      · dee46d59
      Timothy Stack authored
      Cross compilation fixes for the stargates, 'gmake client' should now
      build, link, and install properly.  Haven't really tried to run stuff though.
      
      	* GNUmakerules: Add target for stripping executables, used instead
      	of "install -s" since that doesn't work for cross-compiling.
      
      	* Makeconf.in: Add ELVIN_CONFIG variable that refers to
      	'elvin-config'.
      
      	* configure, configure.in: Detect and save the elvin-config path
      	since we need a different one for cross-compiling.
      
      	* event/lib/GNUmakefile.in, event/link-agent/GNUmakefile.in,
      	event/linktest/GNUmakefile.in, event/program-agent/GNUmakefile.in,
      	event/proxy/GNUmakefile.in, event/tbgen/GNUmakefile.in,
      	event/trafgen/GNUmakefile.in, os/dijkstra/GNUmakefile.in,
      	os/syncd/GNUmakefile.in, sensors/slothd/GNUmakefile.in,
      	tmcd/GNUmakefile.in, tmcd/linux/GNUmakefile.in: Cross compilation
      	fixes, don't statically link on arm, create "foo-debug"
      	executables with debugging info and install separately stripped
      	ones instead of passing "-s" to install.
      dee46d59
    • Siddharth Aggarwal's avatar
      99779cfb
    • Mike Hibler's avatar
      Add sort and limit options. · ff96cb1a
      Mike Hibler authored
      ff96cb1a
    • Siddharth Aggarwal's avatar
      adding new files for /var problem · a7bdf7a9
      Siddharth Aggarwal authored
      a7bdf7a9
    • Siddharth Aggarwal's avatar
      the problem on /var solved · 02231633
      Siddharth Aggarwal authored
      02231633
    • Timothy Stack's avatar
      · bfb38f51
      Timothy Stack authored
      Pass camera config to vmcd in the config_vmc packet and add support
      for using unix-domain sockets when talking to emcd instead of
      unsecured tcp sockets.
      
      	* robots/emc/emcd.c: Add support for camera configs in the config
      	file and add support for listening on a unix-domain socket.
      
      	* robots/emc/test_emcd.config, robots/emc/test_emcd.sh.in: Update
      	for changes to emcd.
      
      	* robots/mtp/mtp.h, robots/mtp/mtp.c, robots/mtp/mtp.x,
      	robots/mtp/mtp_send.c: Add camera config to the config_vmc packet
      	and add support for unix-domain sockets.
      
      	* robots/primotion/GNUmakefile.in: Add empty install target.
      
      	* robots/rmcd/rmcd.c, robots/rmcd/test_emcd.config: Add support
      	for unix-domain sockets.
      
      	* robots/vmcd/vmcd.c: Add support for unix-domain sockets and read
      	the camera config from the config_vmc packet.
      
      	* robots/vmcd/test_vmc*.sh: Fix tests changed by my last checkin.
      
      	* robots/vmcd/test_emcd*.config: Update for changes to the emcd
      	config file format.
      bfb38f51
  6. 13 Jan, 2005 5 commits
  7. 12 Jan, 2005 7 commits
    • Robert Ricci's avatar
      Added support for a switch being in more than one stack at a time. · e189be0a
      Robert Ricci authored
      Each switch has a 'primary' stack that it belongs to if it's specified
      with the '-i' parameter. Otherwise, it can be considered to be a part
      of any of the stacks of which it's a member.
      
      The main point of this is so that we can have switches that are on
      both the control and experimental networks.
      
      Note: Having a VLAN with the same name on two overlapping stacks is
      like crossing the streams: that would be bad. Not "all life as you
      know it stopping instantaneously" bad, but snmpit might get confused.
      e189be0a
    • Leigh Stoller's avatar
      Another little hack for Mike; Add a "lockdown" bit to the experiments · d8b17f2c
      Leigh Stoller authored
      table that will prevent an experiment from being swapped/modified. The
      toggle is on the showexp page, and the toggle is *not* admin
      over-ridable; you must turn the toggle off (and of course, you must be
      an admin to do that).
      d8b17f2c
    • Leigh Stoller's avatar
      A hack for Mike. Add a node_history table to store all moves in and · 78350a54
      Leigh Stoller authored
      out of the reserved table. Mostly this happens in nfree and nalloc,
      but there a couple of other moves, in libdb and in the reload daemon.
      The uid and experiment are stored, long with a timestamp.
      78350a54
    • Leigh Stoller's avatar
      A hack for Mike. Add a node_history table to store all moves in and · 26b318a2
      Leigh Stoller authored
      out of the reserved table. Mostly this happens in nfree and nalloc,
      but there a couple of other moves, in libdb and in the reload daemon.
      The uid and experiment are stored, long with a timestamp.
      26b318a2
    • Mike Hibler's avatar
      Forgot the copyright notice · 422a62cd
      Mike Hibler authored
      422a62cd
    • Timothy Stack's avatar
      regenerate · 850e3f4c
      Timothy Stack authored
      850e3f4c
    • Timothy Stack's avatar
      · f45f9c16
      Timothy Stack authored
      Fix some robot related stuff that I broke with the last checkin and add in
      some other tweaks.
      
      	* robots/primotion/garcia-pilot.cc,
      	robots/primotion/pilotClient.hh, robots/primotion/pilotClient.cc:
      	Broadcast any goto/stop commands to clients observing the robot.
      
      	* robots/rmcd/rmcd.c: Change the behavior to reorient the robot as
      	the last step in a goto, so we avoid doing unnecessary pivots.
      	Need to send an init packet to the robot so it knows who is
      	talking to it.
      
      	* robots/vmcd/vmc-client.c: Oops, supposed to use M_PI_2, not
      	M_PI, when translating from camera coords to world.
      
      	* www/telemetry.php3: Make the size of the applet a little bigger.
      
      	* www/garcia-telemetry/GarciaTelemetry.java,
      	www/garcia-telemetry/UpdateThread.java,
      	www/garcia-telemetry/main.xml: Display a log of goto/stop commands
      	sent to the robot.
      f45f9c16
  8. 11 Jan, 2005 1 commit