Ticket #818 (closed enhancement: fixed)

Opened 10 years ago

Last modified 9 years ago

Run athinfod during the install

Reported by: geofft Owned by: jdreed
Priority: normal Milestone: The Distant Future
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:


#817 and the fact that thumbdrives plugged in during a PXE install can cause strange things to happen reminded me that we do want athinfod running during the install, with at least a query to track install progress.

This would involve

  • figuring out what athinfo queries are reasonable to want during debian-installer (much of the hardware stuff is probably reasonable)
  • building debathena-athinfod-udeb, with as few Debathena deps as possible
  • picking up that udeb early in the install process
  • logging the output of install-debathena.sh (which I think we already do, actually)

There's also probably an argument for running athinfod in install-debathena.sh if you're installing workstation, but I'm not immediately convinced.

Change History

comment:1 Changed 10 years ago by jdreed

This also involves rebuilding athinfod to not use inetd (because, AFAICT, there's no inetd udeb). We don't actually need real athinfo, either -- we can hardcode a list of queries.

comment:2 Changed 10 years ago by jdreed

  • Owner set to jdreed
  • Status changed from new to accepted

Geoff pointed me at httpd from the save-logs udeb, whose source is in the installation-report package. I propose we copy that and implement our athinfod in shell. Building a udeb, in addition to being yet another thing we need to do, requires that anna be functional. We actually do a bunch of things long before anna is functional. wget, however, is functional that early in the install. Here's my proposed script. Note that nc is traditional netcat, not openbsd netcat.

# The idea of using netcat as a lightweight inetd was inspired by the
# "httpd" script in the "save-logs" in the "installation-report"
# package, which is licensed under GPLv2 (as of
# installation-report-2.44ubuntu1, which was current when this was
# written).  This script is, therefore, licensed under GPLv2.  The
# license of athinfod itself is unaffected by this.

run_nc () {
	nc -p $PORT -l -e $1 </dev/null >/dev/null 2>/dev/null &

if [ -z "$ATHINFOD_STARTED" ]; then
	[ -f /var/lib/athinfod_stop ] && exit
	# daemonize
	run_nc $0
	# start up the next listener process
	[ -f /var/lib/athinfod_stop ] || run_nc $0

read query
query="$(echo "$query" | sed 's/[^-.A-Za-z0-9_]//g')" # untaint

case "$query" in
	echo "Installation in progress" ;;
	uname -a ;;
	cat /debathena/preseed ;;
	cat /var/log/syslog ;;
	[ "$query" != "queries" ] && echo "Unknown query"
	cat <<EOF
version  echo "Installation in progress"
uname    uname -a
preseed  cat /debathena/preseed
syslog   cat /var/log/syslog
exit 0

comment:3 Changed 10 years ago by jdreed

Hearing no objections, I committed r25367 (this code does nothing until wgotten (deal with it) by the installer). Having no workflow for the PXE installer, I'm planning on committing the necessary installer changes in about a week, and deploying them shortly after that.

comment:4 Changed 9 years ago by jdreed

  • Status changed from accepted to closed
  • Resolution set to fixed

This got pushed out for Precise. I'm not backporting it, but we'll use it in all new versions.

Note: See TracTickets for help on using tickets.