does not create directory in /var/lib/jenkins

Bug #1829106 reported by Paul Collins
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Jenkins CI Agent Charm
Fix Released
Undecided
Unassigned

Bug Description

Deployed a couple of bionic slaves recently, and they failed to start until I created a couple of missing directories:

sudo install -d -m 0755 -o jenkins -g jenkins -v /var/lib/jenkins/slaves/jenkins-slave-1

The charm should create this itself.

Related branches

Revision history for this message
Tom Haddon (mthaddon) wrote :

Could you include the error from the logs? You mention "until I created a couple of missing directories" but seems like you're only creating one directory here?

Revision history for this message
Tom Haddon (mthaddon) wrote :

I've got an MP that addresses this, but want to confirm the failure before setting it to Needs Review

Revision history for this message
Paul Collins (pjdc) wrote :

Two directories: /var/lib/jenkins/slaves and then /var/lib/jenkins/slaves/jenkins-slave-1. Creating the first was not sufficient.

Revision history for this message
Paul Collins (pjdc) wrote :

The errors were (in /var/log/syslog):

May 15 03:08:39 juju-manual-jenkaas-java-compatibility-kit-bionic-1 bash[19909]: Exception in thread "main" java.nio.file.AccessDeniedException: /var/lib/jenkins/slaves
May 15 03:11:48 juju-manual-jenkaas-java-compatibility-kit-bionic-1 bash[20160]: Exception in thread "main" java.nio.file.AccessDeniedException: /var/lib/jenkins/slaves/jenkins-slave-1

which is a pretty unhelpful way to report the non-existence of something.

I just realized my original report was somewhat unclear because this was when I also discovered that install -d works like "mkdir -p"; the command above creates any missing directories.

Revision history for this message
Tom Haddon (mthaddon) wrote :

This has been fixed in cs:jenkins-slave-10

Changed in jenkins-slave-charm:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.