Bug 1003285 - pulp_node.manifest.UnitWriter.close() uses the closed attribute on a GzipFile, which doesn't exist in Python 2.6
Summary: pulp_node.manifest.UnitWriter.close() uses the closed attribute on a GzipFile...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: nodes
Version: Master
Hardware: Unspecified
OS: Unspecified
medium
urgent
Target Milestone: ---
: 2.3.0
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-01 16:21 UTC by Randy Barlow
Modified: 2013-12-09 14:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-09 14:30:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Randy Barlow 2013-09-01 16:21:42 UTC
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.fp.close()
            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 21:25:20 UTC
This only occurs in pulp's master (2.3).

Comment 2 Michael Hrivnak 2013-09-03 21:26:07 UTC
https://github.com/pulp/pulp/pull/600

Comment 3 Michael Hrivnak 2013-09-10 14:28:19 UTC
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 22:36:13 UTC
build: 2.3.0-0.10.alpha

Comment 5 Preethi Thomas 2013-09-30 19:24:33 UTC
[root@pulp-node2 ~]# rpm -qa pulp-server

pulp-server-2.3.0-0.16.alpha.el6.noarch
[root@pulp-node2 ~]# 
[root@pulp-node2 ~]# rpm -qa pulp-nodes-child
pulp-nodes-child-2.3.0-0.16.alpha.el6.noarch
[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
+----------------------------------------------------------------------+

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

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



[root@pulp-v2-server ~]#

Comment 6 Preethi Thomas 2013-12-09 14:30:56 UTC
Pulp 2.3 released.


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