Project

Profile

Help

Issue #1643

closed

Not able to sync repos if you re create a deleted repo with the same feed and on_demand download policy.

Added by pthomas@redhat.com about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.8.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

If you delete a repo that had an on_demand download policy and then create another repo with the same feed of the deleted repo without removing ophans fails with "cannot concatenate 'str' and 'StringField' objects" error

[root@ibm-x3550m3-09 ~]#  pulp-admin iso repo create --repo-id iso --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_file_repo/ --download-policy on_demand 
Successfully created repository [iso]

[root@ibm-x3550m3-09 ~]# 
[root@ibm-x3550m3-09 ~]#  pulp-admin iso repo sync run --repo-id iso
+----------------------------------------------------------------------+
                     Synchronizing Repository [iso]
+----------------------------------------------------------------------+

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

Downloading the Pulp Manifest...
The Pulp Manifest was downloaded successfully.

There are no ISOs that need to be downloaded.

Task Succeeded

The repository was successfully published.

Task Succeeded

[root@ibm-x3550m3-09 ~]#  pulp-admin iso repo delete --repo-id iso
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Repository [iso] successfully deleted

[root@ibm-x3550m3-09 ~]# pulp-admin iso repo create --repo-id iso --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_file_repo/ 
Successfully created repository [iso]

[root@ibm-x3550m3-09 ~]# 
[root@ibm-x3550m3-09 ~]# 
[root@ibm-x3550m3-09 ~]# 
[root@ibm-x3550m3-09 ~]#  pulp-admin iso repo sync run --repo-id iso+----------------------------------------------------------------------+
                     Synchronizing Repository [iso]
+----------------------------------------------------------------------+

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

Task Failed

cannot concatenate 'str' and 'StringField' objects

[root@ibm-x3550m3-09 ~]# 
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[29377]: pulp.server.async.tasks:INFO: Task failed : [acb799b0-b990-4595-ae63-fc2e
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928) Task pulp.server.managers.repo.syn
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928) Traceback (most recent call last):
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     R = retval = fun(*args, **kwar
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     return super(Task, self).__cal
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     return super(PulpTask, self)._
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     return self.run(*args, **kwarg
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     sync_report = sync_repo(transf
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     return f(*args, **kwargs)
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     report = self.iso_sync.perform
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     self.sync_conduit.associate_ex
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     self._association_manager.asso
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     for unit_id in unit_id_list:
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     collection = content_types_db.
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     collection_name = unit_collect
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)   File "/usr/lib/python2.7/site-pa
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928)     return TYPE_COLLECTION_PREFIX 
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:ERROR: (28983-88928) TypeError: cannot concatenate 'str
Feb 08 21:47:19 ibm-x3550m3-09.lab.eng.brq.redhat.com pulp[28983]: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[8a
Feb 08 22:01:01 ibm-x3550m3-09.lab.eng.brq.redhat.com systemd[1]: Started Session 6 of user root.
Feb 08 22:01:01 ibm-x3550m3-09.lab.eng.brq.redhat.com systemd[1]: Starting Session 6 of user root.
Feb 08 22:01:01 ibm-x3550m3-09.lab.eng.brq.redhat.com CROND[29650]: (root) CMD (run-parts /etc/cron.hourly)
Feb 08 22:01:01 ibm-x3550m
Actions #1

Updated by ipanova@redhat.com about 8 years ago

there are more related issues to the fact of switching the policy for the same repo without cleaning orphans in between.

output after sync&publish with on_demand policy

ll /var/lib/pulp/published/yum/https/repos/repos/pulp/pulp/demo_repos/zoo/
total 132
lrwxrwxrwx. 1 apache apache  119 Feb  9 16:58 bear-4.1-1.noarch.rpm -> /var/lib/pulp/content/units/rpm/76/78177c241777af22235092f21c3932dd4f0664e1624e5a2c77a201ec70f930/bear-4.1-1.noarch.rpm
lrwxrwxrwx. 1 apache apache  120 Feb  9 16:58 camel-0.1-1.noarch.rpm -> /var/lib/pulp/content/units/rpm/77/17fd26f4f352d19bdeaa21b1fa16a3053fa9a7d0b5f69f88577108f8044120/camel-0.1-1.noarch.rpm
drwxr-sr-x. 2 apache apache 4096 Feb  9 16:58 repodata
.........snip......

remove and re-create repo wiht immediate policy.
Output after sync&publish

ll /var/lib/pulp/published/yum/https/repos/repos/pulp/pulp/demo_repos/zoo/
total 4
drwxr-sr-x. 2 apache apache 4096 Feb  9 16:58 repodata
# 
Actions #2

Updated by jortel@redhat.com about 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com
  • Platform Release set to 2.8.0

Added by jortel@redhat.com about 8 years ago

Revision ca5c1043 | View on GitHub

RPM importer needs to handle when unit already exists. closes #1643

Actions #3

Updated by ipanova@redhat.com about 8 years ago

  • Status changed from ASSIGNED to POST
Actions #4

Updated by jortel@redhat.com about 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #5

Updated by jortel@redhat.com about 8 years ago

  • Status changed from MODIFIED to ASSIGNED

https://github.com/pulp/pulp/pull/2407 fixes a similar issue in RPM and this needs to be fixed with a separate PR for ISOs.

Added by jortel@redhat.com about 8 years ago

Revision 7e10cd59 | View on GitHub

ISO importer handle when unit already exists. closes #1643

Actions #6

Updated by jortel@redhat.com about 8 years ago

  • Status changed from ASSIGNED to POST
  • Triaged changed from No to Yes
Actions #7

Updated by jortel@redhat.com about 8 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by dkliban@redhat.com about 8 years ago

  • Status changed from MODIFIED to 5
Actions #9

Updated by dkliban@redhat.com about 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #10

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF