Skip to content

Changing the VM user's shell to fish causes lima to wait forever for the SSH requirement to be satisfied #2856

Closed
@BurnerWah

Description

@BurnerWah

Description

When setting the lima VM user's shell to fish, lima will get stuck forever waiting for the the SSH requirement to be satisfied.

lima-start.log
The loop is in the following lines:

time="2024-11-06T13:14:17-06:00" level=info msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""
time="2024-11-06T13:14:17-06:00" level=debug msg="[hostagent] executing script \"ssh\""
time="2024-11-06T13:14:17-06:00" level=debug msg="[hostagent] executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/burner/.config/lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=burner -o ControlMaster=auto -o ControlPath=\"/Users/burner/.config/lima/alpine/ssh.sock\" -o ControlPersist=yes -p 49540 127.0.0.1 -- /bin/bash -c $'while read -r line; do [ -n \"$line\" ] && export \"$line\"; done<<EOF\\n$(sudo cat /mnt/lima-cidata/param.env)\\nEOF\\n/bin/bash']"
time="2024-11-06T13:14:17-06:00" level=debug msg="[hostagent] stdout=\"\", stderr=\"fish: Expected a variable name after this $.\\n/bin/bash -c $'while read -r line; do [ -n \\\"$line\\\" ] && export \\\"$line\\\"; done<<EOF\\\\n$(sudo cat /mnt/lima-cidata/param.env)\\\\nEOF\\\\n/bin/bash'\\n             ^\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"fish: Expected a variable name after this $.\\n/bin/bash -c $'while read -r line; do [ -n \\\"$line\\\" ] && export \\\"$line\\\"; done<<EOF\\\\n$(sudo cat /mnt/lima-cidata/param.env)\\\\nEOF\\\\n/bin/bash'\\n             ^\\n\": exit status 127"

Lima is running a script that was presumably meant for bash or another standard shell, but it runs it in whatever the user's configured shell is. If the user's shell is set to fish, this causes syntax a syntax error.

Reproduced on alpine & fedora VMs. I can provide any extra logs or make some dedicated VMs specifically for testing this if needed.

OS: Mac OS 14.7.1
CPU: Apple M1 Pro
Lima version: 1.0.0 (via homebrew)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionUsed to work but has been broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions