Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1109103

Summary: [Admin Portal] Unable to detach POSIX-FS (vfs nfs type) domain
Product: [Retired] oVirt Reporter: Jiri Belka <jbelka>
Component: ovirt-engine-coreAssignee: Daniel Erez <derez>
Status: CLOSED CURRENTRELEASE QA Contact: Ori Gofen <ogofen>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5CC: acanan, amureini, bazulay, bugs, gklein, iheim, jbelka, mgoldboi, rbalakri, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: ovirt-engine-3.5.0_beta1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:19:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1107945    
Bug Blocks:    
Attachments:
Description Flags
sosreport-LogCollector-20140613110857.tar.xz
none
sosreport-LogCollector-20140618161836.tar.xz none

Description Jiri Belka 2014-06-13 09:12:03 UTC
Created attachment 908425 [details]
sosreport-LogCollector-20140613110857.tar.xz

Description of problem:
When detaching data domain (POSIX-FS - vfs type: NFS) I got following error in Admin Portal.

~~~
Operation Canceled
Error while executing action: A Request to the Server failed with the following Status Code: 500
~~~

vdsm.log reveals:

~~~
Thread-13::DEBUG::2014-06-13 11:02:16,825::BindingXMLRPC::325::vds::(wrapper) client [10.34.60.239] flowID [29c0b6d0]
Thread-13::DEBUG::2014-06-13 11:02:16,825::task::595::TaskManager.Task::(_updateState) Task=`f1bac832-02d6-46ab-b8c2-e078bf13bef7`::moving from state init -> state preparing
Thread-13::INFO::2014-06-13 11:02:16,825::logUtils::44::dispatcher::(wrapper) Run and protect: disconnectStorageServer(domType=6, spUUID='00000000-0000-0000-0000-000000000000', conList=[{'iqn': '', 'port': '', 'connection': '10.34.63.199:/jbelka/jb-ovirt35', 'mnt_options': 'noexec,nosuid,nodev', 'user': '', 'tpgt': '1', 'vfs_type': 'nfs', 'password': '******', 'id': 'f54acfb9-e6fd-4ef8-be49-f3003d449442'}], options=None)
Thread-13::DEBUG::2014-06-13 11:02:16,825::mount::202::Storage.Misc.excCmd::(_runcmd) '/usr/bin/sudo -n /bin/umount -f -l /rhev/data-center/mnt/10.34.63.199:_jbelka_jb-ovirt35' (cwd None)
Thread-13::ERROR::2014-06-13 11:02:16,834::hsm::2465::Storage.HSM::(disconnectStorageServer) Could not disconnect from storageServer
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/hsm.py", line 2461, in disconnectStorageServer
    conObj.disconnect()
  File "/usr/share/vdsm/storage/storageServer.py", line 235, in disconnect
    self._mount.umount(True, True)
  File "/usr/share/vdsm/storage/mount.py", line 229, in umount
    return self._runcmd(cmd, timeout)
  File "/usr/share/vdsm/storage/mount.py", line 214, in _runcmd
    raise MountError(rc, ";".join((out, err)))
MountError: (1, ';umount: /rhev/data-center/mnt/10.34.63.199:_jbelka_jb-ovirt35: not found\n')
~~~

Be aware that when moving this data domain into maintenance it is already unmounted from the host!

Version-Release number of selected component (if applicable):
vdsm-4.15.0-78.git349f848.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. add data domain: POSIX-FS/vfs type: NFS (there's no info why not!)
2. have all DC up
3. move data domain into maintenance
4. try to detach the data domain

Actual results:
Operation Canceled
Error while executing action: A Request to the Server failed with the following Status Code: 500

in UI and

MountError: (1, ';umount: /rhev/data-center/mnt/10.34.63.199:_jbelka_jb-ovirt35: not found\n')

in vdsm.log

Expected results:
should work

Additional info:

Comment 1 Daniel Erez 2014-06-17 13:46:45 UTC
Hi Jiri,

I've tried to reproduce the described scenario on latest build (3.5-alpha-2),
it seems to behave correctly; the same as using an NFS domain. Can you please upload the relevant engine log in which the DetachStorageDomainFromPoolCommand been invoked.

Comment 2 Jiri Belka 2014-06-17 14:01:41 UTC
If it is not in the logs collected by logcollector then I have no logs for that, see attachment.

Comment 3 Daniel Erez 2014-06-17 14:09:34 UTC
(In reply to Jiri Belka from comment #2)
> If it is not in the logs collected by logcollector then I have no logs for
> that, see attachment.

OK, then moving to ON_QA for reproduction/verification.

Comment 6 Jiri Belka 2014-06-18 14:21:08 UTC
Created attachment 910037 [details]
sosreport-LogCollector-20140618161836.tar.xz

I tried to reproduce again:

- adding posixfs-nfs failed twice with server error 500 code but I got the domain in Storage tab as detach
- attached the domain manually to the DC (3.4 DC/CL level)
- setting the domain into maintenance went successful
- detaching - Detach Storage dialog shows turning cycle and that's all in UI

Attaching new logs with DEBUG level for engine.

Comment 7 Daniel Erez 2014-06-18 15:17:04 UTC
When detaching a master SD without another active SD attached, a canDo message [1] should be displayed. The message is returned correctly when using the rest-api. It's seems to be missing in the UI due to bug 1107945.

[1] "Cannot remove the master Storage Domain from the Data Center without another active Storage Domain to take its place. -Either activate another Storage Domain in the Data Center, or remove the Data Center."

Comment 8 Ori Gofen 2014-07-29 12:49:47 UTC
verified on beta.2

Comment 9 Sandro Bonazzola 2014-10-17 12:19:54 UTC
oVirt 3.5 has been released and should include the fix for this issue.