diff --git a/ansible/install_config/group_vars/rpm_version.yml b/ansible/install_config/group_vars/rpm_version.yml index 64f949c4..fc1b966e 100644 --- a/ansible/install_config/group_vars/rpm_version.yml +++ b/ansible/install_config/group_vars/rpm_version.yml @@ -103,7 +103,7 @@ hasp_tools_rpm_version: tsg_os_clixon_rpm_version: cligen: cligen-5.8.0-release clixon: clixon-5.8.0-release - tsg-os-mgnt-srv: tsg-os-mgnt-srv-1.0.44.22d975c + tsg-os-mgnt-srv: tsg-os-mgnt-srv-1.0.45.9a8a689 sce_rpm_version: sce: sce-1.0.13.23d05e7 diff --git a/ansible/roles/traffic-engine/files/helm/templates/_config.tpl b/ansible/roles/traffic-engine/files/helm/templates/_config.tpl index 60a9dc66..7dc8e7b4 100644 --- a/ansible/roles/traffic-engine/files/helm/templates/_config.tpl +++ b/ansible/roles/traffic-engine/files/helm/templates/_config.tpl @@ -531,22 +531,32 @@ 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 -}} {{- define "traffic-engine.proxy.certstore.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/certstore/conf/cert_store.ini +{{- end }} {{- end -}} {{- define "traffic-engine.proxy.tfe.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/tfe/conf/tfe/tfe.conf +{{- end }} {{- end -}} {{- define "traffic-engine.sce.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/sce/conf/sce.conf +{{- end }} {{- end -}} {{- define "traffic-engine.shaping.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/shaping_engine/conf/shaping.conf +{{- end }} {{- end -}} \ No newline at end of file diff --git a/ansible/roles/tsg-os-HAL/files/script/cpu_amd.sh b/ansible/roles/tsg-os-HAL/files/script/cpu_amd.sh index 2df5d916..ed577f92 100644 --- a/ansible/roles/tsg-os-HAL/files/script/cpu_amd.sh +++ b/ansible/roles/tsg-os-HAL/files/script/cpu_amd.sh @@ -2,6 +2,51 @@ set -x +write_devices_conf() +{ +(cat <> $2 +} + +write_device_rxcore_conf() +{ +(cat <> $3 +} + +del_device_rxcore_conf() +{ + sed -i '/^\[device.*\]/,/^$/d' ${tsg_clixon_cfg_file} +} + +set_mrzcpd_rx_core() +{ + local devices + local str_device + + del_device_rxcore_conf + + devices=$(lshw -c network -businfo | grep network | awk '{print $2}') + for device in $devices + do + businfo=$(ethtool -i $device | grep "bus-info:"| awk '{print $2}') + numa_node=$(lspci -s $businfo -vv | grep "NUMA node:" | awk '{print $3}') + write_device_rxcore_conf $device ${mrzcpd_rx_core[$numa_node]} ${tsg_clixon_cfg_file} + str_device=$str_device","$device + done + str_device=${str_device#*,} + write_devices_conf $str_device ${tsg_clixon_cfg_file} +} + allocate_cpu() { local numa_node_min=0 @@ -51,9 +96,12 @@ allocate_cpu() numa_list=$(numactl --hardware | grep "node $i cpus: " | sed -r "s/node $i cpus: //g") mrzcpd_core=$(echo $numa_list | cut -d ' ' -f $mrzcpd_start-$mrzcpd_end | tr ' ' ',') MRZCPD_IOCORE=$MRZCPD_IOCORE","$mrzcpd_core + mrzcpd_rx_core+=($mrzcpd_core) clixon_core=$(echo $numa_list | cut -d ' ' -f $clixon_start- | tr ' ' ',') CLIXON_IOCORE=$CLIXON_IOCORE","$clixon_core done MRZCPD_IOCORE=${MRZCPD_IOCORE#*,} CLIXON_IOCORE=${CLIXON_IOCORE#*,} + + set_mrzcpd_rx_core }