Project

Profile

Help

Issue #4826

Pulp RPM Publish Comps File Error

Added by Anonymous over 1 year ago. Updated 9 months ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.19.0
Platform Release:
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Hello!

I have had an issue over the last little while since updating several Centos 7 boxes to 2.19. When the repos go to publish it would fail out during "Publishing Comps File" on all repos. Long story short I have tracked it down to a change was made in https://github.com/pulp/pulp_rpm/blame/2.19-release/plugins/pulp_rpm/plugins/distributors/yum/publish.py line 1181-1190. Now that sqliterepo_c is in use instead of createrepo_c (https://github.com/pulp/pulp_rpm/blame/c5f27803ad26dd8f5ff6c36b7d14f2a95e30ec25/plugins/pulp_rpm/plugins/distributors/yum/publish.py line 1179), sqliterepo_c doesnt know to look into the ./scratch folder in the job and fails out. More details below.

Problem:
Running a stock 2.19 on Centos fresh, installed for me hooked up to global repos would sync, but on publish would give the following (I turned on verbose sqliterepo_c output)

[root@test repodata]# pulp-admin rpm repo export run --repo-id centos7-x86_64-os-global
+----------------------------------------------------------------------+
            Publishing Repository [centos7-x86_64-os-global]
+----------------------------------------------------------------------+

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

Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[==================================================] 100%
10019 of 10019 items
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[-]
... completed

Publishing Modules
... skipped

Publishing Comps file
[=========================================         ] 83%
92 of 110 items

Task Failed

Error occurred during 'sqliterepo_c' execution:
::
15:16:48: Version:
0.10.0

15:16:48: Signal handler setup
15:16:48: cr_get_local_metadata:
/var/cache/pulp/reserved_resource_worker-3@test/96de374b-b164-454d-9c1f-20d6c18e5462/repodata/repomd.xml doesn't
exists
repomd.xml doesn't exist
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184) Exception caught from plugin during publish for repo [centos7-x86_64-os-global]
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184) Traceback (most recent call last):
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 1259, in _do_publish
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     publish_report = publish_repo(transfer_repo, conduit, call_config)
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 737, in wrap_f
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     return f(*args, **kwargs)
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/export_distributor/distributor.py", line 138, in publish_repo
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     return self._publisher.process_lifecycle()
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 572, in process_lifecycle
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     super(PluginStep, self).process_lifecycle()
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 163, in process_lifecycle
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     step.process()
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 256, in process
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     self._process_block()
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py", line 303, in _process_block
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     self.process_main()
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)   File "/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/yum/publish.py", line 1191, in process_main
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)     stderr=stderr)
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184) PulpCodedException: Error occurred during 'sqliterepo_c' execution:
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184) ::
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184) repomd.xml doesn't exist
May 14 17:32:34 test pulp[472707]: pulp.server.controllers.repository:ERROR: [25c1e177] (472707-25184)

Fix:
It should be looking in /var/cache/pulp/reserved_resource_worker-3@test/96de374b-b164-454d-9c1f-20d6c18e5462/scratch/repodata/repomd.xml instead.

I replaced publish.py with the last revision (using createrepo_c) and it worked right away. I also was able to get it to work with sqliterepo_c by adding '/scratch/' to the command. Both tested and gave me a working ISO. :)

History

#1 Updated by Anonymous over 1 year ago

Submitted a patch, not sure if thats how you would want to go about fixing or have another idea. https://github.com/pulp/pulp_rpm/pull/1343 But this does seem to fix 2.19, the version prod in the repo right now.

#2 Updated by Anonymous over 1 year ago

The plot thickens! If I run a sync now it errors out saying ./scratch doesnt exist, but then if I publish it works.

#3 Updated by daviddavis over 1 year ago

  • Project changed from Pulp to RPM Support

#4 Updated by ttereshc over 1 year ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 53

#5 Updated by Anonymous over 1 year ago

The dirty fix I have been using that works:

if os.path.isdir(self.content_dir + "/scratch/"):
                pipe = subprocess.Popen('sqliterepo_c --local-sqlite -f '
                                        '--checksum %(checksum_type)s '
                                        '%(content_dir)s/scratch/' %
                                        {'checksum_type': checksum_type,
                                        'content_dir': self.content_dir},
                                        shell=True, stdout=subprocess.PIPE,
                                        stderr=subprocess.PIPE)
else:   
                pipe = subprocess.Popen('sqliterepo_c --local-sqlite -f '
                                        '--checksum %(checksum_type)s '
                                        '%(content_dir)s' %
                                        {'checksum_type': checksum_type,
                                        'content_dir': self.content_dir},
                                        shell=True, stdout=subprocess.PIPE,
                                        stderr=subprocess.PIPE)

#6 Updated by dkliban@redhat.com over 1 year ago

I was unable to reproduce this issue. I synced and published CentOS and Pulp 2.19 repos using Pulp 2.19.0. Bother repos published comp files without error. I used the following createrepo_c package:

createrepo_c.x86_64                                                                                       0.10.0-6.el7                                                                                        @epel

#7 Updated by dkliban@redhat.com over 1 year ago

I just tried with createrepo_c-libs-0.10.0-18.el7.x86_64 and still could not reproduce.

#8 Updated by dkliban@redhat.com over 1 year ago

  • Sprint deleted (Sprint 53)

#9 Updated by dkliban@redhat.com over 1 year ago

  • Status changed from NEW to CLOSED - WORKSFORME

#10 Updated by kossusukka 9 months ago

I confirm this bug existence.

Pulp 2.20 installed, have 8 RPM repos which no one could be exported. All failing at exact same "Error occurred during 'sqliterepo_c'" error. Repos otherwise work ok, they sync OK and gets published ok. Repoview + SQliteDB generation works also at publishing.

Reproduce by setting --generate-sqlite=True (and possibly --repoview=True) using pulp-admin.

When i disabled both of these, export iso worked ok! When i enable both of these, problem reoccuirs.

I used dirty hack by "danberk" from post 5 and it works. Now i can export ISO when repoview (and required sqlite) is enabled, also sync+publish works.

Please register to edit this issue

Also available in: Atom PDF