Skip to content. | Skip to navigation

Personal tools

Navigation

You are here: Home / Wiki / Repairingemulabprotogeni

Repairingemulabprotogeni

Repairing Emulab ProtoGENI Installations

Repairing Emulab ProtoGENI Installations

If you are doing active development on an Emulab ProtoGENI installation and modifying the Component Manager or Slice Authority code, you may inadvertently introduce or tickle a bug which puts the database in an inconsistent state. This may cause resources to never be released or cause other problems. Here are a few techniques to try to unwedge your system:

Locks

To prevent race conditions, changes on tickets, slices, and slivers are locked. If a fault occurs between the lock operation and the unlock operation, they can become permanently locked.

To fix this problem, you should look in the database to find the perma-locked entity.

  • Log onto your inner boss.
  • Open database:
    • For Component Manager Database: mysql geni-cm
    • For Slice Authority Database: mysql geni
  • Find and clear locked entity:
    • For Slices:
      select hrn,idx,locked,stitch_locked from geni_slices where hrn="WEDGED_SLICE";
      update geni_slices set locked=NULL,stitch_locked=NULL where hrn="WEDGED_SLICE";
      
    • For Slivers:
      select hrn,idx,locked from geni_slivers where hrn="WEDGED_SLIVER";
      update geni_slivers set locked=NULL where hrn="WEDGED_SLIVER";
      
    • For Tickets:
      select idx,locked from geni_tickets where idx="WEDGED_TICKET_INDEX";
      update geni_tickets set locked=NULL where idx="WEDGED_TICKET_INDEX";
      

This will clear out the lock so you can clean up the problem.

Indexes

In addition to the external labels like URNs and HRNs, ProtoGENI on Emulab keeps an internal label called an index which is a small number similar to a process number in an OS. You can use these index numbers in the following scripts to clean up problems. To find the index number for a slice, go to the appropriate database and run:

select hrn,idx from geni_slices where hrn="WEDGED_SLICE"

Getting the index for a ticket or sliver is similar, but you must look in the appropriate table.

Slices

Slices can be cleaned up using cleanupslice on your boss.

For Slice Authority:

   /usr/testbed/sbin/cleanupslice -s INDEX

For Component Manager:

   /usr/testbed/sbin/cleanupslice -m INDEX

Tickets

Tickets can be cleaned up using cleanupticket on boss:

/usr/testbed/sbin/withadminprivs /usr/testbed/sbin/protogeni/cleanupticket INDEX

Slivers

Slivers are tied to a slice. You can clean up a sliver by cleaning up its slice on a component manager as described above.