Project

General

Profile

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

Added by Joël Cuissinat over 2 years ago. Updated over 2 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
05/02/2019
Due date:
% Done:

100%

Remaining (hours):
0.0

Associated revisions

Revision 4df46699 (diff)
Added by Daniel Dehennin over 2 years ago

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

Revision 93faca1b (diff)
Added by Daniel Dehennin over 2 years ago

Use SaltStack instead of “manage_stations.py”

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

Ref: #28153

History

#1 Updated by Joël Cuissinat over 2 years ago

  • 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 Updated by Daniel Dehennin over 2 years ago

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 Updated by Daniel Dehennin over 2 years ago

  • Status changed from Nouveau to En cours

#4 Updated by Daniel Dehennin over 2 years ago

  • Assigned To set to Daniel Dehennin

#5 Updated by Scrum Master over 2 years ago

  • Status changed from En cours to Résolu

#6 Updated by Joël Cuissinat over 2 years ago

  • Status changed from Résolu to Fermé
  • % Done changed from 0 to 100
  • Remaining (hours) set to 0.0

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

Also available in: Atom PDF