Skip to content

Commit b9dffa5

Browse files
committed
Fix root daemon access when running with embedded root daemon
When the user daemon runs with an embedded root daemon (e.g., in Docker mode), calls to RootDaemonVersion and withRootDaemon failed because they didn't account for the in-process root session. RootDaemonVersion now returns the local version directly, and withRootDaemon delegates to the session's WithRootClient when a session is available. Signed-off-by: Thomas Hallgren <thomas@tada.se>
1 parent f7f764f commit b9dffa5

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

CHANGELOG.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ items:
5353
due to dependency constraints.
5454
docs: install/client
5555
- version: 2.26.2
56-
date: 2026-02-05
56+
date: (TBD)
5757
notes:
5858
- type: bugfix
5959
title: Fix HTTP intercepts via telepresence compose failing when httpFilters or httpPaths are set
@@ -62,6 +62,13 @@ items:
6262
This caused the traffic manager to reject the intercept with "global TCP/UDP intercepts are disabled".
6363
The mechanism is now correctly switched to "http" when any HTTP filters are specified, matching the behavior
6464
of the CLI intercept command.
65+
- type: bugfix
66+
title: Fix "root daemon is embedded" error on Windows elevated terminals
67+
body: >-
68+
When running Telepresence in an elevated (administrator) terminal on Windows, commands like connect and
69+
loglevel failed with "root daemon is embedded". The user daemon now correctly delegates to the in-process
70+
root daemon session instead of returning an error.
71+
docs: https://github.com/telepresenceio/telepresence/issues/4049
6572
- version: 2.26.1
6673
date: 2026-01-26
6774
notes:

docs/release-notes.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,19 @@ New Linux package installers (.deb for Debian/Ubuntu and .rpm for Fedora/RHEL) a
2020
A new Windows installer (.exe) is now available that installs Telepresence with the root daemon configured as a Windows service. The installer bundles WinFSP and SSHFS-Win dependencies for volume mount support, adds Telepresence to the system PATH, and optionally installs the TelepresenceDaemon service. This eliminates the need for elevated privileges when using Telepresence. Currently available for amd64 architecture only due to dependency constraints.
2121
</div>
2222

23-
## Version 2.26.2 <span style="font-size: 16px;">(February 5)</span>
23+
## Version 2.26.2
2424
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">Fix HTTP intercepts via telepresence compose failing when httpFilters or httpPaths are set</div></div>
2525
<div style="margin-left: 15px">
2626

2727
The compose extension set HeaderFilters and PathFilters on the intercept spec but left the mechanism as "tcp". This caused the traffic manager to reject the intercept with "global TCP/UDP intercepts are disabled". The mechanism is now correctly switched to "http" when any HTTP filters are specified, matching the behavior of the CLI intercept command.
2828
</div>
2929

30+
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">[Fix "root daemon is embedded" error on Windows elevated terminals](https://github.com/telepresenceio/telepresence/issues/4049)</div></div>
31+
<div style="margin-left: 15px">
32+
33+
When running Telepresence in an elevated (administrator) terminal on Windows, commands like connect and loglevel failed with "root daemon is embedded". The user daemon now correctly delegates to the in-process root daemon session instead of returning an error.
34+
</div>
35+
3036
## Version 2.26.1 <span style="font-size: 16px;">(January 26)</span>
3137
## <div style="display:flex;"><img src="images/bugfix.png" alt="bugfix" style="width:30px;height:fit-content;"/><div style="display:flex;margin-left:7px;">[Add support for "warning" as an alias for "warn" in log levels](https://github.com/telepresenceio/telepresence/issues/4043)</div></div>
3238
<div style="margin-left: 15px">

docs/release-notes.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,19 @@ New Linux package installers (.deb for Debian/Ubuntu and .rpm for Fedora/RHEL) a
2626
A new Windows installer (.exe) is now available that installs Telepresence with the root daemon configured as a Windows service. The installer bundles WinFSP and SSHFS-Win dependencies for volume mount support, adds Telepresence to the system PATH, and optionally installs the TelepresenceDaemon service. This eliminates the need for elevated privileges when using Telepresence. Currently available for amd64 architecture only due to dependency constraints.
2727
</Body>
2828
</Note>
29-
## Version 2.26.2 <span style={{fontSize:'16px'}}>(February 5)</span>
29+
## Version 2.26.2
3030
<Note>
3131
<Title type="bugfix">Fix HTTP intercepts via telepresence compose failing when httpFilters or httpPaths are set</Title>
3232
<Body>
3333
The compose extension set HeaderFilters and PathFilters on the intercept spec but left the mechanism as "tcp". This caused the traffic manager to reject the intercept with "global TCP/UDP intercepts are disabled". The mechanism is now correctly switched to "http" when any HTTP filters are specified, matching the behavior of the CLI intercept command.
3434
</Body>
3535
</Note>
36+
<Note>
37+
<Title type="bugfix" docs="https://github.com/telepresenceio/telepresence/issues/4049">Fix "root daemon is embedded" error on Windows elevated terminals</Title>
38+
<Body>
39+
When running Telepresence in an elevated (administrator) terminal on Windows, commands like connect and loglevel failed with "root daemon is embedded". The user daemon now correctly delegates to the in-process root daemon session instead of returning an error.
40+
</Body>
41+
</Note>
3642
## Version 2.26.1 <span style={{fontSize:'16px'}}>(January 26)</span>
3743
<Note>
3844
<Title type="bugfix" docs="https://github.com/telepresenceio/telepresence/issues/4043">Add support for "warning" as an alias for "warn" in log levels</Title>

pkg/client/userd/daemon/grpc.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ func (s *service) TrafficManagerVersion(ctx context.Context, _ *empty.Empty) (vi
448448
}
449449

450450
func (s *service) RootDaemonVersion(ctx context.Context, empty *empty.Empty) (vi *common.VersionInfo, err error) {
451+
if s.rootSessionInProc {
452+
return client.VersionInfo(ctx), nil
453+
}
451454
err = s.withRootDaemon(ctx, func(ctx context.Context, rd daemon.DaemonClient) error {
452455
vi, err = rd.Version(s, empty)
453456
return err
@@ -631,6 +634,12 @@ func (s *service) RerouteRemotePort(ctx context.Context, request *daemon.Reroute
631634
}
632635

633636
func (s *service) withRootDaemon(ctx context.Context, f func(ctx context.Context, daemonClient daemon.DaemonClient) error) error {
637+
s.sessionLock.RLock()
638+
defer s.sessionLock.RUnlock()
639+
if s.session != nil {
640+
return s.session.WithRootClient(ctx, f)
641+
}
642+
634643
if s.rootSessionInProc {
635644
return status.Error(codes.Unavailable, "root daemon is embedded")
636645
}

0 commit comments

Comments
 (0)