Add metastatic driver

This driver supplies "static" nodes that are actually backed by
another nodepool node.  The use case is to be able to request a single
large node (a "backing node") from a cloud provider, and then divide
that node up into smaller nodes that are actually used ("requested
nodes").  A backing node can support one or more requested nodes, and
backing nodes should scale up or down as necessary.

Change-Id: I29d78705a87a53ee07dce6022b81a1ce97c54f1d
This commit is contained in:
James E. Blair
2021-08-28 17:39:57 -07:00
parent b5f576c436
commit 5862bef141
12 changed files with 1128 additions and 4 deletions

View File

@@ -151,6 +151,15 @@ class StateMachineNodeLauncher(stats.StatsReporter):
node.public_ipv6 = instance.public_ipv6
node.region = instance.region
node.az = instance.az
node.driver_data = instance.driver_data
# Optionally, if the node has updated values that we set from
# the image attributes earlier, set those.
for attr in ('username', 'python_path', 'shell_type',
'connection_port', 'connection_type'):
if hasattr(instance, attr):
setattr(node, attr, getattr(instance, attr))
self.zk.storeNode(node)
def runStateMachine(self):
@@ -698,6 +707,16 @@ class Instance:
* private_ipv4: str
* az: str
* region: str
* driver_data: any
And the following are even more optional (as they are usually
already set from the image configuration):
* username: str
* python_path: str
* shell_type: str
* connection_port: str
* connection_type: str
"""
def __init__(self):
self.ready = False
@@ -710,6 +729,7 @@ class Instance:
self.az = None
self.region = None
self.metadata = {}
self.driver_data = None
def __repr__(self):
state = []