Bug 693218

Summary: Add new verb to fetch all file types from Iso domain
Product: Red Hat Enterprise Linux 6 Reporter: Maor <mlipchuk>
Component: vdsmAssignee: Igor Lvovsky <ilvovsky>
Status: CLOSED ERRATA QA Contact: Jakub Libosvar <jlibosva>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: abaron, bazulay, danken, iheim, ilvovsky, jlibosva, lpeer, sgrinber, tdosek, ykaul
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: vdsm-4.9-65.el6 Doc Type: Enhancement
Doc Text:
No description necessary
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 07:11:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
vdsm.log none

Description Maor 2011-04-03 16:44:01 UTC
Description of problem:
Right now ,to fetch specific file types from Iso domain, we use a specific verb for each file type like Iso or floppy.
As part of the new cache mechanism implementation for Iso domains in the backend side, The files are persisted in the DB,
so after this change, it would be a benefit, if VDSM will expose us a new API verb, which will get two parameters, 
one, the pool Id
second, the file type (code number).
(There will be support for a code that will retrieve all files types)

and will return a struct list, which will have the following parameters:
1. file size 
2. date created 
3. file type (which will be some kind of code).

By that, we can execute only one verb on the VDSM, that will fetch all the file types with the file type specified in the parameter.
Instead using many verbs, and getting list of Strings which will indicate the iso names or floppys.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2011-04-04 02:04:39 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Igor Lvovsky 2011-04-10 11:48:42 UTC
The new API was added to the vdsm to get files list from ISO domain: 
   
 getFileList(sdUUID, extension = None)

sdUUID  - Iso domain's UUID
extension - file's extension filter

To get whole file list, call  getFileList() without 'extension' parameter at all.


Return value:
 dictionary per file
   'files' : {'file1.vfd' : {'status': 0, 'ext': 'vfd', 
                              'ctime': 1302419597.5658536, 'size': 0},
              'file2.iso' : {'status': 0, 'ext': 'iso',
                             'ctime': 1302419597.5077033, 'size': 0}
             }

Comment 6 Jakub Libosvar 2011-05-06 06:40:01 UTC
Created attachment 497293 [details]
vdsm.log

On host is python-2.6.6-20.el6.x86_64. When attempting to get the whole file list, I got this traceback that int exceeds XML-RPC limits.

vdsClient -s 0 getFileList 72095733-4157-4ef9-b68b-163ee5385c90
Traceback (most recent call last):
  File "/usr/share/vdsm/vdsClient.py", line 2025, in <module>
    code, message = commands[command][0](commandArgs)
  File "/usr/share/vdsm/vdsClient.py", line 985, in getFileList
    response = self.s.getFileList(*args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib64/python2.6/site-packages/M2Crypto/m2xmlrpclib.py", line 64, in request
    return self.parse_response(h.getfile())
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1361, in parse_response
    return self._parse_response(file, None)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
Fault: <Fault 1: "<type 'exceptions.OverflowError'>:int exceeds XML-RPC limits">

If I use 'iso' or 'vfd' as extension, nothing is returned. There are some files on iso domain. In RHEVM files in iso are shown correctly.

Comment 7 Igor Lvovsky 2011-05-08 11:40:56 UTC
http://gerrit.usersys.redhat.com/#change,375

Comment 9 Tomas Dosek 2011-05-17 07:45:51 UTC
Verified - vdsm-4.9-65.el6 - checked the new vdsClient commands - all work and return right information.

Comment 10 Ayal Baron 2011-11-22 12:59:51 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description necessary

Comment 11 errata-xmlrpc 2011-12-06 07:11:50 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/RHEA-2011-1782.html