Project

Profile

Help

Issue #3047

closed

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

Added by daviddavis about 7 years ago. Updated over 5 years ago.

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

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 correctlyCLOSED - CURRENTRELEASEdaviddavisActions
Related to RPM Support - Issue #3100: Removal of existing iso units doesn't work if there are multiple iso filesCLOSED - CURRENTRELEASEdaviddavisActions
Actions #1

Updated by daviddavis about 7 years ago

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

Added by daviddavis about 7 years ago

Revision 386a3a11 | View on GitHub

Calling method to remove old isos by name before associating them

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

Actions #3

Updated by daviddavis about 7 years ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis
Actions #4

Updated by amacdona@redhat.com about 7 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by daviddavis about 7 years ago

  • Status changed from POST to MODIFIED

Added by daviddavis about 7 years ago

Revision a2abfe40 | View on GitHub

Calling method to remove old isos by name before associating them

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

(cherry picked from commit 386a3a110a673e8e50af3bdca74d3aba18928eed)

Actions #7

Updated by pcreech about 7 years ago

  • Platform Release set to 2.14.2
Actions #8

Updated by daviddavis about 7 years ago

Actions #9

Updated by pcreech about 7 years ago

  • Status changed from MODIFIED to 5
Actions #11

Updated by daviddavis about 7 years ago

  • Status changed from 5 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.

Actions #12

Updated by daviddavis about 7 years ago

  • Status changed from ASSIGNED to 5

Opened a separate issue for comment#11:

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

Actions #13

Updated by daviddavis about 7 years ago

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

Updated by pcreech about 7 years ago

  • Status changed from 5 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.

Actions #15

Updated by pcreech about 7 years ago

  • Status changed from POST to MODIFIED

This shold've been put on modified, not post

Actions #16

Updated by pcreech about 7 years ago

  • Platform Release set to 2.14.3
Actions #17

Updated by pthomas@redhat.com about 7 years ago

  • Status changed from MODIFIED to 5
Actions #18

Updated by pthomas@redhat.com about 7 years ago

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]# 
Actions #21

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added
Actions #22

Updated by daviddavis over 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

Also available in: Atom PDF