Bug 1100848 - Repo with uploaded errata fails to publish
Summary: Repo with uploaded errata fails to publish
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.4 Beta
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 2.4.0
Assignee: Randy Barlow
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-23 15:05 UTC by Preethi Thomas
Modified: 2014-08-09 06:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-09 06:55:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2014-05-23 15:05:32 UTC
Description of problem:

Repo publish  fails with can not serialize error when the repo has uploaded errata

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

[root@ibm-x3250m4-04 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.18.beta.el6.noarch
[root@ibm-x3250m4-04 ~]# 
How reproducible:


Steps to Reproduce:
1.upload an erratum to a repo
2.run repo publish on the repo
3.

Actual results:
[root@ibm-x3250m4-04 ~]# pulp-admin rpm repo create --repo-id foo

Successfully created repository [foo]

[root@ibm-x3250m4-04 ~]# cat walrus.csv 
walrus,5.21,1,0,noarch,walrus-5.21-1.noarch.rpm,e837a635cc99f967a70f34b268baa52e0f412c1502e08e924ff5b09f1f9573f2,sha256,http://walrus.com/walrus-5.21-1.noarch.rpm
[root@ibm-x3250m4-04 ~]# 


[root@ibm-x3250m4-04 ~]# pulp-admin rpm repo uploads erratum --repo-id foo --erratum-id RHSA-2014:0000 --title Walrus --description Walrus --version 5.21 --release 1 --type security --status final --updated "2014-05-14 10:17:38" --issued "2014-05-14 10:17:52" -p walrus.csv --from "pthomas" -v
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing upload
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Importing into the repository...
This command may be exited via ctrl+c without affecting the request.


[\]
Running...

Task Succeeded


Deleting the upload request...
... completed

[root@ibm-x3250m4-04 ~]# pulp-admin rpm repo publish run --repo-id foo
+----------------------------------------------------------------------+
                      Publishing Repository [foo]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.


Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[-]
... completed

Publishing Delta RPMs
[-]
... completed

Publishing Errata
[-]
... failed
cannot serialize 1 (type int)


Task Failed

cannot serialize 1 (type int)

[root@ibm-x3250m4-04 ~]# 

Expected results:


Additional info:

Comment 1 Preethi Thomas 2014-05-23 16:01:16 UTC
log

May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR: Exception caught from plugin during publish for repo [foo]
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR: Traceback (most recent call last):
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/publish.py", line 126, in _do_publish
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     publish_report = publish_repo(transfer_repo, conduit, call_config)
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 473, in wrap_f
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     return f(*args, **kwargs)
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 130, in publish_repo
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     return self._publisher.publish()
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 323, in publish
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     self.process_lifecycle()
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 92, in process_lifecycle
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     step.process()
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 150, in process
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     self._process_block()
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/publish_step.py", line 562, in _process_block
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     self.process_unit(package_unit)
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/metadata/updateinfo.py", line 122, in add_unit_metadata
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     update_element_string = ElementTree.tostring(update_element, 'utf-8')
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 1009, in tostring
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     ElementTree(element).write(file, encoding)
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 663, in write
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     self._write(file, self._root, encoding, {})
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 707, in _write
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     self._write(file, n, encoding, namespaces)
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 705, in _write
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     file.write(_escape_cdata(node.text, encoding))
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 813, in _escape_cdata
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     _raise_serialization_error(text)
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:   File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 777, in _raise_serialization_error
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR:     "cannot serialize %r (type %s)" % (text, type(text).__name__)
May 23 10:59:13 ibm-x3250m4-04 pulp: pulp.server.managers.repo.publish:ERROR: TypeError: cannot serialize 1 (type int)

Comment 2 Randy Barlow 2014-05-27 21:16:00 UTC
https://github.com/pulp/pulp_rpm/pull/502

Comment 3 Randy Barlow 2014-05-29 18:07:25 UTC
This was fixed in pulp-2.4.0-0.19.beta.

Comment 4 Preethi Thomas 2014-06-04 20:33:08 UTC
verified
[root@hp-dl380pgen8-01 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.19.beta.fc20.noarch
[root@hp-dl380pgen8-01 ~]# 

[root@hp-dl380pgen8-01 ~]# pulp-admin rpm repo create --repo-id foo
Successfully created repository [foo]

[root@hp-dl380pgen8-01 ~]# 
[root@hp-dl380pgen8-01 ~]# vi walrus.csv
[root@hp-dl380pgen8-01 ~]# pulp-admin rpm repo uploads erratum --repo-id foo --erratum-id RHSA-2014:0000 --title Walrus --description Walrus --version 5.21 --release 1 --type security --status final --updated "2014-05-14 10:17:38" --issued "2014-05-14 10:17:52" -p walrus.csv --from "pthomas" -v
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing upload
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Importing into the repository...
This command may be exited via ctrl+c without affecting the request.


[\]
Running...

Task Succeeded


Deleting the upload request...
... completed

[root@hp-dl380pgen8-01 ~]# pulp-admin rpm repo publish run --repo-id foo
+----------------------------------------------------------------------+
                      Publishing Repository [foo]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.


Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[-]
... completed

Publishing Delta RPMs
[-]
... completed

Publishing Errata
[-]
... completed

Publishing Comps file
[-]
... completed

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Publishing files to web
[-]
... completed

Writing Listings File
[-]
... completed


Task Succeeded


[root@hp-dl380pgen8-01 ~]#

Comment 5 Randy Barlow 2014-08-09 06:55:05 UTC
This has been fixed in Pulp 2.4.0-1.


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