<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Apr 7, 2017 at 2:40 AM Bill James &lt;<a href="mailto:bill.james@j2.com">bill.james@j2.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We are trying to convert our qa environment from local nfs to gluster.<br class="gmail_msg">
When I move a disk with a VM that is running on same server as the<br class="gmail_msg">
storage it fails.<br class="gmail_msg">
When I move a disk with VM running on a different system it works.<br class="gmail_msg">
<br class="gmail_msg">
VM running on same system as disk:<br class="gmail_msg">
<br class="gmail_msg">
2017-04-06 13:31:00,588 ERROR (jsonrpc/6) [virt.vm]<br class="gmail_msg">
(vmId=&#39;e598485a-dc74-43f7-8447-e00ac44dae21&#39;) Unable to start<br class="gmail_msg">
replication for vda to {u&#39;domainID&#39;:<br class="gmail_msg">
u&#39;6affd8c3-2c51-4cd1-8300-bfbbb14edbe9&#39;, &#39;volumeInfo&#39;: {&#39;domainID&#39;:<br class="gmail_msg">
u&#39;6affd8c3-2c<br class="gmail_msg">
51-4cd1-8300-bfbbb14edbe9&#39;, &#39;volType&#39;: &#39;path&#39;, &#39;leaseOffset&#39;: 0, &#39;path&#39;:<br class="gmail_msg">
u&#39;/rhev/data-center/mnt/glusterSD/ovirt1-ks.test.j2noc.com:_gv2/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5&#39;,<br class="gmail_msg">
&#39;volumeID&#39;: u&#39;30fd46c9-c738-4b13-aeca-3dc9ffc677f5&#39;, &#39;leasePath&#39;:<br class="gmail_msg">
u&#39;/rhev/data-center/mnt/glusterSD/ovirt1-ks.test.j2noc.com:_gv2/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5.lease&#39;,<br class="gmail_msg">
&#39;imageID&#39;: u&#39;7ae9b3f7-3507-4469-a080-d0944d0ab753&#39;}, &#39;diskType&#39;: &#39;file&#39;,<br class="gmail_msg">
&#39;format&#39;: &#39;cow&#39;, &#39;cache&#39;: &#39;none&#39;, u&#39;volumeID&#39;:<br class="gmail_msg">
u&#39;30fd46c9-c738-4b13-aeca-3dc9ffc677f5&#39;, u&#39;imageID&#39;:<br class="gmail_msg">
u&#39;7ae9b3f7-3507-4469-a080-d0944d0ab753&#39;, u&#39;poolID&#39;:<br class="gmail_msg">
u&#39;8b6303b3-79c6-4633-ae21-71b15ed00675&#39;, u&#39;device&#39;: &#39;disk&#39;, &#39;path&#39;:<br class="gmail_msg">
u&#39;/rhev/data-center/8b6303b3-79c6-4633-ae21-71b15ed00675/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5&#39;,<br class="gmail_msg">
&#39;propagateErrors&#39;: u&#39;off&#39;, &#39;volumeChain&#39;: [{&#39;domainID&#39;:<br class="gmail_msg">
u&#39;6affd8c3-2c51-4cd1-8300-bfbbb14edbe9&#39;, &#39;volType&#39;: &#39;path&#39;,<br class="gmail_msg">
&#39;leaseOffset&#39;: 0, &#39;path&#39;:<br class="gmail_msg">
u&#39;/rhev/data-center/mnt/glusterSD/ovirt1-ks.test.j2noc.com:_gv2/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/6756eb05-6803-42a7-a3a2-10233bf2ca8d&#39;,<br class="gmail_msg">
&#39;volumeID&#39;: u&#39;6756eb05-6803-42a7-a3a2-10233bf2ca8d&#39;, &#39;leasePath&#39;:<br class="gmail_msg">
u&#39;/rhev/data-center/mnt/glusterSD/ovirt1-ks.test.j2noc.com:_gv2/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/6756eb05-6803-42a7-a3a2-10233bf2ca8d.lease&#39;,<br class="gmail_msg">
&#39;imageID&#39;: u&#39;7ae9b3f7-3507-4469-a080-d0944d0ab753&#39;}, {&#39;domainID&#39;:<br class="gmail_msg">
u&#39;6affd8c3-2c51-4cd1-8300-bfbbb14edbe9&#39;, &#39;volType&#39;: &#39;path&#39;,<br class="gmail_msg">
&#39;leaseOffset&#39;: 0, &#39;path&#39;:<br class="gmail_msg">
u&#39;/rhev/data-center/mnt/glusterSD/ovirt1-ks.test.j2noc.com:_gv2/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5&#39;,<br class="gmail_msg">
&#39;volumeID&#39;: u&#39;30fd46c9-c738-4b13-aeca-3dc9ffc677f5&#39;, &#39;leasePath&#39;:<br class="gmail_msg">
u&#39;/rhev/data-center/mnt/glusterSD/ovirt1-ks.test.j2noc.com:_gv2/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5.lease&#39;,<br class="gmail_msg">
&#39;imageID&#39;: u&#39;7ae9b3f7-3507-4469-a080-d0944d0ab753&#39;}]} (vm:3594)<br class="gmail_msg">
Traceback (most recent call last):<br class="gmail_msg">
   File &quot;/usr/share/vdsm/virt/vm.py&quot;, line 3588, in diskReplicateStart<br class="gmail_msg">
     self._startDriveReplication(drive)<br class="gmail_msg">
   File &quot;/usr/share/vdsm/virt/vm.py&quot;, line 3713, in _startDriveReplication<br class="gmail_msg">
     self._dom.blockCopy(<a href="http://drive.name" rel="noreferrer" class="gmail_msg" target="_blank">drive.name</a>, destxml, flags=flags)<br class="gmail_msg">
   File &quot;/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py&quot;, line<br class="gmail_msg">
69, in f<br class="gmail_msg">
     ret = attr(*args, **kwargs)<br class="gmail_msg">
   File &quot;/usr/lib/python2.7/site-packages/vdsm/libvirtconnection.py&quot;,<br class="gmail_msg">
line 123, in wrapper<br class="gmail_msg">
     ret = f(*args, **kwargs)<br class="gmail_msg">
   File &quot;/usr/lib/python2.7/site-packages/vdsm/utils.py&quot;, line 941, in<br class="gmail_msg">
wrapper<br class="gmail_msg">
     return func(inst, *args, **kwargs)<br class="gmail_msg">
   File &quot;/usr/lib64/python2.7/site-packages/libvirt.py&quot;, line 684, in<br class="gmail_msg">
blockCopy<br class="gmail_msg">
     if ret == -1: raise libvirtError (&#39;virDomainBlockCopy() failed&#39;,<br class="gmail_msg">
dom=self)<br class="gmail_msg">
libvirtError: internal error: unable to execute QEMU command<br class="gmail_msg">
&#39;drive-mirror&#39;: Could not open<br class="gmail_msg">
&#39;/rhev/data-center/8b6303b3-79c6-4633-ae21-71b15ed00675/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5&#39;:<br class="gmail_msg">
Permission denied<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
[root@ovirt1 test vdsm]# ls -l<br class="gmail_msg">
/rhev/data-center/8b6303b3-79c6-4633-ae21-71b15ed00675/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5<br class="gmail_msg">
-rw-rw---- 2 vdsm kvm 197120 Apr  6 13:29<br class="gmail_msg">
/rhev/data-center/8b6303b3-79c6-4633-ae21-71b15ed00675/6affd8c3-2c51-4cd1-8300-bfbbb14edbe9/images/7ae9b3f7-3507-4469-a080-d0944d0ab753/30fd46c9-c738-4b13-aeca-3dc9ffc677f5<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Then if I try and rerun it it says, even though move failed:<br class="gmail_msg">
<br class="gmail_msg">
2017-04-06 13:49:27,197 INFO  (jsonrpc/1) [dispatcher] Run and protect:<br class="gmail_msg">
getAllTasksStatuses, Return response: {&#39;allT<br class="gmail_msg">
asksStatus&#39;: {&#39;078d962c-e682-40f9-a177-2a8b479a7d8b&#39;: {&#39;code&#39;: 212,<br class="gmail_msg">
&#39;message&#39;: &#39;Volume already exists&#39;, &#39;taskState&#39;:<br class="gmail_msg">
  &#39;finished&#39;, &#39;taskResult&#39;: &#39;cleanSuccess&#39;, &#39;taskID&#39;:<br class="gmail_msg">
&#39;078d962c-e682-40f9-a177-2a8b479a7d8b&#39;}}} (logUtils:52)<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
So now I have to clean up the disks that it failed to move so I can<br class="gmail_msg">
migrate the VM and then move the disk again.<br class="gmail_msg">
Or so it seems.<br class="gmail_msg">
Failed move disks do exist in new location, even though it &quot;failed&quot;.<br class="gmail_msg">
<br class="gmail_msg">
vdsm.log attached.<br class="gmail_msg">
<br class="gmail_msg">
ovirt-engine-tools-4.1.0.4-1.el7.centos.noarch<br class="gmail_msg">
vdsm-4.19.4-1.el7.centos.x86_64<br class="gmail_msg"></blockquote><div><br></div><div>Hi Bill,</div><div><br></div><div>Does it work after setting selinux to permissive? (setenforce 0)</div><div><br></div><div>Can you share output of:</div><div><br></div><div>ps -efZ | grep vm-name<br></div><div>(filter the specific vm) <br></div><div><br></div><div>ls -lhZ /rhev/data-center/mnt</div><div><br></div><div>ls -lhZ /rhev/data-center/mnt/gluster-server:_path/sd_id/images/img_id/vol_id</div><div>(assuming the volume was not deleted after the operation).</div><div><br></div><div>If the volume is not deleted after the failed move disk operation, this is likely</div><div>a bug, please file a bug for this.</div><div><br></div><div>The actual failure may be gluster configuration issue, or selinux related bug.</div><div><br></div><div>Nir</div><div> <br></div></div></div>