Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Preliminary informations

  • Needed configuration files

IN COSTRUZIONE

Informazioni preliminari

...

  • :
    • /u2/dcs/db/DBFiles_2/IPTable.DBFile

    • /u2/dcs/script_linux/.DCS_Environment_eth

...

  • On the web server,

...

  • the IPTable.DBFile

...

Utilizzo della web application devil_manager

Per controllare lo stato dei devil ethernet o per gestirne il riavvio, è a disposizione la web application devil_manager. Questa permette di aprire direttamente dal browser un display VNC per ogni devil ethernet (linux) per controllarne lo stato. In più ne controlla lo stato (alive) ogni trenta secondi e ne permette il riavvio in maniera estremamente semplice. La web application utilizza uno script di proxy che si occupa di controllare i parametri passati, ne verifica la correttezza e chiama il vero script di riavvio dei devil, ossia il devil_mngr.sh.

...

  • file is rsynced from crontab every 5 minutes

devil_manager web application

The devil_manager web application permits to check the devil statuses or to restart them. This web app allows the user to directly open a VNC session for every single ethernet devil (linux or windows) to check what is going on. It also check the state (alive) every 30 seconds and allows the restart of any devil in a very easy way. The web app uses a proxy script that check the received parameters from the app and call the real reboot script on the remote host: devil_mngr.sh.

Code Block
languagetext
titleApplication Workflow
Web Application: http://danteweb.lnf.infn.it/devil_manager

...

	Proxy Script: /opt/web_devil_restart.sh <ip> <devil_number> [-f]

...

		SSH on remote host where the devil to be rebooted is running
			/u2/dcs/script_linux/devil_mngr.sh <restart|force_restart> <DEVIL NUMBER>

Questo avviene tutto in modo trasparente all'utente della web application (anche la sicurezza è garantita grazie all'utilizzo dei sudoers e delle restrizioni all'utente apache del web server).

...

Those passages are completely transparent to the user (the security is granted thanks to sudoers usage and restriction rules for apache user).

devil_mngr.sh

Questa è la sintassi dello script:

...

This is the syntax of the script:

Code Block
languagebash
titledevil_mngr.sh usage
$ /u2/dcs/script_linux/devil_mngr.sh <start|restart|force_restart|stop> <devil_number|all>

I comandi disponibili sono The possible commands are start, restart, force_restart and e stop, mentre i parametri da dover fornire allo script sono il numero del devil su cui eseguire il comando o il parametro all che esegue il comando su tutti i devils configurati sulla macchina da cui si lancia lo script.stop, while the parameters to be passed to the script are the Devil number to be rebooted or all that launch the command on every configured devil on that host.

The script does not print anything on stdout, instead it logs everything Lo script non stampa nulla a video, ma scrive tutto nel log file in /u2/dcs/script_linux/logs/dcs_report.log. These are the workflows for every available command:

start

  • Start VNC display for the selected devil;

  • Start the devil on VNC started

  • Avvio del display VNC sul quale il devil gira;

  • Avvio del devil;

restart

  • Arresto del Stop devil;

  • Avvio del display VNC sul quale il devil gira;

  • Start VNC display for the selected devil (if already started, it goes to the next step without errors);

  • Start the devil on VNC startedAvvio del devil;

force_restart

  • Arresto del Stop devil;

  • Arresto del display VNC sul quale il devil gira;

  • Avvio del display VNC sul quale il devil gira;

  • Kill VNC display for the selected devil;

  • Start VNC display for the selected devil;

  • Start the devil on VNC startedAvvio del devil;

stop

  • Arresto del Stop devil;