Bug 1369323

Summary: Virt VM doesn't boot with Image having deep-flatten feature
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Bhaskarakiran <byarlaga>
Component: RBDAssignee: seb
Status: CLOSED NOTABUG QA Contact: Bhaskarakiran <byarlaga>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0CC: byarlaga, ceph-eng-bugs, flucifre, hnallurv, jdillama, jdurgin, jim.curtis, kdreyer, kramdoss, mzywusko, rcyriac, seb
Target Milestone: rc   
Target Release: 2.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-17 13:16:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1315538, 1371113    
Attachments:
Description Flags
Error none

Description Bhaskarakiran 2016-08-23 06:58:41 UTC
Created attachment 1193160 [details]
Error

Description of problem:
=======================
Testing the ceph 2.0 features on containers.

Enabled the deep-flatten feature on the image and mapped it to a VM. The VM fails to boot with "Operation not supported message"

Version-Release number of selected component (if applicable):
=============================================================
10.2.2-38.el7cp

How reproducible:
=================
100%

Steps to Reproduce:
1. Create rbd image with deep-flatten enabled
2. Map the image to a VM and start it.

Actual results:


Expected results:


Additional info:

Attaching the screenshot of the error message.

Comment 3 Jason Dillaman 2016-08-23 12:26:14 UTC
What do you mean by "map the image to a VM"? Are you just saying attach the image as a QEMU VM drive or are you mapping the image via krbd? Are all clients and OSDs at the same Ceph version? Can you provide logs?

Comment 4 Bhaskarakiran 2016-09-12 05:11:16 UTC
My apologies for the very late reply. I meant attaching the image as a QEMU vm drive. All the client  and OSD's have same ceph version. I will have to re-do to provide the logs. Will provide the logs at the earliest.

Comment 5 seb 2016-09-12 12:55:19 UTC
For clarity's sake, you have a containerized Ceph cluster deployed, then you are trying to boot VMs with specific Ceph features, correct?

Comment 6 Bhaskarakiran 2016-09-13 06:53:20 UTC
Yes.. its the containerized ceph cluster.

Comment 7 Jim Curtis 2016-09-15 03:44:32 UTC
Can you provide a copy of vagrant_variables.yml and group_vars/all, please.

Comment 9 Bhaskarakiran 2016-09-15 08:55:48 UTC
I will provide the files shortly.

Comment 10 Bhaskarakiran 2016-09-19 17:37:26 UTC
I have brought up the ceph cluster manually with 1 mon and 3 osd's. image is created with deep-flatten feature enabled and mapped it the virtual machine. 

Mon output:

[root@dhcp41-220 /]# rbd info libvirt-pool/librbd
rbd image 'librbd':
	size 102400 MB in 25600 objects
	order 22 (4096 kB objects)
	block_name_prefix: rbd_data.1036238e1f29
	format: 2
	features: deep-flatten
	flags: 
[root@dhcp41-220 /]# 

Error when VM is started:

Error starting domain: internal error: early end of file from monitor: possible problem:
2016-09-19T17:33:16.343831Z qemu-kvm: -drive file=rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789,if=none,id=drive-virtio-disk1,format=raw: error reading header from librbd
2016-09-19T17:33:16.345895Z qemu-kvm: -drive file=rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789,if=none,id=drive-virtio-disk1,format=raw: could not open disk image rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789: Could not open 'rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789': Function not implemented

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1423, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1029, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: early end of file from monitor: possible problem:
2016-09-19T17:33:16.343831Z qemu-kvm: -drive file=rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789,if=none,id=drive-virtio-disk1,format=raw: error reading header from librbd
2016-09-19T17:33:16.345895Z qemu-kvm: -drive file=rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789,if=none,id=drive-virtio-disk1,format=raw: could not open disk image rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789: Could not open 'rbd:libvirt-pool/librbd:id=libvirt:key=AQCYEOBX896oDhAAufuDMRq9eJtHelSSQGCfbA==:auth_supported=cephx\;none:mon_host=10.70.41.250\:6789': Function not implemented


VM boots if the feature is just layering.

[root@dhcp41-220 /]# rbd info libvirt-pool/librbd
rbd image 'librbd':
	size 102400 MB in 25600 objects
	order 22 (4096 kB objects)
	block_name_prefix: rbd_data.103b238e1f29
	format: 2
	features: layering
	flags: 
[root@dhcp41-220 /]#

Comment 11 seb 2016-09-20 08:40:11 UTC
Just to be sure features might be connected, can you apply the following in your ceph.conf?

rbd default features = 61

This should give you the following features: layering, exclusive-lock, object-map, fast-diff, deep-flatten

Comment 12 Bhaskarakiran 2016-09-21 11:34:12 UTC
I have put this line in ceph.conf and mapped the rbd image to the VM. It goes to a paused state when trying to boot.  Below is the error message shown :

Error starting domain: Timed out during operation: cannot acquire state change lock (held by remoteDispatchDomainCreate)

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1423, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1029, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Timed out during operation: cannot acquire state change lock (held by remoteDispatchDomainCreate)

Comment 13 seb 2016-09-22 12:40:30 UTC
I'm just not sure about this one, I'll try to bootstrap an OpenStack env and boot some VMs from a containerized Ceph.

Comment 14 seb 2016-09-23 10:35:42 UTC
I just built a setup for this, it consists of a DevStack running master and a containerized ceph using the ceph/demo container.

I was able to successfully boot a VM with the following features: layering, exclusive-lock, object-map, fast-diff, deep-flatten

In the end, I suspect you are experiencing a setup issue.

Can you describe your setup?
Thanks!

Comment 15 Bhaskarakiran 2016-09-26 06:34:17 UTC
I am running the ceph cluster on atomic hosts. 1 mon and 3 osd's and all are running as containers. created a rbd image and mapped this to a VM in virt. While creating the rbd image given the feature as deep-flatten. When the VM boots it throws out an error. While plain enabling of features on the image does work.

Comment 16 seb 2016-09-30 13:43:57 UTC
How do you boot your vms?

Comment 17 Bhaskarakiran 2016-10-03 05:26:13 UTC
From virt GUI. Tried CLI too but doesn't work.

Comment 18 seb 2016-10-03 16:18:06 UTC
No but is it libvirt+qemu-kvm?

Comment 19 Bhaskarakiran 2016-10-04 13:59:19 UTC
yes..

Comment 20 Jason Dillaman 2016-10-04 15:48:41 UTC
@Bhaskarakiran: I am fairly sure that you have an old librbd1 RPM (0.94.x series) on your libvirt host. The default version that ships w/ base RHEL does not support the newer RHCS 2.0 features.

Comment 21 Bhaskarakiran 2016-10-05 05:34:46 UTC
I will check that.

Let me know the latest RPM location / repo so that i verify the same and close on this at the earlist.

Comment 24 Bhaskarakiran 2016-10-05 14:16:35 UTC
Hmm yes.. i tried that as well with another librbd image. That too gave the same error / paused state.

Comment 28 Federico Lucifredi 2016-10-17 13:16:48 UTC
closing per #26.

Comment 29 Red Hat Bugzilla 2023-09-14 23:59:58 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days