Bug 1003285 - pulp_node.manifest.UnitWriter.close() uses the closed attribute on a GzipFile, which doesn't exist in Python 2.6
pulp_node.manifest.UnitWriter.close() uses the closed attribute on a GzipFile...
Product: Pulp
Classification: Community
Component: nodes (Show other bugs)
Unspecified Unspecified
medium Severity urgent
: ---
: 2.3.0
Assigned To: Jeff Ortel
Preethi Thomas
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-09-01 12:21 EDT by Randy Barlow
Modified: 2013-12-09 09:30 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-09 09:30:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Randy Barlow 2013-09-01 12:21:42 EDT
The close() method of the UnitWriter class looks like this:

def close(self):
        Close and compress the associated file.  This method is idempotent.
        :return: The number of units written.
        :rtype: int
        if not self.fp.closed:
            self.bytes_written = os.path.getsize(self.path)
        return self.total_units

The self.fp.closed line raises an AttributeError in Python 2.6, because the GzipFile object doesn't have that attribute.
Comment 1 Michael Hrivnak 2013-09-03 17:25:20 EDT
This only occurs in pulp's master (2.3).
Comment 2 Michael Hrivnak 2013-09-03 17:26:07 EDT
Comment 3 Michael Hrivnak 2013-09-10 10:28:19 EDT
I believe there was a discovery that the unit tests were passing an opened gzip file, but that the actual use in-code passes in a regular open file object. If that is true, then the pull request above should be closed, and a new one submitted that fixes the tests.
Comment 4 Jeff Ortel 2013-09-12 18:36:13 EDT
build: 2.3.0-0.10.alpha
Comment 5 Preethi Thomas 2013-09-30 15:24:33 EDT
[root@pulp-node2 ~]# rpm -qa pulp-server

[root@pulp-node2 ~]# 
[root@pulp-node2 ~]# rpm -qa pulp-nodes-child
[root@pulp-node2 ~]# 

[root@pulp-v2-server ~]# pulp-admin node sync run --node-id node2
This command may be exited via ctrl+c without affecting the request.

Waiting to begin...

(1/2) Repository: errata-install
[==================================================] 100%

(2/2) Repository: zoo
[==================================================] 100%

Synchronization succeeded

                       Child Node Synchronization

  Action: Merged
  Id:     errata-install
    Added:   0
    Removed: 0
    Updated: 0

  Action: Added
  Id:     zoo
    Added:   0
    Removed: 0
    Updated: 39

[root@pulp-v2-server ~]#
Comment 6 Preethi Thomas 2013-12-09 09:30:56 EST
Pulp 2.3 released.

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