Previously, when using the Red Hat Enterprise Virtualization Manager portal to create an NFS data storage domain, an entry would be created regardless of whether or not the right path was provided to the mount command. As the manager assumed there was always a correct target, this could potentially cause serious data loss. This issue has been corrected so that if an incorrect path is provided, the action fails and the failed directory is cleaned automatically by the VDSM.
Description of problem:
1) create new storage domain from type NFS (using web-admin)
2) provide wrong path to mount command
3) check /rhev/data-center/mnt - new entry is added but not removed even after engine sent disconnectStorageServer to clean the failed mount.
behind the scene, it looks as follows:
Thread-3897::INFO::2012-08-30 13:37:14,350::logUtils::39::dispatcher::(wrapper) Run and protect: connectStorageServer, Return response: {'statuslist': [{'status': 477, 'id': '00000000-0000-0000-0000-000000000000'}]}
Thread-4047::INFO::2012-08-30 13:39:25,611::logUtils::37::dispatcher::(wrapper) Run and protect: connectStorageServer(domType=1, spUUID='00000000-0000-0000-0000-000000000000', conList=[{'retrans': '20', 'port': '', 'connection': '10.35.97.44:/pipi/popo', 'iqn': '', 'portal': '', 'user': '', 'password': '******', 'id': '00000000-0000-0000-0000-000000000000'}], options=None)
Thread-4047::DEBUG::2012-08-30 13:39:25,615::__init__::1164::Storage.Misc.excCmd::(_log) '/usr/bin/sudo -n /bin/mount -t nfs -o soft,nosharecache,timeo=600,retrans=20 10.35.97.44:/pipi/popo /rhev/data-center/mnt/10.35.97.44:_pipi_popo' (cwd None)
Thread-4120::INFO::2012-08-30 13:41:25,757::logUtils::37::dispatcher::(wrapper) Run and protect: disconnectStorageServer(domType=1, spUUID='00000000-0000-0000-0000-000000000000', conList=[{'retrans': '20', 'port': '', 'connection': '10.35.97.44:/pipi/popo', 'iqn': '', 'portal': '', 'user': '', 'password': '******', 'id': '00000000-0000-0000-0000-000000000000'}], options=None)
Thread-4120::DEBUG::2012-08-30 13:41:25,758::__init__::1164::Storage.Misc.excCmd::(_log) '/usr/bin/sudo -n /bin/umount -f -l /rhev/data-center/mnt/10.35.97.44:_pipi_popo' (cwd None)
Thread-4120::ERROR::2012-08-30 13:41:25,805::hsm::2045::Storage.HSM::(disconnectStorageServer) Could not disconnect from storageServer
File "/usr/share/vdsm/storage/hsm.py", line 2042, in disconnectStorageServer
return self._mountCon.disconnect()
self._mount.umount(True, True)
File "/usr/share/vdsm/storage/mount.py", line 226, in umount
File "/usr/share/vdsm/storage/mount.py", line 214, in _runcmd
MountError: (1, ';umount: /rhev/data-center/mnt/10.35.97.44:_pipi_popo: not mounted\n')
Thread-4120::INFO::2012-08-30 13:41:27,274::logUtils::39::dispatcher::(wrapper) Run and protect: disconnectStorageServer, Return response: {'statuslist': [{'status': 477, 'id': '00000000-0000-0000-0000-000000000000'}]}
Thread-4047::ERROR::2012-08-30 13:41:30,806::hsm::1971::Storage.HSM::(connectStorageServer) Could not connect to storageServer
File "/usr/share/vdsm/storage/hsm.py", line 1968, in connectStorageServer
return self._mountCon.connect()
self._mount.mount(self.options, self._vfsType)
File "/usr/share/vdsm/storage/mount.py", line 198, in mount
File "/usr/share/vdsm/storage/mount.py", line 214, in _runcmd
MountError: (32, ';mount.nfs: Connection timed out\n')
Thread-4047::INFO::2012-08-30 13:41:30,810::logUtils::39::dispatcher::(wrapper) Run and protect: connectStorageServer, Return response: {'statuslist': [{'status': 477, 'id': '00000000-0000-0000-0000-000000000000'}]}
new dir is not cleaned (even after vdsm restart).
[root@nott-vds1 ~]# ll /rhev/data-center/mnt/
total 208
drwxr-xr-x. 2 vdsm kvm 4096 Aug 30 13:39 10.35.97.44:_pipi_popo
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2012-1508.html
Description of problem: 1) create new storage domain from type NFS (using web-admin) 2) provide wrong path to mount command 3) check /rhev/data-center/mnt - new entry is added but not removed even after engine sent disconnectStorageServer to clean the failed mount. behind the scene, it looks as follows: Thread-3897::INFO::2012-08-30 13:37:14,350::logUtils::39::dispatcher::(wrapper) Run and protect: connectStorageServer, Return response: {'statuslist': [{'status': 477, 'id': '00000000-0000-0000-0000-000000000000'}]} Thread-4047::INFO::2012-08-30 13:39:25,611::logUtils::37::dispatcher::(wrapper) Run and protect: connectStorageServer(domType=1, spUUID='00000000-0000-0000-0000-000000000000', conList=[{'retrans': '20', 'port': '', 'connection': '10.35.97.44:/pipi/popo', 'iqn': '', 'portal': '', 'user': '', 'password': '******', 'id': '00000000-0000-0000-0000-000000000000'}], options=None) Thread-4047::DEBUG::2012-08-30 13:39:25,615::__init__::1164::Storage.Misc.excCmd::(_log) '/usr/bin/sudo -n /bin/mount -t nfs -o soft,nosharecache,timeo=600,retrans=20 10.35.97.44:/pipi/popo /rhev/data-center/mnt/10.35.97.44:_pipi_popo' (cwd None) Thread-4120::INFO::2012-08-30 13:41:25,757::logUtils::37::dispatcher::(wrapper) Run and protect: disconnectStorageServer(domType=1, spUUID='00000000-0000-0000-0000-000000000000', conList=[{'retrans': '20', 'port': '', 'connection': '10.35.97.44:/pipi/popo', 'iqn': '', 'portal': '', 'user': '', 'password': '******', 'id': '00000000-0000-0000-0000-000000000000'}], options=None) Thread-4120::DEBUG::2012-08-30 13:41:25,758::__init__::1164::Storage.Misc.excCmd::(_log) '/usr/bin/sudo -n /bin/umount -f -l /rhev/data-center/mnt/10.35.97.44:_pipi_popo' (cwd None) Thread-4120::ERROR::2012-08-30 13:41:25,805::hsm::2045::Storage.HSM::(disconnectStorageServer) Could not disconnect from storageServer File "/usr/share/vdsm/storage/hsm.py", line 2042, in disconnectStorageServer return self._mountCon.disconnect() self._mount.umount(True, True) File "/usr/share/vdsm/storage/mount.py", line 226, in umount File "/usr/share/vdsm/storage/mount.py", line 214, in _runcmd MountError: (1, ';umount: /rhev/data-center/mnt/10.35.97.44:_pipi_popo: not mounted\n') Thread-4120::INFO::2012-08-30 13:41:27,274::logUtils::39::dispatcher::(wrapper) Run and protect: disconnectStorageServer, Return response: {'statuslist': [{'status': 477, 'id': '00000000-0000-0000-0000-000000000000'}]} Thread-4047::ERROR::2012-08-30 13:41:30,806::hsm::1971::Storage.HSM::(connectStorageServer) Could not connect to storageServer File "/usr/share/vdsm/storage/hsm.py", line 1968, in connectStorageServer return self._mountCon.connect() self._mount.mount(self.options, self._vfsType) File "/usr/share/vdsm/storage/mount.py", line 198, in mount File "/usr/share/vdsm/storage/mount.py", line 214, in _runcmd MountError: (32, ';mount.nfs: Connection timed out\n') Thread-4047::INFO::2012-08-30 13:41:30,810::logUtils::39::dispatcher::(wrapper) Run and protect: connectStorageServer, Return response: {'statuslist': [{'status': 477, 'id': '00000000-0000-0000-0000-000000000000'}]} new dir is not cleaned (even after vdsm restart). [root@nott-vds1 ~]# ll /rhev/data-center/mnt/ total 208 drwxr-xr-x. 2 vdsm kvm 4096 Aug 30 13:39 10.35.97.44:_pipi_popo