Bug 806740 - Add separate "latest_link" entry to remote tree configuration
Add separate "latest_link" entry to remote tree configuration
Product: PulpDist
Classification: Community
Component: z_other (Show other bugs)
Unspecified Unspecified
high Severity medium
: 0.1.0
: ---
Assigned To: Nick Coghlan
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2012-03-26 02:39 EDT by Nick Coghlan
Modified: 2012-03-26 19:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-26 19:51:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nick Coghlan 2012-03-26 02:39:13 EDT
PulpDist 0.0.7 uses the "listing_prefix" to determine both the directories to be retrieved from the upstream server *and* the name to be used for the symlink to the latest version for snapshot trees (calculated as "latest-<listing_prefix>").

It is not always desirable that these two values be the same, so a separate "latest_link" setting should be supported that allows the name used for the symlink to be specified explicitly (with the "latest-<listing_prefix>" behaviour being retained as a default).
Comment 1 Nick Coghlan 2012-03-26 03:26:26 EDT
On further reflection, these rare cases where the name differs between the source and local copy can be handled by creating a local unchanging symlink to the symlink that is dynamically updated by the PulpDist plugin.
Comment 2 Nick Coghlan 2012-03-26 03:45:29 EDT
Further investigation has now shown that the listing_prefix/suffix concept simply doesn't map properly to the intended use cases.

These attributes will be dropped in favour of the more general "listing_pattern" option, with a new "latest_link" attribute added to handle the correct naming of the symlink created to refer to the most recently synchronised directory for snapshot trees.
Comment 3 Nick Coghlan 2012-03-26 03:51:52 EDT
And now we come full circle: the listing prefix/suffix concept actually does cover the desired use cases, *as long as* the prefix is allowed to be a full rsync wildcard pattern.

That is not currently the case, since the prefix is *also* used to define the filename for the latest link, which obviously doesn't work if the prefix contains wildcard characters. The simplest solution is therefore to require that the latest link name be specified explicitly (allowing None to be passed to request that creation of the symbolic link be omitted entirely).
Comment 4 Nick Coghlan 2012-03-26 19:51:33 EDT
Fixed in 0.0.8 by allowing rsync wildcards in listing_prefix and adding a new latest_link attribute for remote trees (defaulting to None).

When deriving a repo config from a mirror config, latest_link_name is set only if the latest_link attribute is set to something other than none.

Note You need to log in before you can comment on or make changes to this bug.