feature:在TSG-X-P0804环境下,修复provision-config-apply在配置项proxy.enable=0时sapp配置cpu affinity错误的bug
This commit is contained in:
@@ -34,6 +34,12 @@
|
||||
workload_proxy_cpu_affinity: "{{ cpu_layout_obtained.tfe_affinity | join(',') }}"
|
||||
workload_proxy_worker_thread: "{{ cpu_layout_obtained.tfe_affinity | length | int - 1 }}"
|
||||
|
||||
- name: "tsg-os-provision: rewrite sapp_cpu_affinity and sapp_worker_threads"
|
||||
set_fact:
|
||||
workload_firewall_cpu_affinity: "{{ (cpu_layout_obtained.sapp_affinity + cpu_layout_obtained.tfe_affinity) | join(',') }}"
|
||||
workload_firewall_worker_threads: "{{ (cpu_layout_obtained.sapp_affinity + cpu_layout_obtained.tfe_affinity) | length }}"
|
||||
when: proxy.enable == 0
|
||||
|
||||
######setting cpu affinity end######
|
||||
|
||||
######setting nic cpu affinity mask start######
|
||||
@@ -244,12 +250,6 @@
|
||||
src: /data/tsg-os-provision/provision.yml
|
||||
dest: /data/tsg-os-provision/provision.yml.snapshot
|
||||
|
||||
- name: "tsg-os-provision: rewrite sapp_cpu_affinity and sapp_worker_threads"
|
||||
set_fact:
|
||||
workload_firewall_cpu_affinity: "{{ cpu_layout_obtained.sapp_affinity + cpu_layout_obtained.sapp_affinity | join(',') }}"
|
||||
workload_firewall_worker_threads: "{{ cpu_layout_obtained.sapp_affinity + cpu_layout_obtained.sapp_affinity | length }}"
|
||||
when: proxy.enable == 0
|
||||
|
||||
- name: "tsg-os-provision: disable enable service step 1:mount partition to mnt_tmp"
|
||||
mount:
|
||||
path: /tmp/mnt_tmp
|
||||
@@ -258,11 +258,17 @@
|
||||
state: mounted
|
||||
|
||||
- name: "tsg-os-provision: disable service step 2:disable tfe service"
|
||||
shell: systemctl --root=/tmp/mnt_tmp disable tfe.service
|
||||
shell: "{{ item }}"
|
||||
with_items:
|
||||
- systemctl --root=/tmp/mnt_tmp disable tfe.service
|
||||
- systemctl --root=/tmp/mnt_tmp disable tfe-env.service
|
||||
when: proxy.enable == 0
|
||||
|
||||
- name: "tsg-os-provision: enable service step 2:enable tfe service"
|
||||
shell: systemctl --root=/tmp/mnt_tmp enable tfe.service
|
||||
shell: "{{ item }}"
|
||||
with_items:
|
||||
- systemctl --root=/tmp/mnt_tmp enable tfe.service
|
||||
- systemctl --root=/tmp/mnt_tmp enable tfe-env.service
|
||||
when: proxy.enable == 1
|
||||
|
||||
- name: "tsg-os-provision: disable enable service step 3:umount mnt_tmp"
|
||||
@@ -270,12 +276,6 @@
|
||||
path: /tmp/mnt_tmp
|
||||
state: absent
|
||||
|
||||
- name: "tsg-os-provision: stop tfe"
|
||||
systemd:
|
||||
name: tfe
|
||||
state: stopped
|
||||
when: proxy.enable == 0
|
||||
|
||||
- name: add porvision successed sign
|
||||
file:
|
||||
path: /data/tsg-os-provision/.provision_succeeded
|
||||
@@ -329,6 +329,17 @@
|
||||
state: restarted
|
||||
when: enable_config_apply == '1'
|
||||
|
||||
- name: "tsg-os-provision: stop tfe"
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
with_items:
|
||||
- tfe
|
||||
- tfe-env
|
||||
when:
|
||||
- enable_config_apply == '1'
|
||||
- proxy.enable == 0
|
||||
|
||||
- name: "tsg-os-provision: restart tfe-env"
|
||||
systemd:
|
||||
name: tfe-env
|
||||
|
||||
Reference in New Issue
Block a user