Remove ready-script support
It no longer makes sense to have nodepool execute 'ready-scripts' on a remote node. With zuulv3, we have ansible and are able to convert our ready-scripts into ansible-playbooks. Change-Id: I07b63a16a668bb9a37fb3f763ac29f307f6c3a65 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
44c55a52cf
commit
89de79e730
@ -98,7 +98,6 @@ label. Example::
|
||||
- name: multi-precise
|
||||
image: precise
|
||||
min-ready: 2
|
||||
ready-script: setup_multinode.sh
|
||||
providers:
|
||||
- name: provider1
|
||||
|
||||
@ -121,11 +120,6 @@ label. Example::
|
||||
label considered disabled. ``min-ready`` is best-effort based on available
|
||||
capacity and is not a guaranteed allocation.
|
||||
|
||||
``ready-script``
|
||||
A script to be used to perform any last minute changes to a node after it
|
||||
has been launched but before it is put in the READY state to receive jobs.
|
||||
For more information, see :ref:`scripts`.
|
||||
|
||||
.. _diskimages:
|
||||
|
||||
diskimages
|
||||
|
@ -86,7 +86,6 @@ class ConfigValidator:
|
||||
'name': str,
|
||||
'image': str,
|
||||
'min-ready': int,
|
||||
'ready-script': str,
|
||||
'providers': [{
|
||||
'name': str,
|
||||
}],
|
||||
|
@ -261,7 +261,6 @@ def loadConfig(config_path):
|
||||
newconfig.labels[l.name] = l
|
||||
l.image = label['image']
|
||||
l.min_ready = label.get('min-ready', 2)
|
||||
l.ready_script = label.get('ready-script')
|
||||
l.providers = {}
|
||||
for provider in label['providers']:
|
||||
p = LabelProvider()
|
||||
|
@ -369,8 +369,6 @@ class NodeLauncher(threading.Thread, StatsReporter):
|
||||
self._zk.storeNode(self._node)
|
||||
|
||||
self._writeNodepoolInfo(host, preferred_ip, self._node)
|
||||
if self._label.ready_script:
|
||||
self._runReadyScript(host, hostname, self._label.ready_script)
|
||||
|
||||
def _writeNodepoolInfo(self, host, preferred_ip, node):
|
||||
key = paramiko.RSAKey.generate(2048)
|
||||
@ -409,16 +407,6 @@ class NodeLauncher(threading.Thread, StatsReporter):
|
||||
|
||||
ftp.close()
|
||||
|
||||
def _runReadyScript(self, host, hostname, script):
|
||||
env_vars = ''
|
||||
for k, v in os.environ.items():
|
||||
if k.startswith('NODEPOOL_'):
|
||||
env_vars += ' %s="%s"' % (k, v)
|
||||
host.ssh("run ready script",
|
||||
"cd /opt/nodepool-scripts && %s ./%s %s" %
|
||||
(env_vars, script, hostname),
|
||||
output=True)
|
||||
|
||||
def _run(self):
|
||||
attempts = 1
|
||||
while attempts <= self._retries:
|
||||
|
@ -13,14 +13,12 @@ zookeeper-servers:
|
||||
labels:
|
||||
- name: trusty
|
||||
image: trusty
|
||||
ready-script: configure_mirror.sh
|
||||
min-ready: 1
|
||||
providers:
|
||||
- name: cloud1
|
||||
- name: cloud2
|
||||
- name: trusty-2-node
|
||||
image: trusty
|
||||
ready-script: multinode_setup.sh
|
||||
min-ready: 0
|
||||
providers:
|
||||
- name: cloud1
|
||||
|
@ -13,14 +13,12 @@ zookeeper-servers:
|
||||
labels:
|
||||
- name: trusty
|
||||
image: trusty
|
||||
ready-script: configure_mirror.sh
|
||||
min-ready: 1
|
||||
providers:
|
||||
- name: cloud1
|
||||
- name: cloud2
|
||||
- name: trusty-2-node
|
||||
image: trusty
|
||||
ready-script: multinode_setup.sh
|
||||
min-ready: 0
|
||||
providers:
|
||||
- name: cloud1
|
||||
|
@ -27,7 +27,6 @@ labels:
|
||||
- name: fake-provider
|
||||
- name: multi-fake
|
||||
image: fake-nodepool
|
||||
ready-script: multinode_setup.sh
|
||||
min-ready: 2
|
||||
providers:
|
||||
- name: fake-provider
|
||||
|
Loading…
Reference in New Issue
Block a user