Versions Compared

Key

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

Preliminary informations

These are the needed configuration files

IN COSTRUZIONE

Informazioni preliminari

I files di configurazione necessari sono:

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

  • /u2/dcs/script_linux/.DCS_Environment_eth

Sul On the web server, il file the IPTable.DBFile viene sincronizzato con il tool rsync lanciato da crontab ogni 5 minuti.

...

file is rsynced from crontab every 5 minutes.

devil_manager

...

web application

To check the ethernet devil status or to restart them, you can use thePer 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  web application. This web app allows you 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 let you restart the devil in a very easy way. The web app uses a proxy script that check the passed parameters (semantic and syntactic) from the app and call the real reboot script on the remote host: devil_mngr.sh. This is the 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>

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

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).

...

devil_mngr.sh

Questa è la sintassi dello This is the syntax of the script:

...

/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

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;