feature:TSG-18248:删除wannat配置项及其相关代码

This commit is contained in:
fumingwei
2023-12-28 14:47:32 +08:00
parent a6978d6a52
commit 898fd56b28
21 changed files with 0 additions and 400 deletions

View File

@@ -25,9 +25,6 @@
- {role: exporter, tags: exporter}
- {role: tsg-diagnose, tags: tsg-diagnose}
- {role: system-init, tags: system-init}
- {role: wannat_wangw, tags: wannat_wangw}
- {role: wannat_common, tags: wannat_common}
- {role: wire_graft, tags: wire_graft}
- {role: consul, tags: consul}
- {role: hasp, tags: hasp}
@@ -97,9 +94,6 @@
- {role: sapp, tags: sapp}
- {role: firewall, tags: firewall}
- {role: tsg_app, tags: tsg_app}
- {role: wannat_wangw, tags: wannat_wangw}
- {role: wannat_common, tags: wannat_common}
- {role: wire_graft, tags: wire_graft}
- {role: hasp, tags: hasp}
- hosts: x86_64_COTS-proxy

View File

@@ -87,14 +87,6 @@ tsg_diagnose_rpm_version:
http_healthcheck_rpm_version:
http_healthcheck: http_healthcheck-2.0.1.0884451
wannat_wangw_rpm_version:
libwangw: libwangw-1.5.4.bd3edfa
libwannat_common: libwannat_common-1.0.3.6dc42b6
wire_graft_rpm_version:
wire_graft: wire_graft_plug-1.5.10.60fa715
libwire_graft: libwire_graft-1.5.10.60fa715
hasp_tools_rpm_version:
hasp_tools: hasp-tools-1.0.11.148e4d0

View File

@@ -1,9 +1,5 @@
[platform]
./plug/stellar_on_sapp/start_loader.inf
{% raw %}{% if wannat.enable == 1 %}
./plug/platform/wannat/wangw.inf
./plug/platform/wire_graft/wire_graft.inf
{% endif %}
{% if ddossketch.enable == 1 %}
./plug/platform/tsg_ddos_sketch/tsg_ddos_sketch.inf

View File

@@ -3,8 +3,6 @@
#If the following plugins fail to initialize, the sapp platform will exit.
#The name of the plugin comes from the configuration ./plug/conflist.inf, section identification is not required.
./plug/platform/wannat/wangw.inf
./plug/platform/wire_graft/wire_graft.inf
./plug/protocol/sip/sip.inf
./plug/protocol/rtp/rtp.inf
./plug/protocol/ssl/ssl.inf

View File

@@ -1,9 +1,5 @@
[platform]
./plug/stellar_on_sapp/start_loader.inf
{{- if eq .Values.wannat.enable .Values.define_enable_val_yes }}
./plug/platform/wannat/wangw.inf
./plug/platform/wire_graft/wire_graft.inf
{{- end }}
{{- if eq .Values.ddos_event.enable .Values.define_enable_val_yes }}
./plug/platform/tsg_ddos_sketch/tsg_ddos_sketch.inf
{{- end }}

View File

@@ -2,9 +2,6 @@
#插件的路径来自配置文件 ./plug/conflist.inf, 不需要加段落标识[platform],[protocol],[business]等.
#If the following plugins fail to initialize, the sapp platform will exit.
#The name of the plugin comes from the configuration ./plug/conflist.inf, section identification is not required.
./plug/platform/wannat/wangw.inf
./plug/platform/wire_graft/wire_graft.inf
./plug/protocol/sip/sip.inf
./plug/protocol/rtp/rtp.inf
./plug/protocol/ssl/ssl.inf

View File

