[v18] Add Linux VNet systemd, dbus, polkit files to the teleport-connect package#64737
[v18] Add Linux VNet systemd, dbus, polkit files to the teleport-connect package#64737tangyatsu wants to merge 1 commit intobranch/v18from
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1b0c6d1df
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| [Service] | ||
| Type=dbus | ||
| BusName=org.teleport.vnet1 | ||
| ExecStart=/usr/local/bin/tsh vnet-daemon |
There was a problem hiding this comment.
Do not start Linux VNet with unsupported tsh subcommand
This unit starts tsh vnet-daemon, but on Linux that subcommand is not registered: tool/tsh/common/vnet_nodaemon.go is built for !darwin and returns vnetCommandNotSupported, so the daemon entrypoint is unavailable on this platform. As a result, D-Bus/systemd activation of teleport-vnet.service will fail immediately, making the packaged Linux VNet service non-functional.
Useful? React with 👍 / 👎.
| org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1 || true | ||
| } | ||
|
|
||
| if has_systemd; then |
There was a problem hiding this comment.
Install VNet files regardless of current systemd runtime
The new post-install logic copies all VNet dbus/polkit/systemd files only when has_systemd is true, which depends on /run/systemd/system existing at install time. In chroot/image-build installs (where PID1 is not systemd), this condition is false even for systemd-based target OSes, so the package silently skips installing required VNet integration files and leaves the feature unavailable until reinstall.
Useful? React with 👍 / 👎.
ravicious
left a comment
There was a problem hiding this comment.
I built Connect using code from tangyatsu/vnet-linux-v18 and tangyatsu/vnet-linux-systemd-dbus-polkit-files-v18. I did some light testing and it seems to work.
Backports #64362
changelog: Add VNet support for Teleport Connect on Linux
Manual Test Plan
Test Environment
any Linux distro with systemd, D-Bus and polkit
Test Cases
teleport-connectpackageteleport-connect, verify VNet files are removed.