1. 04 Aug, 2015 1 commit
  2. 30 Jul, 2015 1 commit
  3. 09 Jun, 2015 1 commit
  4. 28 Jul, 2014 1 commit
  5. 07 Feb, 2014 1 commit
  6. 06 Feb, 2013 1 commit
    • Leigh B Stoller's avatar
      Fix a troublesome SelfLoader problem caused by AuditFork. Do NOT · 774279a9
      Leigh B Stoller authored
      close the saved STDOUT/STDERR descriptors until the new ones are open
      and dup'ed into fileno 1 and 2, and the LOG descriptor closed. This
      was causing SelfLoader to get confused; it has a wacky test that is
      supposed to look for a fork and reopen the handle on __DATA__, so that
      parent and child have its own fd. Not sure I really understand the
      sequence of events though.
  7. 29 Jan, 2013 1 commit
  8. 18 Jan, 2013 1 commit
  9. 17 Jan, 2013 1 commit
    • Leigh B Stoller's avatar
      Various changes and fixes to libaudit. · 8ac3f988
      Leigh B Stoller authored
      Add TBLOGS option to send LOGONLY logs to testbed-logs instead of
      default tbops (except when an error).
      Do not delete logfiles when NODELETE is given; we were not being
      careful about that.
      Changes and fixes to AuditFork to support new usage from ProtoGeni
      XMLRPC (the only place we use it).
  10. 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
      Most Utah-copyrighted files related to ProtoGENI are distributed under
      the terms of the GENI Public License, which is a BSD-like open-source
      Some Utah-copyrighted files in the Emulab source tree are distributed
      under the terms of the GNU Lesser General Public License, version 2.1
  11. 27 May, 2012 1 commit
  12. 21 Jun, 2011 1 commit
  13. 18 Feb, 2011 1 commit
    • Leigh B Stoller's avatar
      Fix the AuditFork() to prevent the loss of STDERR. Turns out · b5db8735
      Leigh B Stoller authored
      (something I just managed to remember) is that if you call the shell
      without STDERR=2, then the shell has no place to send STDERR. The
      only way to get this correct is to use POSIX::dup2 instead of the
      standard perl open function. Well, I bet there is a way (or 10 ways)
      to do this, but this is one that stumbled onto. libaudit does a lot
      of descriptor messing around.
      BTW; this is also why we sometimes lose STDERR from the XMLRPC server.
  14. 17 Feb, 2011 1 commit
  15. 03 Mar, 2010 1 commit
  16. 25 Mar, 2009 1 commit
  17. 27 Feb, 2009 1 commit
  18. 07 Jan, 2009 1 commit
  19. 04 Nov, 2008 2 commits
  20. 29 Aug, 2008 1 commit
  21. 02 Aug, 2007 1 commit
  22. 09 Jan, 2007 1 commit
  23. 06 Nov, 2006 1 commit
    • Kevin Atkinson's avatar
      libaudit related changes: · e89ee617
      Kevin Atkinson authored
        - Added "LIBAUDIT_FANCY" option to AuditStart.  When this option is
          used libaudit will send a different email than it normally sends,
          and on error call tblog_find_error() to determine the error.
        - Also add audit function AddAuditInfo which adds add additional
          information for libaudit to use in SendAuditMail when AUDIT_FANCY
          is set.
        - Modify template_swapin, template_instantiate, and template_create
          to use the new audit functionality.
        - Suppressing calling tblog_find_error and sending the error email
          when auditing in swapexp and batchexp
      tblog changes:
        - Shorten the message sent to the user when the error in unknown.
          Remove all parts about lack of free nodes as it no longer really
          applies as tblog now correctly identified those errors and handles
          them separately.  The message is now just "Please look at the log
          below to see what happened."
        - Improve algo. used to determine the other error when canceled.
          Will now work by removing all errors related to the cancel request
          and the essentially rerunning tblog_find_error.  If the cause of
          the error is still canceled, repeat and try again until the cause
          is something other than canceled or no errors are left.
        - Refactor tblog_find_error, which involves creating new internal
          functions: tblog_determine_single_error, tblog_store_error,
        - Add section on Primary vs Secondary Errors to the inline POD
        - Other minor enhancements and bug fixes.
  24. 06 Oct, 2006 1 commit
  25. 05 Sep, 2006 1 commit
  26. 18 Jul, 2006 1 commit
    • Leigh B. Stoller's avatar
      Changes necessary for moving most of the stuff in the node_types · 624a0364
      Leigh B. Stoller authored
      table, into a new table called node_type_attributes, which is intended
      to be a more extensible way of describing nodes.
      The only things left in the node_types table will be type,class and the
      various isXXX boolean flags, since we use those in numerous joins all over
      the system (ie: when discriminating amongst nodes).
      For the most part, all of that other stuff is rarely used, or used in
      contexts where the information is needed, but not for type descrimination.
      Still, it made for a lot of queries to change!
      Along the way I added a NodeType library module that represents the type
      info as a perl object. I also beefed up the existing Node module, and
      started using it in more places. I also added an Interfaces module, but I
      have not done much with that yet.
      I have not yet removed all the slots from the node_types table; I plan to
      run the new code for a few days and then remove the slots.
      Example using the new NodeType object:
      	use NodeType;
      	my $typeinfo = NodeType->Lookup($type);
              if ($typeinfo->control_interface(\$control_iface) ||
                  !$control_iface) {
        	    warn "No control interface for $type is defined in the DB!\n";
      or using the Node:
      	use Node;
              my $nodeobject = Node->Lookup($node_id);
              my $imageable  = $nodeobject->NodeTypeInfo()->imageable();
              my $rebootable = $nodeobject->isrebootable();
              $nodeobject->NodeTypeAttribute("control_interface", \$control_iface);
      Lots of way to accomplish the same thing, but the main point is that the
      Node is able to override the NodeType (if it wants to), which I think is
      necessary for flexibly describing one/two of a kind things like switches, etc.
  27. 10 Jul, 2006 1 commit
  28. 14 Jun, 2006 1 commit
  29. 06 Jun, 2006 1 commit
  30. 30 Aug, 2004 1 commit
  31. 08 Aug, 2003 1 commit
  32. 07 Aug, 2003 1 commit
  33. 23 May, 2003 1 commit
  34. 24 Jan, 2003 1 commit
  35. 18 Jan, 2003 1 commit
    • Leigh B. Stoller's avatar
      Ah yes, I can waste time like the best of the best. Actually, I'm just · 88fdc7f0
      Leigh B. Stoller authored
      waiting for Mike to work on Jail. This is an auditing module. Its
      intended to serve two purposes. 1) Provide a common set of routines
      for generating all that audit email from various scripts and 2)
      provide a debugging hook for when things screw up via the web
      interface and the user is too clueless to help us out, or the
      information just got lost someplace.
      The main function is:
      To start an audit, call AuditStart(). The first arg indicates if the caller
      is wanting to daemonize. If not, just redirect stdout/stderr to a logfile,
      and return. The logfile is optional; if not provided one will be created
      based on the name of the script with mktemp. If the user wants to
      daemonize, also fork and detach. This is provided as a convenience for
      those scripts that tend to combine redirecting output and daemonizing. The
      parent is exptected to exit, like any good mother of a daemon.
      Okay, so all output is redirected to the log file. If a subscript is
      invoked that also calls audit, that call is ignored, under the assumption
      that the logging can be rolled into the parent, and besides it would create
      a blizzard of email.
      There is a package destructor (END) that is setup to email the log file to
      the audit list, and if a log was created, the log goes to the logs
      list. This is important. The audit list never gets any logs; it just gets a
      two line record of what was done ("rmacct mike (by stoller)"). The log goes
      separately to the logs list for inspection if needed at some point. This
      makes the audit list very consise and easy to distill.
      Like all good package destructors, you can tell if the script was
      exiting with an error. If it was, then instead of sending the mail to
      the logs list, send the message to tbops! The nice thing is that this
      gets invoked no matter how you exit! No need to explicitly send the
      email, unless of course you want it, but I have not written than
      function yet!
      Oh, for debugging. We can go stick in Audit calls when scripts
      misbehave, and we can watch the output.
      Cool, right? Really useful, right? Handy Dandy, right? Mike?