taijirobot
taijirobot

Reputation: 141

Error when creating volume with openstack dashboard

I got an error when trying to create a volume via the openstack dashboard, after installing openstack guided by this: https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/blob/master/OpenStack_Folsom_Install_Guide_WebVersion.rst

In fact the volume was already created, which can be shown with cmd lvdisplay. However, something went wrong with cinder/utils.py so the dashboard showed and error.

The error log in /var/log/cinder/cinder-volume.log is here: http://pastebin.com/NSn493Dk

Any idea about this is appreciated. Thanks :)

Upvotes: 2

Views: 15375

Answers (3)

user624441
user624441

Reputation: 11

This link helped me fixing the same Volume/Instance creation issue on Ubuntu 18.04(LTS). I was getting STATUS=ERROR for INSTANCE creation, because VOLUME creation was failing.

Error: Failed to perform requested operation on instance "Instance-Instance2", the instance has an error status: Please try again later [Error: Build of instance 979693c2-faf9-4f62-9e4e-aab3d274721d aborted: Volume 8649e851-28c4-489f-b115-0df5aa3e63a4 did not finish being created even after we waited 5 seconds or 2 attempts. And its status is error.].

I found volume_group was showing stack-volumes-lvmdriver-1 while vgdisplay was showing stack-volume-default.

/etc/cinder/cinder.conf ( volume_group = stack-volumes-lvmdriver-1) 
vgdisplay output = volume_group = stack-volumes-default


UnInstall Openstack:
----------------
https://nguyentrihai.com/?p=481

Install Openstack again after updating the packages.
Install:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade   
sudo apt-get install python-pip
sudo pip install --upgrade pip
sudo apt-get install -y python-systemd
sudo useradd -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo su -l stack 
git clone https://git.openstack.org/openstack-dev/devstack -b stable/queens
cd /opt/stack/devstack

local.conf entry:

[[local|localrc]]
############################################################
# Customize the following HOST_IP based on your installation
############################################################
HOST_IP=<Your system IP>
SERVICE_HOST=<Your System IP>
ADMIN_PASSWORD=devstack
DATABASE_PASSWORD=devstack
RABBIT_PASSWORD=devstack
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack



( On Ubutntu 18.04)
FORCE=yes ./stack.sh


VGDISPLAY and /etc/cinder/cinder.conf entry:

--- Volume group ---
  VG Name               stack-volumes-lvmdriver-1

stack@speedo:~$ grep -i Volume_group /etc/cinder/cinder.conf 
volume_group = stack-volumes-lvmdriver-1
stack@speedo:~$ 


If vgdisplay showing no entry , as mentioned in above post, use below command:

sudo losetup -f /opt/stack/data/stack-volumes-default-backing-file 

Upvotes: 0

Radu Toader
Radu Toader

Reputation: 1561

edit

vim /etc/cinder/cinder.conf

check the volume group if is the same as the one from command "vgdisplay"

mine is "stack-volumes"

[lvmdriver-1]
volume_group = stack-volumes
volume_driver = cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name = lvmdriver-1

if using devstack

./unstack.sh
./rejoin_stack.sh

when you restart your machine or if there is nothing diplayed under vgdisplay :

sudo losetup -f /opt/stack/data/stack-volumes-backing-file

Upvotes: 2

taijirobot
taijirobot

Reputation: 141

I resolved it by myself.

It was caused by a broken iscsitarget service. I'm using Ubuntu so just reinstall the service with apt-get, which will solve the problem whose error code was 145 with message connection refused.

The command is here:

apt-get install iscsitarget-dkms --reinstall

apt-get install iscsitarget --reinstall

They will reinstall the kernel module iscsi_trgt.

Upvotes: 0

Related Questions