-
Leigh B. Stoller authored
vserver/pcplab). Rather then 10000s of fixed node entries in the DB, create node entries on the fly as needed (assign_wrapper), and then delete them when they are no longer used (nfree). When new nodes check in, no longer create all those nodes table entries (utils/newnode.in and tbsetup/plab/libplab.py.in). I've added a new library: db/Node.pm which is something I started a while back, and decided to commit, along with the support for creating and deleting virtual nodes. CreateVnodes() creates a new set of nodes, choosing non-conflicting names in the DB, and then immediately reserves them to the pid/eid specified. DeleteVnodes takes a list of vnodes and deletes them from nodes,reserved,etc. This library does a few other things which I am going to be playing with, so you might want to go read the comment at the top of the file. Feel free to speak up. CreateVnodes() is from called assign_wrapper when a node type has the "isdynamic" property. Otherwise does the existing avail/nalloc stuff. DeleteVnodes() is called from nfree when the node type has the isdynamic property. I've added a script (sql/delvnodes.pl) to run after updating the DB and software. All free pcvm and pcplab virtual nodes are deleted from the DB; reserved ones will get deleted whenever their experiment ends. I've noted all of this in doc/UPDATING, including setting the isdynamic property on pcvm in the node_types table. I've left tbsetup/plab/libplab.py.in to create a single pcplab node for the management sliver (still called -20). We can worry about this later. All this for modelnet?
4d5620c2