Project

General

Profile

Tâche #22349

Scénario #22221: Les services Zéphir doivent avoir un niveau technique homogène

Finaliser la mise à niveau du code du service `saltmaster`

Added by William Petit over 3 years ago. Updated over 3 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
11/13/2017
Due date:
% Done:

100%

Estimated time:
0.00 h
Spent time:
Remaining (hours):
0.0

Related issues

Related to Zéphir - Tâche #22352: Mutualiser le contrôleur WAMP Nouveau 11/13/2017

Associated revisions

Revision ac39c3c8 (diff)
Added by Daniel Dehennin over 3 years ago

SaltStack: crossbar management must be restricted to the controller

We split the code between the crossbar frontend and the SaltStack
management code.

The controller is only responsible of publishing on crossbar the API
to manage SaltStack.

  • use a common SaltStack prefix for messages
  • services/saltmaster/src/salt_ctrl/salt-controller: simple executable
    script to start the controller.
    Define methods to wrap each exposed API and manage their return
    values and errors.
  • services/saltmaster/src/salt_ctrl/salt_exec.py: define exception
    classes and use them instead of autobahn specific exceptions.
    Remove the handler_map presentation trick for autobahn since it's
    managed by the controller.
    Publish an event for each sheduled command.
  • services/saltmaster/src/salt_ctrl/salt_jobs.py: ditoo.
  • services/saltmaster/src/salt_ctrl/salt-events-listener: simple
    executable script to start a SaltSatack events listener which print
    messages on standard output.
  • services/saltmaster/Dockerfile: install new event listener and adapt
    for controller and its configuration file renames.
  • services/common/messages/v1/salt.exec.yml: link to error message manifests.
  • services/common/messages/v1/salt.exec.error.execute.yml: add
    manifest for error message.
  • services/common/messages/v1/salt.exec.error.login.yml: ditoo.
  • services/common/messages/v1/salt.exec.error.missing-command.yml: ditoo.
  • services/common/messages/v1/salt.exec.error.missing-servername.yml: ditoo.
  • services/common/messages/v1/salt.jobs.list.yml: ditoo.
  • services/common/messages/v1/salt.jobs.describe.yml: ditoo.
  • services/common/messages/v1/salt.jobs.error.db-connection.yml: ditoo.
  • services/common/messages/v1/salt.jobs.error.jobid-type.yml: ditoo.
  • services/common/messages/v1/salt.jobs.error.list.yml: ditoo.
  • services/common/messages/v1/salt.jobs.error.missing-jobid.yml: ditoo.
  • services/common/messages/v1/salt.jobs.error.unknown-jobid.yml: ditoo.

Ref: #22349

History

#1 Updated by William Petit over 3 years ago

  • Status changed from Nouveau to En cours

#2 Updated by William Petit over 3 years ago

  • Subject changed from Finaliser la mise à niveau du code du service @saltmaster@ to Finaliser la mise à niveau du code du service `saltmaster`

#3 Updated by William Petit over 3 years ago

#4 Updated by Daniel Dehennin over 3 years ago

  • % Done changed from 0 to 100
  • Le controlleur est centré sur la gestion crossbar
  • Les erreurs crossbar sont définies dans des messages à part
  • Le point d’entrée est un script et non un module python => utilisation d’un nom qui traduit cette différence
  • Un écouteur d’exemple a exécuter en ligne de commande est fourni
    root@zephir2:~# docker exec -it zephir_saltmaster_1 /srv/salt_ctrl/salt-events-listener
    Salt events listener: crossbar joined.
    Salt events listener: topic “v1.salt.exec.command-executed” subscribed by handler “SaltEventsListener.ExecutedCommand” with subscription ID “8487881006278455”
    Got “v1.salt.exec.command-executed” event with arguments “{'return': [{'minions': ['eolebase.ac-test.fr', 'horus.ac-test.fr'], 'jid': '20171207143731313335'}], 'salt_args': 'salt_args', 'salt_command': 'salt_command', 'servername': 'servername', 'client_mode': 'client_mode'}”
    
  • La documentation des messages est regénérée et prend bien en compte les messages d’erreur.

#5 Updated by Daniel Dehennin over 3 years ago

  • Estimated time set to 0.00 h
  • Remaining (hours) set to 0.0

#6 Updated by Scrum Master over 3 years ago

  • Status changed from En cours to Résolu

#7 Updated by Daniel Dehennin over 3 years ago

  • Status changed from Résolu to Fermé

Also available in: Atom PDF