Flag --profile doesn't apply target profile in move operations between nodes in a cluster

According to the command help --profile my-profile should apply the profile my-profile to the moved container. I’m trying to move a container to a different node in a cluster and it doesn’t work.

root@msc-lxd01:~# snap list lxd
Name  Version         Rev    Tracking     Publisher   Notes
lxd   5.21.4-de343be  37395  5.21/stable  canonical✓  -

root@msc-lxd01:~# lxc config show c1 | grep prf
- prf-msc-lxd02

root@msc-lxd01:~# lxc move c1 --profile prf-msc-lxd01 --target msc-lxd01

root@msc-lxd01:~# lxc config show c1 | grep prf
- prf-msc-lxd02

root@msc-lxd01:~# lxc profile ls
+---------------+---------------------+---------+
|     NAME      |     DESCRIPTION     | USED BY |
+---------------+---------------------+---------+
| default       | Default LXD profile | 0       |
+---------------+---------------------+---------+
| prf-msc-lxd01 |                     | 0       |
+---------------+---------------------+---------+
| prf-msc-lxd02 |                     | 2       |
+---------------+---------------------+---------+
| prf-msc-lxd03 |                     | 1       |
+---------------+---------------------+---------+

Option --no-profiles doesn’t work either.

Am I missing something?

Hi @pmarini, I can reproduce the problem you’re having. It doesn’t work for me too. It looks like a bug to me. Could you please open an issue on GitHub to report it?

Thanks @nikita-mezhenskyi for confirming! I have opened an issue: Flag --profile doesn’t apply target profile in move operations between nodes in a cluster · Issue #17518 · canonical/lxd · GitHub

2 Likes