Bug 1125388
Summary: | in some cases rpm publish of new repo fails once after upgrade from 2.3 | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Chris Duryee <cduryee> |
Component: | rpm-support | Assignee: | Chris Duryee <cduryee> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 2.4 Beta | CC: | pthomas, rbarlow, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | 2.5.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-11-24 21:33:58 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: | |
Embargoed: |
Description
Chris Duryee
2014-07-31 18:00:17 UTC
This happened to me today ☹ Here's an example of a "damaged" unit: In my database, I have this: …"_storage_path" : "/var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm"… But the file doesn't exist at that storage path. It exists in a subfolder of it called "Packages": $ ls -lah /var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/Packages/ total 8.3M drwxr-xr-x. 2 apache apache 4.0K Jun 2 20:13 . drwxr-xr-x. 3 apache apache 4.0K Jun 2 20:13 .. -rw-r--r--. 1 apache apache 8.3M Jun 2 20:13 Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm I'm rerunning the sync/publish now. If you don't hear from me again, send hel^W^W^W^W^W^W^W^W you can assume that the resync/republish trick mentioned above worked! It's me again. Chris's suggestion to rerun sync/publish did seem to work. The publish succeeded, and the generated repository can be used. However, I noticed that the old packages are left around on the filesystem, and are not detected as orphans: [rbarlow@limeade ~]$ ls -lah /var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/ total 8.3M drwxr-xr-x. 3 apache apache 4.0K Aug 26 17:19 . drwxr-xr-x. 3 apache apache 4.0K Jun 2 20:13 .. -rw-r--r--. 1 apache apache 8.3M Aug 26 17:19 Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm drwxr-xr-x. 2 apache apache 4.0K Jun 2 20:13 Packages [rbarlow@limeade ~]$ ls -lah /var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/Packages/ total 8.3M drwxr-xr-x. 2 apache apache 4.0K Jun 2 20:13 . drwxr-xr-x. 3 apache apache 4.0K Aug 26 17:19 .. -rw-r--r--. 1 apache apache 8.3M Jun 2 20:13 Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm These two files are not hardlinks to the same file: [rbarlow@limeade ~]$ stat /var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm File: `/var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm' Size: 8677763 Blocks: 16952 IO Block: 4096 regular file Device: fd00h/64768d Inode: 1434364 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 48/ apache) Gid: ( 48/ apache) Access: 2014-08-26 17:19:49.388661930 -0400 Modify: 2014-08-26 17:19:51.683662375 -0400 Change: 2014-08-26 17:19:51.926662425 -0400 [rbarlow@limeade ~]$ stat /var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/Packages/Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm File: `/var/lib/pulp/content/rpm/Deployment_Guide-as-IN/5.8/1.el5/noarch/f3f4e807e531735d60429adca4ac6292ac802b80/Packages/Deployment_Guide-as-IN-5.8-1.el5.noarch.rpm' Size: 8677763 Blocks: 16952 IO Block: 4096 regular file Device: fd00h/64768d Inode: 922068 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 48/ apache) Gid: ( 48/ apache) Access: 2014-08-26 12:07:55.171171763 -0400 Modify: 2014-06-02 20:13:51.241678922 -0400 Change: 2014-06-02 20:13:51.589678985 -0400 We will have to do something to clean this up for users who have upgraded. Unfortunately, it's not easy to detect whether files in /var/lib/content are part of units or not, because not every file in there has a storage path recorded in the database. We discussed this in-person yesterday. It appears that something may be changing _storage_path on the unit, which should not be happening. update: if you manually change the _storage_path of your units and move them on-disk to the new location then publish, the operation works as expected. Syncing repos that have units with non-standard paths also works as expected and does not create duplicate files. To repro this bz on a fresh 2.4 without upgrading, you need to manually change the _storage_path of your units, move the files to the new location, then add an additional repo that contains some units that were moved. This last step is the one that causes trouble. merged to master (should be in 2.5-dev as well once that is branched) build: 2.5.0-0.6.beta verified [root@cloud-qe-17 ~]# rpm -qa pulp-server pulp-server-2.5.0-0.11.beta.el6.noarch [root@cloud-qe-17 ~]# Upgraded from 2.3 ->2.5 with different types for content. pulp-manage-db ran without any errors had a rhel5 repo before the upgrade synced & published a second rhel5 repo without any errors |