Bug 833381 - 3.1 - [Storage] Disconnect storage pool thorough an exception.
3.1 - [Storage] Disconnect storage pool thorough an exception.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Eduardo Warszawski
Haim
Storage
: Regression, TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 07:11 EDT by Leonid Natapov
Modified: 2014-07-01 07:59 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-12 04:29:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
vdsm log (948.39 KB, application/octet-stream)
2012-06-19 07:11 EDT, Leonid Natapov
no flags Details

  None (edit)
Description Leonid Natapov 2012-06-19 07:11:19 EDT
Created attachment 592915 [details]
vdsm log

[Storage] Disconnect storage pool thorough an exception.
I was trying to switch to maintenance Master SD. Here is the exception.
When I tried to activate Master I got another exception saying that version or spm id is invalid. It described in BZ833084. This bug and the current bug might be related. VDSM log attached.

Thread-4128::DEBUG::2012-06-19 12:37:39,654::BindingXMLRPC::156::vds::(wrapper) [10.35.97.32]
Thread-4128::DEBUG::2012-06-19 12:37:39,654::task::588::TaskManager.Task::(_updateState) Task=`fe864837-2276-4a68-9d47-abbd3a88136d`::moving from
state init -> state preparing
Thread-4128::INFO::2012-06-19 12:37:39,655::logUtils::37::dispatcher::(wrapper) Run and protect: disconnectStoragePool(spUUID='347bb22d-598b-44bc-
8b05-e1b176d30bef', hostID=1, scsiKey='347bb22d-598b-44bc-8b05-e1b176d30bef', remove=False, options=None)
Thread-4128::DEBUG::2012-06-19 12:37:39,655::resourceManager::175::ResourceManager.Request::(__init__) ResName=`Storage.347bb22d-598b-44bc-8b05-e1
b176d30bef`ReqID=`94da7613-f0f8-4a08-a690-74e0a2a830c1`::Request was made in '/usr/share/vdsm/storage/resourceManager.py' line '485' at 'registerR
esource'
Thread-4128::DEBUG::2012-06-19 12:37:39,655::resourceManager::486::ResourceManager::(registerResource) Trying to register resource 'Storage.347bb2
2d-598b-44bc-8b05-e1b176d30bef' for lock type 'exclusive'
Thread-4128::DEBUG::2012-06-19 12:37:39,655::resourceManager::528::ResourceManager::(registerResource) Resource 'Storage.347bb22d-598b-44bc-8b05-e
1b176d30bef' is free. Now locking as 'exclusive' (1 active user)
Thread-4128::DEBUG::2012-06-19 12:37:39,656::resourceManager::212::ResourceManager.Request::(grant) ResName=`Storage.347bb22d-598b-44bc-8b05-e1b17
6d30bef`ReqID=`94da7613-f0f8-4a08-a690-74e0a2a830c1`::Granted request
Thread-4128::DEBUG::2012-06-19 12:37:39,656::task::817::TaskManager.Task::(resourceAcquired) Task=`fe864837-2276-4a68-9d47-abbd3a88136d`::_resourc
esAcquired: Storage.347bb22d-598b-44bc-8b05-e1b176d30bef (exclusive)
Thread-4128::DEBUG::2012-06-19 12:37:39,656::task::978::TaskManager.Task::(_decref) Task=`fe864837-2276-4a68-9d47-abbd3a88136d`::ref 1 aborting Fa
lse
Thread-4128::INFO::2012-06-19 12:37:39,657::sp::659::Storage.StoragePool::(disconnect) Disconnect from the storage pool 347bb22d-598b-44bc-8b05-e1
b176d30bef
Thread-4128::ERROR::2012-06-19 12:37:39,657::task::853::TaskManager.Task::(_setError) Task=`fe864837-2276-4a68-9d47-abbd3a88136d`::Unexpected erro
r
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 861, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 38, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 901, in disconnectStoragePool
    return self._disconnectPool(pool, hostID, scsiKey, remove)
  File "/usr/share/vdsm/storage/hsm.py", line 905, in _disconnectPool
Comment 3 Eduardo Warszawski 2012-07-12 04:29:20 EDT
The complete trace is:

Thread-4128::ERROR::2012-06-19 12:37:39,657::task::853::TaskManager.Task::(_setError) Task=`fe864837-2276-4a68-9d47-abbd3a88136d`::Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/task.py", line 861, in _run
    return fn(*args, **kargs)
  File "/usr/share/vdsm/logUtils.py", line 38, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/storage/hsm.py", line 901, in disconnectStoragePool
    return self._disconnectPool(pool, hostID, scsiKey, remove)
  File "/usr/share/vdsm/storage/hsm.py", line 905, in _disconnectPool
    res = pool.disconnect()
  File "/usr/share/vdsm/storage/sp.py", line 677, in disconnect
    fileUtils.safeUnlink(self._poolFile)
AttributeError: 'module' object has no attribute 'safeUnlink'

The actual master code uses os.unlink() instead the inexistent fileUtils.safeUnlink().
The same is true for the 3.1 and 3.0 branches.
Our git history show no traces of fileUtils.safeUnlink() calls.
Seems that this bug was present only in a private build.
Please verify on an official build and reopen if reproduced.

Note You need to log in before you can comment on or make changes to this bug.