can not create a volume

Bug #1928781 reported by z
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MicroStack
Invalid
Undecided
Unassigned

Bug Description

in openstack page ,I create a volume ,but it failed.it returned
 "schedule allocate volume:Could not find any available weighted backend."

my server is ubuntu 20.04
my microstack version is 233
in a single noe

df -h shows below:
udev 7.7G 0 7.7G 0% /dev
tmpfs 1.6G 1.5M 1.6G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 914G 8.8G 859G 2% /
tmpfs 7.7G 0 7.7G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
/dev/sda2 976M 199M 710M 22% /boot
/dev/sda1 511M 7.8M 504M 2% /boot/efi
/dev/loop1 387M 387M 0 100% /snap/microstack/233
/dev/loop2 62M 62M 0 100% /snap/core20/x1
/dev/loop0 33M 33M 0 100% /snap/snapd/x1
tmpfs 1.6G 0 1.6G 0% /run/user/1000

microstack.openstack service list

+----------------------------------+-----------+-----------+
| ID | Name | Type |
+----------------------------------+-----------+-----------+
| 123d61ae87bb42ab816e3dd757bd64b3 | keystone | identity |
| 1440bac4a2bf43d69154c879ccd199f9 | cinderv3 | volumev3 |
| 1a9f1c68c24142ee90cfd2895d968b9c | nova | compute |
| 4350ef5bd3ab45b6bd7d504d37be85cf | neutron | network |
| 9d434dc4913d40f485e13b8f6dfd051e | glance | image |
| aed08482ea1e4d0ba051f740438ae4e2 | placement | placement |
| e34d5368d02e4a48b1d70b9048ea2dea | cinderv2 | volumev2 |
+----------------------------------+-----------+-----------+

 sudo microstack.cinder-manage service list
Binary Host Zone Status State Updated At RPC Version Object Version Cluster
cinder-scheduler tsingyun nova enabled :-) 2021-05-18 10:53:38 3.12 1.38

the attachment is the log after I click create volume button.I got it from /var/log/syslog

I really do not konw what's going wrong...

Tags: crate volume
Revision history for this message
Billy Olsen (billy-olsen) wrote :

When you initialized microstack, did you enable the experimental volume backend? The cinder volume lvm configuration is not setup with the standard `sudo microstack init --auto --control`, but can be initialized from scratch using `sudo microstack init --auto --control --setup-loop-based-cinder-lvm-backend` which will setup a 32 GB loopback device for cinder volume storage. You can further expand the command to include `--loop-device-file-size <size_in_GB_integer>` to influence the size of the loopback device, i.e.:

sudo microstack init --auto --control --setup-loop-based-cinder-lvm-backend --loop-device-file-size 50

would initialize a control + compute node with a 50 GB loop device for storing cinder volumes.

I think that the microstack installation could do a bit better of a job of disabling cinder capabilities when its not fully configured to use the experimental volume backend, b/c otherwise it seems that the volume services are available when they really aren't.

With experimental volume support enabled, you'd see a microstack.cinder-scheduler and a microstack.cinder-volume service enabled and active in the output of `snap services microstack`. For future reference, the log files should be available in /var/snap/microstack/common/log which should help debug the specific service.

Revision history for this message
z (yy3) wrote :

thanks a lot. I try to reinstall microstack , I install it success.but can not init it any more ...
it always show some errors during init
.just like
Traceback (most recent call last):
  File "/snap/microstack/233/bin/microstack", line 11, in <module>
    load_entry_point('microstack==0.0.1', 'console_scripts', 'microstack')()
  File "/snap/microstack/233/lib/python3.8/site-packages/microstack/main.py", line 44, in main
    cmd()
  File "/snap/microstack/233/lib/python3.8/site-packages/init/main.py", line 60, in wrapper
    return func(*args, **kwargs)
  File "/snap/microstack/233/lib/python3.8/site-packages/init/main.py", line 227, in init
    question.ask()
  File "/snap/microstack/233/lib/python3.8/site-packages/init/questions/question.py", line 210, in ask
    self.yes(awr)
  File "/snap/microstack/233/lib/python3.8/site-packages/init/questions/__init__.py", line 719, in yes
    enable('setup-lvm-loopdev')
  File "/snap/microstack/233/lib/python3.8/site-packages/init/shell.py", line 162, in enable
    check('snapctl', 'start', 'microstack.{}'.format(service), '--enable')
  File "/snap/microstack/233/lib/python3.8/site-packages/init/shell.py", line 69, in check
    raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'snapctl start microstack.setup-lvm-loopdev --enable' returned non-zero exit status 1.

or

