Bug 1374302

Summary: Introduce python-scandir package which will be required by gluster-swift
Product: Red Hat Gluster Storage Reporter: Prashanth Pai <ppai>
Component: relengAssignee: Sreenath G <sgirijan>
Status: CLOSED ERRATA QA Contact: surabhi <sbhaloth>
Severity: medium Docs Contact:
Priority: medium    
Version: rhgs-3.1CC: amukherj, asrivast, rcyriac, rhs-bugs, sgirijan, sisharma, storage-qa-internal, thiago
Target Milestone: ---   
Target Release: RHGS 3.2.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-23 05:13:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1351528, 1351640, 1378424    

Description Prashanth Pai 2016-09-08 12:13:23 UTC
scandir() is a directory iteration function like os.listdir(), except that instead of returning a list of bare filenames, it yields DirEntry objects that include file type and stat information along with the name. Using scandir() increases the speed of os.walk() by 2-20 times (depending on the platform and file system) by avoiding unnecessary calls to os.stat() in most cases.

Upstream project: https://github.com/benhoyt/scandir
License: BSD License
Upstream Fedora dist-git repo: http://pkgs.fedoraproject.org/cgit/rpms/python-scandir.git/


Why is this new package necessary ?
A gluster-swift optimisation patch[1] (targeted for 3.2) makes use of scandir functionality if available. While the upstream gluster-swift project can use the scandir installed via pip (https://pypi.python.org/pypi/scandir), downstream product needs scandir to be packaged as a RPM.

[1]: https://review.gluster.org/#/c/14460/


What needs to be done ?
A dist-git repo needs to be created downstream to introduce the new package and subsequently build it to be included in RHGS.

Comment 2 Sreenath G 2016-09-19 11:52:23 UTC
rhgs-3.2.0-rhel-6 and rhgs-3.2.0-rhel-7 branches created for python-scandir dist-git package

http://pkgs.devel.redhat.com/cgit/rpms/python-scandir

Also added the package to whitelist for rhgs-3.2-rhel-6 and rhgs-3.2-rhel-7 brew tags. 

Before proceeding with build, please verify if there are any additional "Requires"/"BuildRequires" for this package.

Comment 4 Prashanth Pai 2016-09-20 06:27:01 UTC
@Sreenath G: There's only one such requirement:

BuildRequires:  python2-devel

Comment 5 Prashanth Pai 2016-09-20 10:59:14 UTC
Currently python-scandir package isn't used by swiftonfile builds yet. The next build of swiftonfile (whenever that happens) will be dependent on python-scandir. Until then python-scandir will be an unused orphaned package and shouldn't be added to errata.

The first build (el6 and el7) of python-scandir is available here:
https://brewweb.engineering.redhat.com/brew/packageinfo?packageID=59363

Comment 9 surabhi 2016-12-05 12:04:10 UTC
Upgrading to Swiftonfile build version swiftonfile-2.3.0-5.el7rhgs.noarch pulls in python-scandir-1.3-1.el7rhgs.x86_64 and upgrade happens successfully.
Marking the BZ verified.

Comment 11 errata-xmlrpc 2017-03-23 05:13:47 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.

https://rhn.redhat.com/errata/RHBA-2017-0488.html