From 9f2230ab14886e7ff0666c99766a79f98794e4e8 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 8 Feb 2018 12:12:43 -0800 Subject: [PATCH] Default min-ready to 0 This is a more sensible default for most people, and friendlier to new users. Also, expand on the docs a bit. Change-Id: I6f2c61ca423fba598c93fe5b26786dfa2711efb2 --- doc/source/configuration.rst | 14 ++++++++++---- nodepool/config.py | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index 592b0e84d..79363d57d 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -107,10 +107,16 @@ written to run on nodes of a certain label. Example:: this is exceeded the node will be deleted. A value of 0 disables this. Defaults to 0. - ``min-ready`` (default: 2) - Minimum instances that should be in a ready state. Set to -1 to have the - label considered disabled. ``min-ready`` is best-effort based on available - capacity and is not a guaranteed allocation. + ``min-ready`` (default: 0) + Minimum number of instances that should be in a ready + state. Nodepool always creates more nodes as necessary in response + to demand, but setting ``min-ready`` can speed processing by + attempting to keep nodes on-hand and ready for immedate use. + ``min-ready`` is best-effort based on available capacity and is + not a guaranteed allocation. The default of 0 means that nodepool + will only create nodes of this label when there is demand. Set + to -1 to have the label considered disabled, so that no nodes will + be created at all. .. _diskimages: diff --git a/nodepool/config.py b/nodepool/config.py index bad0dcb48..47a80d162 100755 --- a/nodepool/config.py +++ b/nodepool/config.py @@ -146,7 +146,7 @@ def loadConfig(config_path): l.name = label['name'] newconfig.labels[l.name] = l l.max_ready_age = label.get('max-ready-age', 0) - l.min_ready = label.get('min-ready', 2) + l.min_ready = label.get('min-ready', 0) l.pools = [] for provider in config.get('providers', []):