Skip to content

Commit

Permalink
Request install-ID prior to launching the daemon.
Browse files Browse the repository at this point in the history
With Metriton removed, there's no one requesting the install-ID prior to
launching the user daemon. If that daemon is launched in a container, it
will have the config ina read-only filesystem and therefore fail to
store a generated install-ID.

This commit ensures that the ID is requested (and created if it doesn't
exist) before starting the containerized daemon.

Signed-off-by: Thomas Hallgren <[email protected]>
  • Loading branch information
thallgren committed Oct 11, 2024
1 parent 8b5531c commit 72ecb17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/client/docker/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,12 @@ func LaunchDaemon(ctx context.Context, daemonID *daemon.Identifier) (conn *grpc.
return nil, err
}

// Ensure that an ID exists in the config prior to launching the daemon. If it doesn't, the daemon
// will try to add it and fail, because the config is a read-only file system.
if _, err = client.InstallID(ctx); err != nil {
return nil, err
}

if err = EnsureNetwork(ctx, "telepresence"); err != nil {
return nil, err
}
Expand Down

0 comments on commit 72ecb17

Please sign in to comment.