NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.66k stars 13.81k forks source link

tailscale - combining binaries breaks `tailscale ssh` #310950

Closed theEndBeta closed 4 months ago

theEndBeta commented 4 months ago

Describe the bug

Commit "tailscale: combine client and daemon binary" breaks tailscale ssh

╭─    ~/nix    main *1 +3                                                                                                                   ✔  vesu@glacier  18:59:02  
╰─ tailscale ssh myhost
2024/05/11 18:59:06 tailscaled does not take non-flag arguments: ["nc" "myhost.word-other.ts.net." "22"]
Connection closed by UNKNOWN port 65535
╭─    ~/nix    main *1 +3                                                                                                               255 ✘  vesu@glacier  18:59:06  
╰─ git au && just switch
sudo nixos-rebuild switch --flake ".#glacier"
warning: Git tree '/home/vesu/nix' is dirty
warning: updating lock file '/home/vesu/nix/flake.lock':
• Updated input 'nixpkgs-test':
    'github:nixos/nixpkgs/ccf4d0c623495168171bee72f511d7e56b4cdc84' (2024-04-24)
  → 'github:nixos/nixpkgs/cd7bb6126ced1216fb49f48103db7811bd308a39' (2024-04-22)
warning: Git tree '/home/vesu/nix' is dirty
building the system configuration...
warning: Git tree '/home/vesu/nix' is dirty
activating the configuration...
setting up /etc...
reloading user units for vesu...
setting up tmpfiles
reloading the following units: dbus.service
restarting the following units: tailscaled.service
╭─    ~/nix    main *1 +3 !1                                                                                                        ✔  32s   vesu@glacier  19:00:11  
╰─ tailscale version    
1.64.2
  go version: go1.22.2
╭─    ~/nix    main *1 +3 !1                                                                                                                ✔  vesu@glacier  19:00:16  
╰─ tailscale ssh myhost 
[vesu@<ip> ~]$ 
logout
Connection to myhost.word-other.ts.net. closed.

Steps To Reproduce

Attempt to use tailscale ssh ... with nixpkgs commit ccf4d0c623495168171bee72f511d7e56b4cdc84 or later and notice that it fails with the error tailscaled does not take non-flag arguments: ["nc" "myhost.word-other.ts.net." "22"]

Expected behavior

tailscale ssh ... should not fail, as in commits prior.

Notify maintainers

@SuperSandro2000

Metadata

╰─ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.87, NixOS, 23.11 (Tapir), 23.11.20240511.71bae31`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - channels(vesu): `"home-manager-23.05.tar.gz"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

SuperSandro2000 commented 4 months ago

The bug is here https://github.com/tailscale/tailscale/blob/main/cmd/tailscale/cli/ssh.go#L119

I am going to create a PR and apply a patch to fix this.

SuperSandro2000 commented 4 months ago

Please test #311176

theEndBeta commented 4 months ago

Patch seems to work - thank you @SuperSandro2000!