From 3a87af805fffc3e508031b935b64b16317c6caa4 Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Wed, 24 Sep 2025 15:19:46 -0400 Subject: [PATCH] update service file, use salt.minion state to update mine_functions --- salt/libvirt/bridge.sls | 12 +----------- setup/so-functions | 6 ++---- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/salt/libvirt/bridge.sls b/salt/libvirt/bridge.sls index 096616e2e..9e8c59f90 100644 --- a/salt/libvirt/bridge.sls +++ b/salt/libvirt/bridge.sls @@ -5,11 +5,6 @@ # We do not import GLOBALS in this state because it is called during setup include: -{# If we update the mine functions for the so-hypervisor node, then it will not be able to update the mine when the state run. #} -{# This state is called from so-functions during setup and the so-hypervisor node would not have an accepted minion key and therefore couldn't update mine #} -{% if grains.role == 'so-managerhype '%} - - salt.mine_functions -{% endif %} - salt.minion.service_file down_original_mgmt_interface: @@ -37,15 +32,10 @@ wait_for_br0_ip: - cmd: down_original_mgmt_interface - onchanges_in: - file: salt_minion_service_unit_file -{% if grains.role == 'so-managerhype '%} - - file: mine_functions -{% endif %} -{% if grains.role == 'so-managerhype '%} restart_salt_minion_service: service.running: - name: salt-minion - enable: True - listen: - - file: mine_functions -{% endif %} + - file: salt_minion_service_unit_file diff --git a/setup/so-functions b/setup/so-functions index 9ab11a904..4434dc908 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -1194,10 +1194,8 @@ hypervisor_local_states() { info "Running libvirt states for hypervisor" logCmd "salt-call state.apply libvirt.64962 --local --file-root=../salt/ -l info queue=True" info "Setting up bridge for $MNIC" - salt-call state.apply libvirt.bridge --local --file-root=../salt/ -l info pillar='{"host": {"mainint": "'$MNIC'"}}' queue=True - if [ $is_managerhype ]; then - logCmd "salt-call state.apply salt.minion queue=True" - fi + salt-call state.apply libvirt.bridge --local --file-root=../salt/ -l info pillar='{"host": {"mainint": "'$MNIC'"}}' queue=True + logCmd "salt-call state.apply salt.minion queue=True" fi }