Bug 1115466 - reconstructMaster() takes exactly 10 arguments (9 given) when using jsonrpc
Summary: reconstructMaster() takes exactly 10 arguments (9 given) when using jsonrpc
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm-jsonrpc-java
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 3.5.0
Assignee: Piotr Kliczewski
QA Contact: Petr Beňas
URL:
Whiteboard: infra
Depends On: 1128761
Blocks: 1073943
TreeView+ depends on / blocked
 
Reported: 2014-07-02 12:20 UTC by Nir Soffer
Modified: 2016-02-10 19:32 UTC (History)
8 users (show)

Fixed In Version: ovirt-3.5.0-beta1.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:41:18 UTC
oVirt Team: Infra


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
oVirt gerrit 29510 master MERGED vdsm: Missing hostId parameter on reconstructMaster verb Never
oVirt gerrit 29511 master MERGED jsonrpc: Missing hostId parameter on reconstructMaster Never
oVirt gerrit 29861 ovirt-3.5 MERGED vdsm: Missing hostId parameter on reconstructMaster verb Never

Description Nir Soffer 2014-07-02 12:20:15 UTC
Description of problem:

When using jsonrpc, reconstractMaster send 8 arguemnts instead of 9 as specifed in the schema. The missing argument is the *first* one, the hostId.

The schema:

##
# @StoragePool.reconstructMaster:
#
# Recover a Storage Pool by reconstructing its Storage Domains.
#
# @storagepoolID:           The UUID of the Storage Pool 
#
# @name:                    A human-readable name for the Storage Pool 
#
# @masterSdUUID:            The UUID of the Storage Domain that will be used as
#                           the master domain
#
# @masterVersion:           The Storage Domain version of the master domain
#
# @domainDict:              Storage Domain statuses to be restored
#
# @lockRenewalIntervalSec:  The number of seconds to wait before renewing lease
#                           (Should be less than @leaseTimeSec).  0 selects the
#                           default value.
#
# @leaseTimeSec:            The maximum number of seconds that the leaseholder
#                           may retain the lease without renewing it.  0 selects
#                           the default value.
#
# @ioOpTimeoutSec:          The maximum number of seconds that an I/O operation
#                           may take to complete.  0 selects the default value.
#
# @leaseRetries:            The number of times to attempt lease renewal before
#                           failure.  0 selects the default value.
#
# Since: 4.10.0

What vdsm get from engine (formatted):

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 480, in _serveRequest
    res = method(**params)
  File "/usr/share/vdsm/rpc/Bridge.py", line 254, in _dynamicMethod
    raise InvalidCall(fn, methodArgs, e)
InvalidCall: Attempt to call function:
<bound method StoragePool.reconstructMaster of  
<API.StoragePool object at 0x7f6a74512c10>> with arguments:
(
    u'iscsi-fc', 
    u'83535395-46b5-4dcb-bd52-fa17385104bc', 
    73, 
    {   
        u'89d14514-8e2f-4003-be81-efcb73f95b3d': u'active',
        u'4b7e5cbc-d8e2-4af4-b92b-649fb578b126': u'active',
        u'beaabe72-cfd6-4a60-8073-91d7dbbd4417': u'active',
        u'ed438add-6956-4861-b2f3-48fc90e6b86c': u'active',
        u'f1bef1e2-27c7-4917-8541-e3f255c16fb0': u'active',
        u'e624fcf2-8a4e-4dcf-9022-6845bad5fb6d': u'active',
        u'20501ea5-cf6b-453a-b23d-a708c28cec1f': u'active',
        u'04511d19-f03a-469a-9e31-ab51d6e75a56': u'active',
        u'5cc85983-5560-4286-a5b0-79bc16707ec6': u'active',
        u'04e604d3-71eb-41e0-a8a3-74404bdd9d75': u'active', 
        u'f3b93f29-1bcb-4805-bb8b-d4fbfaf1db3b': u'active', 
        u'fc348be8-18f4-42ff-8421-9043203e13a6': u'active', 
        u'983111eb-5fea-4899-833b-305e6fb91b47': u'active',
        u'952ca72b-06db-4c86-8dab-9c5c7bb28a8e': u'active',
        u'8101ba55-358e-472e-b95e-10d88f39d145': u'active',
        u'09049dc6-2007-492e-afd9-3ec201775b2a': u'active',
        u'd827b717-0a9b-4643-8f87-836c0bd3ff8a': u'active',
        u'b22b31b7-274f-4e87-9204-7526323eb907': u'active',
        u'83535395-46b5-4dcb-bd52-fa17385104bc': u'active',
        u'c78c9416-0cd1-49b0-b73f-c1b2004c3721': u'active',
        u'b91abd0b-e9e6-41a1-a957-5808872aa4fc': u'active',
        u'e96f971d-dae4-4599-8ec0-32bd31b88781': u'active',
        u'b8d480ea-0456-4372-a329-cf4ddcac5722': u'active',
        u'22def38e-d9b0-40d9-92ee-d3e891061600': u'active',
        u'83f4e073-7a35-45a6-a8b2-c2c3ee592e38': u'active',
        u'a9d6c1ee-78d2-42f9-96a8-a700a8c3f40e': u'active',
        u'71c03a25-d4e7-4d73-951e-181244ae053c': u'active',
        u'4cdaa642-92a5-4cd5-a8f1-6e45a3c28456': u'active',
        u'78604e0f-8b12-45b2-82f7-2606a94e0c3b': u'active',
        u'f6bf09ed-0409-4e8d-b915-d72b21652fe9': u'active'
    },  
    5,  
    60, 
    10, 
    3   
)
error: reconstructMaster() takes exactly 10 arguments (9 given)

Becasue reconstract fails, data center is unusable and there
is no way to recover from this.

Version-Release number of selected component (if applicable):
3.5.0-0.0.master.20140630172346.git994996b.fc19

How reproducible:
Always

Steps to Reproduce:
1. Start reconstract flow

Comment 1 Nir Soffer 2014-07-02 12:41:51 UTC
Note: the schema is *incorrect* - the missing parameter is the hostId 
and not storagepoolID.

See vdsm/API.py:

    def reconstructMaster(self, hostId, name, masterSdUUID, masterVersion,
                          domainDict, lockRenewalIntervalSec, leaseTimeSec,
                      ioOpTimeoutSec, leaseRetries):
        lockPolicy = None   # Not used
        return self._irs.reconstructMaster(
            self._UUID, name, masterSdUUID, domainDict, masterVersion,
            lockPolicy, lockRenewalIntervalSec, leaseTimeSec, ioOpTimeoutSec,
            leaseRetries, hostId)

The pool id is is self._UUID and is not needed in this verb.

Comment 2 Petr Beňas 2014-08-06 08:31:20 UTC
Can you please provide more detailed steps to reproduce? How can one start the reconstract flow?

Comment 3 Allon Mureinik 2014-08-06 08:34:21 UTC
(In reply to Petr Beňas from comment #2)
> How can one start the reconstract flow?
1. Create a DC with two or more storage domains.
2. Move the master storage domain to maintenance - this should force the master to be reconstructed on another domain.

Comment 4 Petr Beňas 2014-08-26 13:46:58 UTC
Verified in  oVirt Engine Version: 3.5.0-0.0.master.20140821064931.gitb794d66.el6  with comment 3 steps

Comment 5 Sandro Bonazzola 2014-10-17 12:41:18 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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