From owner-freebsd-current@FreeBSD.ORG Tue Jan 13 23:11:34 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A32F9A5 for ; Tue, 13 Jan 2015 23:11:34 +0000 (UTC) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEB7BBF1 for ; Tue, 13 Jan 2015 23:11:33 +0000 (UTC) Received: by mail-lb0-f180.google.com with SMTP id l4so5173826lbv.11 for ; Tue, 13 Jan 2015 15:11:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:cc:content-type; bh=7lpk/Yf2vLhMDSUCEWJ4wuWBg5HiHIOX277BmLaFY7I=; b=KVSMPE9OVAEGOSy6zlZFC09BZ0egy/tBfyUM8Jepyv0ZOesvJwXn1XgUL5V8P5zLF6 7EFUkVM/GQYXC3fCH+GSnxaandZMXvC5t8aF27o6YKEfKlhMjqrTekxM4MktYYFBdMeH UCW713A3QUrpVON0s2vxSpsXvhnNI/sRukkXwxyUiZCQx6ibbV0QNZHXrTSooxPCmppa BgmVHWPOj1/Bey/x66E+nUFZ5pQ2Ja8hYrVN40OJC6Nx5a3gIg1fPWZEWlP6geRWFn2k UJrx1k+XHf1fA5Hg9M32loirjp0S8K0R8cnpAy1xWV45uhGB95R0Gzv8dpE3uAmPoN2x wXQw== MIME-Version: 1.0 X-Received: by 10.152.23.98 with SMTP id l2mr873121laf.46.1421190691861; Tue, 13 Jan 2015 15:11:31 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.129.3 with HTTP; Tue, 13 Jan 2015 15:11:31 -0800 (PST) Date: Tue, 13 Jan 2015 15:11:31 -0800 X-Google-Sender-Auth: QEu6lCuu1X0qSwk5XFD52Qc-fA0 Message-ID: Subject: Devops question: freebsd-update needs a real tty to run, problem for automation From: Craig Rodrigues To: freebsd-current Current Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Ahmed Kamal X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 23:11:34 -0000 Hi, 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. We found that when the invocation of freebsd-update was scripted and not run via a real tty, we can into this error: "freebsd-update fetch should not be run non-interactively." 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. 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 before fetching the updates. This is OK when run in a cron job, but not OK when run as part of a devops automation framework. Anybody have ideas as to the best way to proceed in fixing this in freebsd-update? -- Craig