From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 01/18] apt: lock osstest's usages of apt-get against each other Date: Wed, 21 Jan 2015 11:29:51 +0000 Message-ID: <1421839791.4899.16.camel@citrix.com> References: <1417536141.29004.6.camel@citrix.com> <1417536299-1810-1-git-send-email-ian.campbell@citrix.com> <21694.40015.351886.997315@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21694.40015.351886.997315@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Jim Fehlig , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2015-01-20 at 18:19 +0000, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 01/18] apt: lock osstest's usages of apt-get against each other"): > > Currently we rely on all apt-get invocations being in a single > > ts-xen-build-prep job which can't run on a shared host. > > > > That is a bit inflexible so instead use our own lock. We wait > > indefinitely and rely on osstest's existing command timeout > > infrastructure to catch problems. > > ... > > diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm > > index e6c54bc..2ac490f 100644 > > --- a/Osstest/TestSupport.pm > > +++ b/Osstest/TestSupport.pm > > @@ -433,17 +433,18 @@ sub target_putfile_root ($$$$;$) { > > sub target_run_apt { > > my ($ho, $timeout, @aptopts) = @_; > > target_cmd_root($ho, > > - "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y apt-get @aptopts", > > + "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y \ > > + with-lock-ex -w /var/lock/osstest-apt apt-get @aptopts", > > $timeout); > > I think target_run_apt ought to lose the $timeout parameter. Anyone > who calls it with other than the big 3000s timeout might lose, after > all. Good point. FWIW I don't think this patch is actually necessary for this series, it arose during an early version because I was installing stuff in ts-build-libvirt, but now everything is done in e.g. ts-build-prep. I think it's still a step in the direction you wanted wrt sharing machine though, so I'll keep it in the series next time around too. Ian.