Project

General

Profile

Actions

Bug #6439

closed

rudder-agent is stuck, waiting for user input during log compression

Added by Lionel Le Folgoc about 6 years ago. Updated about 6 years ago.

Status:
Released
Priority:
2
Category:
System integration
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

rudder 3.0.2

If I run manually "cf-agent -KI" on the policy server, it is apparently stuck right after:

2015-03-26T09:25:55+0100     info: /default/root_component_check/methods/'any'/default/compress_webapp_log/files/'/var/log/rudder/webapp'[0]: Transforming '/bin/gzip "/var/log/rudder/webapp/2015_03_13.stderrout.log"' 

After some time I got bored and pressed Enter, and I could see the following log line:

2015-03-26T09:26:02+0100     info: /default/root_component_check/methods/'any'/default/compress_webapp_log/files/'/var/log/rudder/webapp'[0]: gzip: /var/log/rudder/webapp/2015_03_13.stderrout.log.gz already exists; do you wish to overwrite (y or n)?       not overwritten
2015-03-26T09:26:02+0100    error: /default/root_component_check/methods/'any'/default/compress_webapp_log/files/'/var/log/rudder/webapp'[0]: Finished command related to promiser '/var/log/rudder/webapp' -- an error occurred, returned 2
2015-03-26T09:26:02+0100    error: /default/root_component_check/methods/'any'/default/compress_webapp_log/files/'/var/log/rudder/webapp'[0]: Transformer '/var/log/rudder/webapp/2015_03_13.stderrout.log' => '/bin/gzip "/var/log/rudder/webapp/2015_03_13.stderrout.log"' returned error

Then it's stuck the same way for 2015_03_16.stderrout.log…

I guess you should do what's necessary to ensure the commands called are not in interactive mode. ;-)

Thanks.


Related issues

Related to Rudder - Bug #6676: rudder-agent is stuck, waiting for user input during log compression (on 2.10)ReleasedMatthieu CERDA2015-05-27Actions
Related to Rudder - Bug #6995: rudder-agent is stuck, waiting for user input during log compressionRejectedNicolas CHARLESActions
Has duplicate Rudder - Bug #6444: Rudder will hang trying to compress Jetty logfiles if they already existRejectedMatthieu CERDA2015-03-26Actions
Actions #1

Updated by François ARMAND about 6 years ago

Hello,

Thanks for the report. As far as I understand, there is two problems here:

- of course gzip should not be used in interactive mode ever !
- we have already an archive for the 2015_03_13 logs. This should not happen.

For the second part, I can see two causes, and 4 choices about what to do. Let's start with the choices:

if both xxx and xxx.gz exists:

- 1/ do nothing
- 2/ keep the gz and delete the xxx
- 3/ delete the gz and gzip the xxx (or overwrite the existing gz)
- 4/ create a xxx.1.gz (or any other unique id that it is an other archive for the log - maybe a timestamp, so that it is really unique without dealing with incrementing things)

So for the possible cause to have both files present:

- 1/ some user uncompressed the archive not in place (to keep both, for example with gunzip c or gzcat)
2/ somehow, the application created some more entries in the xxx file (rotated to early ? badly closed file descriptor ? )

The cause 2 is the one we want to manage correctly, because it means that loosing any file loose information. By consequence, choice 2 and 3 are not possible. I don't know what is the best one, thought.

Actions #2

Updated by François ARMAND about 6 years ago

  • Category set to System integration
  • Status changed from New to 8
  • Assignee set to Benoît PECCATTE
  • Priority changed from N/A to 2
  • Target version set to 2.10.13

Moreover, perhaps we should treat the two problems in two bugs. But they seem rather hard linked one to each other.
Benoit, any thought ?

Actions #3

Updated by Nicolas CHARLES about 6 years ago

I got stuck as well, on a freshly installed server. Don't know why it compressed immediately the log thought

Actions #4

Updated by Benoît PECCATTE about 6 years ago

  • Found in version(s) old 3.0.3 added

We think the problem is:
- We use the range between 2 days ago and now to detect is a file should not be compressed
- If the current log file is written during execution, its change time will be after the "now" of cfengine
- The techniques then decides to compress current log whereas it shouldn't

Actions #5

Updated by Benoît PECCATTE about 6 years ago

  • Status changed from 8 to In progress
Actions #6

Updated by Benoît PECCATTE about 6 years ago

  • Target version changed from 2.10.13 to 2.11.10
Actions #7

Updated by Benoît PECCATTE about 6 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/646
Actions #8

Updated by Benoît PECCATTE about 6 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset rudder-techniques|commit:1f7f56122d08459c0368cd8d3910526641b6d9de.

Actions #9

Updated by Nicolas CHARLES about 6 years ago

Applied in changeset rudder-techniques|commit:8a457fec01a20dba461755e2be27b000c7ff38af.

Actions #10

Updated by Vincent MEMBRÉ about 6 years ago

  • Subject changed from Stuck waiting for user input during log compression to rudder-agent is stuck, waiting for user input during log compression
Actions #11

Updated by Vincent MEMBRÉ about 6 years ago

This bug has been fixed in Rudder 2.11.10 and 3.0.4 which were released today.

Actions #12

Updated by Vincent MEMBRÉ about 6 years ago

  • Status changed from Pending release to Released
Actions #13

Updated by Alexis MOUSSET almost 6 years ago

  • Related to Bug #6676: rudder-agent is stuck, waiting for user input during log compression (on 2.10) added
Actions #14

Updated by Nicolas CHARLES almost 6 years ago

  • Related to Bug #6995: rudder-agent is stuck, waiting for user input during log compression added
Actions

Also available in: Atom PDF