Project

General

Profile

Actions

Bug #11416

closed

remote execution is cut at 30 secondes

Bug #11416: remote execution is cut at 30 secondes

Added by Nicolas CHARLES over 8 years ago. Updated about 8 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Small
Priority:
63
Name check:
Fix check:
Regression:

Description

We do not define a default timeout for remote execution, and it cuts execution at execution time: 30.61s
Timeout is defined in https://docs.cfengine.com/docs/master/reference-components-cf-runagent.html, but if it is not defined, then default_timeout apply, which default to 30s (see https://docs.cfengine.com/docs/master/reference-components-cf-agent.html#default_timeout )

we should set a default timeout for remote execution

Updated by Janos Mattyasovszky over 8 years ago Actions #1

Timeout manifests as "was interrupted" error from agent run:

policy_server # rudder remote run ruddernode
error    Rudder agent was interrupted during execution by a fatal error
         Run with -i to see log messages.

## Summary #####################################################################
0 components verified in 1 directives
execution time: 30.61s
################################################################################

Updated by François ARMAND over 8 years ago Actions #2

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority changed from 0 to 52

Updated by Vincent MEMBRÉ over 8 years ago Actions #3

  • Target version changed from 4.1.8 to 4.1.9

Updated by Benoît PECCATTE over 8 years ago Actions #4

  • Priority changed from 52 to 51

Updated by Benoît PECCATTE over 8 years ago Actions #5

  • Effort required set to Small
  • Priority changed from 51 to 67

Updated by Alexis Mousset over 8 years ago Actions #6

  • Priority changed from 67 to 66

In fact the documentation (which states it is a connection timeout) is wrong, it is applied as SO_RCVTIMEO on the socket, and hence closes the connection when we see no output for 30 seconds, which may happen in changes only mode for example.

Updated by Vincent MEMBRÉ over 8 years ago Actions #7

  • Target version changed from 4.1.9 to 4.1.10

Updated by Nicolas CHARLES about 8 years ago Actions #8

  • Priority changed from 66 to 65

Interestingly, it's the agent that closes the connection.
Agent side

   error: SSL_read: receive timeout
rudder  verbose: Connection to 192.168.42.3 is closed

then server side

rudder  verbose: 192.168.42.2> MD5=918083b6dad780baf4e93367aa1cfe7f: Client is TRUSTED, public key MATCHES stored one.
rudder  verbose: 192.168.42.2>      Received:    EXEC 
rudder     info: 192.168.42.2> cf-serverd executing cfruncommand: /opt/rudder/bin/rudder agent run -uR
   error: 192.168.42.2> SSL_write: underlying network error (Broken pipe)
rudder     info: 192.168.42.2> Sending failed, aborting EXEC (send: Broken pipe)
   error: 192.168.42.2> SSL_write: (-1 SSL_ERROR_SSL) bad write retry 
rudder  verbose: 192.168.42.2> Unable to reply with terminator. (send: Success)
rudder  verbose: 192.168.42.2> Remote peer terminated TLS session (SSL_read)
rudder     info: 192.168.42.2> Closing connection, terminating thread

I configured the timeout everywhere

Updated by Nicolas CHARLES about 8 years ago Actions #9

simply setting a -t in the command line solves the issue

Updated by Nicolas CHARLES about 8 years ago Actions #10

  • Status changed from New to In progress

Updated by Nicolas CHARLES about 8 years ago Actions #11

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder-agent/pull/146

Updated by Nicolas CHARLES about 8 years ago Actions #12

  • Status changed from Pending technical review to Pending release

Updated by Vincent MEMBRÉ about 8 years ago Actions #13

  • Status changed from Pending release to Released
  • Priority changed from 65 to 63

This bug has been fixed in Rudder 4.1.10 and 4.2.4 which were released today.

Actions

Also available in: PDF Atom