Renaming volumes on Ceph RBD

I’m trying to figure out if this is a bug or expected behaviour.

lxc storage volume rename test-pool volume2 volume3
Error: Invalid expanded devices: Storage volume "maran-test" is already attached to a container on a different node

Note that “maran-test” is not related to the container volume2 is currently mounted on, it does not even live on the same pool.

Container the volume is attached on.

~# lxc config show --expanded hallo
architecture: x86_64
  image.architecture: amd64
  image.description: ubuntu 18.04 LTS amd64 (release) (20191021)
  image.label: release
  image.os: ubuntu
  image.release: bionic
  image.serial: "20191021"
  image.type: squashfs
  image.version: "18.04"
  limits.cpu: "2"
  limits.memory: 500MB
  volatile.base_image: d6f281a2e523674bcd9822f3f61be337c51828fb0dc94c8a200ab216d12a0fff
  volatile.eth0.hwaddr: 00:16:3e:15:a3:28
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":65536}]' '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":65536}]'
  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":65536}]'
  volatile.last_state.power: STOPPED
    name: eth0
    nictype: bridged
    parent: lxdbr0
    type: nic
    path: /
    pool: test-pool
    size: 30GB
    type: disk
    path: /mnt/hallo/volumdde
    pool: test-pool
    source: volume
    type: disk
    path: /mnt/hallo/volume2
    pool: test-pool
    source: volume2
    type: disk
ephemeral: false
- default
stateful: false
description: ""

Volume information

~# lxc storage volume show test-pool volume2
  block.filesystem: ext4
  block.mount_options: discard
  size: 25GB
  volatile.idmap.last: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":65536}]' '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":65536}]'
description: ""
name: volume2
type: custom
- /1.0/containers/hallo

Any idea why it won’t allow me to rename volumes?

What LXD version is that?

And can you also show the lxc storage volume show for that maran-test volume?

This is on master d1a99e0138815b80be6a894a92fe5fec7970125c.

Info for maran-test

# lxc storage volume show default custom/maran-test
  block.filesystem: ext4
  block.mount_options: discard
  size: 10GB
  volatile.idmap.last: '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]' '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'
description: ""
name: maran-test
type: custom
- /1.0/containers/first

Definitely smells like a bug, can you file one at
ideally with as short a reproducer as you can come up with?

I tried to replicate it on the latest master but I can’t seem to build it any longer.

lxd/cluster/recover.go:67:14: server.Recover undefined (type *dqlite.Node has no field or method Recover)

I already cleared my deps folder and did a make deps but it still won’t build. Any hints?


Solved it, makefile does not update go dependencies automatically but there is a nice update script make update.

Edit 2

Still happening on latest master, issue created.