ephemeral/enlistment nodes should dhcp with correct hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Scott Moser |
Bug Description
Note: This bug has been changed to maas as a project, and its implementation changed significantly. See the original bug report below.
Instead of having hostname.conf read a kernel parameter, I've validated via packet inspection that at least in quantal, klibc's ipconfig seems to correctly send hostname as whatever is provided on the cmdline.
The format is:
ip=::::<hostname>
| It would be nice if /etc/init/
| override the value in /etc/hostname. This is useful in the netboot case
| where the kernel cmdline can be controlled on a per MAC basis, but the
| filesystem is read-only.
| At this point I'm looking for input on possible fallout of a change like
| this.
| Here is the suggested /etc/init/
| #
| # This task is run on startup to set the system hostname from /etc/hostname,
| # falling back to "localhost" if that file is not readable or is empty and
| # no hostname has yet been set.
| description "set system hostname"
| start on startup
| task
| script
| { read cmdline < /proc/cmdline || : } >/dev/null 2>&1
| if hn="${cmdline#
| hn="${hn%% *}"
| echo "setting hostname ${hn}" >/dev/console
| exec hostname "${hn}"
| fi
| exec hostname -b -F /etc/hostname
|end script
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: hostname 3.11ubuntu1
ProcVersionSign
Uname: Linux 3.5.0-13-generic x86_64
ApportVersion: 2.5.1-0ubuntu4
Architecture: amd64
Date: Wed Sep 5 11:53:36 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcEnviron:
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: hostname
UpgradeStatus: Upgraded to quantal on 2011-11-07 (303 days ago)
Related branches
- Gavin Panella (community): Approve
- Jeroen T. Vermeulen: Pending requested
-
Diff: 42 lines (+5/-10)2 files modifiedsrc/provisioningserver/kernel_opts.py (+4/-7)
src/provisioningserver/tests/test_kernel_opts.py (+1/-3)
Changed in hostname (Ubuntu): | |
importance: | Undecided → Wishlist |
no longer affects: | hostname (Ubuntu) |
summary: |
- hostname.conf should prefer kernel cmdline 'hostname=' to contents of - /etc/hostname + ephemeral/enlistment nodes should dhcp with correct hostname |
Changed in maas: | |
status: | Confirmed → Triaged |
importance: | Undecided → High |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
I discussed this with slangasek in #ubuntu-devel today, and he preferred not to have this in /etc/init/ hostname. conf as it does incur a for for the shell, and can be done elsewhere.
http:// irclogs. ubuntu. com/2012/ 09/05/% 23ubuntu- devel.html# t16:57