Project

Profile

Help

Issue #2198

Timestamp not updated for changed docker_tag

Added by twaugh over 5 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
2.0.0
Platform Release:
2.9.3
Target Release - Docker:
2.0.5
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 7
Quarter:

Description

When a manifest is imported using sync, pulp_docker attempts to create a docker_tag unit describing its tag.

If a docker_tag unit already exists for that tag, its manifest_digest is updated. In this situation, the _last_updated field does not appear to get updated. This causes problems for distributors that want to find changes since their last run, as updated docker_tag units will not be returned in that search.

Seen with pulp_docker-2.0.0.2.

Associated revisions

Revision 9e4aa622 View on GitHub
Added by ipanova@redhat.com over 5 years ago

With docker_tag unit change _last_updated is changed accordingly

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

History

#1 Updated by amacdona@redhat.com over 5 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes
  • Tags 2.11 added

#2 Updated by Anonymous over 5 years ago

  • Sprint/Milestone set to 25

#3 Updated by dkliban@redhat.com over 5 years ago

It would be very helpful if some more reproduction steps could be provided. Perhaps even a link on documentation for how to pull and image from a registry, modify it, push the modified image, and tag the new image.

#4 Updated by mhrivnak over 5 years ago

The bug is here:

https://github.com/pulp/pulp_docker/blob/17e0208d/plugins/pulp_docker/plugins/models.py#L248

We need the update call to also set the _last_updated attribute of the unit.

I suspect a reproducer would go like this:

1. build a simple docker image with a dockerfile that has something you can change. Perhaps it's just this:

FROM: busybox
ADD stuff.txt /stuff.txt

2. push that image to a registry
3. sync that repo with pulp
4. note the _last_updated timestamp on the tag unit
5. change the contents of "stuff.txt" and re-build the image
6. push the image to the same regsitry
7. sync that repo with pulp
8. note that the _last_updated timestamp on the tag unit did not change, but the value for it's manifest_digest attribute did.

#5 Updated by ipanova@redhat.com over 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com

#6 Updated by ipanova@redhat.com over 5 years ago

  • Status changed from ASSIGNED to POST

#7 Updated by ipanova@redhat.com over 5 years ago

Steps to verify:

1. build a simple docker image with a dockerfile that has something you can change. Perhaps it's just this:

FROM: busybox
ADD stuff.txt /stuff.txt

2. push that image to a registry
3. sync that repo with pulp
4. note the _last_updated timestamp on the tag unit and manifest_digest
5. change the contents of "stuff.txt" and re-build the image
6. push the image to the same regsitry
7. sync that repo with pulp
8. confirm that the _last_updated timestamp on the tag *did* change, also the value for it's manifest_digest attribute.
9. re-sync the repo
10. confirm that _last_updated did not changed, manifest_digest also should have stayed the same.

#8 Updated by ipanova@redhat.com about 5 years ago

  • Target Release - Docker set to 2.0.4

#9 Updated by bmbouter about 5 years ago

  • Target Release - Docker deleted (2.0.4)

Since we're doing time based releases we should only set the target docker release when the issue is a MODIFIED.

#10 Updated by ipanova@redhat.com about 5 years ago

  • Status changed from POST to MODIFIED
  • Target Release - Docker set to 2.0.4

#11 Updated by semyers about 5 years ago

  • Target Release - Docker changed from 2.0.4 to 2.0.5

#12 Updated by semyers about 5 years ago

  • Platform Release set to 2.9.3

#13 Updated by semyers about 5 years ago

  • Status changed from MODIFIED to 5

#14 Updated by semyers about 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#15 Updated by bmbouter over 4 years ago

  • Tags deleted (2.11)

#16 Updated by bmbouter over 3 years ago

  • Sprint set to Sprint 7

#17 Updated by bmbouter over 3 years ago

  • Sprint/Milestone deleted (25)

#18 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF