Skip to content

Conversation

@richardlau
Copy link
Member

@richardlau richardlau commented May 13, 2021

  • Update python to point to python2 (for consistency with other
    platforms in our CI; use python3 for Python 3).
  • Use py38-pip to match the version of Python 3 installed.
  • Create a pip3 symlink as Ansible's pip task fails without it.
  • -slaveLog Jenkins agent parameter has been obsoleted. Use the
    -o parameter to daemon to redirect stdout/stderr to the log file.

Refs: #2531

@Trott
Copy link
Member

Trott commented May 13, 2021

@nodejs/platform-freebsd

@richardlau
Copy link
Member Author

This is an attempt to fix the Failed 'jenkins-worker : install tap2junit' error running the ansible work create playbook against test-digitalocean-freebsd11-x64-1. The good news is that running ansible against the freebsd now succeeds. Unfortunately the Jenkins service on the machines doesn't appear to be working and I've not yet worked out why 😞. sudo service jenkins status shows the status running/not running -- I haven't been able to work out why its failing to start properly as nothing gets written to jenkins_console.log.

Eventually figured it out by editing /usr/local/etc/rc.d/jenkins to add a -o parameter to daemon so I could get at the output from the Java command, which shows an invalid argument. Jenkins renamed an agent parameter (from -slaveLog to -agentLog) and running the playbook updated the agent to a version where the parameter we were using has been dropped. Updated the PR to use the replacement parameter.

Refs: jenkinsci/remoting#416

Details
"-slaveLog" is not a valid option
java -jar agent.jar [options...]
 -agentLog FILE                  : Local agent error log destination (overrides
                                   workDir)
 -auth user:pass                 : If your Jenkins is security-enabled, specify
                                   a valid user name and password.
 -cert VAL                       : Specify additional X.509 encoded PEM
                                   certificates to trust when connecting to
                                   Jenkins root URLs. If starting with @ then
                                   the remainder is assumed to be the name of
                                   the certificate file to read.
 -connectTo HOST:PORT            : make a TCP connection to the given host and
                                   port, then start communication.
 -cp (-classpath) PATH           : add the given classpath elements to the
                                   system classloader.
 -failIfWorkDirIsMissing         : Fails the initialization if the requested
                                   workDir or internalDir are missing ('false'
                                   by default) (default: false)
 -help                           : Show this help message (default: false)
 -internalDir VAL                : Specifies a name of the internal files
                                   within a working directory ('remoting' by
                                   default) (default: remoting)
 -jar-cache DIR                  : Cache directory that stores jar files sent
                                   from the master
 -jnlpCredentials USER:PASSWORD  : HTTP BASIC AUTH header to pass in for making
                                   HTTP requests.
 -jnlpUrl URL                    : instead of talking to the master via
                                   stdin/stdout, emulate a JNLP client by
                                   making a TCP connection to the master.
                                   Connection parameters are obtained by
                                   parsing the JNLP file. (default:
                                   https://ci.nodejs.org/computer/test-digitaloc
                                   ean-freebsd11-x64-1/slave-agent.jnlp)
 -loggingConfig FILE             : Path to the property file with
                                   java.util.logging settings
 -noKeepAlive                    : Disable TCP socket keep alive on connection
                                   to the master. (default: false)
 -noReconnect                    : Doesn't try to reconnect when a
                                   communication fail, and exit instead
                                   (default: false)
 -proxyCredentials USER:PASSWORD : HTTP BASIC AUTH header to pass in for making
                                   HTTP authenticated proxy requests.
 -secret HEX_SECRET              : Agent connection secret to use instead of
                                   -jnlpCredentials. (default: 3ed3fb76127f63501
                                   0d4e8d1094b11414fb675d509b5f14124d2a4d1a9b7e1
                                   13)
 -tcp FILE                       : instead of talking to the master via
                                   stdin/stdout, listens to a random local
                                   port, write that port number to the given
                                   file, then wait for the master to connect to
                                   that port.
 -text                           : encode communication with the master with
                                   base64. Useful for running agent over 8-bit
                                   unsafe protocol like telnet
 -version                        : Shows the version of the remoting jar and
                                   then exits (default: false)
 -workDir FILE                   : Declares the working directory of the
                                   remoting instance (stores cache and logs by
                                   default)

- Update `python` to point to `python2` (for consistency with other
platforms in our CI; use `python3` for Python 3).
- Use `py38-pip` to match the version of Python 3 installed.
- Create a `pip3` symlink as Ansible's `pip` task fails without it.
- `-slaveLog` Jenkins agent parameter has been obsoleted. Use the
`-o` parameter to `daemon` to redirect stdout/stderr to the log file.
@richardlau
Copy link
Member Author

Updated the PR to use the replacement parameter.

For clarity (I'd updated the description but thought I'd also posted this comment) I decided not to use -agentLog as if you don't use -agentLog the output is sent to stdout/stderr -- we can capture that via the -o option for daemon and that's a better way of redirecting the output as it captures output in the case where the agent fails to start.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jbergstroem jbergstroem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richardlau richardlau merged commit 9bbfcf6 into nodejs:master May 17, 2021
@richardlau richardlau deleted the freebsd branch May 17, 2021 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants