[Yum-devel] zeroconf-like discovery of repos
misa+yum at redhat.com
Tue May 16 15:53:44 UTC 2006
Here's a scenario that I've been thinking about, and wanted to get an idea how
useful it would be for other people.
I happen to have a local mirror of some yum repositories. Since the mirror is
behind the firewall, it's not accessible to the rest of the world, so no
reason for it to live on the mirrorlist.
However, if I plug my laptop in the network I'd like to get my updates from my
fast mirror, and if I go home I want to follow the regular route.
Me changing the file in yum.repos.d is sort of inconvenient. That's why I
think this would be a good case for service discovery.
The proposal I have is:
- each yum repository will have a unique name. For instance, Fedora Core would
be core-fedora, Fedora Core Updates would be updates-core-fedora etc.
- the first thing that the client does for each repository is: do a SRV
lookup for the yum repository name, plus _yum._tcp (ideally the domain name
should be automatically filled in and it should come from dhcp). If the SRV
lookup is successful, a secondary TXT lookup is performed, to retrieve the
URL for that repository. The URL looks like the one in baseurl, minus the
server name. So, for instance:
SRV lookup of core-fedora._yum._tcp returns:
TXT lookip of core-fedora._yum._tcp returns:
- Distinguishing the protocol for the repo: could be either a TXT record or
the port for the SRV record. I'd vote for the former, since one can have an
HTTP repo running on a non-standard port.
- This is based purely on a convention for carefully crafting the URLs. One
could also "browse" the network and return a list of available yum repos -
but I'd postpone that for a while.
- If we go this route, _yum will have to be registered as a 'service' with
dns-sd.org, see http://www.dns-sd.org/ServiceTypes.html
Does this sound useful?
More information about the Yum-devel