1. 04 Jun, 2014 1 commit
    • Mike Hibler's avatar
      Fix small race conditions introduced when fixing the larger race condition. · 44dcf3c6
      Mike Hibler authored
      Since SIGCHLD could be delayed due to blocking in progmode(), need to
      be ready for those when they finally do happen (i.e., after the pid in
      question may have been cleaned up or the global progpid var reset).
      
      Also tweak the "did it fail immediately" timeout to be a bit longer.
      Empirically, it now handles unresponsive IPMI SOL sessions better.
      44dcf3c6
  2. 29 May, 2014 1 commit
    • Mike Hibler's avatar
      Tweaks to "program mode" (aka, IPMI mode). · 94194030
      Mike Hibler authored
      Add code to avoid the respawn loops that Leigh so presciently predicted.
      Change the logging path to /usr/testbed/log/tiplogs so we don't have to
      keep putting in the /var/log/tiplogs symlink.
      94194030
  3. 03 Jan, 2014 1 commit
  4. 30 Dec, 2013 1 commit
    • Leigh Stoller's avatar
      New mode to support ipmi based consoles; the -M option. Use like: · 5b70faaf
      Leigh Stoller authored
        capture -M pc1 ipmitool -H pc1-mng  -I lanplus -U root -P 'XXX' sol activate
      
      We can probably come up with a better approach then the password on
      the command line, but did not want to add that to capture just yet.
      
      Don't forget that you have to have initial tiplines entries in the DB.
      5b70faaf
  5. 29 Dec, 2013 1 commit
  6. 18 Dec, 2013 1 commit
    • Leigh Stoller's avatar
      Clear the circular buffer when ownership changes (as for · 945ff901
      Leigh Stoller authored
      physical nodes during swapout/swapin).
      
      Also work around small race condition when starting up;
      the acl file is created fter daemonization, and there is a
      small window where the file exists but is not complete.
      Use tmp file and rename to avoid the race.
      945ff901
  7. 16 Dec, 2013 2 commits
    • Mike Hibler's avatar
      Stick in a missing ifdef or two. · 08d9bbf3
      Mike Hibler authored
      08d9bbf3
    • Leigh Stoller's avatar
      Two new options to allow use with XEN VMs. · 093655c7
      Leigh Stoller authored
      The -n option says to turn off the log file. We do not want to store
      thes on the XEN host, will take too much room.
      
      The -C option adds a circular buffer to store the last 8K of output
      from the console. When a new client connects, dump the contents of
      the circ buffer so the user sees context. At this point no longer
      save output. When the user disconnects, start saving the output again
      in the buffer, to dump at the next connection.
      093655c7
  8. 24 Sep, 2012 1 commit
    • Eric Eide's avatar
      Replace license symbols with {{{ }}}-enclosed license blocks. · 6df609a9
      Eric Eide authored
      This commit is intended to makes the license status of Emulab and
      ProtoGENI source files more clear.  It replaces license symbols like
      "EMULAB-COPYRIGHT" and "GENIPUBLIC-COPYRIGHT" with {{{ }}}-delimited
      blocks that contain actual license statements.
      
      This change was driven by the fact that today, most people acquire and
      track Emulab and ProtoGENI sources via git.
      
      Before the Emulab source code was kept in git, the Flux Research Group
      at the University of Utah would roll distributions by making tar
      files.  As part of that process, the Flux Group would replace the
      license symbols in the source files with actual license statements.
      
      When the Flux Group moved to git, people outside of the group started
      to see the source files with the "unexpanded" symbols.  This meant
      that people acquired source files without actual license statements in
      them.  All the relevant files had Utah *copyright* statements in them,
      but without the expanded *license* statements, the licensing status of
      the source files was unclear.
      
      This commit is intended to clear up that confusion.
      
      Most Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the Affero GNU General Public License, version 3
      (AGPLv3).
      
      Most Utah-copyrighted files related to ProtoGENI are distributed under
      the terms of the GENI Public License, which is a BSD-like open-source
      license.
      
      Some Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the GNU Lesser General Public License, version 2.1
      (LGPL).
      6df609a9
  9. 23 May, 2012 1 commit
    • Mike Hibler's avatar
      Add support for remote telnet-based console servers. · 32c159b3
      Mike Hibler authored
      We already supported "remote mode" (-m) which told capture that the
      device command line argument was of the form "host:port". Extended that
      to "host:port,protocol" where protocol can be "raw" (aka, the current
      remote mode) or "telnet". Telnet support is provided through the libtelnet
      library (http://github.com/elanthis/libtelnet) which I created a FreeBSD
      port for in install/ports. Most of the work was just breaking out some
      code in the monster select loop.
      
      Only tested on the Linux Networx "icebox" and only very lightly. The set
      of telnet want/won't/do/don't options may not be correct, but it seems to
      work.
      
      Also cleaned up some lint.
      32c159b3
  10. 15 May, 2012 1 commit
    • Mike Hibler's avatar
      Fix a capserver vulnerability reported by John Hickey. · 2d9daab0
      Mike Hibler authored
      Validate those SQL args!
      
      NOTE: we also ensure that the reporting node is listed as a legit tip server
      in the tipservers table. This means that capture may stop working on nodes
      whose servers are not in the table! SQL update 291 will add any servers
      listed in tiplines entries that are not in tipservers to prevent this breakage.
      2d9daab0
  11. 13 Apr, 2012 1 commit
    • Mike Hibler's avatar
      Add -L option to capture to print out how long it has been since last output. · 8da97950
      Mike Hibler authored
      We currently put out a time stamp when we detect output after being idle for
      a long time. But the time stamp is the time at which we started getting output
      again, so it doesn't give us any idea how long it was idle (i.e., when the
      last previous output happened).
      
      So -L changes the format of the stamp from "STAMP{ctime-string}" to
      "STAMP{idle@ctime-string}", where "idle" is the number of seconds it has been
      since the last output.
      8da97950
  12. 27 Jul, 2011 1 commit
  13. 04 Nov, 2010 1 commit
    • David Johnson's avatar
      Allow tiptunnel to set serial device options via capture. · e6a0977e
      David Johnson authored
      For now, I made it possible to set speed of the capture with
      tiptunnel.  Later we could expose more options... but the right
      thing to do is build a ConsoleAgent that is much more flexible.
      I think we now know what we need as far as a good feature set
      for that program.
      e6a0977e
  14. 10 May, 2010 1 commit
  15. 13 Mar, 2008 1 commit
  16. 07 Mar, 2008 1 commit
  17. 03 Mar, 2008 2 commits
  18. 26 Feb, 2008 1 commit
  19. 04 Feb, 2008 1 commit
  20. 25 May, 2007 1 commit
  21. 08 May, 2007 1 commit
  22. 23 Apr, 2007 1 commit
  23. 06 Dec, 2006 1 commit
  24. 01 Dec, 2006 1 commit
  25. 26 Oct, 2006 2 commits
  26. 19 Jun, 2006 1 commit
  27. 27 Apr, 2006 1 commit
  28. 26 Apr, 2006 1 commit
  29. 30 Dec, 2005 1 commit
  30. 27 Dec, 2005 1 commit
  31. 09 May, 2005 1 commit
  32. 04 Apr, 2005 1 commit
    • Timothy Stack's avatar
      · 463ee6b1
      Timothy Stack authored
      Mote and robot related stuff.  The main thing is the addition of relay
      capabilities to capture and related things.
      
      	* GNUmakefile.in: Add the capture and tip subdirectories to the
      	client and client-install targets.
      
      	* configure, configure.in, config.h.in: Detect srandomdev() for
      	capture and add "mote/newmote" script.
      
      	* capture/GNUmakefile.in, capture/capture.c: Add "relay"
      	capabilities to capture.
      
      	* capture/capquery.c: Query the capserver for the relay receiver's
      	port number.
      
      	* capture/capserver.c: Small hack to return the port number
              for a node.
      
      	* db/libdb.pm.in, db/xmlconvert.in: Add virt_tiptunnels table.
      
      	* event/program-agent/program-agent.c: Change log file names to
      	something a little more user-friendly.  Add a "MODIFY" event
      	handler that lets the user set agent attributes (command, tag,
      	timeout) without having to run a program.
      
      	* event/sched/GNUmakefile.in, event/sched/console-agent.cc,
      	event/sched/console-agent.h, event/sched/event-sched.c: Add
      	console agents that can be used to snapshot a section of the
      	capture log file.
      
      	* event/sched/node-agent.cc: Some minor cleanup.
      
      	* event/sched/simulator-agent.cc, event/sched/simulator-agent.h:
      	Add the config data to the report mail.  Add a "RESET" event
      	handler that runs "loghole clean".  Save the report mail in a file
      	so it gets archived with the rest of the logs.
      
      	* lib/libtb/tbdefs.h: Add CONSOLE object type.
      
      	* mote/GNUmakefile.in, mote/newmote: Add newmote script, just a
      	quick hack to add motes to the DB.
      
      	* mote/tbuisp.in: Add another backend for loading motes through
      	their relay capture server.
      
      	* robots/mtp/mtp_dump.c: Dump the min/max values for x and y,
      	handy for figuring out the bounds of the camera.
      
      	* sql/database-fill.sql: Change the RELOAD-MOTE/SHUTDOWN ->
      	ALWAYSUP/SHUTDOWN mode transition to ALWAYSUP/ISUP since stated
      	doesn't seem to run triggers after a state change by a mode
      	transition.
      
      	* tbsetup/tbreport.in: Change the ordering of the eventlist so it
      	displays event-sequences appropriately.
      
      	* tbsetup/ns2ir/GNUmakefile.in, tbsetup/ns2ir/console.tcl,
      	tbsetup/ns2ir/node.tcl, tbsetup/ns2ir/parse.tcl.in,
      	tbsetup/ns2ir/sim.tcl.in: Add a "console" agent that represents
      	the serial console for a node.
      
      	* tbsetup/ns2ir/sequence.tcl: Add an "append" method so it is
      	easier to build sequences dynamically.
      
      	* tbsetup/ns2ir/topography.tcl: Make checkdest available to
      	regular users.
      
      	* tip/GNUmakefile.in, tip/tiptunnel.c: Add support for uploading a
      	file to a relay version of capture and exporting the end
      	connection as a pty.
      
      	* tmcd/decls.h, tmcd/common/libsetup.pm: Bump version number since
      	the dosubnodelist change is not backwards compatible.
      
      	* tmcd/tmcd.c: Make dosubnodelist and dosubconfig callable even
      	when a node isn't allocated.  Add dotiptunnels command that
      	returns which serial consoles are to be mounted on a node.  Add
      	mote version of subconfig that returns information needed to
      	startup the relay version of capture.
      
      	* tmcd/common/bootsubnodes: For motes, startup the relay version
      	of capture (XXX stargate specific).
      
      	* tmcd/common/libsetup.pm, tmcd/common/libtmcc.pm,
      	tmcd/common/config/rc.config, tmcd/common/config/rc.tiptunnels:
      	Client side changes for mounting another nodes serial line.
      
      	* tmcd/common/rc.bootsetup: Always boot the subnodes, even when
      	free.  This is used for motes since their capture needs to be up
      	for reloading at the time.
      
      	* tmcd/linux/ixpboot: Shuffle some code around so the script
      	doesn't fail if the ixp isn't allocated.
      
      	* utils/loghole.in: Add "digest.out" and "report.mail" as global
      	logs to be saved in archives and display the "report.mail" file
      	when showing a loghole archive.
      
      	* xmlrpc/emulabserver.py.in: Scrub more of the return values to
      	get rid of "None"s.
      463ee6b1
  33. 28 Nov, 2004 1 commit
  34. 12 Apr, 2004 1 commit
    • Mike Hibler's avatar
      Getting back ETIMEDOUT from a socket read should not be fatal to capture. · 76e1528a
      Mike Hibler authored
      Now it is treaded just like ECONNRESET.
      
      Also, don't clobber the read errno with the intermediate sigsetmask call
      (though it should never fail and errno should never be affected)
      
      Change warn() to warning() to avoid conflict with standard BSD library
      routine.  This showed up when statically linking capture.
      76e1528a
  35. 06 Nov, 2003 1 commit
    • Leigh Stoller's avatar
      Minor changes to capserver authtication model; capserver now requires · ef94125e
      Leigh Stoller authored
      that capture connect on a reserved port. To do this, capture binds a
      dynamic reserved port to connect to capserver, which verifies the
      integrity of the sender by looking at the portnumber that accept
      returns.
      
      Note that this has the potential problem of burning a lot of reserved
      ports on ops (128 tiplines) since the kernel keeps the client side in
      TIME_WAIT for a minute or two after it is closed (the socket is in
      actual use for just a moment before being closed). If we try to
      restart capture too many times within a span of a minute or two, we
      might have problems. Will have to switch to a fancier protocol then.
      Yuck.
      ef94125e
  36. 15 Oct, 2003 1 commit
    • Mike Hibler's avatar
      Uniform syslog'ing. Change everything I could find to use a syslog facility · cc6d6fa7
      Mike Hibler authored
      as defined in the defs-* file (e.g. "TBLOGFACIL=local2").  The default is
      "local5" which is what we are setup to use so you shouldn't need to mess
      with your defs- file!
      
      perl scripts just get this value configured in when configure is run.
      C programs get the value in two ways.  For programs that are intimate with
      the testbed infrastructure, and include "config.h", they just get it from
      that file.  For programs that we sometimes use outside the Emulab build
      environment (e.g., frisbee, capture) and that don't include config.h,
      the value is set via a "-DLOG_TESTBED=..." in the GNUmakefile build line.
      If the value isn't set, it defaults to what it used to be (usually LOG_USER).
      
      Still to do: healthd, hmcd (whose build doesn't seem to be completely
      integrated) and plabdaemon.in (since its icky python :-)
      cc6d6fa7
  37. 02 Jun, 2003 1 commit