@@ -1,76 +0,0 @@
[main]
#接收来自natgw的数据包模式: udp_socket, udp_multi_thread, marsio
NAT_GW_io_mode=udp_multi_thread
#在线模式用vxlan, 测试模式用ethernet, 即标准ethernet/IP协议
NAT_GW_tunnel_mode=vxlan
#从起始位置开始, 本地监听sapp->threa_cound个端口, 支持多线程NIO无锁模式
recvfrom_NATGW_bind_first_port={{ .Values.wannat.wan_gateway_listen_port_range_left_edge }}
#NAT GW的内部互联网卡名称
NAT_GW_tunnel_device={{ .Values.nic_policy_log_name }}
#DNAT首包发送给NATGW时, 对端的监听端口
NAT_GW_tunnel_port={{ .Values.external_resources.nat_gateway.data_listen_port }}
#NAT GW的内部互联IP地址, 端口使用vxlan默认值, 要求对方也开放UDP 4789端口
NAT_GW_tunnel_ip={{ .Values.external_resources.nat_gateway.address }}
#连接NATGW, 订阅四元组广播消息端口
NAT_GW_broadcast_session_port={{ .Values.external_resources.nat_gateway.connection_table_listen_port }}
toroad_tunnel_ip={{ .Values.external_resources.reachability_test_server.address }}
#连接toroad, 订阅四元组广播消息端口
toroad_broadcast_session_port={{ .Values.external_resources.reachability_test_server.connection_table_listen_port }}
#SNAT的应答首包发送给toroad时, 对端的监听端口
toroad_tunnel_port={{ .Values.external_resources.reachability_test_server.data_listen_port }}
[session]
#最大并发连接数
max_session_num=100000
#连续no_pkt_timeout秒没有数据包, 认为此连接已超时, 可以删除
no_pkt_timeout=60
[runtime_log]
log_file=./wannat_log/wannat.log
log_level=30
[field_stat2]
Fs2_log_local_dir_path=./wannat_log
Fs2_server_ip=127.0.0.1
Fs2_server_port=8125
Fs2_interval=3
Fs2_prometheus_enabled=1
[maat]
table_info=./etc/wannat/tableinfo.conf
#json, redis, local_file
#config_src_type=local_file
config_src_type=redis
#config_src_type=json
json_cfg_file=./etc/wannat/gtest.json
inc_dir=./redis_dump/
full_dir=./redis_dump/
redis_server_ip={{- include "traffic-engine.global.cm.server-ip" . }}
redis_server_port={{- include "traffic-engine.global.cm.server-port" . }}
REDIS_PORT_NUM={{ .Values.external_resources.cm.port_num }}
redis_index={{ .Values.vsys_id }}
[polling_sleep]
#每收包try_get_pkt_max_count次, 如果没收到包的次数超过no_pkt_sleep_count, 则直接返回IDLE, 不调用recvfrom
try_get_pkt_max_count=2000
no_pkt_sleep_count=1
[no_nat_gw_self_test]
test_eth_mode_nat_type=snat
test_eth_mode_vlink_id=0
test_eth_mode_link_dir=E
test_eth_bpf="port 80"
test_linkinfo_file=./etc/wannat/self_test.linkinfo

View File

@@ -1,41 +0,0 @@
[main]
driver_cfg_file="/opt/tsg/mrzcpd/etc/mrglobal.conf"
driver_hash_section_name="service"
driver_hash_dist_key_name="distmode"
driver_hash_algo_key_name="hashmode"
[record_link_info]
stream_project_tag_enable=1
#单个流超过此包数的才发送链路信息, 防止遭受ddos攻击疯狂发日志
at_least_total_num=2
at_least_total_byte=10
#是否将link_info存入streaminfo,供其他插件读取
stream_project_tag_enable=1
#用于标识本机ip使用哪块网卡,可能是管理口,可能是其他业务口
identification_by_which_device={{ .Values.nic_policy_log_name }}
#mirror镜像模式下, 从MAC地址获取链路信息
### note, for example, dst mac is 01:12:34:56:78:90, src src is 02:AA:BB:CC:DD:EE:FF,
### ether[0] is 0x01, dst mac first octet, ether[1] is 0x12, dst mac second octet,
### ether[6] is 0x02, src mac first octet, ether[11] is 0xFF, src mac sixth octet.
### the bit field is from 0 to 7, the 0 is least significant bit, the 7 is most significant bit.
mirror_get_linkinfo_enable=0
mirror_linkinfo_project_name=mirror_linkinfo_from_mac
mirror_linkinfo_device_syntax="mac[11]:0-7"
mirror_linkinfo_slot_syntax="mac[9]:0-7"
mirror_linkinfo_port_syntax="mac[10]:0-7"
mirror_linkinfo_dir_syntax="mac[4]:7-7"
[toroad]
sendto_toroad_enable=1
toroad_ip={{ .Values.external_resources.reachability_test_server.address }}
toroad_port={{ .Values.external_resources.reachability_test_server.link_table_listen_port }}
sendto_toroad_interval= {{ .Values.wannat.link_table_report_interval }}
[log]
log_level=30