Traceback (most recent call last):
  File "/snap/microstack/233/bin/microstack", line 11, in <module>
    load_entry_point('microstack==0.0.1', 'console_scripts', 'microstack')()
  File "/snap/microstack/233/lib/python3.8/site-packages/microstack/main.py", line 44, in main
    cmd()
  File "/snap/microstack/233/lib/python3.8/site-packages/init/main.py", line 60, in wrapper
    return func(*args, **kwargs)
  File "/snap/microstack/233/lib/python3.8/site-packages/init/main.py", line 227, in init
    question.ask()
  File "/snap/microstack/233/lib/python3.8/site-packages/init/questions/question.py", line 210, in ask
    self.yes(awr)
  File "/snap/microstack/233/lib/python3.8/site-packages/init/questions/__init__.py", line 189, in yes
    enable('ovs-vswitchd')
  File "/snap/microstack/233/lib/python3.8/site-packages/init/shell.py", line 162, in enable
    check('snapctl', 'start', 'microstack.{}'.format(service), '--enable')
  File "/snap/microstack/233/lib/python3.8/site-packages/init/shell.py", line 69, in check
    raise subprocess.CalledProcessError(proc.returncode, " ".join(args))
subprocess.CalledProcessError: Command 'snapctl start microstack.ovs-vswitchd --enable' returned non-zero exit status 1.
adn so on ....

My command is
sudo microstack init --auto --control --setup-loop-based-cinder-lvm-backend --loop-device-file-size 50

my operation is
1. sudo apt autoremove --purge snapd (I run sudo snap remove microstack not works well, so I remove all..)
2. sudo apt install snapd
3. sudo snap install --beta microstack
4. sudo microstack init --auto --control --setup-loop-based-cinder-lvm-backend --loop-device-file-size 50
5. I got the error like subprocess.CalledProcessError: Command 'snapctl start microstack.XXXX --enable' returned non-zero exit status 1.

Revision history for this message
z (yy3) wrote :

systemctl status snap.microstack.ovs-vswitchd.service
● snap.microstack.ovs-vswitchd.service - Service for snap application microstack.ovs-vswitchd
     Loaded: loaded (/etc/systemd/system/snap.microstack.ovs-vswitchd.service; disabled; vendor preset: enabled)
     Active: inactive (dead) (Result: exit-code) since Wed 2021-05-19 16:13:54 CST; 1min 40s ago

5月 19 16:13:54 tsingyun systemd[1]: snap.microstack.ovs-vswitchd.service: Control process exited, code=exited, status=1/FAILURE
5月 19 16:13:54 tsingyun systemd[1]: snap.microstack.ovs-vswitchd.service: Failed with result 'exit-code'.
5月 19 16:13:54 tsingyun systemd[1]: Failed to start Service for snap application microstack.ovs-vswitchd.
5月 19 16:13:54 tsingyun systemd[1]: Stopped Service for snap application microstack.ovs-vswitchd.

Revision history for this message
z (yy3) wrote :

I run the command in snap.microstack.ovs-vswitchd.service
it shows blow:
sudo /usr/bin/snap run microstack.ovs-vswitchd
libkmod: ERROR ../libkmod/libkmod-config.c:812 conf_files_list: opendir(/etc/modprobe.d): Permission denied
modprobe: ERROR: could not insert 'openvswitch': Operation not permitted
 * Inserting openvswitch module

Revision history for this message
z (yy3) wrote :

and my /etc/modprobe.d is:

drwxr-xr-x 2 root root 4096 5月 19 06:08 modprobe.d/

Revision history for this message
z (yy3) wrote :

finally it works well .thanks a lot.
1. sudo apt upgrade
2. sudo snap remove microstack (now it works)
3. sudo snap install --beta microstack
4. sudo microstack init --auto --control --setup-loop-based-cinder-lvm-backend --loop-device-file-size 50

Revision history for this message
Billy Olsen (billy-olsen) wrote :

I’m glad it works for you! To confirm, step 3 in your last comment was ‘sudo snap install —beta microstack’ or ‘sudo snap install microstack —beta —dev mode’? (Hopefully those are two hyphens, responding from phone). I just want to make sure you are using devmode.

Revision history for this message
z (yy3) wrote :

oh, I think step 3 my command is
sudo snap install microstack —beta —devmode
the command I run 'snap list' shows below:

Name Version Rev Tracking Publisher Notes
core20 20210429 1026 latest/stable canonical✓ base
microstack ussuri 233 latest/beta canonical✓ devmode
snapd 2.50 11841 latest/stable canonical✓ snapd

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Glad its working for you and thanks for confirming you're using devmode.

Changed in microstack:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.