Bug 1404347

Summary: [DOCS] Image Tagging Best Practices
Product: OpenShift Container Platform Reporter: Steven Walter <stwalter>
Component: DocumentationAssignee: Alex Dellapenta <adellape>
Status: CLOSED CURRENTRELEASE QA Contact: Vikram Goyal <vigoyal>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: medium    
Version: 3.3.0CC: aos-bugs, byount, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-28 12:46:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Steven Walter 2016-12-13 16:06:10 UTC
Document URL: 
https://docs.openshift.com/container-platform/3.3/dev_guide/managing_images.html

Section Number and Name: 
New subsection of the tagging images section

Describe the issue: 
There is not much guidance on the best way to tag images. This causes some customers to tag every new version of an image with a unique tag, for instance:
myimage:dec132016105845
To indicate this image revision is tagged on dec13, 2016 at 10:58:45. This seems like a nice idea as it makes it obvious which revision is which; however, it leads to issues where old image metadata never gets pruned from etcd. If you use the above schema to tag images for every change, then running `oadm prune image` commands will never prune images, as each one is considered the newest revision in a separate tag. In reality, one should keep multiple revisions to a single unchanging tag, or a few unchanging tags:

myimage:latest
myimage:stable

And so on.

In very large clusters, the schema of creating new tags for every revised image will eventually fill up the etcd datastore with excess tag metadata for images that are long outdated.

Comment 3 Alex Dellapenta 2017-06-06 21:06:06 UTC
It looks like some relevant content on this subject was added back in OCP 3.4:

https://github.com/openshift/openshift-docs/pull/3409

I've made some enhancements to that section via:

https://github.com/openshift/openshift-docs/pull/4545

- Renames section from "Tag Naming" to "Recommended Tagging Conventions"
- Adds `latest` and `stable` example tags to the table
- Adds a comment (just for OCP/Origin docs) about etcd potentially filling up

Comment 4 openshift-github-bot 2017-06-07 13:22:54 UTC
Commits pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/219fe0bd1ae35515e5f35a18e4d593a5bcf7b712
Bug 1404347: Enhancements to Tag Naming section

https://github.com/openshift/openshift-docs/commit/f4721b67a2d36bde6d4f80b28d96dc111478d2c3
Merge pull request #4545 from adellape/tagging-stable

Bug 1404347: Enhancements to Tag Naming section