[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r617: Update running build slaves when the master changes.
Jeff Licquia
licquia at linuxfoundation.org
Thu Jul 24 16:55:29 UTC 2014
------------------------------------------------------------
revno: 617
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: puppet-lsb
timestamp: Thu 2014-07-24 12:55:29 -0400
message:
Update running build slaves when the master changes.
modified:
modules/buildbot/manifests/devchk.pp
modules/buildbot/manifests/slave.pp
-------------- next part --------------
=== modified file 'modules/buildbot/manifests/devchk.pp'
--- a/modules/buildbot/manifests/devchk.pp 2014-07-24 16:31:06 +0000
+++ b/modules/buildbot/manifests/devchk.pp 2014-07-24 16:55:29 +0000
@@ -26,7 +26,7 @@
# commands, we need to change them here and in buildbot::slave.
Exec["make-slave"] {
- command => "/opt/buildbot/bin/buildslave create-slave --umask=022 /opt/buildbot/lsb-slave $buildbotmaster $masteruser $masterpw",
+ command => "/opt/buildbot/bin/buildslave create-slave --umask=022 /opt/buildbot/lsb-slave ${buildbotmaster}:${buildbotport} $masteruser $masterpw",
}
}
=== modified file 'modules/buildbot/manifests/slave.pp'
--- a/modules/buildbot/manifests/slave.pp 2014-07-24 16:31:06 +0000
+++ b/modules/buildbot/manifests/slave.pp 2014-07-24 16:55:29 +0000
@@ -19,7 +19,8 @@
# Where's the master?
- $buildbotmaster = 'vm2.linuxbase.org:9989'
+ $buildbotmaster = 'vm2.linuxbase.org'
+ $buildbotport = '9989'
# 32-bit versions of some architectures don't exist as
# native platforms themselves; they run almost entirely
@@ -272,7 +273,7 @@
# It's a pain, but hopefully this won't need to change much.
exec { "make-slave":
- command => "/opt/buildbot/bin/buildslave create-slave --umask=022 /opt/buildbot/lsb-slave $buildbotmaster $masteruser $masterpw",
+ command => "/opt/buildbot/bin/buildslave create-slave --umask=022 /opt/buildbot/lsb-slave ${buildbotmaster}:${buildbotport} $masteruser $masterpw",
cwd => "/opt/buildbot",
creates => "/opt/buildbot/lsb-slave/buildbot.tac",
path => [ "/opt/buildbot/bin", "/bin", "/sbin", "/usr/bin",
@@ -282,6 +283,19 @@
File["/opt/buildbot/lsb-slave"] ],
}
+ exec { "update-buildmaster":
+ command => "sed -i 's/^buildmaster_host.*\$/buildmaster_host = \"${buildbotmaster}\"/' /opt/buildbot/lsb-slave/buildbot.tac"
+ path => [ "/bin", "/sbin", "/usr/bin", "/usr/sbin" ]
+ require => Exec["make-slave"],
+ notify => Service["buildslave"]
+ refreshonly => true,
+ }
+
+ file { "/opt/buildbot/${buildbotmaster}-update":
+ ensure => present,
+ notify => Exec["update-buildmaster"],
+ }
+
file { "/opt/buildbot/lsb-slave/info/admin":
content => "LSB Workgroup <lsb-discuss at lists.linuxfoundation.org>\n",
require => Exec['make-slave'],
More information about the lsb-messages
mailing list