Date: Wed, 14 Jan 2015 00:31:09 +0100 From: Baptiste Daroussin <bapt@FreeBSD.org> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: Craig Rodrigues <rodrigc@FreeBSD.org>, Ahmed Kamal <email.ahmedkamal@googlemail.com>, freebsd-current Current <freebsd-current@freebsd.org> Subject: Re: Devops question: freebsd-update needs a real tty to run, problem for automation Message-ID: <20150113233109.GI17273@ivaldir.etoilebsd.net> In-Reply-To: <54B5AA4C.7050307@FreeBSD.org> References: <CAG=rPVcLWgXR_7JabjbkCWK=SkrQrgcZmAS=Yde0mE3Qpz8Q=A@mail.gmail.com> <54B5AA4C.7050307@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--a7XSrSxqzVsaECgU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 13, 2015 at 05:29:16PM -0600, Bryan Drewery wrote: > On 1/13/2015 5:11 PM, Craig Rodrigues wrote: > > Hi, > >=20 > > Ahmed Kamal, a devops expert, is helping me to script the steps to > > upgrade a cluster of FreeBSD machines. For certain machines, > > we want to track the official FreeBSD releases and use freebsd-update > > to install official updates. > >=20 > > We found that when the invocation of freebsd-update was scripted > > and not run via a real tty, we can into this error: > >=20 > > "freebsd-update fetch should not be run non-interactively." > >=20 > > There are various workarounds mentioned on various web pages. > > However, should we modify freebsd-update so that it can work better > > when not run via a real tty? This would make it more devops/automation > > friendly. > >=20 > > The closest thing I have found is "freebsd-update cron", which can fetch > > the updates and run without a real tty. The only problem with > > "freebsd-update cron" > > is that it sleeps a random amount of time between 1 and 3600 seconds be= fore > > fetching the updates. This is OK when run in a cron job, > > but not OK when run as part of a devops automation framework. > >=20 > > Anybody have ideas as to the best way to proceed in fixing this in > > freebsd-update? > > -- > > Craig >=20 >=20 > sed -i '' -e 's,-t 0 ];,-t 0 ] \&\& [ 0 -eq 1 ],' /usr/sbin/freebsd-update >=20 > This is untested. We'll likely put it in Poudriere as well. >=20 > IMHO the check should be removed in the official version. >=20 You do not need it in poudriere as the rexec binary emulates a tty to worka= round this. Best regards, Bapt --a7XSrSxqzVsaECgU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlS1qroACgkQ8kTtMUmk6EwaVwCfesICx0LdDTgljkhLjr3+0pF1 N2gAnjMLnj1ms9hQI4bISlnnwzq43uFR =X5X7 -----END PGP SIGNATURE----- --a7XSrSxqzVsaECgU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150113233109.GI17273>