Project

Profile

Help

Issue #3047

ISO repo doesn't correctly handle updates to files for content already in Pulp

Added by daviddavis about 2 years ago. Updated 5 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
2.14.3
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
Yes
Verification Required:
No
Sprint:

Description

In an earlier issue we handled updates to files in ISO repos when the file was being uploaded or resynced:

https://pulp.plan.io/issues/2773

I forgot to handle the case though where the file already exists in pulp and gets added to a repo. Steps to reproduce:

1. Create 2 two repos and sync them both. I recommend using file paths as feeds.
2. Edit an iso in the repo and make sure you update the PULP_MANIFEST file
3. Re-sync repo 1
4. Re-sync repo 2

Expected results:

Each repo has 1 iso unit.

Actual results:

The first repo has 1 unit while the second repo has 2 units. This is because the code that does the association of existing content to repo 2 was never updated in #2773.


Related issues

Related to RPM Support - Issue #2773: ISO repo does not handle updates to files on manifest during re-sync correctly CLOSED - CURRENTRELEASE Actions
Related to RPM Support - Issue #3100: Removal of existing iso units doesn't work if there are multiple iso files CLOSED - CURRENTRELEASE Actions

Associated revisions

Revision 386a3a11 View on GitHub
Added by daviddavis about 2 years ago

Calling method to remove old isos by name before associating them

fixes #3047
https://pulp.plan.io/issues/3047

Revision a2abfe40 View on GitHub
Added by daviddavis almost 2 years ago

Calling method to remove old isos by name before associating them

fixes #3047
https://pulp.plan.io/issues/3047

(cherry picked from commit 386a3a110a673e8e50af3bdca74d3aba18928eed)

History

#1 Updated by daviddavis about 2 years ago

  • Related to Issue #2773: ISO repo does not handle updates to files on manifest during re-sync correctly added

#3 Updated by daviddavis about 2 years ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis

#4 Updated by amacdona@redhat.com about 2 years ago

  • Triaged changed from No to Yes

#5 Updated by daviddavis about 2 years ago

  • Status changed from POST to MODIFIED

#6 Updated by pthomas@redhat.com about 2 years ago

  • Smash Test set to 784

#7 Updated by pcreech almost 2 years ago

  • Platform Release set to 2.14.2

#9 Updated by pcreech almost 2 years ago

  • Status changed from MODIFIED to ON_QA

#11 Updated by daviddavis almost 2 years ago

  • Status changed from ON_QA to ASSIGNED

Reopening since this issue doesn't seem fully fixed. Here's a test case:


export REPO1='iso-1'
export REPO2='iso-2'
mkdir /tmp/iso
cd /tmp/iso

echo "test1" > 1.iso
echo "test2" > 2.iso
echo 1.iso,`sha256sum 1.iso | awk '{ print $1 }'`,`stat -L -c '%s' 1.iso` > PULP_MANIFEST
echo 2.iso,`sha256sum 2.iso | awk '{ print $1 }'`,`stat -L -c '%s' 2.iso` >> PULP_MANIFEST

pulp-admin iso repo create --repo-id $REPO1 --feed file:///tmp/iso
pulp-admin iso repo sync run --repo-id $REPO1
pulp-admin iso repo create --repo-id $REPO2 --feed file:///tmp/iso
pulp-admin iso repo sync run --repo-id $REPO2

echo "blah1" > 1.iso
echo "blah2" > 2.iso
echo 1.iso,`sha256sum 1.iso | awk '{ print $1 }'`,`stat -L -c '%s' 1.iso` > PULP_MANIFEST
echo 2.iso,`sha256sum 2.iso | awk '{ print $1 }'`,`stat -L -c '%s' 2.iso` >> PULP_MANIFEST

pulp-admin iso repo sync run --repo-id $REPO1
pulp-admin iso repo sync run --repo-id $REPO2

pulp-admin iso repo list

Repos end up with 3 iso units instead of 2.

#12 Updated by daviddavis almost 2 years ago

  • Status changed from ASSIGNED to ON_QA

Opened a separate issue for comment#11:

https://pulp.plan.io/issues/3100

