Bug 476364 - initscripts ignore dhcpclass
initscripts ignore dhcpclass
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-13 11:56 EST by Vadym Chepkov
Modified: 2008-12-16 23:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-16 23:11:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Vadym Chepkov 2008-12-13 11:56:30 EST
During kickstart installation you can specify dhcpclass=intserver in the anaconda command line and in kickstart file as well.

Anaconda honors the request and gets IP from the configured pool and it populates interface configuration file with two options:

# grep -i dhcp /etc/sysconfig/network-scripts/ifcfg-eth0

BOOTPROTO=dhcp
DHCPCLASS=intserver
DHCP_HOSTNAME=pavilion
DHCP_CLASSID=intserver

Only DHCP_HOSTNAME is propagated into /etc/dhclient-eth0.conf:

cat /etc/dhclient-eth0.conf
send host-name "pavilion";  # temporary RHL ifup addition

It should also add

send user-class "intserver";

or, what anaconda uses,

send vendor-class-identifier "intserver";
Comment 1 Bill Nottingham 2008-12-16 10:08:23 EST
Dave, when was this added to anaconda?
Comment 2 David Cantrell 2008-12-16 14:44:21 EST
24-Oct-2008, commit 8807d1cfc446bd23404e150e31eb0cf7fe4c98e1

I now write out dhclient-DEVICE.conf in anaconda since we're using NetworkManager now.  It will pick up that file and combine it with its own internal settings for the device (which is picked up from ifcfg-DEVICE).  ifcfg-fedora in NetworkManager doesn't read every possible value that could exist in ifcfg-DEVICE, which is why I put 'send vendor-class' in dhclient-DEVICE.conf during installation.

Hope that explains it.
Comment 3 Bill Nottingham 2008-12-16 15:00:29 EST
Given that anaconda writes out dhclient-DEVICE.conf, I'm not sure anything needs changed in initscripts. Am I missing something?
Comment 4 Vadym Chepkov 2008-12-16 16:23:14 EST
I assume anaconda does it during installation process, but installed system doesn't have 'send vendor-class-identifier' in dhclient-DEVICE.conf
Comment 5 Bill Nottingham 2008-12-16 16:37:35 EST
Does anaconda need to copy it to the installed system?
Comment 6 David Cantrell 2008-12-16 16:50:32 EST
(In reply to comment #5)
> Does anaconda need to copy it to the installed system?

Probably.  It's not doing that now.  Reassigning bug to me.
Comment 7 Vadym Chepkov 2008-12-16 22:04:24 EST
But if the settings in ifcfg-DEVICE are changed, anaconda won't be there to update dhclient-DEVICE.conf. I still think ifup-eth should do it, the same way it does it for DHCP_HOSTNAME, the changes are really trivial:

if [ -n "${DHCP_CLASSID}" ]; then
       # Send a vendor-class-identifier to the DHCP server
       if [ -w /etc/dhclient-${DEVICE}.conf ] ; then
           if ! LC_ALL=C grep "send *vendor-class-identifier *\"${DHCP_CLASSID}\"" /etc/dhclient-${DEVICE}.conf > /dev/null 2>&1 ; then
               echo "send vendor-class-identifier \"${DHCP_CLASSID}\";  # temporary RHL ifup addition" >> /etc/dhclient-${DEVICE}.conf
           fi
       elif ! [ -e /etc/dhclient-${DEVICE}.conf ] ; then
           echo "send vendor-class-identifier \"${DHCP_CLASSID}\";  # temporary RHL ifup addition" >> /etc/dhclient-${DEVICE}.conf
       fi
fi
Comment 8 David Cantrell 2008-12-16 23:11:18 EST
This fix will be included in anaconda-11.4.1.59-1 in rawhide.

Note You need to log in before you can comment on or make changes to this bug.