Issue #3047
closedISO 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.
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
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
Updated by daviddavis about 7 years ago
- Status changed from NEW to POST
- Assignee set to daviddavis
Updated by daviddavis about 7 years ago
- Status changed from POST to MODIFIED
Applied in changeset 386a3a110a673e8e50af3bdca74d3aba18928eed.
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)
Updated by daviddavis about 7 years ago
Applied in changeset a2abfe4087be30fd1434bfd93fd3b82071492f36.
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.
Updated by daviddavis about 7 years ago
- Status changed from ASSIGNED to 5
Opened a separate issue for comment#11:
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
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.
Updated by pcreech about 7 years ago
- Status changed from POST to MODIFIED
This shold've been put on modified, not post
Updated by pthomas@redhat.com about 7 years ago
- Status changed from MODIFIED to 5
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]#
Updated by daviddavis over 5 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
Calling method to remove old isos by name before associating them
fixes #3047 https://pulp.plan.io/issues/3047