capistrano / capistrano/sshkit

Feature: Don't display redundant error messages on execute failure

Aperta
#348 10 commenti 1 reazione 0 assegnatari Vedi su GitHub
new feature
Lingua principale
Ruby
Stelle
1.2k
Fork
257
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Showing the same error in three different ways seems redundant. Is it possible to collapse into one?

The second one looks most relevant.

```
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host 12.34.56.78: Exception while executing on host 12.34.56.78: logrotate -f /etc/logrotate.conf exit status: 1
logrotate -f /etc/logrotate.conf stdout: Nothing written
logrotate -f /etc/logrotate.conf stderr: error: error running non-shared postrotate script for /path/to/log1.log of '/path/to/log1.log
/path/to/log2.log
'

SSHKit::Runner::ExecuteError: Exception while executing on host 12.34.56.78: logrotate -f /etc/logrotate.conf exit status: 1
logrotate -f /etc/logrotate.conf stdout: Nothing written
logrotate -f /etc/logrotate.conf stderr: error: error running non-shared postrotate script for /path/to/log1.log of '/path/to/log1.log
/path/to/log2.log
'

SSHKit::Command::Failed: logrotate -f /etc/logrotate.conf exit status: 1
logrotate -f /etc/logrotate.conf stdout: Nothing written
logrotate -f /etc/logrotate.conf stderr: error: error running non-shared postrotate script for /path/to/log1.log of '/root/apps/eme/shared/log/staging.log
/path/to/log2.log
'
```

Background: It occurred when I run

``` ruby
execute 'logrotate -f /etc/logrotate.conf'
```

on a single server, where the `postrotate` script for logrotate exits with a failure status.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Riproduci il malfunzionamento eseguendo 'logrotate -f /etc/logrotate.conf' su un singolo server e analizza i messaggi SSHKit::Runner::ExecuteError e SSHKit::Command::Failed segnalati. Traccia dove vengono esposti questi errori, quindi verifica che un errore pertinente conservi il comando, lo stato di uscita, stdout e stderr senza ripetere tre volte lo stesso malfunzionamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ruby
Ambito
devops
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.