1. 05 Dec, 2003 1 commit
  2. 03 Dec, 2003 1 commit
    • Leigh B. Stoller's avatar
      Fix up all of the sprintf calls to watch for output buffer overflow. I · 3aaf74e9
      Leigh B. Stoller authored
      did this with a simple macro called OUTPUT() that does the check and
      bails from the current function. This was as boring and tedious as
      life gets, but we should be protected from stack smashing now.
      
      Also fixed up a couple cases where we take data from the client;
      make sure that the sscanf calls are bounded.
      3aaf74e9
  3. 01 Dec, 2003 2 commits
  4. 21 Nov, 2003 4 commits
    • Mike Hibler's avatar
      Tweaks to support e1000 cards on the pc2000s. Installing this will break · 21e9611f
      Mike Hibler authored
      pc170-1 until those nodes actually have e1000 cards installed (next week).
      21e9611f
    • Mike Hibler's avatar
    • Mike Hibler's avatar
      Make sure we can hardwire speed/duplex on new Intel Pro/1000 (e1000) cards. · 5ad5ab99
      Mike Hibler authored
      Need to use ethtool instead of mii-tool to do this.  My comment:
      
        #
        # Linux is apparently changing from mii-tool to ethtool but some drivers
        # don't support the new interface (3c59x), some don't support the old
        # interface (e1000), and some (eepro100) support the new interface just
        # enough that they can report success but not actually do anything.  Sweet!
        #
      
      This requires that we load ethfind on the nodes, though the script will
      continue to work if it isn't (though will not work for e1000 cards).
      5ad5ab99
    • Mike Hibler's avatar
      Hack fix for an apparent boot-time race condition. Our pump-invoked · 633a7a12
      Mike Hibler authored
      sethostname script properly sets the hostname, but sometimes that hostname
      gets overridden by one of the static boot scripts which sets the hostname
      back to "localhost".  The sequence is something like:
      	pump runs on eth0 and fires off our sethostname script
      	sethostname blocks
      	ifup of eth1 starts, determines that hostname hasn't been
      	  set (i.e., is set to "localhost") and remembers (NEEDHOSTNAME)
      	sethostname finishes by setting the host name
      	ifup of eth1 finishes, seeing NEEDHOSTNAME is set but doesn't
      	  have anything to set it to so resets to "localhost"
      Weird.  Hack is to make sure it never thinks it needs to set the hostname
      by setting it to something that is not "localhost".  We do this once we
      identify the control net interface (and thus know we will be running pump RSN).
      633a7a12
  5. 12 Nov, 2003 3 commits
  6. 07 Nov, 2003 1 commit
  7. 05 Nov, 2003 1 commit
    • Leigh B. Stoller's avatar
      Client side of the event system changes. · 70246c91
      Leigh B. Stoller authored
      * Download the eventkey with new tmcd call.
      
      * Pass -k option to various agents so that they can verify the HMACs
        in the incoming notifications.
      
      * Change program agent; The list of agents from tmcd now includes the
        command, which is written to a config file for the program-agent to
        read in. The command string in the event is now ignored.
      
      * Build the local proxy for linux, and add the goo to start the local
        elvind and use the proxy. It has been this way on FreeBSD for a
        while, but I never got it installed for Linux before now.
      70246c91
  8. 30 Oct, 2003 1 commit
  9. 27 Oct, 2003 3 commits
  10. 24 Oct, 2003 2 commits
    • Robert Ricci's avatar
      Commit the stuff necessary to copy out new plab rootballs, versions of · d12f9b61
      Robert Ricci authored
      which had been hanging around in my home directory for a while.
      
      There are a few new things in plab/etc/netbed_files that set up a
      directory of the same name in @prefix@. This will get rsync'ed with
      netbed_files/ on each planetlab node.
      log/  - just needs to exist for the httpd server
      sbin/ - contains thttpd, and scripts to manipulate it
      www/  - the directory served by thttpd. Contains symlinks to the 'real'
              location of the rootballs (etc/plab)
      
      I've committed a binary of thttpd - this is simply because it'd be a
      PITA to compile a Linux binary for every devel tree, etc.
      
      PLAB_ROOTBALL has now become a configure options. The idea is that we
      will keep the latest version number in configure.in, but you can
      override it in your defs
      file. This way, we don't have to update every defs file when there's a new
      version, but people can still play around with their own version if they want.
      
      The two scripts that interact with the plab nodes skip ones that are
      down. They ssh in as 'utah1', meaning that one of us who has access to
      that account needs to run them, so that they can have access to our
      keys. We can put boss's public key (or something) out there to remove
      this requirement.
      
      plabdist runs an rsync between @prefix@/etc/plab/netbed_files and a
      file of the same name on the planetlab nodes. It's intended to be run
      from the main install tree - the local rsync directory is not normally
      set up in devel trees. It runs in parallel, but is limited to 4 to
      avoid beating up boss too much. Takes about 1:40 with the current set
      of plab nodes (took > 10 minutes doing one at a time).
      
      plabhttpd (re)starts the mini web server on all plab nodes
      d12f9b61
    • Mike Hibler's avatar
      84bf73a5
  11. 23 Oct, 2003 1 commit
  12. 21 Oct, 2003 1 commit
  13. 20 Oct, 2003 1 commit
  14. 17 Oct, 2003 1 commit
  15. 16 Oct, 2003 1 commit
    • Leigh B. Stoller's avatar
      Brave new world of tmcc client side caching. The goal is to reduce the · 2b72f2c9
      Leigh B. Stoller authored
      number of connections to tmcd, and the resulting number of DB queries.
      Currently thats about 24 per node when it boots. Each vnode adds
      another 24 or so. The new approach is to use the "fullconfig" command,
      which dumps the entire config in one shot, saving about 20 of those
      connections. We still need to do the status/state commands for real of
      course. When a node boots, it requests the fullconfig; the client side
      takes this fullconfig, and dumps the individual sections to
      /var/emulab/boot/tmcc/section_name. Subsequent requests first look for
      it locally in the above named files, falling back to real tmcc if none
      exists. The update command also refreshes the cache.
      
      Tested for jails and plab node vservers as well.
      2b72f2c9
  16. 15 Oct, 2003 5 commits
  17. 14 Oct, 2003 1 commit
  18. 09 Oct, 2003 1 commit
    • Leigh B. Stoller's avatar
      Reorg of two aspects of node update. · 2641af4d
      Leigh B. Stoller authored
      * install-rpm, install-tarfile, spewrpmtar.php3, spewrpmtar.in: Pumped
        up even more! The db file we store in /var/db now records both the
        timestamp (of the file, or if remote the install time) and the MD5
        of the file that was installed. Locally, we can get this info when
        accessing the file via NFS (copymode on or off). Remote, we use wget
        to get the file, and so pass the timestamp along in the URL request,
        and let spewrpmtar.in determine if the file has changed. If the
        timestamp it gets is >= to the timestamp of the file, an error code
        of 304 (Not Modifed) is returned. Otherwise the file is returned.
      
        If the timestamps are different (remote, server sends back an actual
        file), the MD5 of the file is compared against the value stored. If
        they are equal, update the timestamp in the db file to avoid
        repeated MD5s (or server downloads) in the future. If the MD5 is
        different, then reinstall the tarball or rpm, and update the db file
        with the new timestamp and MD5. Presto, we have auto update capability!
      
        Caveat: I pass along the old MD5 in the URL, but it is currently
        ignored. I do not know if doing the MD5 on the server is a good
        idea, but obviously it is easy to add later. At the moment it
        happens on the node, which means wasted bandwidth when the timestamp
        has changed, but the file has not (probably not something that will
        happen in typical usage).
      
        Caveat: The timestamp used on remote nodes is the time the tarfile
        is installed (GM time of course). We could arrange to return the
        timestamp of the local file back to the node, but that would mean
        complicating the protocol (or using an http header) and I was not in
        the mood for that. In typical usage, I do not think that people will
        be changing tarfiles and rpms so rapidly that this will make a
        difference, but if it does, we can change it.
      
      * node_update.in, client side watchdog, and various web pages:
        Deflated node_update, removing all of the older ssh code. We now
        assume that all nodes will auto update on a periodic basis, via the
        watchdog that runs on all client nodes, including plab nodes.
      
        Changed the permission check to look for new UPDATE permission (used
        to be UPDATEACCOUNT). As before, it requires local_root or better.
        The reason for this is that node_update now implies more than just
        updating the accounts/mounts. The web pages have been changed to
        explain that in addition to mounts/accounts, rpms and tarfiles will
        also be updated. At the moment, this is still tied to a single
        variable (update_accounts) in the nodes table, but as Kirk requested
        at the meeting, it will probably be nice to split these out in the
        future.
      
        Added the ability to node_update a single node in an experiment (in
        addition to all nodes option on the showexp page). This has been
        added to the shownode webpage menu options.
      
        Changed locking code to use the newer wrapper states, and to move
        the experiment to RUNNING_LOCKED until the update completes. This is
        to prevent mayhem in the rest of the system (which could be dealt
        with, but is not worth the trouble; people have to wait until their
        initiated update is complete, before they can swap out the
        experiment).
      
        Added "short" mode to shownode routine, equiv to the recently added
        short mode for showexp. I use this on the confirmation page for
        updating a single node, giving the user a couple of pertinent (feel
        good) facts before they comfirm.
      2641af4d
  19. 07 Oct, 2003 2 commits
  20. 06 Oct, 2003 2 commits
    • Leigh B. Stoller's avatar
      Quickie change to experiment with client side caching; Added a new · 9fb9ef8f
      Leigh B. Stoller authored
      "fullconfig" command to cycle through the list of existing commands
      and spit out a section for each. Not all of them of course; just a
      subset that makes sense. I did not that mounts are a bit of a problem
      cause of the USESFS argument. Not sure what to do yet.
      9fb9ef8f
    • Leigh B. Stoller's avatar
      * New libtmcc.pm module that encapsulates the tmcc interface. Most of the · 434a472a
      Leigh B. Stoller authored
        code that was in libsetup has moved into this library, and underwent a
        giant cleaning and pumping up. The interface from your typical perl
        script now looks like this:
      
        use libtmcc;
      
        if (tmcc(TMCCCMD_STATUS, "optional arguments", \@tmccresults) < 0) {
            warn("*** WARNING: Could not get status from server!\n");
            return -1;
        }
        foreach my $me (@tmccresults) {
      	print "bite $me";
        }
      
        The arguments and results are optional values. There is a fourth optional
        value that is a hash of config options (basically converted to command
        line switches passed to tmcc). For example, to set the timeout on an
        individual call, pass a fourth argument like:
      
      	("timeout" => 5)
      
        There is also a way to set global options so that all subsequent tmcc
        calls are affected:
      
      	configtmcc("timeout", 5);
      
        I'll probably clean this up a bit to avoid the direct strings.
      
        The result list is a list of strings. Since we are trending away from
        using tmcc to transfer large amounts of data, I think this is okay.
      
      * A new tmcc.pl which does little more than load libtmcc and use it.
        This will become the new tmcc, with the existing C version becoming a
        backend binary for it.
      
      * All of the perl scripts in tmcd have been changed to use the new
        library. I left the few uses of tmcc in shell scripts alone since they
        were of the simple variety (mostly "state" command).
      
      * And again, if you have read this far, you will learn why I bothered with
        all this. Well, the existing code was really bad and it was getting out
        of control. Sort of like a squid that was getting harder to control as
        its rotting tenticles slithered into more and more scripts. Anyway ...
      
        More important, my goal is to use the libtmcc library to add caching.  I
        have not worked out the details yet, but I am envisioning a configuration
        file, perhaps generated initially by tmcd, of all of the config
        values. If the library finds that file, it sucks the info out of the file
        instead of going to tmcd. Eventually, this config file would be generated
        as part of experiment swapping and stored in the DB, but thats a longer
        term project, and perhaps orthogonal (how we fill the cache is not as
        important as adding the ability to use a cache, right?).
      
        Note that certain operations (like "state" and "ready") are flagged by
        the library to always bypass the "cache".
      434a472a
  21. 02 Oct, 2003 2 commits
    • Mike Hibler's avatar
      Add yet another route to jails: an interface route for the real control net. · 9fd95b1a
      Mike Hibler authored
      Previously, if you accessed a phys node by its real IP address (155.101.132.N)
      from inside a jail, it used the default route going to the router and back.
      Now it will put it out directly on the control net.
      
      The main reason for this is so that minibed vnodes can reach their boss and
      ops nodes.  Vnodes in mini don't have a default route that works, so we needed
      a way to get to boss/ops.
      
      Note that gated will remove this route when it starts up.  Thus, vnodes will
      revert to using the default route to get to the real control net.  On mainbed,
      this will still work (hop through the router as before).  On mini, it won't
      work at all.
      
      Moral: don't use session routing and vnodes on mini.
      9fd95b1a
    • Leigh B. Stoller's avatar
      Change ixp config to get the host side (gateway) of the pci/eth link · 82e2ec73
      Leigh B. Stoller authored
      from the interfaces table of the parent node. This coincides with
      Rob's changes to stash the IP there, and arrange for it to go into
      DNS.
      82e2ec73
  22. 30 Sep, 2003 2 commits
  23. 25 Sep, 2003 1 commit