diff --git a/batch/batch/driver/instance_collection/pool.py b/batch/batch/driver/instance_collection/pool.py index 98c2549b837..8fb519881d9 100644 --- a/batch/batch/driver/instance_collection/pool.py +++ b/batch/batch/driver/instance_collection/pool.py @@ -109,6 +109,7 @@ def __init__( self.data_disk_size_gb = config.data_disk_size_gb self.data_disk_size_standing_gb = config.data_disk_size_standing_gb self.preemptible = config.preemptible + self.label = config.label @property def local_ssd_data_disk(self) -> bool: @@ -130,6 +131,7 @@ def config(self): 'max_instances': self.max_instances, 'max_live_instances': self.max_live_instances, 'preemptible': self.preemptible, + 'label': self.label, } def configure(self, pool_config: PoolConfig): @@ -148,6 +150,7 @@ def configure(self, pool_config: PoolConfig): self.max_instances = pool_config.max_instances self.max_live_instances = pool_config.max_live_instances self.preemptible = pool_config.preemptible + self.label = pool_config.label def adjust_for_remove_instance(self, instance): super().adjust_for_remove_instance(instance) diff --git a/batch/batch/driver/main.py b/batch/batch/driver/main.py index e80b726072e..3eaec76bdde 100644 --- a/batch/batch/driver/main.py +++ b/batch/batch/driver/main.py @@ -485,6 +485,8 @@ async def pool_config_update(request, userdata): # pylint: disable=unused-argum session, 'Max live instances', post['max_live_instances'], lambda v: v > 0, 'a positive integer' ) + label = post['label'] + enable_standing_worker = 'enable_standing_worker' in post possible_worker_cores = [] @@ -537,6 +539,7 @@ async def pool_config_update(request, userdata): # pylint: disable=unused-argum max_instances, max_live_instances, pool.preemptible, + label, ) await pool_config.update_database(db) pool.configure(pool_config) diff --git a/batch/batch/driver/templates/pool.html b/batch/batch/driver/templates/pool.html index 19c84302980..23a5d706362 100644 --- a/batch/batch/driver/templates/pool.html +++ b/batch/batch/driver/templates/pool.html @@ -31,6 +31,7 @@

Configuration

Standing worker cores:
Max instances:
Max live instances:
+
Label: