From 3dca85f6a77cf2c151366749207213491877cfc7 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Tue, 11 Apr 2017 22:41:33 -0400 Subject: [PATCH 1/2] Pin Twisted version for Buildbot builders too Previously, we pinned the version for the buildmaster. Pin the version for builders as well, which also use Twisted. Also, restart the buildbot-slave service automatically when the buildbot packages change to apply the changes immediately. --- buildbot/master/init.sls | 2 +- buildbot/slave/init.sls | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/buildbot/master/init.sls b/buildbot/master/init.sls index 818fdf30..51c1aed2 100644 --- a/buildbot/master/init.sls +++ b/buildbot/master/init.sls @@ -11,7 +11,7 @@ buildbot-master: - txgithub == 15.0.0 - boto == 2.38.0 - pyyaml == 3.11 - - twisted == 16.6.0 + - twisted == 16.6.0 # NOTE: keep in sync with buildbot-slave sls - require: - pkg: pip service.running: diff --git a/buildbot/slave/init.sls b/buildbot/slave/init.sls index 2263d6d9..0494b4e2 100644 --- a/buildbot/slave/init.sls +++ b/buildbot/slave/init.sls @@ -7,6 +7,7 @@ buildbot-slave-dependencies: pip.installed: - pkgs: - buildbot-slave == 0.8.12 + - twisted == 16.6.0 # NOTE: keep in sync with buildbot-master sls - require: - pkg: pip @@ -56,4 +57,5 @@ buildbot-slave: service.running: - enable: True - watch: + - pip: buildbot-slave-dependencies - file: {{ common.servo_home }}/buildbot/slave From 485c075c653a45fd3ecf8359df6800dabe85ff63 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Tue, 11 Apr 2017 22:51:18 -0400 Subject: [PATCH 2/2] Add more Salt requisites for Buildbot states Use separate `deploy-` and `ownership-` state IDs for the Buildbot master config states to work arounda Salt behavior: - https://github.com/saltstack/salt/issues/5667 - https://github.com/saltstack/salt/issues/29532 --- buildbot/master/init.sls | 10 ++++++++-- buildbot/slave/init.sls | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/buildbot/master/init.sls b/buildbot/master/init.sls index 51c1aed2..dd3323c6 100644 --- a/buildbot/master/init.sls +++ b/buildbot/master/init.sls @@ -19,12 +19,14 @@ buildbot-master: # Buildbot must be restarted manually! See 'Buildbot administration' on the # wiki and https://github.com/servo/saltfs/issues/304. - require: + - user: servo - pip: buildbot-master - - file: {{ common.servo_home }}/buildbot/master + - file: ownership-{{ common.servo_home }}/buildbot/master - file: /etc/init/buildbot-master.conf -{{ common.servo_home }}/buildbot/master: +deploy-{{ common.servo_home }}/buildbot/master: file.recurse: + - name: {{ common.servo_home }}/buildbot/master - source: salt://{{ tpldir }}/files/config - user: servo - group: servo @@ -34,6 +36,8 @@ buildbot-master: - context: common: {{ common }} buildbot_credentials: {{ pillar['buildbot']['credentials'] }} + - require: + - user: servo ownership-{{ common.servo_home }}/buildbot/master: file.directory: @@ -43,6 +47,8 @@ ownership-{{ common.servo_home }}/buildbot/master: - recurse: - user - group + - require: + - file: deploy-{{ common.servo_home }}/buildbot/master /etc/init/buildbot-master.conf: file.managed: diff --git a/buildbot/slave/init.sls b/buildbot/slave/init.sls index 0494b4e2..090e1e06 100644 --- a/buildbot/slave/init.sls +++ b/buildbot/slave/init.sls @@ -25,6 +25,8 @@ buildbot-slave-dependencies: - template: jinja - context: common: {{ common }} + - require: + - user: servo {% if grains['kernel'] == 'Darwin' %} @@ -56,6 +58,8 @@ buildbot-slave-dependencies: buildbot-slave: service.running: - enable: True + - require: + - user: servo - watch: - pip: buildbot-slave-dependencies - file: {{ common.servo_home }}/buildbot/slave