RabbitMQ Admin Interface

LHCb administration client

In order to use the lhcb administration client, do the following steps:

$ ssh lbmessagingbroker
$ . /build/lbciagent/virtualenv/bin/activate

Once the environment is set, you can use lhcb rabbitmq administration client:

$ lbma --help
usage: LbMessagingAdministration.py [-h] [-d] [--info]
                                    
                                    {display,change_priority,add,regenerate,park,unpark}
                                    ...

Tool to administrate nightliesInstallation Messages

optional arguments:
  -h, --help            show this help message and exit
  -d, --debug           Show debug information
  --info                Show logging messages with level INFO

subcommands:
    display             Displays the messages in the installation queue
    change_priority     Updates the priority of the messages filtered by slot
                        or/and build_id or/and platform or/and project
    add                 Adds a messages with slot, build_id, platform and
                        project in the queue
    regenerate          Regenerates all the installations messages for today.
                        If all is used, all the messages are regenerated. If
                        not, only the completed messages are regenerated.
    park                Parks messages filtered by slot or/and build_id or/and
                        platform or/and project in a specific exchange
    unpark              Unparks messages filtered by slot or/and build_id
                        or/and platform or/and project from a specific queue

lbma display


$ lbma display --help
usage: LbMessagingAdministration.py display [-h]

optional arguments:
  -h, --help  show this help message and exit

lbma change_priority

$ lbma change_priority --help
usage: LbMessagingAdministration.py change_priority [-h] [--slot SLOT]
                                                    [--build_id BUILD_ID]
                                                    [--platform PLATFORM]
                                                    [--project PROJECT]
                                                    priority

positional arguments:
  priority             The new priority for the messages

optional arguments:
  -h, --help           show this help message and exit
  --slot SLOT          Specify slot name
  --build_id BUILD_ID  Specify build id
  --platform PLATFORM  Specify platform name
  --project PROJECT    Specify project name

lbma add

$ lbma add --help
usage: LbMessagingAdministration.py add [-h] [--slot SLOT]
                                        [--build_id BUILD_ID]
                                        [--platform PLATFORM]
                                        [--project PROJECT]
                                        priority

positional arguments:
  priority             The priority for the messages

optional arguments:
  -h, --help           show this help message and exit
  --slot SLOT          Specify slot name
  --build_id BUILD_ID  Specify build id
  --platform PLATFORM  Specify platform name
  --project PROJECT    Specify project name

lbma regenerate

$ lbma regenerate --help
usage: LbMessagingAdministration.py regenerate [-h] [--slot SLOT]
                                               [--build_id BUILD_ID]
                                               [--platform PLATFORM]
                                               [--project PROJECT] [--all]

optional arguments:
  -h, --help           show this help message and exit
  --slot SLOT          Specify slot name
  --build_id BUILD_ID  Specify build id
  --platform PLATFORM  Specify platform name
  --project PROJECT    Specify project name
  --all                Regenerate even non built projects

lbma park

$ lbma park --help
usage: LbMessagingAdministration.py park [-h] [--slot SLOT]
                                         [--build_id BUILD_ID]
                                         [--platform PLATFORM]
                                         [--project PROJECT]
                                         destination_exchange

positional arguments:
  destination_exchange  Specify destination exchange for messageparking

optional arguments:
  -h, --help            show this help message and exit
  --slot SLOT           Specify slot name
  --build_id BUILD_ID   Specify build id
  --platform PLATFORM   Specify platform name
  --project PROJECT     Specify project name

lbma unpark

$ lbma unpark --help
usage: LbMessagingAdministration.py unpark [-h] [--slot SLOT]
                                           [--build_id BUILD_ID]
                                           [--platform PLATFORM]
                                           [--project PROJECT]
                                           destination_exchange source_queue

positional arguments:
  destination_exchange  Specify the previous used destination exchange for
                        messageparking
  source_queue          Specify source queue for messageunparking

optional arguments:
  -h, --help            show this help message and exit
  --slot SLOT           Specify slot name
  --build_id BUILD_ID   Specify build id
  --platform PLATFORM   Specify platform name
  --project PROJECT     Specify project name

command line management tool information

RabbitMQ provides an web administration tool as well as a command line : https://www.rabbitmq.com/management.html

Example commands

* Configuration * Once the rabbitmqadmin script downloaded, you need specify the server location and credentials. For example the following can be done:

alias rmqa="rabbitmqadmin -u lhcbadmin -p <password> --host=lbmessagingbroker --vhost=/lhcb "
To list the queues in a vhost

$ rmqa list queues
+--------------------------------------------------+----------+
|                       name                       | messages |
+--------------------------------------------------+----------+
| BuildReady                                       | 0        |
| BuildReadyCIAgent                                | 0        |
| CVMFSCondDbActions                               | 0        |
| CVMFSDevActions                                  | 1385     |
| RequestedTests                                   | 0        |
| hltthr_lhcb-2017-patchesx86_64-centos7-gcc62-opt | 217      |
| hltthr_lhcb-2018-patchesx86_64-centos7-gcc62-opt | 32       |
+--------------------------------------------------+----------+

To list the messages in a queue:

$ rmqa --format=pretty_json get  queue=hltthr_lhcb-2018-patchesx86_64-centos7-gcc62-opt   count=1000 
[
  {
    "exchange": "topic.build_ready", 
    "message_count": 31, 
    "payload": "[{\"slot\": \"lhcb-lcg-dev3\", \"priority\": null, \"build_id\": 406, \"project\": \"Geant4\", \"platform\": \"x86_64-slc6-gcc62-dbg\", \"deployment\": [\"cvmfs\"]}]", 
    "payload_bytes": 145, 
    "payload_encoding": "string", 
    "properties": {
      "delivery_mode": 2
    }, 
    "redelivered": true, 
    "routing_key": "lhcb-lcg-dev3.Geant4.x86_64-slc6-gcc62-dbg"
  }, 
[...]
-- BenjaminCouturier - 2018-01-16
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2018-04-20 - StefanGabrielChitic
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback