canonical / lxd-ui

Easy and accessible container and virtual machine management. A browser interface for LXD
GNU General Public License v3.0
285 stars 34 forks source link

Error report on CephFS volume creation from UI #996

Closed khoubeibba closed 5 days ago

khoubeibba commented 1 week ago

Description

Using LXD-UI : Error when trying to create a volume using cephfs driver
Using the CLI : OK

Metadata

microcloud cluster 2.1.0 LTS lxd 5.21.2 LTS ceph-version: 19.2.0-0ubuntu0.24.04.1; microceph-git: 9aeaeb2970 openvswitch: 3.3.0-1ubuntu3 UI Version: 0.8.4 Path: /ui/project/default/storage

Stacktrace

Error: Could not find cephfs in storagePoolDriverToOptionKey
    at O (https://10.52.2.142:8443/ui/assets/FormMenuItem-42448b7e.js:1:4491)
    at ie (https://10.52.2.142:8443/ui/assets/FormMenuItem-42448b7e.js:1:5816)
    at se (https://10.52.2.142:8443/ui/assets/FormMenuItem-42448b7e.js:1:4920)
    at je (https://10.52.2.142:8443/ui/assets/FormMenuItem-42448b7e.js:1:8168)
    at ee (https://10.52.2.142:8443/ui/assets/StorageVolumeForm-b05fb09e.js:1:4772)
    at Zg (https://10.52.2.142:8443/ui/assets/index-fc04eb4e.js:38:19529)
    at Am (https://10.52.2.142:8443/ui/assets/index-fc04eb4e.js:40:3139)
    at B1 (https://10.52.2.142:8443/ui/assets/index-fc04eb4e.js:40:44801)
    at L1 (https://10.52.2.142:8443/ui/assets/index-fc04eb4e.js:40:39763)
    at v$ (https://10.52.2.142:8443/ui/assets/index-fc04eb4e.js:40:39691)
edlerd commented 1 week ago

Thank you for the request. I cannot reproduce the error, and also from the code I can't see how this could be triggered. Can you please provide a bit more info of which interactions in the UI lead to the trace you posted above?

I reconstructed your situation with a LXD-UI in the same version as you mentioned. A cephfs pool is rendered correctly in the storage pool overview for me. I don't understand what you mean with "create a volume using cephfs driver", because as far as I understand, cephfs is providing a filesystem, so you cannot create a volume on it.

image

khoubeibba commented 6 days ago

Thank you for your return Here's a video screen-capture

edlerd commented 6 days ago

Thanks for the video, it helped me to understand and reproduce the issue. The volumes link in the pool detail pages should not appear for cephfs in the first place. Because there are no volumes on a cephfs pool as it already contains a filesystem.

The crash happens, because we filter the volume list after the "Volumes" link is used by the cephfs pool. Then use the cephfs pool as a default on hitting the volume creation button. But the volume creation can't handle a pool with driver cephfs, and actually that is correct as it is not a valid pool driver to create a volume on.

We'll hide that "Volumes" link on a storage pool with driver cephfs. That will fix the breaking path you experienced above.

khoubeibba commented 6 days ago

Thanks @edlerd for the info, but what I don't understand is the fact that I was able to create a volume on the remote-fs storage pool and I can see it on the UI lxc storage volume create remote-fs another-volume image

edlerd commented 6 days ago

Thanks for your message, you are right. According to the docs on cephfs volumes can be created, but only with type filesystem. In that case, I'll change the fix accordingly.