| Summary: | pulp_node.manifest.UnitWriter.close() uses the closed attribute on a GzipFile, which doesn't exist in Python 2.6 | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Randy Barlow <rbarlow> |
| Component: | nodes | Assignee: | Jeff Ortel <jortel> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | urgent | Docs Contact: | |
| Priority: | medium | ||
| Version: | Master | CC: | mhrivnak |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | 2.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-12-09 14:30:56 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: | |
This only occurs in pulp's master (2.3). 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. build: 2.3.0-0.10.alpha [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 ~]#
Pulp 2.3 released. |
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.