From f0c6b8601ef19e907ee4be3a9e5c4617e5a15884 Mon Sep 17 00:00:00 2001 From: VinaySagarGonabavi Date: Mon, 7 Oct 2024 12:24:15 -0700 Subject: [PATCH] Remove vtgate lifecycle hooks (#3966) Remove vtgate lifecycle hooks as we're not proceeding with #3959 and would like to have functional vtgate pods for testing --- paasta_tools/vitesscluster_tools.py | 21 +-------------------- tests/test_vitesscluster_tools.py | 22 ++-------------------- 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/paasta_tools/vitesscluster_tools.py b/paasta_tools/vitesscluster_tools.py index f23334dad3..527cc84f9c 100644 --- a/paasta_tools/vitesscluster_tools.py +++ b/paasta_tools/vitesscluster_tools.py @@ -104,6 +104,7 @@ "throttle_check_as_check_self": "true", "db_charset": "utf8mb4", "disable_active_reparents": "true", + "init_shard": "0", } @@ -260,26 +261,6 @@ def get_cell_config( config = CellConfigDict( name=cell, gateway=GatewayConfigDict( - lifecycle={ - "preStop": { - "exec": { - "command": [ - "/bin/sh", - "-c", - f"/cloudmap/scripts/deregister_from_cloudmap.sh vtgate-{cell} {aws_region}", - ] - } - }, - "postStart": { - "exec": { - "command": [ - "/bin/sh", - "-c", - f"/cloudmap/scripts/register_to_cloudmap.sh vtgate-{cell} {aws_region}", - ] - } - }, - }, affinity={"nodeAffinity": node_affinity}, extraEnv=updated_vtgate_extra_env, extraFlags={ diff --git a/tests/test_vitesscluster_tools.py b/tests/test_vitesscluster_tools.py index abecd28c1e..58237eb9cf 100644 --- a/tests/test_vitesscluster_tools.py +++ b/tests/test_vitesscluster_tools.py @@ -132,26 +132,6 @@ "name": "etc-srv-configs", }, ], - "lifecycle": { - "postStart": { - "exec": { - "command": [ - "/bin/sh", - "-c", - "/cloudmap/scripts/register_to_cloudmap.sh vtgate-fake_cell mo-ck_r-e", - ] - } - }, - "preStop": { - "exec": { - "command": [ - "/bin/sh", - "-c", - "/cloudmap/scripts/deregister_from_cloudmap.sh vtgate-fake_cell mo-ck_r-e", - ] - } - }, - }, "replicas": 1, "resources": { "limits": {"cpu": "100m", "memory": "256Mi"}, @@ -349,6 +329,7 @@ "enforce-tableacl-config": "true", "grpc_max_message_size": "134217728", "init_tablet_type": "replica", + "init_shard": "0", "keep_logs": "72h", "log_err_stacks": "true", "queryserver-config-schema-reload-time": "1800", @@ -537,6 +518,7 @@ "enforce-tableacl-config": "true", "grpc_max_message_size": "134217728", "init_tablet_type": "replica", + "init_shard": "0", "keep_logs": "72h", "log_err_stacks": "true", "queryserver-config-schema-reload-time": "1800",