View File

@@ -148,8 +148,6 @@ enable_breakpad_upload=0
cp /opt/tsg/config/main.conf /opt/tsg/sapp/tsgconf/main.conf
cp /opt/tsg/config/maat.conf /opt/tsg/sapp/tsgconf/maat.conf
cp /opt/tsg/config/sapp.toml /opt/tsg/sapp/etc/sapp.toml
cp /opt/tsg/config/wangw.conf /opt/tsg/sapp/etc/wannat/wangw.conf
cp /opt/tsg/config/wire_graft.conf /opt/tsg/sapp/etc/wire_graft/wire_graft.conf
cp /opt/tsg/config/send_raw_pkt.conf /opt/tsg/sapp/etc/send_raw_pkt.conf
cp /opt/tsg/config/tsg_device_tag.json /opt/tsg/etc/tsg_device_tag.json
cp /opt/tsg/config/vlan_flipping_map.conf /opt/tsg/sapp/etc/vlan_flipping_map.conf
@@ -586,7 +584,6 @@ enable_breakpad_upload=0
{{- define "traffic-engine.firewall.set-redis-ip" -}}
{{- if eq .Values.external_resources.cm.connectivity "local_cache" }}
sed -Ei "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sapp/tsgconf/maat.conf
sed -Ei "s|CM_POLICY_LOCAL_CACHE_IP_LOCATION|${CM_POLICY_LOCAL_CACHE_IP?}|g" /opt/tsg/sapp/etc/wannat/wangw.conf
{{- end }}
{{- end -}}

View File

@@ -10,8 +10,6 @@ data:
maat.conf: {{ tpl (.Files.Get "conf/maat.conf") . | quote }}
sapp.toml: {{ tpl (.Files.Get "conf/sapp.toml") . | quote }}
send_raw_pkt.conf: {{ tpl (.Files.Get "conf/send_raw_pkt.conf") . | quote }}
wangw.conf: {{ tpl (.Files.Get "conf/wangw.conf") . | quote }}
wire_graft.conf: {{ tpl (.Files.Get "conf/wire_graft.conf") . | quote }}
vlan_flipping_map.conf: {{ tpl (.Files.Get "conf/vlan_flipping_map.conf") . | quote }}
tsg_device_tag.json: {{ tpl (.Files.Get "conf/tsg_device_tag.json") . | quote }}
firewall.inf: {{ tpl (.Files.Get "conf/firewall.inf") . | quote }}

View File

@@ -127,11 +127,6 @@ overload_protection:
detect_threshold_cpu_usages: 90
recovery_detect_cycle_in_sec: 30
wannat:
enable: yes
link_table_report_interval: 30
wan_gateway_listen_port_range_left_edge: 3545
vsys_id: 1
etherfabric_settings:

View File

@@ -36,19 +36,6 @@ app_behavior:
gtp:
enable_gtp_c_record: 1
wannat:
enable: 0
nat_gateway_address: "127.0.0.1"
reachability_test_server_address: "127.0.0.1"
reachability_test_server_port: 8888
feedback_linkinfo_interval: 30
nat_gateway_broadcast_session_port: 5671
reachability_test_server_broadcast_session_port: 5672
reachability_test_server_tunnel_port: 3542
wan_gateway_listen_port_range_left_edge: 3545
nat_gateway_listen_port: 3544
enable_link_info_recording: 1
ddossketch:
enable: 1
tcp_flood_report_thresh: 0.0008

View File

@@ -35,11 +35,6 @@ radius:
gtp:
enable_gtp_c_record: 0/1
wannat:
enable: 0/1
nat_gateway_address: "127.0.0.1"
reachability_test_server_address: "127.0.0.1"
ddossketch:
enable: 0/1

View File

@@ -183,18 +183,6 @@
dest: /etc/telegraf/telegraf_proxy.conf
tags: telegraf_security
- name: "tsg-os-provision: template wannat wangw.conf file"
template:
src: "../templates/wangw.conf.j2"
dest: /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: /opt/tsg/sapp/etc/wire_graft/wire_graft.conf
tags: wire_graft
- name: "tsg-os-provision: template consul"
template:
src: "../templates/consul.hcl.j2"

View File

