Skip to content

Commit c12588f

Browse files
committed
spire: don't scan for supervisor keys during auto-launch
When launching an existing virtual cluster, don't attempt to authenticate to the supervisor with the pre-keysystem method of using the preseeded authorized ssh key. Doing so won't work because that ssh key is no longer authorized on the supervisor after the keysystem is set up. (Previously, it sometimes appeared to work when the keysystem-provided ssh keys were still loaded from a prior auto-install.) This also avoids unnecessarily pulling the host key from the keysystem and verifying it using the fingerprint displayed on the supervisor console; once the keysystem is set up the supervisor can authenticate itself using the CA.
1 parent ced57ff commit c12588f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

platform/spire/src/virt.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -549,10 +549,10 @@ def auto_install_supervisor(ops: command.Operations, tc: TerminationContext, sup
549549

550550

551551
@command.wrapseq
552-
def auto_launch_supervisor(ops: command.Operations, tc: TerminationContext, supervisor: configuration.Node, debug_qemu=False):
552+
def auto_launch_supervisor(ops: command.Operations, tc: TerminationContext, supervisor: configuration.Node, autoadd_fingerprint=False, debug_qemu=False):
553553
# TODO: annotations, so that this can be --dry-run'd
554554
vm = VirtualMachine(supervisor, tc, debug_qemu=debug_qemu)
555-
ops.add_operation("start up supervisor node", lambda: vm.boot_launch(autoadd_fingerprint=True))
555+
ops.add_operation("start up supervisor node", lambda: vm.boot_launch(autoadd_fingerprint=autoadd_fingerprint))
556556

557557

558558
@command.wrapseq
@@ -591,7 +591,7 @@ def auto_install(ops: command.Operations, authorized_key=None, persistent: bool=
591591
with ops.context("termination", TerminationContext()) as tc:
592592
with ops.context("debug shell", DebugContext(persistent)):
593593
ops.add_subcommand(auto_install_supervisor, tc, config.keyserver, iso_path, cdrom_install=cdrom_install, debug_qemu=debug_qemu)
594-
ops.add_subcommand(auto_launch_supervisor, tc, config.keyserver, debug_qemu=debug_qemu)
594+
ops.add_subcommand(auto_launch_supervisor, tc, config.keyserver, autoadd_fingerprint=True, debug_qemu=debug_qemu)
595595
ops.add_subcommand(seq.sequence_supervisor)
596596

597597
other_nodes = [n for n in config.nodes if n != config.keyserver]

0 commit comments

Comments
 (0)