Bug #2213

/etc/resolv.conf overwritten by dhclient

Added by Davide Principi almost 8 years ago. Updated almost 8 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-base
Target version:v6.4-beta2
Security class: Resolution:
Affected version:v6.4-beta1 NEEDINFO:No

Description

Symptom
/etc/resolv.conf is overwritten by dhclient:

    # cat /etc/resolv.conf 
; generated by /sbin/dhclient-script
search nethesis.it vboxnet0.tld
nameserver 192.168.5.252

dhclient is running with -1 option (see #2057#note-4)

    # ps -C dhclient -o command | tail
COMMAND
/sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth1.leases -pf /var/run/dhclient-eth1.pid eth1

Reproducibility
Configure a red interface with DHCP

Expected behaviour
/etc/resolv.conf contains the result of the template expansion


Related issues

Related to NethServer 6 - Enhancement #2057: Firewall: enhance DHCP configuration on red interfaces CLOSED 07/15/2013 07/19/2013

History

#1 Updated by Davide Principi almost 8 years ago

This defect has arisen in nethserver-base-1.0.5 after moving NethServer/Module/NetworkAdapter/Modify.php from nethserver-firewall-base, in #2075

Giacomo had fixed this behaviour in nethserver-firewall-base|04fca2e9a

#2 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from TRIAGED to ON_DEV
  • % Done changed from 20 to 30

#3 Updated by Giacomo Sanchietti almost 8 years ago

  • Assignee set to Giacomo Sanchietti

#4 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

The bug was already fixed in nethserver-firewall-base, and was re-introduced when the network UI module was moved from nethserver-firewall-base to nethserver-base.
See commits nethserver:nethserver-firewall-base|aa781dd2 and nethserver:nethserver-firewall-base|efdc4b76.

Lost fixes are now been moved to a special action called interface-config-adjust, executed in interface-update event, just before expand-template.

#5 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from MODIFIED to ON_QA
  • % Done changed from 60 to 70
New package in nethserver-testing:
  • nethserver-base-1.4.1-10.0git148d5133.ns6.noarch.rpm
Test case
  • Configure a machine with only 1 ethernet card
  • Add a new ethernet card and configure it as red using the web UI
  • After save, green device should not have the gateway property anymore
  • If red interface is configured with DHCP, check following properties:
    • persisten_dhclient should be y
    • peerdns should be no

#6 Updated by Giacomo Sanchietti almost 8 years ago

  • Assignee deleted (Giacomo Sanchietti)

#7 Updated by Davide Principi almost 8 years ago

  • Assignee set to Davide Principi

#8 Updated by Davide Principi almost 8 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

VERIFIED

    # rpm -qa | grep ^neth | sort
nethserver-base-1.4.1-12.0gitce7f7f4e.ns6.noarch
nethserver-grub-1.0.1-1.ns6.noarch
nethserver-httpd-admin-1.0.5-2.0git1ca852bd.ns6.noarch
nethserver-lib-1.3.1-1.0git2f4e0795.ns6.noarch
nethserver-nethgui-1.2.4-1.ns6.noarch
nethserver-ntp-1.0.4-3.0git89404714.ns6.noarch
nethserver-openssh-1.0.3-1.ns6.noarch
nethserver-php-1.1.0-1.ns6.noarch
nethserver-release-6.4-3.0gite4f69d31.ns6.noarch
nethserver-smartd-1.0.0-1.ns6.noarch
nethserver-yum-1.1.1-1.ns6.noarch

#9 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
In nethserver-updates:
  • nethserver-base-1.4.3

Also available in: Atom PDF