Devops question: freebsd-update needs a real tty to run, problem for automation
Craig Rodrigues
rodrigc at FreeBSD.org
Tue Jan 13 23:11:34 UTC 2015
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
More information about the freebsd-current
mailing list