RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 853710 - 3.1 - [vdsm] deactivateStorageDomain fails due to "storage domain does not exist" (Problem with handler, treating as timeout)
Summary: 3.1 - [vdsm] deactivateStorageDomain fails due to "storage domain does not ex...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: vdsm
Version: 6.3
Hardware: All
OS: All
unspecified
urgent
Target Milestone: rc
: 6.4
Assignee: Federico Simoncelli
QA Contact: Dafna Ron
URL:
Whiteboard: storage
: 854295 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-02 10:06 UTC by Gadi Ickowicz
Modified: 2022-07-09 05:38 UTC (History)
13 users (show)

Fixed In Version: vdsm-4.9.6-39.0
Doc Type: Bug Fix
Doc Text:
When an ISO domain was blocked and deactivateStorageDomain was sent, it failed to deactivate the storage domain and showed a "storage domain does not exist" error. Due to this, the domain never switched to inactive, and instead cycled between locked and active in the engine. This patch removes a now redundant cache that caused the error, allowing domains to switch to inactive successfully.
Clone Of:
Environment:
Last Closed: 2012-12-04 19:09:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vdsm + engine logs (1.75 MB, application/x-bzip)
2012-09-02 10:06 UTC, Gadi Ickowicz
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1508 0 normal SHIPPED_LIVE Important: rhev-3.1.0 vdsm security, bug fix, and enhancement update 2012-12-04 23:48:05 UTC

Description Gadi Ickowicz 2012-09-02 10:06:38 UTC
Created attachment 609044 [details]
vdsm + engine logs

Description of problem:
When an iso domain is blocked and deactivateStorageDomain is sent, it fails to deactivate the storage domain with "storage domain does not exist" error.

Due to this, the domain never switches to inactive, and cycles between locked and active in engine.

Thread-776::ERROR::2012-08-30 13:43:16,192::task::853::TaskManager.Task::(_setError) Task=`88337d82-334f-4623-86d0-fb589b2e33a9`::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 988, in deactivateStorageDomain
    pool.deactivateSD(sdUUID, msdUUID, masterVersion)
  File "/usr/share/vdsm/storage/securable.py", line 63, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 1103, in deactivateSD
    masterDir = os.path.join(dom.domaindir, sd.MASTER_FS_DIR)
  File "/usr/share/vdsm/storage/sdc.py", line 47, in __getattr__
    dom = self.getRealDomain()
  File "/usr/share/vdsm/storage/sdc.py", line 51, in getRealDomain
    return self._cache._realProduce(self._sdUUID)
  File "/usr/share/vdsm/storage/sdc.py", line 123, in _realProduce
    dom = self._findDomain(sdUUID)
  File "/usr/share/vdsm/storage/sdc.py", line 147, in _findDomain
    raise se.StorageDomainDoesNotExist(sdUUID)
StorageDomainDoesNotExist: Storage domain does not exist: ('4e16961e-b86d-403b-8304-d3b5e8e409ff',)


during this time, repoStats continues to report the domain as valid:False, causing the continuous cycle back to locked:

Thread-785::INFO::2012-08-30 13:43:26,877::logUtils::39::dispatcher::(wrapper) Run and protect: repoStats, Return response: {'4e16961e-b86d-403b-8304-d3b5e8e409ff': {'delay': '0', 'lastCheck': 1346322697.6894541, 'code': 200, 'valid': False}, '81c9e011-46ac-4b1a-bb72-b22d0de3e6bd': {'delay': '0.015328168869', 'lastCheck': 1346323396.2141991, 'code': 0, 'valid': True}}


Version-Release number of selected component (if applicable):
4.9-31.0

How reproducible:


Steps to Reproduce:
1. Block an nfs iso storage domain
2. try to deactivate the storage domain
3. check logs / query engine for storage domain status
  
Actual results:
storage domain status cycles between active and locked

Expected results:
storage domain should be inactive

Additional info:

