Ticket #225 (assigned enhancement)

Opened 12 years ago

Last modified 10 years ago

install-debathena.sh should create a log for debugging purposes

Reported by: jdreed Owned by: amb
Priority: low Milestone: The Distant Future
Component: installer Keywords:
Cc: Fixed in version:
Upstream bug:

Description (last modified by amb) (diff)

Currently the machinery in the PXE installer creates /var/log/athena-install.log. It would be better if install-debathena.sh did this so we also have a log for non-cluster machines.

This was previously tracked as ATN-67.

Change History

comment:1 Changed 11 years ago by geofft

  • Priority changed from major to critical

For the love of God, Montresor!

comment:2 Changed 11 years ago by geofft

I tested the code that we had for this but commented out,

chroot /target sh /root/install-debathena.sh < /dev/tty5 > /dev/tty5 2>&1
# This approach fails due to lingering processes keeping the
# pipeline open and the script hung.
# chroot /target sh /root/install-debathena.sh < /dev/tty5 2>&1 \
#     | chroot /target tee /var/log/athena-install.log > /dev/tty5

and it seems to have worked fine on two Optiplex 780s. Can we still reproduce the hang, or was that the fault of buggy mirrors or other broken code that we might have fixed?

I'm having trouble determining how the commented code might hang and the non-commented code be fine. I suppose you might want to not run tee inside the chroot; we might be able to arrange to just /target/usr/bin/tee /target/var/log/athena-install.log. But I'm not sure how much I believe that that's a problem.

comment:3 Changed 10 years ago by geofft

I've continued to test that code by uncommenting it by hand when doing possibly-failed installs, and I haven't seen any trouble with it and it's been incredibly useful. I'd like to bring it back, but I'll wait until after we get Lucid installs stable to do so.

Note that the uncommented code has since changed to check the exit status. Because UNIX is awesome like this, the best way to continue that appears to be something like

(chroot /target sh /root/install-debathena.sh < /dev/tty5 2>&1 \
     && touch /debathena/install-succeeded) \
     | chroot /target tee /var/log/athena-install.log > /dev/tty5
if ! [ -e /debathena/install-succeeded ]; then

Ideally we'd also spawn an athinfod before doing this so that you can check the install status remotely while it's installing.

In other slightly-related news, ssh/scp (from openssh-client-udeb) hangs if it's in the recovery shell on tty5, but works fine on ttys 2 or 3. I wonder if this is related to the reports of lingering processes, and whether opening the tty slightly more normally -- e.g., with openvt -- will work better.

comment:4 Changed 10 years ago by geofft

So, we've also wanted the non-PXE installer to log, and possibly generate an athinfo-accessible log. I propose that we just make install-debathena.sh itself write out a logfile, and abandon making the net installer's call to install-debathena.sh tee to a logfile.

I also propose that install-debathena.sh also start up a tiny athinfo-compatible server by default (prompting [Y/n]) if it fails, and encourage you to contact someone (olc? bugs? release-team? debathena?) and give them the following info.

comment:5 Changed 10 years ago by amb

  • Status changed from new to assigned

While I agree with Geoff's comment above, I've committed r24864 (updating the PXE installer with Geoff's code above) as low-hanging fruit for getting install logs right now. (Though I'm still leaving this open, and r24864 should probably get reverted when we have something better.)

comment:6 Changed 10 years ago by amb

  • Priority changed from critical to minor
  • Description modified (diff)
  • Summary changed from Installer should create a log for debugging purposes to install-debathena.sh should create a log for debugging purposes

Changed title and description and downgraded priority to match the current state of things.

Also, an update with the relevant athinfo query is now in dev.

Note: See TracTickets for help on using tickets.