Skip to content

Commit 6eecc9a

Browse files
committed
incusd/instance_post: Pass in internal user agent during relocation
Closes #1299 Signed-off-by: Stéphane Graber <[email protected]>
1 parent 0cf3730 commit 6eecc9a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/incusd/instance_post.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
internalInstance "github.com/lxc/incus/v6/internal/instance"
1515
"github.com/lxc/incus/v6/internal/server/auth"
1616
"github.com/lxc/incus/v6/internal/server/cluster"
17+
clusterRequest "github.com/lxc/incus/v6/internal/server/cluster/request"
1718
"github.com/lxc/incus/v6/internal/server/db"
1819
dbCluster "github.com/lxc/incus/v6/internal/server/db/cluster"
1920
"github.com/lxc/incus/v6/internal/server/db/operationtype"
@@ -595,7 +596,12 @@ func migrateInstance(ctx context.Context, s *state.State, inst instance.Instance
595596
// Handle pool and project moves.
596597
if req.Project != "" || req.Pool != "" {
597598
// Get a local client.
598-
target, err := incus.ConnectIncusUnix(s.OS.GetUnixSocket(), nil)
599+
args := &incus.ConnectionArgs{
600+
SkipGetServer: true,
601+
UserAgent: clusterRequest.UserAgentClient,
602+
}
603+
604+
target, err := incus.ConnectIncusUnix(s.OS.GetUnixSocket(), args)
599605
if err != nil {
600606
return err
601607
}

0 commit comments

Comments
 (0)