firstboot: improve salt highstate error reporting

Full stdout/stderr is way to much to fit in that error message. Tell the
user where it can be found and what to do.
release3.1
Marek Marczykowski-Górecki 9 years ago
parent aa8c80cbca
commit 3feb90eef2
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

@ -233,13 +233,26 @@ class moduleClass(Module):
def configure_qubes(self):
self.show_stage('Executing qubes configuration')
try:
# get rid of initial entries (from package installation time)
os.rename('/var/log/salt/minion', '/var/log/salt/minion.install')
except OSError:
pass
# Refresh minion configuration to make sure all installed formulas are included
self.run_command_in_thread(['qubesctl', 'state.sls', 'config',
'-l', 'quiet', '--out', 'quiet'])
for state in QubesChoice.get_states():
self.run_command_in_thread(['qubesctl', 'top.enable', state,
'saltenv=dom0', '-l', 'quiet', '--out', 'quiet'])
self.run_command_in_thread(['qubesctl', 'state.highstate'])
try:
self.run_command_in_thread(['qubesctl', 'state.highstate'])
except Exception as e:
raise Exception(
"Qubes initial configuration failed. Login to the system and "
"check /var/log/salt/minion for details. "
"You can retry configuration by calling "
"'sudo qubesctl state.highstate' in dom0 (you will get "
"detailed state there).")
def configure_default_template(self):
self.show_stage('Setting default template')

Loading…
Cancel
Save