ࡱ > 8 : 3 4 5 6 7 $Z bjbjWW 5 5 $R T T ) ) ) ) ) = t ) / / / / / / / / 1 /4 v / / 7' / 7' 7' 7' / 7' / 7' 7' V . @ b/ _} ) ! . ~/ / 0 / . x 4 7' 4 b/ 7' b/ T :
GIMS Update
November 4, 2010
Charles Thomas
This document will attempt to informally note the progress weve made on the GIMS project as of GEC9 in Washington, DC, 11/2010, outlining the state of the system as it was presented for the GEC9 demo.
Table of Contents:
Section 1: ProtoGENI Integration via the Reference Component Manager
Section 2: Updates to the GIMS Backend
Section 3: Updates to the GIMS Control GUI
Section 4: Modifications to the Rspec to support ProtoGENI Integration
Section 5: Updates to the GIMS database.
Section 6: Logging
Appendix A: Console traces from the CreateSliver function.
Appendix A1: ProtoGENI command line.
Appendix A2: GIMSControl log trace.
Appendix A3: GIMS backend log trace.
Appendix A4: Console output from the capture daemon.
Appendix B: Console traces from the DeleteSlice function.
Appendix B1: ProtoGENI command line.
Appendix B2: GIMSControl log trace.
Appendix B3: GIMS backend log trace.
Appendix B4: Console output from the capture daemon.
Appendix C: GIMS database diagram
Appendix D: Updated GIMS system diagram
Section 1: ProtoGENI Integration via the Reference Component Manager
The major step forward for this GEC is that GIMS is now working with the ProtoGENI Reference Component Manager (RCM). The RCM was installed on a machine called gims.wail.wisc.edu, and one of the first things I did was to RCS the code and then start studying its functionality. The main functions are carried out in the file GeniCM.pm, a perl module that provides skeleton calls for a variety of the limited ProtoGENI functions. The ones we care about for the purposes of the GIMS project are as follows:
CreateSliver:
Normally this call is passed a slice name and an Rspec and it goes through the process of creating and registering a slice with the SliceAuthority, checking all the certificates for authentication and authorization, calling a Component Manager to create one or more slivers, and starting all the slivers in the slice. If all of these functions go well, at that point we call out to our capture device and perform the following functions:
Assign a unique Experiment ID based on the given slice name.
Create a new experiment in the database, including storage of the slice URN and the Rspec.
Check the Rspec passed to the function to determine the name of the configuration to load into the capture device.
Retrieve the config from the database.
Load the config into the capture device.
Begin capturing traffic.
DeleteSlice:
Normally this call is passed a slice name and goes through the chain the ProtoGENI hierarchy to clean up after an experiment is finished. The slivers in the slice are shut down, and the database states are set to show that these entities are no longer in use. Again, certs are checked to perform all appropriate authN/authZ functions. Assuming all these functions succeed, we then call out to our capture system and perform the following functions:
Stop capture.
Set the capture state to done in the database.
Write end-of-experiment data to the various log files.
SliverAction:
As deployed in the RCM, this function can only reboot slices/slivers, but I expanded its functionality to allow the functions StartSliver and StopSliver to be invoked.
StopSliver:
Not a part of the simplified command set, I implemented this functionality to allow us to pause packet capture once an experiment had been started. This will be useful, for example, in cases where the experiment is run for a while with one setting, then capture is paused while the experiment is reconfigured and capture can then be restarted.
StartSliver:
Not a part of the simplified command set, we implemented this functionality to allow us to restart packet capture after it had been paused using StopSliver.
The basic methodology for integrating our device functionality was to create a perl module (GIMSControl.pm) that would reside in the same directory as the RCM. At the end of the selected RCM subroutines (in a location that is only reached if all the previous code has completed successfully) I inserted calls to the GIMSControl module to invoke the required capture functionality and also to log the results of these calls. This methodology was selected in order to keep perturbation of the RCM code to a minimum.
Section 2: Updates to the GIMS Backend
The first change, albeit merely a syntactical one, is that the name of the former Aggregate Manager was changed to be the GIMS backend. This is to avoid confusion about its role, which is really a coordinating nerve center for the capture system and not an Aggregate Manager in the GENI sense of that word (implying an implementation of the AM API).
The GIMS backend was augmented with a number of additional functions which were needed to support the ProtoGENI integration. A list of current functions is given here with newly added functions in italics.
Functions that do not directly involve the capture device (so-called Non-Device Functions):
GetDeviceCapabilities Retrieves the stored device capabilities from the database. This allows the device config GUI to present the user with options that make sense for the device they are planning to configure.
GetExperimentSettings Returns the device configuration for a given experiment.
GetExperimentResults Not implemented yet, but we are going to use this to return live status results during running experiments, then return final result information and URLs after an experiment has finished.
GetNewExpId Generate a unique experiment ID.
CreateNewExperiment An involved call. Generates a new ExperimentID based on the slice name, create an experiment in the database (storing all appropriate ProtoGENI info like slice URN and Rspec), and associate this experiment with a certain capture device.
GetExpInfoFromURN Given a ProtoGENI URN, return all database info on this experiment.
GetDeviceConfig Returns a given device config from the database.
StoreDeviceConfig Allows the GIMS Control GUI to save device configs directly to the GIMS database.
Functions that do involve the capture device (so-called Device Functions):
StartExperiment
PauseExperiment
StopExperiment
ConfigureExperiment
Section 3: Updates to the GIMS Control GUI
The GIMS Control GUI was used in the prototyping phase to control all aspects of experiment setup and control. I modified the device configuration mode of the GIMS Control GUI to allow users to assign names to specific configurations and store them in the GIMS database. This turned out to be necessary since ProtoGENI does slice creation and slice start in the same operation, therefore we could not move from Created to Configured to Start states as we had in the prototype GIMS system. Now when a user creates a new slice, the capture experiment is created, a pre-loaded config is retrieved from the database and loaded into the device, and capture is started. The GUI needed to be modified to support direct storage of these configs in the database, rather than pushing them directly to the device.
Section 4: Modifications to the Rspec to support ProtoGENI Integration
Since the Rspec 2.0 version, which is going to include user extensions, was not yet fully developed, I did some ad hoc modifications to enable certain configuration options to be passed to the ProtoGENI calls (and from there to the GIMSControl subroutines) via the Rspec. An unmodified Rspec for a simple GENI slice might look like this:
I extended it as follows (changes in italics):
In this example, the device location, device name, and the config name are given in the Rspec. We use this tuple of information as a key to retrieve the given configuration from the database and load it into the device during Slice/Sliver creation.
I am hoping that once the user-extensions are firmed up in version 2.0 of the Rspec that we can store this information using those extensions. I have shared my modifications with Jon Duerig at the University of Utah in the hopes that our input will help drive the v2.0 conversation and allow us to encode our device-specific information in a more officially-supported manner.
Section 5: Updates to the GIMS database
The GIMS database was augmented to include the table device_conf, which keeps track of device configurations to be loaded at slice/sliver creation. In addition other fields were added to the experiment table to support ProtoGENI integration including slice_urn and rspec. See Appendix C for a diagram outlining the current database configuration.
Section 6: Logging
The capture device itself has logs that it writes to allow post-mortem analysis of a capture experiment. In addition to these, there is also a log called gims_backend.log which stores the output of the GIMS backend and lives with the GIMS backend, and another called GIMSControl.log that records the output of the GIMSControl module that lives with the RCM. Both of the entities being monitored have been designed to throw enough information to the logs to make debugging problems with the system as easy as possible.
Appendix A: Console traces from the CreateSliver function.
Appendix A1: ProtoGENI command line.
[cthomas@ops ~/protogeni/test]$ ./createsliver.py -m https://gims.wail.wisc.edu/protogeni/xmlrpc/cm -d -n GENI5 GimsMSNProduction.rspec
https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa GetCredential
Got my SA credential
https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa GetKeys
https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa Resolve
No such slice registered here:Creating new slice called GENI5
https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa Register
New slice created
Creating the Sliver ...
https://gims.wail.wisc.edu:443/protogeni/xmlrpc/cm/2.0 CreateSliver
Created the sliver
default
gims-sensor-01
msn
urn:publicid:IDN+gims.wail.wisc.edu+authority+cm urn:publicid:IDN+gims.wail.wisc.edu+node+pc1
urn:publicid:IDN+gims.wail.wisc.edu+node+pc1
1
gims.wail.wisc.edu:51201
urn:publicid:IDN+gims.wail.wisc.edu+sliver+140
node1
raw
http://protogeni.net/resources/rspec/0.1
Appendix A2: GIMSControl log trace.
2010-11-05 13:52:37: Started session with GIMS Backend...
2010-11-05 13:52:37: Handling command StartExperiment...
2010-11-05 13:52:37: handleDeviceCommand(StartExperiment)...
2010-11-05 13:52:37: Got DB handle...
2010-11-05 13:52:37: Validating experiment state...
2010-11-05 13:52:37: Opening socket for gims-sensor-01.wail.wisc.edu, 8001...
2010-11-05 13:52:37: Calling socket()...
2010-11-05 13:52:37: Setting filehandle to unbuffered mode...
2010-11-05 13:52:37: Connecting...
2010-11-05 13:52:37: Socket opened to gims-sensor-01.wail.wisc.edu:8001.
2010-11-05 13:52:37: Sending to socket...
2010-11-05 13:52:37: Listening for response...
2010-11-05 13:52:37: Closing socket...
2010-11-05 13:52:37: Socket closed.
2010-11-05 13:52:37: Updated status to 'running' on ExpID: GENI5_48694C9A.
2010-11-05 13:52:37: Formulating reply...
2010-11-05 13:52:37: Packaged reply:
2010-11-05 13:52:37:
backend_data
device_response_data
Successfully started experiment GENI5_48694C9A. Process id 3550
]]>
Appendix A3: GIMS backend log trace.
Calling GIMSControl::prepareToCapture()...:
In prepareToCapture()...
GIMS Resource: node1:pc1
Loc: msn, Dev: gims-sensor-01
GIMS Response:
GIMS Backend received command CreateNewExperiment.
Experiment GENI5_48694C9A created. Added device msn:gims-sensor-01 to the experiment.
Calling GIMSControl::configureCapture()...:
In configureCapture()...
GIMS Resource: node1:pc1
ExpID: GENI5_48694C9A
GIMS Response:
GIMS Backend received command GetDeviceConfig.
[SNIP CONFIG XML]
GIMS Backend received command ConfigureExperiment.
HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.6.6
Date: Fri, 05 Nov 2010 18:53:18 GMT
Content-type: text/xml
Content-length: 562
Successfully configured experiment GENI5_48694C9A. Current state: Experiment: GENI5_48694C9A :-: sitelocation->MSN:::sampletype->none:::sampleparam->0.5:::storage->local:::anontype->none:::metatext->No meta data:::devicehost->gims-sensor-01:::device->gims-sensor-01:::aggregationtype->none:::rollover->30:::filterexpr->tcp or udp :-: capture on False :-: capture pid -1. Configuration warnings: Success
Calling GIMSControl::startCapture()...:
In GIMSControl::startCapture()...
ExpID: GENI5_48694C9A
GIMS Response:
GIMS Backend received command StartExperiment.
HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.6.6
Date: Fri, 05 Nov 2010 18:53:19 GMT
Content-type: text/xml
Content-length: 190
Successfully started experiment GENI5_48694C9A. Process id 3550
Appendix A4: Console output from the capture daemon.
root@gims-sensor-01:~/capd-06282010-alpha# ./runproxy.sh
+ python -O capd_proxy.py -b capture-daemon/data -d eth0 -c ./capture-daemon/capture-daemon
/usr/local/lib/python2.6/dist-packages/Crypto/Util/randpool.py:40: RandomPool_DeprecationWarning: This application uses RandomPool, which is BROKEN in older releases. See http://www.pycrypto.org/randpool-broken
RandomPool_DeprecationWarning)
2010-11-05 13:52:54,900 capd_proxy INFO capd_proxy starting up.
2010-11-05 13:52:54,908 storage_agent INFO Storage agent starting up.
2010-11-05 13:52:54,908 storage_agent INFO Using local storage.
2010-11-05 13:52:54,909 storage_agent INFO Using s3 storage.
2010-11-05 13:52:54,909 storage_agent INFO Using ssh storage.
2010-11-05 13:52:54,911 storage_agent INFO completed_upload.txt didn't previously exist.
2010-11-05 13:53:18,469 capd_proxy INFO New experiment state created for GENI5_48694C9A {'DeviceName': 'gims-sensor-01', 'MethodName': 'ConfigureExperiment', 'SiteLocation': 'msn', 'StorageSpec': {'storagetype': 'local', 'storageparams': {'rollover_interval': 30}}, 'ExperimentId': 'GENI5_48694C9A', 'AnonSpec': {'anontype': 'none'}, 'TransformSpec': {'SampleSpec': {'sampleparams': {'p': 0.5, 'N': 0.5}, 'sampletype': 'none'}}, 'MetaDataSpec': {'UserText': 'No meta data'}, 'AggregationSpec': {'aggtype': 'none'}, 'CaptureSpec': {'device': 'gims-sensor-01', 'filterexpr': 'tcp or udp'}}
2010-11-05 13:53:18,470 capd_proxy INFO Configure experiment GENI5_48694C9A. Current state: Experiment: GENI5_48694C9A :-: sitelocation->MSN:::sampletype->none:::sampleparam->0.5:::storage->local:::anontype->none:::metatext->No meta data:::devicehost->gims-sensor-01:::device->gims-sensor-01:::aggregationtype->none:::rollover->30:::filterexpr->tcp or udp :-: capture on False :-: capture pid -1; config warnings: Success
2010-11-05 13:53:19,062 capd_proxy INFO Attempt to start experiment GENI5_48694C9A
2010-11-05 13:53:19,063 capd_proxy INFO Notifying storage agent about experiment GENI5_48694C9A (local)
2010-11-05 13:53:19,064 capd_proxy INFO Starting experiment: ./capture-daemon/capture-daemon // capture-daemon/data/GENI5_48694C9A // ['./capture-daemon/capture-daemon', '-d', 'eth0', '-s', ' tcp or udp', '-p', 'capture-daemon/data/GENI5_48694C9A', '-l', 'MSN', '-u', 'No meta data', '-N', 'GENI5_48694C9A', '-z', '1800']
2010-11-05 13:53:19,064 storage_agent INFO new experiment of interest (GENI5_48694C9A) registered.
File rollover: metadata written to capture-daemon/data/GENI5_48694C9A/GENI5_48694C9A_MSN_20101105185320_metadump.xml
Appendix B: Console traces from the DeleteSlice function.
Appendix B1: ProtoGENI command line.
[cthomas@ops ~/protogeni/test]$ ./deleteslice.py -m https://gims.wail.wisc.edu/protogeni/xmlrpc/cm -d -n GENI5
https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa GetCredential
Got my SA credential. Looking for slice ...
HYPERLINK "https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa" https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa Resolve
Found the slice, asking for a credential ...
https://www.schooner.wail.wisc.edu:443/protogeni/xmlrpc/sa GetCredential
Got the slice credential
Deleting the slice
https://gims.wail.wisc.edu:443/protogeni/xmlrpc/cm/2.0 DeleteSlice
Slice has been deleted.
Appendix B2: GIMSControl log trace.
In GIMSControl::stopCapture()...
GIMS Backend received command StopExperiment.
HTTP/1.0 200 OK
Server: BaseHTTP/0.3 Python/2.6.6
Date: Fri, 05 Nov 2010 19:12:33 GMT
Content-type: text/xml
Content-length: 188
Successfully stopped experiment GENI5_48694C9A, process idNone
DeleteSlice() success:
$VAR1 = {
'value' => 0,
'output' => '',
'code' => 0
};
Appendix B3: GIMS backend log trace.
2010-11-05 14:11:51: Started session with GIMS Backend...
2010-11-05 14:11:51: Handling command StopExperiment...
2010-11-05 14:11:51: handleDeviceCommand(StopExperiment)...
2010-11-05 14:11:51: Got DB handle...
2010-11-05 14:11:51: Validating experiment state...
2010-11-05 14:11:51: Opening socket for gims-sensor-01.wail.wisc.edu, 8001...
2010-11-05 14:11:51: Calling socket()...
2010-11-05 14:11:51: Setting filehandle to unbuffered mode...
2010-11-05 14:11:51: Connecting...
2010-11-05 14:11:51: Socket opened to gims-sensor-01.wail.wisc.edu:8001.
2010-11-05 14:11:51: Sending to socket...
2010-11-05 14:11:51: Listening for response...
2010-11-05 14:11:51: Closing socket...
2010-11-05 14:11:51: Socket closed.
2010-11-05 14:11:51: Updated status to 'done' on ExpID: GENI5_48694C9A.
2010-11-05 14:11:51: Formulating reply...
2010-11-05 14:11:51: Packaged reply:
2010-11-05 14:11:51:
backend_data
device_response_data
Successfully stopped experiment GENI5_48694C9A, process idNone
]]>
Appendix B4: Console output from the capture daemon.
2010-11-05 14:12:33,351 capd_proxy INFO Attempt to stop experiment GENI5_48694C9A
2010-11-05 14:12:33,351 capd_proxy INFO Sending SIGTERM to capture process 3550.
2010-11-05 14:12:35,236 storage_agent INFO Local file capture-daemon/data/GENI5_48694C9A/GENI5_48694C9A_MSN_20101105185320_metadump.xml for experiment GENI5_48694C9A is ready.
2010-11-05 14:12:35,237 storage_agent INFO Local file capture-daemon/data/GENI5_48694C9A/GENI5_48694C9A_MSN_20101105185320.pcap for experiment GENI5_48694C9A is ready.
Appendix C: GIMS database diagram
Appendix D: Updated GIMS system diagram
+ 0 \ m ' ( * * +, >, K. L. . . . ,4 R4 : : : : A A A A A A 7L 8L L M yr h.zq h{ hF h{ CJ OJ QJ hF h{ CJ OJ QJ hF h{ 5CJ h9VD h{ 5CJ h9VD h{ CJ OJ QJ hOT h{ CJ OJ QJ h{ 5 hOT 5 hw 5 hk 5 hk 6h
<