#13 Updated by daviddavis almost 2 years ago

  • Related to Issue #3100: Removal of existing iso units doesn't work if there are multiple iso files added

#14 Updated by pcreech almost 2 years ago

  • Status changed from ON_QA to POST
  • Platform Release deleted (2.14.2)

Removing this from the issues that landed for 2.14.2 after some in person discussion. The code that has landed so far will remain in 2.14.2, but this wlll be considered resolved when other issues tied to it are in modified as well.

#15 Updated by pcreech almost 2 years ago

  • Status changed from POST to MODIFIED

This shold've been put on modified, not post

#16 Updated by pcreech almost 2 years ago

  • Platform Release set to 2.14.3

#17 Updated by pthomas@redhat.com almost 2 years ago

  • Status changed from MODIFIED to ON_QA

#18 Updated by pthomas@redhat.com almost 2 years ago

  • Verified changed from No to Yes

Verified

[root@intel-sharkbay-dh-02 iso]# pulp-admin iso repo create --repo-id iso-1 --feed file:///tmp/iso
Successfully created repository [iso-1]

[root@intel-sharkbay-dh-02 iso]# pulp-admin iso repo sync run --repo-id iso-1
+----------------------------------------------------------------------+
                    Synchronizing Repository [iso-1]
+----------------------------------------------------------------------+

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

The Pulp Manifest was downloaded successfully.

Downloading 2 ISOs...
[==================================================] 100%
ISOs: 2/2    Data: 12 B/12 B    Avg: 12 B/s

Successfully downloaded 2 ISOs.

Task Succeeded

The repository was successfully published.

Task Succeeded

[root@intel-sharkbay-dh-02 iso]# pulp-admin iso repo create --repo-id iso-2 --feed file:///tmp/iso
Successfully created repository [iso-2]

[root@intel-sharkbay-dh-02 iso]# pulp-admin iso repo sync run --repo-id iso-2
+----------------------------------------------------------------------+
                    Synchronizing Repository [iso-2]
+----------------------------------------------------------------------+

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

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@intel-sharkbay-dh-02 iso]# echo "blah1" > 1.iso
[root@intel-sharkbay-dh-02 iso]# echo "blah2" > 2.iso
[root@intel-sharkbay-dh-02 iso]# echo 1.iso,`sha256sum 1.iso | awk '{ print $1 }'`,`stat -L -c '%s' 1.iso` > PULP_MANIFEST
[root@intel-sharkbay-dh-02 iso]# echo 2.iso,`sha256sum 2.iso | awk '{ print $1 }'`,`stat -L -c '%s' 2.iso` >> PULP_MANIFEST
[root@intel-sharkbay-dh-02 iso]# 
[root@intel-sharkbay-dh-02 iso]# 
[root@intel-sharkbay-dh-02 iso]# pulp-admin iso repo sync run --repo-id iso-1
+----------------------------------------------------------------------+
                    Synchronizing Repository [iso-1]
+----------------------------------------------------------------------+

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

The Pulp Manifest was downloaded successfully.

Downloading 2 ISOs...
[==================================================] 100%
ISOs: 2/2    Data: 12 B/12 B    Avg: 12 B/s

Successfully downloaded 2 ISOs.

Task Succeeded

The repository was successfully published.

Task Succeeded

[root@intel-sharkbay-dh-02 iso]# pulp-admin iso repo sync run --repo-id iso-2
+----------------------------------------------------------------------+
                    Synchronizing Repository [iso-2]
+----------------------------------------------------------------------+

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

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@intel-sharkbay-dh-02 iso]# pulp-admin iso repo list
+----------------------------------------------------------------------+
                            ISO Repositories
+----------------------------------------------------------------------+

Id:                  iso-1
Display Name:        None
Description:         None
Content Unit Counts: 
  Iso: 2

Id:                  iso-2
Display Name:        None
Description:         None
Content Unit Counts: 
  Iso: 2

[root@intel-sharkbay-dh-02 iso]# 

#21 Updated by bmbouter 6 months ago

  • Tags Pulp 2 added

#22 Updated by daviddavis 5 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF