Skip to content

BOWL Aggregate Manager configuration

Julius Schulz-Zander edited this page Oct 7, 2013 · 1 revision

BOWL Aggregate Manager

The BOWL Aggregate Manager (BOWLAM) is written as a plugin for the AMsoil.

BOWL AMsoil Plugin

This section describes the architecture of the BOWL AMsoil Plugin.

JSON API

  • Accessible on port 11223
  • In Python:

    import jsonrpclib
    s = jsonrpclib.Server(‘http://localhost:11223’)
    nodes = s.ListResources()
  • Exports the following methods:
    • ListResources(available=True, slice_urn)
      • available:
      • slice_urn:
    • Allocate(slice_urn, ids, end_time, client_uuid, client_email)
      • slice_urn:
      • ids: list of
      • end_time: , please use datetime.isoformat()
      • client_uuid:
      • client_email :
    • Provision(slice_urns, end_time, client_name, client_email, client_uuid)
      • slice_urns: list of
      • client_name:
      • everything else just like Allocate()
    • PerformOperationalAction(slice_urns, action, client_name, client_email, client_uuid):
      • Not in use at the moment!
      • action:
      • everything else just like Provision()
    • Delete(slice_urns, client_name, client_email, client_uuid)
      • similar to Provision() and Allocate()
  • Return values:
    • 0: OK
    • -1: ResourceManager Error
    • -2: Sending mail to BOWL admins failed (e.g. for node reservation/setup)

Delegate

  • plugins/bowlgeni3
  • Sliver == individual resource == Node
  • Slice == multiple reserved slivers == experiment == Reservation
  • methods take a list of URNs
    • typically either one slice URN or multiple sliver URNs that all belong to the same slice
    • we can choose to support more combinations, but I think we won’t…
  • API calls (see http://groups.geni.net/geni/wiki/GAPI_AM_API_V3)
  • all have the two arguments “client_cert” and “credentials” which come from the clearinghouse or something
  • additional arguments are specified in brackets
  • get_version
    • return XML Schema Definitions for RSpecs: *.xsd
      • advertisement (announce what kinds of resources are available)
      • request (specifies the wishes of the experimenter)
      • manifest (show status of a sliver)
    • get manifest extensions mapping: Returns a dict of namespace names (e.g. “bowl”) and manifest extensions (url to a request/manifest/ad.xsd)
      • manifest/request/ad extension == xsd schema URL as string
    • apparently we can make up our own XSD schema, but in order to be GENI compliant we would have to supply ProtoGeni RSpecs http://www.protogeni.net/ProtoGeni/wiki/RSpec
      • we can use extensions: http://www.protogeni.net/ProtoGeni/wiki/RSpecExtensions2
      • what schema we use may also influence the expedient client interface (and any client actually)
      • might for example include the Node ID
        • as a first step, change dhcp’s IP address to a string “Node ID”
  • list_resources (geni available)
    • Gibt advertisement Rspecs aller Resources zurück
      • zusammengebaut aus Infos über die Nodes
    • falls geni_available true ist, nur von Resourcen die nicht reserviert sind
  • describe (urns)
    • Gibt manifest Rspecs von einer Slice oder einer Liste von Slivern zurück
    • Gedacht als “feste” Infos, die sich nicht ändern
    • sollte genug Infos geben, damit Experimenter entscheiden kann, ob er die Resourcen benutzen will
  • status (urns)
    • enthält dynamische Daten bzw Infos über die Instanziierung
    • soll nach dem Provision aufgerufen werden, um einen zu updaten, wann die Resourcen fertig vorbereitet sind und benutzt werden können
    • wird bei uns wohl immer pending zurückgeben, da Resourcen nicht automatisch aufgesetzt werden
    • gibt return struct zurück, das slice URN und Liste von Slivers mit Status und Ablaufzeit enthält
  • allocate (slice urn, rspec, end time)
    • legt eine Reservierung mit den entsprechenden Resourcen an
    • Gibt manifest Rspec der allokierten Resource und eine Liste von slivern mit expiring date (?) zurück
  • renew
    • urns, expiration time, best effort (not implemented yet)
    • update Reservation with new end time
  • provision
    • in principle, this should “really” reserve the node, i.e. start the OFELIA image
    • we are doing this manually, so this only sends an e-mail to us, stating that someone requested the resources
  • perform operational action
    • should be able to start, stop, restart the slice…
    • sends out e-mails to us
  • delete (urns, best effort)
    • löscht Reservierungen
    • kann auch einzelne Sliver aus einer Slice löschen
    • gibt Return struct zurück, das Liste gelöschter Sliver enthält
  • shutdown (slice urn)
    • gedacht für “emergency shutdown” aber nix löschen
    • gibt XMLRPC boolean zurück, ob die reservierung runtergefahren wurde
    • sollte uns wohl einfach ne Mail senden und dann true zurückgeben
  • Geni Is single allocation:
    • If set to true, you can only allocate all slivers at once, only display all allocated slivers at once etc..
    • Leave it false
  • Get allocation mode:
    • whether slivers can be added to an existing slice
    • returns geni_single, geni_disjoint or geni_many
    • return geni_many

Resource Manager

  • see code/epydoc

Testing

  • Log in on ofelia host
  • sudo -s to become root
  • screen -r to attach the screen that runs the relevant programs
  • If no screen is present, here is how to start AMsoil yourself:
    • su ofelia to become ofelia user
    • Start Clearing House:

      ofelia@ofelia:~/gcf-2.2.1$ python src/gcf-ch.py
    • Start AMsoil:

      ofelia@ofelia:~/AMsoil$ python src/main.py
    • Open the log:

      tail -f log/amsoil.log
  • (Optionally) Display database and add data

    psql ofelia_test
    • \d – describe object (no argument: shows all tables, with argument: show columns of a table)
    • show nodes in the database
       select * from hosts;
    • insert new node

      insert into hosts(id, hostname, default_mac, default_ip) values (3, ‘two’, ‘ca:ff:ee:00’, “1.2.3.4”);
  • Start omni:
    • listresources

      ofelia@ofelia:~/gcf-2.2.1$ python src/omni.py -o -a https://localhost:8001 -V 3 listresources
    • reserve resources
      • create Rspec, e.g.

        <?xml version=“1.0” ?>


        3




        ofelia@ofelia:~/gcf-2.2.1$ python src/omni.py o -a https://localhost:8001 -V 3 allocate [-end-time 2013-05-08T16:25:36.310002]
      • Creates reservations in table, sets their geni_allocation_status to geni_allocated and their geni_operational_status to geni_notready (since they have only been reserved and not set up yet)
      • Note that omni checks some slice expiration info from the credentials, which may be wrong (i.e. differ from the sliver expiration which we provided)
      • If omni complains about the slice expiration time not being long enough, use —devmode option for omni to disable the bogus credential expiration time check
    • provision
      • can only provision allocated slices!

        ofelia@ofelia:~/gcf-2.2.1$ python src/omni.py o -a https://localhost:8001 -V 3 provision [-end-time 2013-05-08T16:25:36.310002]
      • TODO: send an e-mail to BOWL admins that these nodes were requested
    • describe

      ofelia@ofelia:~/gcf-2.2.1$ python src/omni.py -o -a https://localhost:8001 -V 3 describe
      • returns RSpec manifest of nodes that belong to this slice, sliver status of each
    • get status

      ofelia@ofelia:~/gcf-2.2.1$ python src/omni.py -o -a https://localhost:8001 -V 3 status
      • returns Rspec manifest of nodes and status of reservations
      • is meant to be polled until operational status becomes “geni_ready”
    • renew

      ofelia@ofelia:~/gcf-2.2.1$ python src/omni.py —devmode -o -a https://localhost:8001 -V 3 renew
      • expiration time e.g. 2013-05-08T16:25:36.310002
      • use —devmode to disable omni credentiral expiration time checking
    • delete

      ofelia@ofelia:~/gcf-2.2.1$ python src/omni.py -o -a https://localhost:8001 -V 3 delete

Calls that are not yet functional/unclear

  • performoperationalaction / poa
  • shutdown