Ticket #11710 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

os4: hostname is none

Reported by: erikos Owned by: dsd
Priority: normal Milestone: 12.1.0
Component: olpc-utils Version: not specified
Keywords: Cc: martin.langhoff
Action Needed: no action Verified: no
Deployments affected: Blocked By:
Blocking:

Description

The hostname is none (command), can be seen in terminal as well.

Attachments

Change History

Changed 3 years ago by erikos

  • owner set to dsd

Changed 3 years ago by dsd

During a boot where configuration is needed, olpc-configure needs to wait for devices to initialise (using udevadm settle). But this isn't enough to solve it, as for some reason, loading wireless firmware takes 30 seconds during boot, and udev doesn't wait for it.

Changed 2 years ago by dsd

  • status changed from new to assigned

libertas needs to move to loading firmware asynchronously. Posted some patches for review at http://lists.infradead.org/pipermail/libertas-dev/2012-April/thread.html

Changed 2 years ago by dsd

Those patches got acked, pushed to x86-3.3.

Changed 2 years ago by dsd

  • next_action changed from diagnose to add to build

Fixed in olpc-utils 26dcc2f6af03ede263b03f6044142ed6941209a4, shipped in olpc-utils-2.0.8

Changed 2 years ago by dsd

  • next_action changed from add to build to test in build

Test in 12.1.0 build 8.

Changed 2 years ago by greenfeld

  • next_action changed from test in build to diagnose

The hostname is set on 12.1.0 build 8 for XO-1.5, but is not set on the same build for XO-1.75.

Changed 2 years ago by dsd

Ah yes. This will be fixed with the move to Linux 3.3.

Changed 2 years ago by martin.langhoff

Found this bug looking at why udevadm settle sneaked into our olpc-configure.

Can we explore ?

  • moving the hostname setup to a udev-triggered script
  • running this hostname setup in the background with a: configure_hostname &

Changed 2 years ago by dsd

Can't do either unfortunately. Hostname must be set before starting avahi (we have a painful history here), and we can't set the hostname until the network modules are loaded (which would otherwise typically only happen after olpc-configure exits).

"udevadm settle" only runs on first boot, which is also delayed by other operations, so I don't think its a big deal.

Changed 2 years ago by martin.langhoff

OK. So a different take on this: it is just not working on my XO-1.75 unit. I am olpc@(none) even if I remove /.olpc-configured and reboot. Investigating a bit.

One thing that is strange is that dmesg shows libertas_sdio msgs very late in the boot process. This is true regardless of /.olpc-configured.

Changed 2 years ago by martin.langhoff

See attached: draft patch: load drivers early, settle only wlan, wait for

path

This patch cuts first boot time for me from 1:11s to 49s, and increases the reliability of hostname setup.

  • Without any changes, I get ~50% success rate.
  • Early driver load and udevadm trigger changes shorten boot time but still hit and miss.
  • Adding waitonpath seems to resolve issues, have not seen it fail. The debugging echo always reports "10" however so perhaps we're in a very tight race with udevadm, one that sleep 0.1 would solve.

All of this on a short number of runs, with "rm /.olpc-configured /home/olpc/.olpc-configured /etc/sysconfig/network" to clear state.

Changed 2 years ago by martin.langhoff

Changed 2 years ago by martin.langhoff

  • cc martin.langhoff added

Changed 2 years ago by martin.langhoff

Orthogonal to my changes, there is an issue that seems strange: the code clock only ever executes once in the life of an OS install -- upgrade to "v15". If it doesn't work on that one try, we still mark the ".olpc-configured" file as done, and it will not be retried.

AFAICT, the version of the "root" does not matter. We should instead install the file unconditionally if it's not there.

Changed 2 years ago by dsd

  • next_action changed from diagnose to add to build

Fixed in olpc-utils-2.0.10: we now generate hostnames from mfg data, falling back on random numbers. No need to wait for the network device.

(I'll also be pushing the required changes for async firmware loading to arm-3.0-wip shortly.)

Changed 2 years ago by dsd

  • next_action changed from add to build to test in build

Test in 12.1.0 build 10.

Changed 2 years ago by greenfeld

  • status changed from assigned to closed
  • next_action changed from test in build to no action
  • resolution set to fixed

On XO-1.5 and XO-1.75 we derive the hostname from the WM OFW tag in 12.1.0 os10.

If this tag is not present then a random value is generated.

In either case the result is saved by olpc-configure in /etc/sysconfig/network to avoid the hostname changing across reboots.

Note: See TracTickets for help on using tickets.