Bug 82

Summary: Remember if install DHCP received hostname from server
Product: Mageia Reporter: Frank Griffin <ftg>
Component: InstallerAssignee: Olivier Blin <mageia>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Normal CC: dmorganec, ftg, mageia, marja11, neoser10, thierry.vignaud
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard: MGA2TOO, 5alpha2
Source RPM: drakx-net, drakx-installer-binaries CVE:
Status comment:
Attachments: Blino, any reason not to apply this patch?
ddebug.log
ifcfg-*
network
stage1.log

Description Frank Griffin 2011-02-17 16:27:24 CET
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101209 SeaMonkey/2.0.11
Build Identifier: 

If a network install obtains its connection via DHCP, and the DHCP server response supplied a hostname not built from the resulting IP address, it would be nice if this fact were remembered, so that the configuration of that interface in the new system has "Assign hostname from DHCP Server" checked by default.

Reproducible: 

Steps to Reproduce:
D Morgan 2011-02-25 00:02:16 CET

CC: (none) => dmorganec
Assignee: ahmadsamir3891 => bugsquad

Thierry Vignaud 2011-03-03 16:53:28 CET

CC: (none) => thierry.vignaud
Source RPM: drakconnect => drakx-net

Comment 1 Marja Van Waes 2011-10-04 14:06:38 CEST
We don't have a drakx-net maintainer, yet

Last time you did a network install (Mageia 1 rc or Mageia 1), did it still not work the way you wanted?

CC: (none) => m.van.waes

Comment 2 Frank Griffin 2011-10-04 15:20:12 CEST
Yes, "Assign hostname" never comes up checked.

I don't think this is a drakx-net issue.  It requires install stage 1 to "remember" that a hostname was returned, and the part of stage 2 that creates the initial ifcfg (which may be drakx-net) to set NEEDHOSTNAME based on the saved boolean.

CC: (none) => ftg

Comment 3 Marja Van Waes 2011-10-04 15:41:12 CEST
(In reply to comment #2)
> Yes, "Assign hostname" never comes up checked.
> 
> I don't think this is a drakx-net issue.  It requires install stage 1 to
> "remember" that a hostname was returned, and the part of stage 2 that creates
> the initial ifcfg (which may be drakx-net) to set NEEDHOSTNAME based on the
> saved boolean.

@ Thierry: WDYT?
Comment 4 Thierry Vignaud 2011-10-04 17:29:32 CEST
I think you'd better ask blino which was the maintainer for both drakx-net and stage1

CC: (none) => mageia

Comment 5 Marja Van Waes 2011-10-07 19:24:18 CEST
(In reply to comment #3)
> (In reply to comment #2)
> > Yes, "Assign hostname" never comes up checked.
> > 
> > I don't think this is a drakx-net issue.  It requires install stage 1 to
> > "remember" that a hostname was returned, and the part of stage 2 that creates
> > the initial ifcfg (which may be drakx-net) to set NEEDHOSTNAME based on the
> > saved boolean.
> 
> @ Thierry: WDYT?

(In reply to comment #4)
> I think you'd better ask blino which was the maintainer for both drakx-net and
> stage1

@ Blino:

Is this a stage 1 issue?
Marja Van Waes 2011-10-23 16:45:51 CEST

Source RPM: drakx-net => drakx-net, drakx-installer-binaries

Marja Van Waes 2011-10-24 21:24:23 CEST

Assignee: bugsquad => mageia

Comment 6 Thierry Vignaud 2012-03-07 17:55:16 CET
Created attachment 1696 [details]
Blino, any reason not to apply this patch?
Thierry Vignaud 2012-03-07 17:55:25 CET

Keywords: (none) => PATCH

Comment 7 Thierry Vignaud 2012-03-07 17:56:23 CET
Hostname isn't given since dchaumette made it so on Jan 31 2003:
    "don't save hostname if intf->boot_proto == BOOTPROTO_DHCP"
Comment 8 Frank Griffin 2012-03-07 18:04:39 CET
(In reply to comment #7)
> Hostname isn't given since dchaumette made it so on Jan 31 2003:
>     "don't save hostname if intf->boot_proto == BOOTPROTO_DHCP"

I get the idea of that test, but it's flawed for two reasons.  First, if you're looking to disqualify automatically generated DHCP hostnames, it should only discard it if the name contains a reverse IP address.  Second, the checkbox in drakconnect says "Obtain hostname from DHCP (or generate one)", so the checkbox includes the auto-generated case anyway.

But I can understand not pre-checking the checkbox for an auto-generated name under the assumption that most people who install under an auto-generated DHCP hostname would probably want to set a fixed one.
Comment 9 Frank Griffin 2012-03-07 18:08:48 CET
Well, wait a minute.  The intent of that change was probably not to pre-set an auto-generated DHCP hostname as a fixed hostname, and that makes sense.

What needs to be remembered is that a hostname was received at all, not what it was.  Not pre-setting a fixed hostname in a DHCP environment is perfectly reasonable.  But pre-checking the "Obtain hostname" box if DHCP supplied one (subject  to the filtering test above) is the issue here.
Comment 10 Marja Van Waes 2012-05-26 13:08:23 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Frank Griffin 2012-06-12 21:13:39 CEST

Keywords: NEEDINFO => (none)
Whiteboard: (none) => MGA2TOO

Comment 11 Thierry Vignaud 2014-06-04 14:56:36 CEST
If you can still reproduce it, can you attach the following files?
- /tmp/network
- /tmp/ifcfg-*
- /tmp/stage1.log
- /tmp/ddebug.log
Just wait for stage2 to show up, go to tty2, mount some USB key, ...

Keywords: (none) => NEEDINFO

Comment 12 Frank Griffin 2014-08-22 16:19:50 CEST
Fresh install today, generated eth0 ifcfg-enp6s0 has only DEVICE, BOOTPROTO=DHCP and METRIC.  No NEEDHOST.

I'll attach the requested 4 files in a second.
Comment 13 Frank Griffin 2014-08-22 16:21:06 CEST
Created attachment 5357 [details]
ddebug.log
Comment 14 Frank Griffin 2014-08-22 16:21:44 CEST
Created attachment 5358 [details]
ifcfg-*
Comment 15 Frank Griffin 2014-08-22 16:22:13 CEST
Created attachment 5359 [details]
network
Comment 16 Frank Griffin 2014-08-22 16:22:59 CEST
Created attachment 5360 [details]
stage1.log
Comment 17 Thierry Vignaud 2014-08-22 16:59:17 CEST
Hmm the unselecting might be remembered in urpmi {state} and thus prevent the later installation to actually occurs (when configuring network in summary)
Comment 18 Dick Gevers 2014-11-19 15:43:59 CET
This is much more current than it would seem from the header fields.

Keywords: NEEDINFO => (none)
Whiteboard: MGA2TOO => MGA2TOO, 5 alpha2

Dick Gevers 2014-11-21 17:32:41 CET

Whiteboard: MGA2TOO, 5 alpha2 => MGA2TOO, 5alpha2

Comment 19 Mauricio Andrés Bustamante Viveros 2018-03-11 04:52:05 CET
Someone knows if this applies to MGA6TOO??

CC: (none) => neoser10