It’s me again, this time with a fully fresh ceph and lxd environment.
Tried to add a storage pool and I’m receiving this error creating a container and the pool is shown as status: Pending:
root@aa1-cptef102-n4:/home/ubuntu# lxc launch --storage ceph ubuntu:20.04
Creating the instance
Error: Failed instance creation: Create instance from image: Failed to create mount directory "/var/snap/lxd/common/lxd/storage-pools/ceph/images/42424696bc6fc56ebff11508b597946b8f451f002a780bf0a943051130712a8f": mkdir /var/snap/lxd/common/lxd/storage-pools/ceph/images/42424696bc6fc56ebff11508b597946b8f451f002a780bf0a943051130712a8f: no such file or directory
Here’s the pool
config:
ceph.osd.pool_name: lxd-rootfs-01
ceph.user.name: lxd
description: “”
name: ceph
driver: ceph
used_by: []
status: Pending
locations:
- aa1-cptef101-n1
- aa1-cptef101-n2
- aa1-cptef101-n3
- aa1-cptef101-n4
- aa1-cptef102-n1
- aa1-cptef102-n2
- aa1-cptef102-n3
- aa1-cptef102-n4
The pool is visible:
info:
description: “”
driver: ceph
name: ceph
space used: 0B
total space: 60.80TB
used by: {}
The pool was created as such: lxc storage create ceph ceph source=lxd-rootfs-01 --target aa1-cptef101-n1 lxc storage set ceph ceph.user.name=lxd lxc storage set ceph ceph.osd.pool_name=lxd-rootfs-01
root@aa1-cptef102-n3:/home/ubuntu# lxc storage create ceph ceph ceph.user.name=lxd
Storage pool ceph created
Looks like creating containers works now, too:
root@aa1-cptef102-n3:/home/ubuntu# lxc launch ubuntu:20.04 --storage ceph
Creating the instance
Instance name is: legible-garfish
The instance you are starting doesn't have any network attached to it.
To create a new network, use: lxc network create
To attach a network to an instance, use: lxc network attach
Starting legible-garfish
@freeekanayaka can we do something to filter out pending pools and networks in most operations?
In this case it looks like LXD completely ignored the fact that the pool hasn’t actually been fully created and happily allowed it to be used to store stuff.