Skip to content

Fix container deployment from Ubuntu 26.04 / WSL hosts - #538

Merged
giuseppe-carboni merged 6 commits into
masterfrom
wsl-deployment-container
Nov 16, 2026
Merged

giuseppe-carboni merged 6 commits into
masterfrom
wsl-deployment-container

Conversation

@sergiopoppi

Copy link
Copy Markdown
Member
  • sshLogin: raise the timeout from 2s to 15s and use BatchMode=yes and ConnectTimeout=5, so a slow sshd is no longer mistaken for a rejected key (which made discos-deploy ask for the root password).
  • Dockerfile: set UseDNS no and GSSAPIAuthentication no in the image, so sshd answers without waiting on reverse DNS before Ansible runs.
  • dockerEnsureContainer: inject the RSA public key also when the container already exists, not only on creation.
  • dependencies role: accept GitHub's host key on first connection (accept_newhostkey) when cloning the token branch.
  • key_exchange role: run ssh-keyscan with -q and keep only key type and key, since newer OpenSSH prints the banner comment on stdout and broke the known_hosts entry ("Host parameter does not match hashed host field").

- sshLogin: raise the timeout from 2s to 15s and use BatchMode=yes and
  ConnectTimeout=5, so a slow sshd is no longer mistaken for a rejected
  key (which made discos-deploy ask for the root password).
- Dockerfile: set UseDNS no and GSSAPIAuthentication no in the image, so
  sshd answers without waiting on reverse DNS before Ansible runs.
- dockerEnsureContainer: inject the RSA public key also when the
  container already exists, not only on creation.
- dependencies role: accept GitHub's host key on first connection
  (accept_newhostkey) when cloning the token branch.
- key_exchange role: run ssh-keyscan with -q and keep only key type and
  key, since newer OpenSSH prints the banner comment on stdout and broke
  the known_hosts entry ("Host parameter does not match hashed host
  field").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sergiopoppi and others added 4 commits October 14, 2026 09:47
- scripts/discos.ps1: PowerShell 7.3+ functions discos-deploy,
  discos-container and discos-login that forward to the tools installed
  in a WSL2 distribution (default Ubuntu-26.04, override with
  DISCOS_WSL_DISTRO). Arguments are passed through a login shell
  unchanged, so PATH and REPOSITORY_TOKEN come from ~/.profile.
- dockerMachineList: list the inventory machines that exist as Docker
  containers (empty when Docker is not installed).
- discos-login: accept those containers as machines too and check them
  with a direct SSH port probe, since machineList only knew about
  Vagrant/VirtualBox VMs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Docker-only hosts (e.g. WSL) discos-login printed
"/bin/sh: 1: vboxmanage: not found" because machineList() always ran
vboxmanage to list the VirtualBox VMs. _vboxList() now returns an empty
list when vboxmanage is not on the PATH, so only the Docker containers
are listed and no shell error is shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
discos-vnc only offered Vagrant/VirtualBox VMs, so on Docker-only hosts
(e.g. WSL) it failed with "invalid choice: 'manager' (choose from )".

- isRunning: accept machines that exist as Docker containers, not only
  Vagrant VMs.
- discos-vnc: add the Docker containers to the selectable machines.
- discos-login: use isRunning again instead of its own container check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When vncviewer was missing (e.g. only gvncviewer installed), discos-vnc
crashed with FileNotFoundError after starting the SSH tunnel, leaving
the tunnel running in the background. It now checks that vncviewer is
on the PATH first and stops with a message suggesting the
tigervnc-viewer package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread deployment/__init__.py Outdated
[
'timeout',
'2',
'15',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems ok, but i'm not really sure about this increase in timeout. It was specifically set for a not too high number in order for provisioning on physical machines to not let the user wait too long. @sergiopoppi can you try setting it again to 2 seconds and perform another test?

Timeout set to old 2 seconds timeout
@giuseppe-carboni
giuseppe-carboni merged commit 61e6b14 into master Nov 16, 2026
1 check passed
@giuseppe-carboni
giuseppe-carboni deleted the wsl-deployment-container branch November 16, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants