Bug 1293822 - Have worker own /home/worker files; r?dustin draft
authorGregory Szorc <gps@mozilla.com>
Tue, 09 Aug 2016 16:15:22 -0700
changeset 398890 10c23e45656a6823dfcc36359dd15d77a6efbb22
parent 398797 d0c8d84686d0114e9fb3f2133433146e4e107c74
child 527785 44044d3bb391df89b43f1842c75ab7325233fc6c
push id25669
push userbmo:gps@mozilla.com
push dateTue, 09 Aug 2016 23:26:30 +0000
reviewersdustin
bugs1293822, 1163057
milestone51.0a1
Bug 1293822 - Have worker own /home/worker files; r?dustin This effectively reverts the change in 2f0d6ea822b5 (bug 1163057) to own the files by root:root. Since that change landed, we su to the "worker" user early during task startup. So there is no more need to have /home/worker owned by root:root. MozReview-Commit-ID: 77q9APiDKpb
testing/docker/desktop-test/Dockerfile
testing/docker/desktop1604-test/Dockerfile
--- a/testing/docker/desktop-test/Dockerfile
+++ b/testing/docker/desktop-test/Dockerfile
@@ -55,21 +55,16 @@ RUN usermod -a -G video worker
 RUN mkdir Documents; mkdir Pictures; mkdir Music; mkdir Videos; mkdir artifacts
 
 # install tc-vcs and tc-npm-cache
 RUN npm install -g taskcluster-vcs@2.3.12 \
  && npm install -g taskcluster-npm-cache@1.1.14 \
  && rm -rf ~/.npm
 ENV PATH $PATH:/home/worker/bin
 
-# Remove once running under 'worker' user.  This is necessary for pulseaudio to start
-# XXX: change this back to worker:worker once permissions issues are resolved
-RUN            chown -R root:root /home/worker
-
-
 # TODO Re-enable worker when bug 1093833 lands
 #USER          worker
 
 # clean up
 RUN rm -Rf .cache && mkdir -p .cache
 
 # Disable Ubuntu update prompt
 # http://askubuntu.com/questions/515161/ubuntu-12-04-disable-release-notification-of-14-04-in-update-manager
@@ -92,10 +87,12 @@ ADD apport /etc/default/apport
 # Disable font antialiasing for now to match releng's setup
 ADD fonts.conf /home/worker/.fonts.conf
 
 # Set up first-run experience for interactive mode
 ADD motd /etc/taskcluster-motd
 ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
 RUN chmod +x /bin/taskcluster-interactive-shell
 
+RUN chown -R worker:worker /home/worker
+
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
--- a/testing/docker/desktop1604-test/Dockerfile
+++ b/testing/docker/desktop1604-test/Dockerfile
@@ -56,21 +56,16 @@ RUN mkdir Documents; mkdir Pictures; mkd
 
 # install a new enough npm, plus tc-vcs and tc-npm-cache
 RUN npm install -g npm@^2.0.0 \
  && npm install -g taskcluster-vcs@2.3.12 \
  && npm install -g taskcluster-npm-cache@1.1.14 \
  && rm -rf ~/.npm
 ENV PATH $PATH:/home/worker/bin
 
-# Remove once running under 'worker' user.  This is necessary for pulseaudio to start
-# XXX: change this back to worker:worker once permissions issues are resolved
-RUN            chown -R root:root /home/worker
-
-
 # TODO Re-enable worker when bug 1093833 lands
 #USER          worker
 
 # clean up
 RUN rm -Rf .cache && mkdir -p .cache
 
 # Disable Ubuntu update prompt
 # http://askubuntu.com/questions/515161/ubuntu-12-04-disable-release-notification-of-14-04-in-update-manager
@@ -93,10 +88,12 @@ ADD apport /etc/default/apport
 # Disable font antialiasing for now to match releng's setup
 ADD fonts.conf /home/worker/.fonts.conf
 
 # Set up first-run experience for interactive mode
 ADD motd /etc/taskcluster-motd
 ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
 RUN chmod +x /bin/taskcluster-interactive-shell
 
+RUN chown -R worker:worker /home/worker
+
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]