5. Managing Slices

5.1. Adding and Removing SSH keys

Remote access to slices is done using SSH. SSH keys must be in the OpenSSH key format. (A sample key in the OpenSSH key format can be found here. Note that it a single line of text.) Keys for authorized users for a slice are added using the svm command. Once an SSH key is added, the corresponding user should be able to SSH into any node in the slice using the slice's name as the login. For example:

   # svm addkey oceanstore ~/.ssh/identity.pub
   Success on 12.155.161.147
   Success on 152.3.136.3
   Success on 128.111.52.62
   Success on 131.215.45.71
   ....

   # ssh 12.155.161.147 -l oceanstore

SSH keys are also removed using the svm command.

   # svm delkey oceanstore ~/.ssh/identity.pub
   Success on 12.155.161.147
   Success on 152.3.136.3
   Success on 128.111.52.62
   Success on 131.215.45.71
   ....

To remove all SSH keys for a slice, use the svm command as shown below.

   # svm nukekeys oceanstore
   Success on 12.155.161.147
   Success on 152.3.136.3
   Success on 128.111.52.62
   Success on 131.215.45.71
   ....

To simplify the management of pushing SSH public keys out to slices, users can use the pluserinfo command to look up SSH public keys on www.planet-lab.org. SSH public keys are available for all users who have registered at www.planet-lab.org and have had their accounts enabled by their site's principle investigator. Like PlanetLab web accounts, pluserinfo identifies accounts for SSH keys by email address, as shown in the example below. (Note that the key below is printed with newlines in the example just for formatting. Your actual SSH public key should consist of a single line of text.) The pluserinfo command most often is used to look up a key, redirect it to a file, then pass the file to svm to push the key out to all nodes in a slice.

   # pluserinfo --key llp@cs.princeton.edu
   ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA3Xv8nHAS+qRrvQ7DKxoH77ZKSAhaqbQtjAib6o1h6+9u
   qhDqdMGiRivu1gKyYjj7DGPSoaqQ/LxMIbwFbNwRpkAM+rFRIYPjC0kWE2pBGAaf3TsIZZUMdGxPI5a/
   qSpMrb8WFtab1CN+xzVj9jauX/pEjfPzcHZQTSH7PTA0M2k= llp@gentoo

pluserinfo can also be used to look up additional details on a particular user. For example:

   # pluserinfo llp@cs.princeton.edu
   EMAIL: llp@cs.princeton.edu
   NAME: Larry Peterson
   SITE_NAME: Princeton
   TITLE: Professor
   IS_ADM: f
   IS_PI: t
   ADDRESS: 35 Olden Street
   CITY: Princeton
   STATE: NJ
   ZIP: 08544
   COUNTRY: US
   PHONE: 609-258-6077
   URL: 
   SSH_PUBKEY: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA3Xv8nHAS+qRrvQ7DKxoH77ZKSAhaqbQt
   jAib6o1h6+9uqhDqdMGiRivu1gKyYjj7DGPSoaqQ/LxMIbwFbNwRpkAM+rFRIYPjC0kWE2pBGAaf3TsI
   ZZUMdGxPI5a/qSpMrb8WFtab1CN+xzVj9jauX/pEjfPzcHZQTSH7PTA0M2k= llp@gentoo

Using www.planet-lab.org as a lookup service for SSH keys is more a convenience than anything else. As shown in the initial example, any SSH key (e.g., ~/.ssh/identity.pub) may be added to a slice.

5.2. Renewing Slices

Leases for slivers in a slice can be renewed using the svm command. All lease renewals are for same lease length as specified in the original slice XML file when the lease was created. Upon renewing a lease for a sliver on a given node, the old lease is replaced with the new lease. Hence, when renewing a lease at time t, the new lease will be valid until time t + leaselen. Using svm, leases for all slivers in a slice can be renewed with a single command as shown below.

   # svm renewslice oceanstore
   Success on 150.135.65.2
   Success on 150.135.65.3
   Success on 131.215.45.71
   Success on 131.215.45.72
   Success on 128.232.103.203
   ....

5.3. Node Lists and Expirations

The svm command can also be used to list the nodes in a particular slice. The list of nodes returned are nodes where virtual machines have been successfully created.

   # svm nodelist oceanstore
   150.135.65.2
   150.135.65.3
   131.215.45.71
   131.215.45.72
   128.232.103.203
   ...

The svm command can also be used to list the expiration times for the leases in a particular slice. For example:

   # svm expirations oceanstore
   Sliver for slice oceanstore expires 2003-03-05 23:11:01 UTC on 150.135.65.2
   Sliver for slice oceanstore expires 2003-03-05 23:11:03 UTC on 150.135.65.3
   Sliver for slice oceanstore expires 2003-03-05 23:11:02 UTC on 131.215.45.71
   Sliver for slice oceanstore expires 2003-03-05 23:11:03 UTC on 131.215.45.72
   ...

5.4. Cleaning up your .planetlab Directory

As slices are created, deleted, and expire over time, information for certain slices in your .planetlab directory will become out of date. In some cases, the svm command will delete the relevant files for you. For example, if a slice is expicitly deleted, all files related to that slice will be automatically deleted. In other cases, however, files will persist. For example, if a slice's leases simply expire, information about that slice will still persist in your .planetlab directory.

To purge your .planetlab of old files, use the following command. This command essentially will look for slices that do not contain any valid (i.e., non-expired) tickets or leases. If a slice does not contain any valid tickets or leases, all files related to that slice will be deleted. Note that since this command does comparisons based on time, the machine where you run svm must maintain reasonably accurate time. If your clock is ahead by several days, for example, files will get blown away several days before they should have been.

   # svm clean