qubes-anaconda-addon: adjust mgmt stack usage
Salt-minion config is no longer generated using 'state.sls config', so remove references to it. Instead make sure all modules are up to date in cache (saltutil.sync_all). Also make sure 'salt-minion' service is disabled (it is no longer handled by config formula). Additionally dom0 states are no longer in separate environment. Slightly improve logging.
This commit is contained in:
parent
7ff84cf133
commit
8b37d08376
@ -91,7 +91,7 @@ done
|
||||
|
||||
set -e
|
||||
|
||||
for service in rdisc kdump libvirt-guests; do
|
||||
for service in rdisc kdump libvirt-guests salt-minion; do
|
||||
systemctl disable ${service}.service || :
|
||||
systemctl stop ${service}.service || :
|
||||
done
|
||||
@ -114,7 +114,7 @@ if [ "$vms_service" == "yes" -o "$vms_app" == "yes" ]; then
|
||||
mv /var/log/salt/minion /var/log/salt/minion.install || :
|
||||
fi
|
||||
|
||||
qubesctl state.sls config -l quiet --out quiet
|
||||
qubesctl saltutil.sync_all -l quiet --out quiet
|
||||
fi
|
||||
|
||||
states=()
|
||||
@ -130,7 +130,7 @@ fi
|
||||
if [ "$vms_service" == "yes" -o "$vms_app" == "yes" ]; then
|
||||
for state in "${states[@]}"; do
|
||||
echo "-> Requesting creation of VM: ${state#qvm.}"
|
||||
qubesctl top.enable "${state}" saltenv=dom0 -l quiet --out quiet
|
||||
qubesctl top.enable "${state}" -l quiet --out quiet
|
||||
done
|
||||
|
||||
echo "-> Creating VMs"
|
||||
|
@ -484,7 +484,7 @@ class QubesOsSpoke(FirstbootOnlySpokeMixIn, NormalSpoke):
|
||||
def configure_dom0(self):
|
||||
self.set_stage("Setting up administration VM (dom0)")
|
||||
|
||||
for service in [ 'rdisc', 'kdump', 'libvirt-guests' ]:
|
||||
for service in [ 'rdisc', 'kdump', 'libvirt-guests', 'salt-minion' ]:
|
||||
self.run_command(['systemctl', 'disable', '{}.service'.format(service) ], ignore_failure=True)
|
||||
self.run_command(['systemctl', 'stop', '{}.service'.format(service) ], ignore_failure=True)
|
||||
|
||||
@ -498,11 +498,11 @@ class QubesOsSpoke(FirstbootOnlySpokeMixIn, NormalSpoke):
|
||||
pass
|
||||
|
||||
# Refresh minion configuration to make sure all installed formulas are included
|
||||
self.run_command(['qubesctl', 'state.sls', 'config', '-l', 'quiet', '--out', 'quiet'])
|
||||
self.run_command(['qubesctl', 'saltutil.sync_all'])
|
||||
|
||||
for state in QubesChoice.get_states():
|
||||
print("Setting up state: {}".format(state))
|
||||
self.run_command(['qubesctl', 'top.enable', state, 'saltenv=dom0', '-l', 'quiet', '--out', 'quiet'])
|
||||
self.run_command(['qubesctl', 'top.enable', state])
|
||||
|
||||
try:
|
||||
self.run_command(['qubesctl', 'state.highstate'])
|
||||
|
Loading…
Reference in New Issue
Block a user