Project

Profile

Help

Issue #1389

closed

Disallow re-uploading the same package twice

Added by igan over 8 years ago. Updated about 5 years ago.

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

Description

when pulp-admin is used for uploading rpm package that already published with same name, version and package version, but different sha and size, then yum install returns following error:

[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416 Requested Range Not Satisfiable"

It looks like the metadata of the package is not updated, and the size of package served by http is not the same as in metadata. This causes 416 HTTP error.

Obviosly releasing of same RPM twice is a error case scenario, but the behavior of pulp is not adequate.

I see 2 possible behaviors:

1) check if package is already in the repo and reject 2-nd push
2) silently overwrite the old package with the new one, including metadata.

I leave you choosing the expected behavior.


Related issues

Related to Pulp - Issue #2630: disassociate_units updates last_unit_removed timestamp even if no units are removedCLOSED - CURRENTRELEASEsemyersActions
Actions #1

Updated by jortel@redhat.com over 8 years ago

  • Assignee set to ipanova@redhat.com
  • Triaged changed from No to Yes

Please investigate to see if this has been fixed. Mark untriaged if you find this is not true.

Actions #2

Updated by ipanova@redhat.com over 8 years ago

  • Status changed from ASSIGNED to CLOSED - DUPLICATE

This issue is fixed in 2.6.6 https://pulp.plan.io/issues/494

I am closing this a duplicate.

Actions #3

Updated by jsherril@redhat.com about 7 years ago

  • Status changed from CLOSED - DUPLICATE to NEW
  • Version changed from 2.6.1 to 2.10.3
  • Tags deleted (Easy Fix)

Reopening as this is still an issue (tested on 2.10.3), i believe https://pulp.plan.io/issues/494 only really fixed it for syncs

Actions #4

Updated by bmbouter about 7 years ago

  • Triaged changed from Yes to No

Untriaging as requested via IRC

Actions #5

Updated by igan about 7 years ago

I confirm, issue is still was observed in 2.7.0-1 but less frequently.

Actions #6

Updated by ttereshc about 7 years ago

  • Assignee deleted (ipanova@redhat.com)
Actions #7

Updated by bizhang about 7 years ago

  • Sprint/Milestone set to 33
  • Triaged changed from No to Yes
Actions #8

Updated by ttereshc about 7 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ttereshc
Actions #9

Updated by mhrivnak about 7 years ago

  • Sprint/Milestone changed from 33 to 34
Actions #10

Updated by ttereshc about 7 years ago

The issue occurs only after incremental publish, so the workaround is to force publish from scratch (with --force-full flag, for example).

We silently overwrite old package with a new one, but during incremental publish package metadata is added to the end of the existing metadata files, so there can be multiple references to the packages with the same NEVRA but different checksums. Duplicated metadata is also possible in metadata files.
To have N records for the package with the same NEVRA, just repeat N times:
- upload package (with the same checksums for duplicates or with different checksums to reproduce reported issue)
- publish repo

Added by ttereshc about 7 years ago

Revision 10d651cf | View on GitHub

Update last_unit_removed when unit is disassociated

It will force subsequent publish to be from scratch. Before that publish could be incremental and in some cases, like upload of the package with same NEVRA, resulted in duplicated or outdated metadata in the published repository.

closes #1389 https://pulp.plan.io/issues/1389

Added by ttereshc about 7 years ago

Revision 10d651cf | View on GitHub

Update last_unit_removed when unit is disassociated

It will force subsequent publish to be from scratch. Before that publish could be incremental and in some cases, like upload of the package with same NEVRA, resulted in duplicated or outdated metadata in the published repository.

closes #1389 https://pulp.plan.io/issues/1389

Actions #11

Updated by ttereshc about 7 years ago

  • Status changed from ASSIGNED to POST
Actions #12

Updated by ttereshc about 7 years ago

  • Status changed from POST to MODIFIED
Actions #13

Updated by semyers about 7 years ago

  • Related to Issue #2630: disassociate_units updates last_unit_removed timestamp even if no units are removed added
Actions #14

Updated by bizhang about 7 years ago

  • Platform Release set to 2.12.2
Actions #15

Updated by bizhang about 7 years ago

  • Status changed from MODIFIED to 5
Actions #16

Updated by bizhang about 7 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #17

Updated by bmbouter about 6 years ago

  • Sprint set to Sprint 16
Actions #18

Updated by bmbouter about 6 years ago

  • Sprint/Milestone deleted (34)
Actions #19

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF