Skip to content

Commit

Permalink
incusd/instance_post: Pass in internal user agent during relocation
Browse files Browse the repository at this point in the history
Closes #1299

Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Nov 15, 2024
1 parent eeaa9f3 commit 51a8dc4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/incusd/instance_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
internalInstance "github.com/lxc/incus/v6/internal/instance"
"github.com/lxc/incus/v6/internal/server/auth"
"github.com/lxc/incus/v6/internal/server/cluster"
clusterRequest "github.com/lxc/incus/v6/internal/server/cluster/request"
"github.com/lxc/incus/v6/internal/server/db"
dbCluster "github.com/lxc/incus/v6/internal/server/db/cluster"
"github.com/lxc/incus/v6/internal/server/db/operationtype"
Expand Down Expand Up @@ -595,7 +596,12 @@ func migrateInstance(ctx context.Context, s *state.State, inst instance.Instance
// Handle pool and project moves.
if req.Project != "" || req.Pool != "" {
// Get a local client.
target, err := incus.ConnectIncusUnix(s.OS.GetUnixSocket(), nil)
args := &incus.ConnectionArgs{
SkipGetServer: true,
UserAgent: clusterRequest.UserAgentClient,
}

target, err := incus.ConnectIncusUnix(s.OS.GetUnixSocket(), args)
if err != nil {
return err
}
Expand Down

0 comments on commit 51a8dc4

Please sign in to comment.