Bug 1201263

Summary: [New] - Cannot create brick in UI when nodes are added to the cluster using JSON RPC.
Product: [oVirt] ovirt-engine Reporter: RamaKasturi <knarra>
Component: Frontend.WebAdminAssignee: Ramesh N <rnachimu>
Status: CLOSED CURRENTRELEASE QA Contact: RamaKasturi <knarra>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: bugs, gklein, lsurette, mgoldboi, rbalakri, rnachimu, sabose, yeylon, ykaul
Target Milestone: ovirt-3.6.0-rcFlags: rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
sasundar: testing_ack+
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1225828 (view as bug list) Environment:
Last Closed: 2016-02-10 12:58:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1187461, 1225828    

Description RamaKasturi 2015-03-12 12:24:56 UTC
Description of problem:
when clicking on the sync button under the Storage Devices sub tab, event message shows "Manually synced the storage devices from host <host_name>" but the devices are not synced.

Version-Release number of selected component (if applicable):
ovirt-engine-3.6.0-0.0.master.20150311183307.gite532c4a.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. create a cluster of version 3.6
2. Add a rhel7 host to the cluster. 
3. click on storage devices subtab 
4. click on the sync button.

Actual results:
Storage Devices does not get synced in the UI.

Expected results:
Storage Devices should get synced in the UI.

Additional info:

Comment 1 Ramesh N 2015-03-12 12:29:58 UTC
This is because of the latest change in blivet where unit also returned with the size of the device. 

Tim: can u adopt this change in VDSM?.

Comment 2 Timothy Asir 2015-03-13 09:23:14 UTC
patch sent to vdsm upstream: https://gerrit.ovirt.org/#/c/38707/

Comment 3 RamaKasturi 2015-03-25 06:19:53 UTC
This does not happen when user adds the node to cluster using json rpc.

Comment 4 RamaKasturi 2015-04-20 05:28:09 UTC
Moving this back as syncing storage devices is not possible when the nodes are added to the cluster using json rpc.

Comment 5 Ramesh N 2015-04-20 08:38:29 UTC
I think syncing the storage devices works with JSON. Only create brick is not working. 

I can see the following error in VDSM log. 

Tim: Can u check the log.

VDSM Log: 

Thread-1932::DEBUG::2015-04-20 13:50:57,904::__init__::445::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'GlusterHost.createBrick' in bridge with {u'mountPoint': u'/gluster-bricks/rhsc-ramesh-test-brick', u'brickName': u'rhsc-ramesh-test-brick', u'devices': [u'vdb1'], u'fsType': u'xfs'}
JsonRpc (StompReactor)::DEBUG::2015-04-20 13:50:58,259::stompReactor::94::Broker.StompAdapter::(handle_frame) Handling message <StompFrame command=u'SEND'>
JsonRpcServer::DEBUG::2015-04-20 13:50:58,260::__init__::482::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request
Thread-1933::DEBUG::2015-04-20 13:50:58,261::__init__::445::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'GlusterHost.list' in bridge with {}
JsonRpc (StompReactor)::DEBUG::2015-04-20 13:50:58,727::stompReactor::94::Broker.StompAdapter::(handle_frame) Handling message <StompFrame command=u'SEND'>
JsonRpcServer::DEBUG::2015-04-20 13:50:58,732::__init__::482::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request
Thread-1934::DEBUG::2015-04-20 13:50:58,734::stompReactor::158::yajsonrpc.StompServer::(send) Sending response
Thread-1933::DEBUG::2015-04-20 13:50:59,153::__init__::476::jsonrpc.JsonRpcServer::(_serveRequest) Return 'GlusterHost.list' in bridge with {'hosts': [{'status': 'CONNECTED', 'hostname': '192.168.122.1/24', 'uuid': '449579b7-d9ec-48b6-9f95-c82b86c15376'}]}
Thread-1933::DEBUG::2015-04-20 13:50:59,153::stompReactor::158::yajsonrpc.StompServer::(send) Sending response
JsonRpc (StompReactor)::DEBUG::2015-04-20 13:50:59,167::stompReactor::94::Broker.StompAdapter::(handle_frame) Handling message <StompFrame command=u'SEND'>
JsonRpcServer::DEBUG::2015-04-20 13:50:59,168::__init__::482::jsonrpc.JsonRpcServer::(serve_requests) Waiting for request
Thread-1935::DEBUG::2015-04-20 13:50:59,169::__init__::445::jsonrpc.JsonRpcServer::(_serveRequest) Calling 'GlusterVolume.list' in bridge with {}
Thread-1935::DEBUG::2015-04-20 13:50:59,252::__init__::476::jsonrpc.JsonRpcServer::(_serveRequest) Return 'GlusterVolume.list' in bridge with {'volumes': {}}
Thread-1935::DEBUG::2015-04-20 13:50:59,252::stompReactor::158::yajsonrpc.StompServer::(send) Sending response
Thread-1932::ERROR::2015-04-20 13:50:59,353::__init__::469::jsonrpc.JsonRpcServer::(_serveRequest) Internal server error
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/yajsonrpc/__init__.py", line 464, in _serveRequest
    res = method(**params)
  File "/usr/share/vdsm/rpc/Bridge.py", line 273, in _dynamicMethod
    result = fn(*methodArgs)
  File "/usr/share/vdsm/gluster/apiwrapper.py", line 87, in createBrick
    devList, fsType, raidParams)
  File "/usr/share/vdsm/gluster/api.py", line 62, in wrapper
    rv = func(*args, **kwargs)
  File "/usr/share/vdsm/gluster/api.py", line 594, in createBrick
    raidParams)
  File "/usr/share/vdsm/supervdsm.py", line 50, in __call__
    return callMethod()
  File "/usr/share/vdsm/supervdsm.py", line 48, in <lambda>
    **kwargs)
  File "<string>", line 2, in glusterCreateBrick
  File "/usr/lib64/python2.7/multiprocessing/managers.py", line 773, in _callmethod
    raise convert_to_error(kind, result)
ValueError: vg-/gluster-bricks/rhsc-ramesh-test-brick is not a valid name for this device

Comment 6 Timothy Asir 2015-05-13 10:30:11 UTC
It looks like there is a parameter name change in engine and vdsm.
The engine json should use the following names for the createBrick method
for the input parameters.

    createBrick(name, mountPoint, devList, fsType,raidParams)

Comment 7 Max Kovgan 2015-06-28 14:13:48 UTC
ovirt-3.6.0-3 release

Comment 8 RamaKasturi 2016-02-02 08:54:37 UTC
Tested with RHEV 3.6.2.6 and RHGS Nightly ( glusterfs-3.7.5-17.el7rhgs )

Brick creation is sucessful when nodes are added to RHEV UI in JSON RPC mode and devices get synced to UI.