Projet

Général

Profil

Tâche #28153

Scénario #27605: Scribe AD : Gérer les machines connectées dans l'EAD2

Définir les commandes salt (ou autres) à utiliser pour les différentes actions

Ajouté par Joël Cuissinat il y a presque 5 ans. Mis à jour il y a presque 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Début:
02/05/2019
Echéance:
% réalisé:

100%

Restant à faire (heures):
0.0

Révisions associées

Révision 4df46699 (diff)
Ajouté par Daniel Dehennin il y a presque 5 ans

Manage workstations: make list, reboot and poweroff working

We disable the “close session” since it's not working for now.

  • backend/actions/scribe/connexion.py (ConnectedMachine._get_client_scribe):
    use SaltStack to get the list of alived minions.
  • backend/actions/scribe/connexion.py (ConnectedMachine._get_action_form):
    hide the “close session” button.
  • backend/actions/scribe/connexion.py (ConnectedMachine._stop_client):
    use SaltStack “system.poweroff”
  • backend/actions/scribe/connexion.py (ConnectedMachine._restart_client):
    use SaltStack “system.reboot”.

Ref: #28153

Révision 93faca1b (diff)
Ajouté par Daniel Dehennin il y a presque 5 ans

Use SaltStack instead of “manage_stations.py”

  • backend/manage_stations.py: only print a message and exit with error
    status.

Ref: #28153

Historique

#1 Mis à jour par Joël Cuissinat il y a presque 5 ans

  • lister les clients allumés, avec si possible le nom de la station (=normalement nom du minion), son IP et l'utilisateur connecté
    salt-run manage.alived
    
  • éteindre
  • fermer la session

#2 Mis à jour par Daniel Dehennin il y a presque 5 ans

Il est possible de lister les sessions actives en exécutant la commande quser :

PC-238424.dompedago.etb1.lan:
     UTILISATEUR           SESSION            ID  �TAT    TEMPS INACT TEMPS SESSION
     pcadmin               console             1  Actif       aucun   06/05/2019 15:52
PC-238429.dompedago.etb1.lan:
     UTILISATEUR           SESSION            ID  �TAT    TEMPS INACT TEMPS SESSION
     6a.01                 console             1  Actif       aucun   06/05/2019 14:14

Il faut extraire l’identifiant de la session afin de le passer à la commande logoff :

root@scribe:/usr/share/eole/workstation# salt '*' cmd.run 'logoff 1' 
PC-238424.dompedago.etb1.lan:
PC-238429.dompedago.etb1.lan:

#3 Mis à jour par Daniel Dehennin il y a presque 5 ans

  • Statut changé de Nouveau à En cours

#4 Mis à jour par Daniel Dehennin il y a presque 5 ans

  • Assigné à mis à Daniel Dehennin

#5 Mis à jour par Scrum Master il y a presque 5 ans

  • Statut changé de En cours à Résolu

#6 Mis à jour par Joël Cuissinat il y a presque 5 ans

  • Statut changé de Résolu à Fermé
  • % réalisé changé de 0 à 100
  • Restant à faire (heures) mis à 0.0

Testé OK (même si les stations éteintes ne disparaissent pas toujours de ma liste) :o

Formats disponibles : Atom PDF