Bug 739962

Summary: VDSM - Storage: Can't activate formerly broken domain
Product: [Retired] oVirt Reporter: Daniel Paikov <dpaikov>
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abaron, amureini, bazulay, danken, hateya, iheim, ykaul
Target Milestone: ---   
Target Release: 3.3.4   
Hardware: Unspecified   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-30 22:51:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
vdsm.log none

Description Daniel Paikov 2011-09-20 14:46:59 UTC
Created attachment 524051 [details]
vdsm.log

* Pool with one data domain.
* Backup metadata; corrupt domain by echo 1 > metadata.
* RHEVM sets domain to Inactive.
* Overwrite metadata with the backed up metadata.
* Try to activate the domain.
* Activate fails, even though metadata is now ok. Setup goes back to normal only after maintenance/activate of host.

The failure in RHEVM looks like this:
Error connecting to the Storage Pool Manager service.
Possible reasons:
 - Storage Pool Manager service is in non-active state.
 - No Active Host in the Data Center.
(Error code: 5009)

The failure in VDSM looks like this:
Thread-5769::ERROR::2011-09-20 17:42:39,399::dispatcher::103::Storage.Dispatcher.Protect::(run) {'status': {'message': "Meta Data parameter i
nvalid: ('Version or spm id invalid',)", 'code': 755}}
Thread-4307::ERROR::2011-09-20 17:42:41,967::sp::103::Storage.StatsThread::(run) Unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/storage/sp.py", line 98, in run
    stats, code = self._statsfunc(self._domain)
  File "/usr/share/vdsm/storage/sp.py", line 1292, in _repostats
    stats['masterValidate'] = domain.validateMaster()
  File "/usr/share/vdsm/storage/sd.py", line 438, in validateMaster
    if not self.isMaster():
  File "/usr/share/vdsm/storage/sd.py", line 661, in isMaster
    return self.getMetaParam(DMDK_ROLE).capitalize() == MASTER_DOMAIN
  File "/usr/share/vdsm/storage/sd.py", line 621, in getMetaParam
    return self._metadata[key]
  File "/usr/share/vdsm/storage/persistentDict.py", line 63, in __getitem__
    return dec(self._dict[key])
  File "/usr/share/vdsm/storage/persistentDict.py", line 173, in __getitem__
    raise KeyError(key)
KeyError: 'ROLE'

Comment 2 Dan Kenigsberg 2011-10-03 16:36:03 UTC
since this is a second-order problem, I'm pushing this to upstream - unless this is shown to break a common use case.

Comment 3 Itamar Heim 2013-01-30 22:51:40 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.