Bug 1313297

Summary: [WALA][rhel6.7] error occurs when detach a disk on a running VM
Product: Red Hat Enterprise Linux 6 Reporter: Hu Zhang <huzhan>
Component: WALinuxAgentAssignee: Yue Zhang <yuezha>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7CC: huishao, leiwang, lizzha, mingzhan, wshi, yuxisun
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-12 09:24:52 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:

Description Hu Zhang 2016-03-01 11:00:12 UTC
Description of problem:
Error occurs when detach a disk on a running VM(rhel6.7). This disk is mounted to a mount point.
After detached, it's still in the mount list but removed from device list.
Same on Ubuntu. But could not reproduce on rhel7.2.
Meanwhile, on Azure, the disk will be detached even it is busy. But on hyper-v,
the disk will be detached only when it is not in use.

Version-Release number of selected component (if applicable):
WALinuxAgent-2.0.16-1.el6

How reproducible:
Always

Steps to Reproduce:
1. Attach a disk to a running VM.
2. Mount the disk.
# mount /dev/sdc1 /mnt/newdisk
3. Detach the disk on the azure portal.
4. Check the disk on VM
# mount  | grep /dev/sdc1
/dev/sdc1 on /mnt/newdisk1 type ext4 (rw)
# fdisk -l | grep sdc
#
# ls /mnt/newdisk
ls: reading directory /mnt/newdisk1: Input/output error
#

Actual results:
After detached, it's still in the mount list but removed from device list. And it returns an error
when do any manipulation on the mount point.

Expected results:
After detached, it shouldn't be in the mount list any more.
on Azure, the disk should not be detached when it is busy.

Additional info:

Comment 4 Yuxin Sun 2016-07-12 05:30:00 UTC
This issue also exists in RHEL-7.3. Doesn't exist in RHEL-7.2.

Comment 5 Yuxin Sun 2016-07-12 09:24:52 UTC
Compare with Hyper-V, the phenomenon is the same on both Azure and Hyper-V. So we think it is not a bug. Close it and modify the test case.