Bug 1400534

Summary: Select host as SPM will raise 'Unhandled exception' (secured object is not in safe state) in the elected SPM host
Product: [oVirt] vdsm Reporter: Raz Tamir <ratamir>
Component: CoreAssignee: Nir Soffer <nsoffer>
Status: CLOSED CURRENTRELEASE QA Contact: Kevin Alon Goldblatt <kgoldbla>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.18.17CC: aefrat, amureini, bugs, knarra, lveyde, nsoffer, obockows, tnisan
Target Milestone: ovirt-4.1.2Flags: rule-engine: ovirt-4.1+
rule-engine: ovirt-4.2+
rule-engine: planning_ack+
amureini: devel_ack+
ratamir: testing_ack+
Target Release: 4.19.11   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-23 08:13:21 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:
Attachments:
Description Flags
vdsm log none

Description Raz Tamir 2016-12-01 12:58:50 UTC
Created attachment 1226821 [details]
vdsm log

Description of problem:
When selecting a new host as SPM, in it's vdsm.log an Unhandled exception is raised
from vdsm.log:
Thread-1470::ERROR::2016-12-01 14:52:27,358::utils::375::Storage.StoragePool::(wrapper) Unhandled exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/utils.py", line 372, in wrapper
    return f(*a, **kw)
  File "/usr/lib/python2.7/site-packages/vdsm/concurrent.py", line 177, in run
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/storage/securable.py", line 78, in wrapper
    return method(self, *args, **kwargs)
  File "/usr/share/vdsm/storage/sp.py", line 207, in _upgradePoolDomain
    self._finalizePoolUpgradeIfNeeded()
  File "/usr/lib/python2.7/site-packages/vdsm/storage/securable.py", line 76, in wrapper
    raise SecureError("Secured object is not in safe state")
SecureError: Secured object is not in safe state



Version-Release number of selected component (if applicable):
vdsm-4.18.17-1.el7ev.x86_64
ovirt-engine-4.0.6-0.1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Select new host as SPM
2.
3.

Actual results:
An Unhandled exception is raised in the elected host's logs

Expected results:


Additional info:

Comment 1 Raz Tamir 2016-12-01 16:25:04 UTC
*** Bug 1400622 has been marked as a duplicate of this bug. ***

Comment 2 Tal Nisan 2017-01-17 13:40:53 UTC
*** Bug 1381418 has been marked as a duplicate of this bug. ***

Comment 3 Nir Soffer 2017-02-23 19:03:35 UTC
Tal, I found the root cause while looking a similar issue, so I sent a fix. 
I hope you don't mind taking your bug :-)

Comment 4 Nir Soffer 2017-02-27 19:12:24 UTC
Fix merged upstream.

Tal, do we want a backport to 4.1?

Comment 7 Nir Soffer 2017-03-02 01:57:59 UTC
This is vdsm bug, not engine.

Comment 8 Tal Nisan 2017-03-08 14:34:56 UTC
Nir, please backport to 4.1 as well

Comment 9 Nir Soffer 2017-03-08 23:11:12 UTC
Patch backported, should be merged soon.

Comment 10 Nir Soffer 2017-03-17 23:18:03 UTC
No response from Olimp after more then 2 weeks, removing the customer ticket since
it is not related to this bug.

Comment 11 Kevin Alon Goldblatt 2017-04-27 12:51:16 UTC
Verified with the following code:
-----------------------------------
vdsm-4.19.11-1.el7ev.x86_64
ovirt-engine-4.1.2-0.1.el7.noarch
rhevm-4.1.2-0.1.el7.noarch


Verified with the following scenario:
----------------------------------------
1. Select a new host as SPM >>>>> works fine and no error is reported in the vdsm log


Moving to VERIFIED!