[25365] in Source-Commits

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

Re: /svn/athena r24926 - trunk/debathena/config/auto-update/debian

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Tue Jan 25 21:54:39 2011

Date: Tue, 25 Jan 2011 21:54:32 -0500 (EST)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: Jonathan D Reed <jdreed@mit.edu>
cc: source-commits@mit.edu
In-Reply-To: <201101251743.p0PHhsYP000608@drugstore.mit.edu>
Message-ID: <alpine.DEB.1.10.1101252154120.13915@dr-wily.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Looks good to me, ACK.

-- 
Geoffrey Thomas
geofft@mit.edu

On Tue, 25 Jan 2011, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2011-01-25 12:43:54 -0500 (Tue, 25 Jan 2011)
> New Revision: 24926
>
> Modified:
>   trunk/debathena/config/auto-update/debian/athena-auto-update
>   trunk/debathena/config/auto-update/debian/athena-auto-upgrade
>   trunk/debathena/config/auto-update/debian/changelog
>   trunk/debathena/config/auto-update/debian/control.in
>   trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d
> Log:
> In auto-update:
>  * Don't depend on at, because bad things happen (Trac #782)
>
>
> Modified: trunk/debathena/config/auto-update/debian/athena-auto-update
> ===================================================================
> --- trunk/debathena/config/auto-update/debian/athena-auto-update	2011-01-23 10:45:03 UTC (rev 24925)
> +++ trunk/debathena/config/auto-update/debian/athena-auto-update	2011-01-25 17:43:54 UTC (rev 24926)
> @@ -67,6 +67,22 @@
>
> trap 'rm -f $pidfile' EXIT
>
> +if [ "$1" = "cron" ]; then
> +    case `date +"%H"` in
> +	0[2-6])
> +	    # 2 hrs
> +	    interval=7200
> +	    ;;
> +	*)
> +	    # 6 hrs
> +	    interval=21600
> +	    ;;
> +    esac
> +    if ! desync -t /var/run/athena-update.desync $interval; then
> +	exit 0
> +    fi
> +fi
> +
> statfile="/var/lib/athena-update-status"
> updstatus="unknown"
> updmsg=""
>
> Modified: trunk/debathena/config/auto-update/debian/athena-auto-upgrade
> ===================================================================
> --- trunk/debathena/config/auto-update/debian/athena-auto-upgrade	2011-01-23 10:45:03 UTC (rev 24925)
> +++ trunk/debathena/config/auto-update/debian/athena-auto-upgrade	2011-01-25 17:43:54 UTC (rev 24926)
> @@ -67,6 +67,22 @@
>     fi
> fi
>
> +if [ "$1" = "cron" ]; then
> +    interval=21600
> +    shopt -s nocasematch
> +    case `hostname` in
> +	m38-370*)
> +	    interval=43200
> +	    ;;
> +	w20-575*)
> +	    interval=28800
> +	    ;;
> +    esac
> +    if ! desync -t /var/run/athena-upgrade.desync $interval; then
> +        exit 0
> +    fi
> +fi
> +
> CLUSTERINFO=`getcluster -b $(lsb_release -sr)`
> [ $? != 0 ] && complain "Failed to get clusterinfo" && exit 1
> eval $CLUSTERINFO
>
> Modified: trunk/debathena/config/auto-update/debian/changelog
> ===================================================================
> --- trunk/debathena/config/auto-update/debian/changelog	2011-01-23 10:45:03 UTC (rev 24925)
> +++ trunk/debathena/config/auto-update/debian/changelog	2011-01-25 17:43:54 UTC (rev 24926)
> @@ -1,3 +1,9 @@
> +debathena-auto-update (1.20) unstable; urgency=low
> +
> +  * Don't depend on at, because bad things happen (Trac #782)
> +
> + -- Jonathan Reed <jdreed@mit.edu>  Tue, 25 Jan 2011 12:43:05 -0500
> +
> debathena-auto-update (1.19.1) unstable; urgency=low
>
>   * Don't chmod non-existent files
>
> Modified: trunk/debathena/config/auto-update/debian/control.in
> ===================================================================
> --- trunk/debathena/config/auto-update/debian/control.in	2011-01-23 10:45:03 UTC (rev 24925)
> +++ trunk/debathena/config/auto-update/debian/control.in	2011-01-25 17:43:54 UTC (rev 24926)
> @@ -7,6 +7,6 @@
>
> Package: debathena-auto-update
> Architecture: all
> -Depends: ${misc:Depends}, bsdutils, debathena-desync, cron, at, aptitude, apt-file, kexec-tools
> +Depends: ${misc:Depends}, bsdutils, debathena-desync, cron, aptitude, apt-file, kexec-tools
> Description: Performs automatic updates for Athena machines.
>  This package performs automatic updates for Athena machines.
>
> Modified: trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d
> ===================================================================
> --- trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d	2011-01-23 10:45:03 UTC (rev 24925)
> +++ trunk/debathena/config/auto-update/debian/debathena-auto-update.cron.d	2011-01-25 17:43:54 UTC (rev 24926)
> @@ -1,8 +1,7 @@
> SHELL=/bin/sh
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
>
> -#min  hour      mday  mon  wday  user  command
> -0     2,4,6     *     *    *     root  echo "/usr/sbin/athena-auto-update cron" | at "now + $(desync -n 120) minutes" 2>&1 | egrep -v "(job [0-9]+ at)|(^warning: commands will be executed using /bin/sh)"
> -0     8,14,20   *     *    *     root  echo "/usr/sbin/athena-auto-update cron" | at "now + $(desync -n 360) minutes" 2>&1 | egrep -v "(job [0-9]+ at)|(^warning: commands will be executed using /bin/sh)"
> -0     2		*     *	   *	 root  echo "/usr/sbin/athena-auto-upgrade" | at "now + $(desync -n 360) minutes" 2>&1 | egrep -v "(job [0-9]+ at)|(^warning: commands will be executed using /bin/sh)"
> +#min           hour  mday  mon  wday  user  command
> +0,15,30,45     *     *     *    *     root  /usr/sbin/athena-auto-update cron
> +0              2     *     *    *     root  /usr/sbin/athena-auto-upgrade
>
>
>

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