Error: Failed to create storage pool 'default': Failed to run: ceph --name client.admin --cluster ceph osd pool create lxd 32: 2020-06-27 15:56:51.067330 7f2d25023700 -1 Errors while parsing config file!

Hi,
I executed ‘sudo lxd init’ command on the ceph monitor host, but I get the following error. Can anyone enlighten me where could be the problem?
Thanks.
lxd version – 4.2

Would you like to use LXD clustering? (yes/no) [default=no]: 
Do you want to configure a new storage pool? (yes/no) [default=yes]: 
Name of the new storage pool [default=default]: 
Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: ceph
Create a new CEPH pool? (yes/no) [default=yes]: 
Name of the existing CEPH cluster [default=ceph]: 
Name of the OSD storage pool [default=lxd]: 
Number of placement groups [default=32]: 
Would you like to connect to a MAAS server? (yes/no) [default=no]: 
Would you like to create a new local network bridge? (yes/no) [default=yes]: 
What should the new bridge be called? [default=lxdbr0]: 
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: 
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: 
Would you like LXD to be available over the network? (yes/no) [default=no]: 
Would you like stale cached images to be updated automatically? (yes/no) [default=yes] 
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: yes
config: {}
networks:
- config:
    ipv4.address: auto
    ipv6.address: auto
  description: ""
  name: lxdbr0
  type: ""
storage_pools:
- config:
    ceph.cluster_name: ceph
    ceph.osd.pg_num: "32"
    ceph.osd.pool_name: lxd
  description: ""
  name: default
  driver: ceph
profiles:
- config: {}
  description: ""
  devices:
    eth0:
      name: eth0
      network: lxdbr0
      type: nic
    root:
      path: /
      pool: default
      type: disk
  name: default
cluster: null

Error: Failed to create storage pool 'default': Failed to run: ceph --name client.admin --cluster ceph osd pool create lxd 32: 2020-06-27 15:56:51.067330 7f2d25023700 -1 Errors while parsing config file!
2020-06-27 15:56:51.067344 7f2d25023700 -1 parse_file: cannot open /etc/ceph/ceph.conf: (2) No such file or directory
2020-06-27 15:56:51.067345 7f2d25023700 -1 parse_file: cannot open ~/.ceph/ceph.conf: (2) No such file or directory
2020-06-27 15:56:51.067345 7f2d25023700 -1 parse_file: cannot open ceph.conf: (2) No such file or directory
Error initializing cluster client: ObjectNotFound('error calling conf_read_file',)
test@ceph100:~$ ls -al /etc/ceph/
total 28
drwxr-xr-x  2 root root   95 Jun 27 15:51 .
drwxr-xr-x 99 root root 8192 Jun 27 15:30 ..
-rw-------  1 root root   63 Jun 22 07:03 ceph.client.admin.keyring
-rw-r--r--  1 root root  272 Jun 27 15:51 ceph.conf
-rw-r--r--  1 root root  595 Jun 22 07:04 ceph.pub
-rw-r--r--  1 root root   61 Jun 26 00:27 lxdpool.keyring

Regards.

Looks like a bug.

Consider writing a bug report at:

Also give some more details.

lxd init should be run as root, but I guess you did that.

Done, #7592.