[25772] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25222 - trunk/debathena/scripts/installer

daemon@ATHENA.MIT.EDU (Jonathan Reed)
Fri Jul 8 23:45:55 2011

Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Jonathan Reed <jdreed@MIT.EDU>
In-Reply-To: <alpine.DEB.2.00.1107082305450.32427@tyger.mit.edu>
Date: Fri, 8 Jul 2011 23:45:46 -0400
Cc: "andrew m. boardman" <amb@mit.edu>, source-commits@mit.edu
Message-Id: <CD58FD72-F29E-4878-9F36-1841616405AA@mit.edu>
To: Geoffrey Thomas <geofft@mit.edu>
Content-Transfer-Encoding: 8bit

We could add priority fields, if we really want to, by abusing the version field in the cluster keys.

Andrew and I also discussed making the fields not dependent on each other, in that "apt_release development" will only get you -development, and you need "apt_release proposed" to also get proposed.  (We currently support that, in that alpha-linux sets both apt_release development and apt_release proposed, but we shortcut it in auto-update's clusterinfo code).

I think I favor the latter solution.

-Jon

On Jul 8, 2011, at 11:08 PM, Geoffrey Thomas wrote:

> I really really don't like that we're depending on "bleeding", "development", and "proposed" being alphabetically in order, because that's the kind of thing we're going to get wrong one day and not notice. Can we at least document that more explicitly?
> 
> But better would be something on the order of
> 
> hesclusters=$(dig +short +bufsize=2048 ${hostname}.cluster.ns.athena.mit.edu TXT \
>   |sed -e 's/"$//' -ne 's/^"apt_release //p')
> for i in bleeding development proposed; do
> if echo "$hesclusters" | grep -fqx "$i"; then
>   hescluster=$i
>   break
> fi
> done
> 
> -- 
> Geoffrey Thomas
> geofft@mit.edu
> 
> On Fri, 8 Jul 2011, andrew m. boardman wrote:
> 
>> Author: amb
>> Date: 2011-07-08 22:03:39 -0400 (Fri, 08 Jul 2011)
>> New Revision: 25222
>> 
>> Modified:
>> trunk/debathena/scripts/installer/install-debathena.beta.sh
>> Log:
>> Extract only one line of the hesiod cluster info, which can contain
>> multiple entries.
>> 
>> 
>> Modified: trunk/debathena/scripts/installer/install-debathena.beta.sh
>> ===================================================================
>> --- trunk/debathena/scripts/installer/install-debathena.beta.sh	2011-07-05 18:32:09 UTC (rev 25221)
>> +++ trunk/debathena/scripts/installer/install-debathena.beta.sh	2011-07-09 02:03:39 UTC (rev 25222)
>> @@ -244,8 +244,11 @@
>> sourceslist=/etc/apt/sources.list.d/debathena.list
>> clustersourceslist=/etc/apt/sources.list.d/debathena.clusterinfo.list
>> if [ -z "$hostname" ] ; then hostname=`hostname` ; fi
>> +
>> +# Note that hesiod may contain multiple apt_release lines.  We want, in order
>> +# of priority, just one of "bleeding" (maybe), "development", or "proposed".
>> hescluster=$(dig +short +bufsize=2048 ${hostname}.cluster.ns.athena.mit.edu TXT \
>> -    |sed -e 's/"$//' -ne 's/^"apt_release //p') || hescluster=""
>> +    |sed -e 's/"$//' -ne 's/^"apt_release //p'|sort|head -1) || hescluster=""
>> 
>> if [ ! -e "$sourceslist" ] || ! grep -q debathena "$sourceslist"; then
>> if [ -e "$sourceslist" ]; then
>> 
>> 



home help back first fref pref prev next nref lref last post