Fix another old, and significant, bug
Each pclass hold a mapping from type names to nodes of that type that are currently available for use. This structure was not being properly maintained; when a mapping was removed, only the entry for the pnodes *current* type was being put back. When the pnode goes empty, *all* of its possible types should be marked as available. The consequence was that for pnodes that could take on multiple types (which is the common case in Emulab), once a node had been considered for a certain type (say, 'pc', 'pcvm', or 'delay'), it would *never* be considered for another type again. Add a new function that gets called when a pnode goes empty, to reset *all* of its type mappings in its pclass. Fixing this bug could have some serious positive consequences.
Showing with 24 additions and 1 deletion