@@ -1,28 +0,0 @@
---
- name: "copy nanomsg.rpm to destination server"
copy:
src: "{{ role_path }}/files/"
dest: /tmp
- name: "install nanomsg library centos7"
yum:
name:
- /tmp/nanomsg-1.1.5-6.el7.x86_64.rpm
state: present
disable_gpg_check: yes
when: runtime_env == 'TSG-7400-mcn0' or runtime_env == 'TSG-7400-mcn123'
- name: "install nanomsg library rockylinux8"
yum:
name:
- /tmp/nanomsg-1.1.5-6.el8.x86_64.rpm
state: present
disable_gpg_check: yes
when: runtime_env == 'TSG-X-P0906'
- name: "Install wannat_common library"
shell: rpm -i /tmp/rpm_download/{{ item.rpm_version }}* --prefix {{ item.prefix }}
with_items:
- { "rpm_version": "{{ wannat_wangw_rpm_version.libwannat_common }}", "prefix": "{{ prefix_path.framework }}" }

View File

@@ -1,22 +0,0 @@
---
- name: "download rpm packages: wannat wangw"
yum:
name: "{{ item.value }}"
conf_file: "{{ rpm_repo_config_path }}"
state: present
download_only: yes
download_dir: "{{ path_download }}"
with_dict: "{{ wannat_wangw_rpm_version }}"
- name: "Install wangw plugins"
shell: rpm -i /tmp/rpm_download/{{ item.rpm_version }}* --prefix {{ item.prefix }}
with_items:
- { "rpm_version": "{{ wannat_wangw_rpm_version.libwangw }}", "prefix": "{{ prefix_path.sapp }}" }
- name: "Template the etc/wannat/wangw.conf"
template:
src: "{{ role_path }}/templates/wangw.conf.j2.j2"
dest: /opt/tsg/tsg-os-provision/templates/wangw.conf.j2
tags: template
when: runtime_env != 'TSG-X-P0906'

View File

@@ -1,92 +0,0 @@
[main]
#接收来自natgw的数据包模式: udp_socket, udp_multi_thread, marsio
NAT_GW_io_mode=udp_multi_thread
#在线模式用vxlan, 测试模式用ethernet, 即标准ethernet/IP协议
NAT_GW_tunnel_mode=vxlan
#从起始位置开始, 本地监听sapp->threa_cound个端口, 支持多线程NIO无锁模式
{% raw %}recvfrom_NATGW_bind_first_port={{ wannat.wan_gateway_listen_port_range_left_edge }}
{% endraw %}
#NAT GW的内部互联网卡名称
NAT_GW_tunnel_device={{ control_and_policy.nic_name }}
#DNAT首包发送给NATGW时, 对端的监听端口
{% raw %}NAT_GW_tunnel_port={{ wannat.nat_gateway_listen_port }}
{% endraw %}
#NAT GW的内部互联IP地址, 端口使用vxlan默认值, 要求对方也开放UDP 4789端口
{% raw %}{% if wannat.natgw_address is defined %}
NAT_GW_tunnel_ip={{ wannat.natgw_address }}
{% else %}
NAT_GW_tunnel_ip={{ wannat.nat_gateway_address }}
{% endif %}
{% endraw %}
#连接NATGW, 订阅四元组广播消息端口
{% raw %}NAT_GW_broadcast_session_port={{ wannat.nat_gateway_broadcast_session_port }}
{% endraw %}
{% raw %}{% if wannat.toroad_address is defined %}
toroad_tunnel_ip={{ wannat.toroad_address }}
{% else %}
toroad_tunnel_ip={{ wannat.reachability_test_server_address }}
{% endif %}
{% endraw %}
#连接toroad, 订阅四元组广播消息端口
{% raw %}toroad_broadcast_session_port={{ wannat.reachability_test_server_broadcast_session_port }}
{% endraw %}
#SNAT的应答首包发送给toroad时, 对端的监听端口
{% raw %}toroad_tunnel_port={{ wannat.reachability_test_server_tunnel_port }}
{% endraw %}
[session]
#最大并发连接数
max_session_num=100000
#连续no_pkt_timeout秒没有数据包, 认为此连接已超时, 可以删除
no_pkt_timeout=60
[runtime_log]
log_file=./wannat_log/wannat.log
log_level=30
[field_stat2]
Fs2_log_local_dir_path=./wannat_log
Fs2_server_ip=127.0.0.1
Fs2_server_port=8125
Fs2_interval=3
Fs2_prometheus_enabled=1
[maat]
table_info=./etc/wannat/tableinfo.conf
#json, redis, local_file
#config_src_type=local_file
config_src_type=redis
#config_src_type=json
json_cfg_file=./etc/wannat/gtest.json
inc_dir=./redis_dump/
full_dir=./redis_dump/
redis_server_ip={% raw %}{{ cm_policy_server_ip }}
{% endraw %}
redis_server_port={% raw %}{{ cm_policy_server_port }}
{% endraw %}
{% raw %}REDIS_PORT_NUM={{ cm.policy_server.port_num }}
redis_index={{ vsys_id }}
{% endraw %}
[polling_sleep]
#每收包try_get_pkt_max_count次, 如果没收到包的次数超过no_pkt_sleep_count, 则直接返回IDLE, 不调用recvfrom
try_get_pkt_max_count=2000
no_pkt_sleep_count=1
[no_nat_gw_self_test]
test_eth_mode_nat_type=snat
test_eth_mode_vlink_id=0
test_eth_mode_link_dir=E
test_eth_bpf="port 80"
test_linkinfo_file=./etc/wannat/self_test.linkinfo