Comment 1 Gadi Ickowicz 2012-09-02 10:13:05 UTC
(In reply to comment #0)
> Created attachment 609044 [details]
> vdsm + engine logs
> 
> Description of problem:
> When an iso domain is blocked and deactivateStorageDomain is sent, it fails
> to deactivate the storage domain with "storage domain does not exist" error.
> 
> Due to this, the domain never switches to inactive, and cycles between
> locked and active in engine.
> 
> Thread-776::ERROR::2012-08-30
> 13:43:16,192::task::853::TaskManager.Task::(_setError)
> Task=`88337d82-334f-4623-86d0-fb589b2e33a9`::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 988, in deactivateStorageDomain
>     pool.deactivateSD(sdUUID, msdUUID, masterVersion)
>   File "/usr/share/vdsm/storage/securable.py", line 63, in wrapper
>     return f(self, *args, **kwargs)
>   File "/usr/share/vdsm/storage/sp.py", line 1103, in deactivateSD
>     masterDir = os.path.join(dom.domaindir, sd.MASTER_FS_DIR)
>   File "/usr/share/vdsm/storage/sdc.py", line 47, in __getattr__
>     dom = self.getRealDomain()
>   File "/usr/share/vdsm/storage/sdc.py", line 51, in getRealDomain
>     return self._cache._realProduce(self._sdUUID)
>   File "/usr/share/vdsm/storage/sdc.py", line 123, in _realProduce
>     dom = self._findDomain(sdUUID)
>   File "/usr/share/vdsm/storage/sdc.py", line 147, in _findDomain
>     raise se.StorageDomainDoesNotExist(sdUUID)
> StorageDomainDoesNotExist: Storage domain does not exist:
> ('4e16961e-b86d-403b-8304-d3b5e8e409ff',)
> 
> 
> during this time, repoStats continues to report the domain as valid:False,
> causing the continuous cycle back to locked:
> 
> Thread-785::INFO::2012-08-30
> 13:43:26,877::logUtils::39::dispatcher::(wrapper) Run and protect:
> repoStats, Return response: {'4e16961e-b86d-403b-8304-d3b5e8e409ff':
> {'delay': '0', 'lastCheck': 1346322697.6894541, 'code': 200, 'valid':
> False}, '81c9e011-46ac-4b1a-bb72-b22d0de3e6bd': {'delay': '0.015328168869',
> 'lastCheck': 1346323396.2141991, 'code': 0, 'valid': True}}

This exception is causing a timeout error in CrabRPC. 
Relevant log lines:
hread-459::WARNING::2012-08-30 13:36:49,390::remoteFileHandler::185::Storage.CrabRPCProxy::(callCrabRPCFunction) Problem with handler, treating as timeout
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/remoteFileHandler.py", line 177, in callCrabRPCFunction
    rawLength = self._recvAll(LENGTH_STRUCT_LENGTH, timeout)
  File "/usr/share/vdsm/storage/remoteFileHandler.py", line 143, in _recvAll
    raise Timeout()
Timeout
Thread-458::ERROR::2012-08-30 13:36:49,391::task::853::TaskManager.Task::(_setError) Task=`2b78c9e2-bec9-4e87-8b74-d842225bc0f4`::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 988, in deactivateStorageDomain
    pool.deactivateSD(sdUUID, msdUUID, masterVersion)
  File "/usr/share/vdsm/storage/securable.py", line 63, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 1103, in deactivateSD
    masterDir = os.path.join(dom.domaindir, sd.MASTER_FS_DIR)
  File "/usr/share/vdsm/storage/sdc.py", line 47, in __getattr__
    dom = self.getRealDomain()
  File "/usr/share/vdsm/storage/sdc.py", line 51, in getRealDomain
    return self._cache._realProduce(self._sdUUID)
  File "/usr/share/vdsm/storage/sdc.py", line 123, in _realProduce
    dom = self._findDomain(sdUUID)
  File "/usr/share/vdsm/storage/sdc.py", line 147, in _findDomain
    raise se.StorageDomainDoesNotExist(sdUUID)
StorageDomainDoesNotExist: Storage domain does not exist: ('4e16961e-b86d-403b-8304-d3b5e8e409ff',)


> 
> Version-Release number of selected component (if applicable):
> 4.9-31.0
> 
> How reproducible:
> 
> 
> Steps to Reproduce:
> 1. Block an nfs iso storage domain
> 2. try to deactivate the storage domain
> 3. check logs / query engine for storage domain status
>   
> Actual results:
> storage domain status cycles between active and locked
> 
> Expected results:
> storage domain should be inactive
> 
> Additional info:

Comment 4 Ayal Baron 2012-09-02 10:57:10 UTC
The code assumes that os.path.join cannot fail without considering that dom.domaindir could:

            else:
                masterDir = os.path.join(dom.domaindir, sd.MASTER_FS_DIR)

this is probably due to the move to domain proxies. Fede?
If so, we could have this problem in multiple places in the code.

Comment 5 Gadi Ickowicz 2012-09-05 14:51:51 UTC
Tested with http://gerrit.ovirt.org/#/c/7511/

Domain now deactivates successfully

Comment 6 Gadi Ickowicz 2012-09-05 15:02:33 UTC
*** Bug 854295 has been marked as a duplicate of this bug. ***

Comment 8 Ayal Baron 2012-09-12 06:07:02 UTC
(In reply to comment #5)
> Tested with http://gerrit.ovirt.org/#/c/7511/
> 
> Domain now deactivates successfully

Moving to POST according to this.

Comment 9 Haim 2012-10-17 11:29:30 UTC
clearing need info per C8.

Comment 12 Dafna Ron 2012-10-29 10:07:21 UTC
verified on si22.1

Comment 15 errata-xmlrpc 2012-12-04 19:09:17 UTC
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


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