From 0c0e170fc63869c69e171423eb284922bcdbc31f Mon Sep 17 00:00:00 2001 From: fumingwei Date: Tue, 26 Jul 2022 16:16:08 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E4=BF=AE=E5=A4=8DTSG-X-0906=E4=B8=8B?= =?UTF-8?q?=E5=BC=80=E5=90=AFwannat=E5=8A=9F=E8=83=BD=E5=AF=BC=E8=87=B4sap?= =?UTF-8?q?p=E5=90=AF=E5=8A=A8=E5=A4=B1=E8=B4=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/roles/mrzcpd/tasks/main.yml | 11 +++++++++++ .../tasks/provision.yml.TSGXNXR620G40R01P0906-init | 9 ++++++++- .../vsys/templates/tsg_workload_resource.yml.j2.j2 | 3 +++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ansible/roles/mrzcpd/tasks/main.yml b/ansible/roles/mrzcpd/tasks/main.yml index 84bc2224..a2eb7b66 100644 --- a/ansible/roles/mrzcpd/tasks/main.yml +++ b/ansible/roles/mrzcpd/tasks/main.yml @@ -111,6 +111,17 @@ - /usr/lib/systemd/system/mrtunnat.service - /usr/lib/systemd/system/mrzcpd.service +- name: "replace action: replace service unit Requires and after option, TSG-X-0906" + replace: + path: "/usr/lib/systemd/system/mrzcpd.service" + regexp: "{{ item.regexp }}" + replace: "{{ item.replace }}" + with_items: + - { regexp: "Requires=mrenv.service",replace: "Requires=mrenv.service k3s.service"} + - { regexp: "After=mrenv.service",replace: "After=mrenv.service k3s.service"} + when: + - runtime_env == 'TSG-X-P0906' + ##################### mrzcpd ##################### - name: "enable mrenv" systemd: diff --git a/ansible/roles/tsg-os-provision/files/tasks/provision.yml.TSGXNXR620G40R01P0906-init b/ansible/roles/tsg-os-provision/files/tasks/provision.yml.TSGXNXR620G40R01P0906-init index 589e5f30..478205a8 100644 --- a/ansible/roles/tsg-os-provision/files/tasks/provision.yml.TSGXNXR620G40R01P0906-init +++ b/ansible/roles/tsg-os-provision/files/tasks/provision.yml.TSGXNXR620G40R01P0906-init @@ -119,6 +119,7 @@ - /target_config/opt/tsg/tfe/conf/tfe - /target_config/opt/tsg/tfe/conf/pangu - /target_config/opt/tsg/certstore/conf + - /target_config/opt/tsg/sapp/etc/wire_graft - /target_config/etc/telegraf - /target_config/opt/tsg/etc - /target_config/etc/default @@ -180,6 +181,12 @@ dest: /target_config/opt/tsg/sapp/etc/wannat/wangw.conf tags: wangw + - name: "tsg-os-provision: template wire_graft.conf file" + template: + src: "../templates/wire_graft.conf.j2" + dest: /target_config/opt/tsg/sapp/etc/wire_graft/wire_graft.conf + tags: wire_graft + - name: "tsg-os-provision: template the tfe.conf" template: src: "../templates/tfe.conf.j2" @@ -207,7 +214,7 @@ tags: telegraf_statistic - name: "create tap device ctrl_mock" - shell: ip tuntap add mode tap ctrl_mock; ifconfig ctrl_mock up; ifconfig ctrl_mock {{ policy_and_log_nic_ip }}/32 + shell: ip tuntap add mode tap ctrl_mock; ifconfig ctrl_mock up; ifconfig ctrl_mock {{ policy_and_log_nic_ip }}/32; ifconfig ctrl_mock mtu 2000 - name: "create tap device tap0" shell: ip tuntap add dev tap0 mode tap multi_queue diff --git a/ansible/roles/vsys/templates/tsg_workload_resource.yml.j2.j2 b/ansible/roles/vsys/templates/tsg_workload_resource.yml.j2.j2 index f4fa14e8..30df4b48 100644 --- a/ansible/roles/vsys/templates/tsg_workload_resource.yml.j2.j2 +++ b/ansible/roles/vsys/templates/tsg_workload_resource.yml.j2.j2 @@ -128,6 +128,9 @@ spec: - name: config-volume mountPath: "/opt/tsg/tfe/conf/pangu/pangu_pxy.conf" subPath: "opt/tsg/tfe/conf/pangu/pangu_pxy.conf" + - name: config-volume + mountPath: "/opt/tsg/sapp/etc/wire_graft/wire_graft.conf" + subPath: "opt/tsg/sapp/etc/wire_graft/wire_graft.conf" - name: config-volume mountPath: "/opt/tsg/etc/tsg_sn.json" subPath: "opt/tsg/etc/tsg_sn.json"