Merge "Create snapshots when min-ready is >= 0"
This commit is contained in:
commit
90f5596f52
@ -106,9 +106,11 @@ providers or images are used to create them). Example::
|
||||
providers:
|
||||
- name: provider1
|
||||
|
||||
The `name`, `image`, and `min-ready` keys are required. The
|
||||
`providers` list is also required if any nodes should actually be
|
||||
created (e.g., the label is not currently disabled).
|
||||
The `name` and `image` keys are required. The `providers` list is
|
||||
also required if any nodes should actually be created (e.g., the
|
||||
label is not currently disabled). The `min-ready` key is optional
|
||||
and defaults to 2. If the value is -1 the label is considered
|
||||
disabled.
|
||||
|
||||
The `subnodes` key is used to configure multi-node support. If a
|
||||
`subnodes` key is supplied to an image, it indicates that the specified
|
||||
|
@ -975,7 +975,7 @@ class NodePool(threading.Thread):
|
||||
l.name = label['name']
|
||||
newconfig.labels[l.name] = l
|
||||
l.image = label['image']
|
||||
l.min_ready = label['min-ready']
|
||||
l.min_ready = label.get('min-ready', 2)
|
||||
l.subnodes = label.get('subnodes', 0)
|
||||
l.ready_script = label.get('ready-script')
|
||||
l.providers = {}
|
||||
@ -1386,7 +1386,8 @@ class NodePool(threading.Thread):
|
||||
# outside of its schedule.
|
||||
self.log.debug("Checking missing images.")
|
||||
for label in self.config.labels.values():
|
||||
if not label.min_ready:
|
||||
if label.min_ready < 0:
|
||||
# Label is configured to be disabled, skip creating the image.
|
||||
continue
|
||||
for provider_name in label.providers:
|
||||
found = False
|
||||
|
Loading…
Reference in New Issue
Block a user