View File

@@ -1,22 +0,0 @@
---
- name: "download rpm packages: wire_graft"
yum:
name: "{{ item.value }}"
conf_file: "{{ rpm_repo_config_path }}"
state: present
download_only: yes
download_dir: "{{ path_download }}"
with_dict: "{{ wire_graft_rpm_version }}"
- name: "Install wire_graft that is sapp plugins"
shell: rpm -i /tmp/rpm_download/{{ item.rpm_version }}* --prefix {{ item.prefix }}
with_items:
- { "rpm_version": "{{ wire_graft_rpm_version.wire_graft }}", "prefix": "{{ prefix_path.sapp }}" }
- { "rpm_version": "{{ wire_graft_rpm_version.libwire_graft }}", "prefix": "{{ prefix_path.framework }}" }
- name: "Template the etc/wire_graft/wire_graft.conf"
template:
src: "{{ role_path }}/templates/wire_graft.conf.j2.j2"
dest: /opt/tsg/tsg-os-provision/templates/wire_graft.conf.j2
tags: template
when: runtime_env != 'TSG-X-P0906'

View File

@@ -1,52 +0,0 @@
[main]
driver_cfg_file="/opt/tsg/mrzcpd/etc/mrglobal.conf"
driver_hash_section_name="service"
driver_hash_dist_key_name="distmode"
driver_hash_algo_key_name="hashmode"
[record_link_info]
stream_project_tag_enable=1
#单个流超过此包数的才发送链路信息, 防止遭受ddos攻击疯狂发日志
at_least_total_num=2
at_least_total_byte=10
#是否将link_info存入streaminfo,供其他插件读取
stream_project_tag_enable=1
#用于标识本机ip使用哪块网卡,可能是管理口,可能是其他业务口
identification_by_which_device={{ control_and_policy.nic_name }}
#mirror镜像模式下, 从MAC地址获取链路信息
### note, for example, dst mac is 01:12:34:56:78:90, src src is 02:AA:BB:CC:DD:EE:FF,
### ether[0] is 0x01, dst mac first octet, ether[1] is 0x12, dst mac second octet,
### ether[6] is 0x02, src mac first octet, ether[11] is 0xFF, src mac sixth octet.
### the bit field is from 0 to 7, the 0 is least significant bit, the 7 is most significant bit.
mirror_get_linkinfo_enable=0
mirror_linkinfo_project_name=mirror_linkinfo_from_mac
mirror_linkinfo_device_syntax="mac[11]:0-7"
mirror_linkinfo_slot_syntax="mac[9]:0-7"
mirror_linkinfo_port_syntax="mac[10]:0-7"
mirror_linkinfo_dir_syntax="mac[4]:7-7"
[toroad]
{% raw %}sendto_toroad_enable={{ wannat.enable_link_info_recording }}
{% endraw %}
{% raw %}{% if wannat.toroad_address is defined %}
toroad_ip={{ wannat.toroad_address }}
{% else %}
toroad_ip={{ wannat.reachability_test_server_address }}
{% endif %}
{% if wannat.toroad_port is defined %}
toroad_port={{ wannat.toroad_port }}
{% else %}
toroad_port={{ wannat.reachability_test_server_port }}
{% endif %}
sendto_toroad_interval= {{ wannat.feedback_linkinfo_interval }}
{% endraw %}
[log]
log_level=30