From cc86861453201576ffe4da54f7240da8c13e184a Mon Sep 17 00:00:00 2001 From: fumingwei Date: Thu, 14 Oct 2021 14:54:41 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:TSG-7976=E4=BF=AE=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E9=87=8Fsession=5Frecord=5Fid=5Fgenerator=E4=B8=BAsession=5Fid?= =?UTF-8?q?=5Fgenerator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/roles/firewall/templates/main.conf.j2.j2 | 12 ++++++------ .../provision.yml.sample.7400MCN0P01R01 | 2 +- .../config_sample/provision.yml.sample.9000NPBP01R01 | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ansible/roles/firewall/templates/main.conf.j2.j2 b/ansible/roles/firewall/templates/main.conf.j2.j2 index 076034ba..aa7021b0 100644 --- a/ansible/roles/firewall/templates/main.conf.j2.j2 +++ b/ansible/roles/firewall/templates/main.conf.j2.j2 @@ -65,12 +65,12 @@ APP_NAME="tsg_master" [SYSTEM] NIC_NAME="{{ firewall.main_conf.SYSTEM.NIC_NAME }}" -{% raw %}{% if session_record_id_generator.snowflake_worker_id_base is defined %} -DATACENTER_ID={{ session_record_id_generator.snowflake_worker_id_base }} +{% raw %}{% if session_id_generator.snowflake_worker_id_base is defined %} +DATACENTER_ID={{ session_id_generator.snowflake_worker_id_base }} {% elif data_center.id is defined %} DATACENTER_ID={{ data_center.id }} {% else %} -DATACENTER_ID={{ session_record_id_generator.snowflake_worker_id_base }} +DATACENTER_ID={{ session_id_generator.snowflake_worker_id_base }} {% endif %} {% endraw %} LOG_LEVEL=30 @@ -78,12 +78,12 @@ LOG_PATH="./tsglog/tsg_master" POLICY_PRIORITY_LABEL="POLICY_PRIORITY" L7_PROTOCOL_FILE="./tsgconf/tsg_l7_protocol.conf" DEVICE_ID_COMMAND="hostname | awk -F'-' '{print $3}'| awk -F'adc' '{print $2}'" -{% raw %}{% if session_record_id_generator.snowflake_worker_id_offset is defined %} -DEVICE_SEQ_IN_DATA_CENTER={{ session_record_id_generator.snowflake_worker_id_offset }} +{% raw %}{% if session_id_generator.snowflake_worker_id_offset is defined %} +DEVICE_SEQ_IN_DATA_CENTER={{ session_id_generator.snowflake_worker_id_offset }} {% elif device.sequence_in_data_center is defined %} DEVICE_SEQ_IN_DATA_CENTER={{ device.sequence_in_data_center }} {% else %} -DEVICE_SEQ_IN_DATA_CENTER={{ session_record_id_generator.snowflake_worker_id_offset }} +DEVICE_SEQ_IN_DATA_CENTER={{ session_id_generator.snowflake_worker_id_offset }} {% endif %} {% endraw %} diff --git a/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.7400MCN0P01R01 b/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.7400MCN0P01R01 index 599ec754..51e477e9 100644 --- a/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.7400MCN0P01R01 +++ b/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.7400MCN0P01R01 @@ -5,7 +5,7 @@ device: - key1: value1 - key2: value2 -session_record_id_generator: +session_id_generator: snowflake_worker_id_base: 1 snowflake_worker_id_offset: 1 diff --git a/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.9000NPBP01R01 b/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.9000NPBP01R01 index ef36737a..5c9492e9 100644 --- a/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.9000NPBP01R01 +++ b/ansible/roles/tsg-os-provision/files/config_sample/provision.yml.sample.9000NPBP01R01 @@ -5,7 +5,7 @@ device: - key1: value1 - key2: value2 -session_record_id_generator: +session_id_generator: snowflake_worker_id_base: 1 snowflake_worker_id_offset: 1