** Description changed:

- When checking isc-dhcp-server unit file I saw isc-dhcp-server is being
- started by:
+ [Impact]
+ 
+ When checking isc-dhcp-server unit file it was seen that isc-dhcp-server
+ is being started by:
  
  ConditionPathExists=/etc/default/isc-dhcp-server
  ConditionPathExists=|/etc/ltsp/dhcpd.conf
  ConditionPathExists=|/etc/dhcp/dhcpd.conf
  
  [Service]
  EnvironmentFile=/etc/default/isc-dhcp-server
  RuntimeDirectory=dhcp-server
  # The leases files need to be root:dhcpd even when dropping privileges
  ExecStart=/bin/sh -ec '\
      CONFIG_FILE=/etc/dhcp/dhcpd.conf; \
      if [ -f /etc/ltsp/dhcpd.conf ]; then CONFIG_FILE=/etc/ltsp/dhcpd.conf; 
fi; \
      [ -e /var/lib/dhcp/dhcpd.leases ] || touch /var/lib/dhcp/dhcpd.leases; \
      chown root:dhcpd /var/lib/dhcp /var/lib/dhcp/dhcpd.leases; \
      chmod 775 /var/lib/dhcp ; chmod 664 /var/lib/dhcp/dhcpd.leases; \
      exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid 
-cf $CONFIG_FILE $INTERFACES'
  
  But the /etc/default/isc-dhcp-server file sets $INTERFACESv4 and
  $INTERFACESv6.
  
- This has only been working because cmdline sets -4 and subnet
- declaration in dhcpd.conf file makes dhcp-server to bind to the correct
- interfaces, as it looks like.
+ The previous upload(er) forgot to mention (and split) the INTERFACES
+ variable to v4 and v6 and as a result, it has been this way for so long.
+ 
+ The SRU would split the variables into respective names, thereby making
+ sure that what /etc/default/isc-dhcp-serve sets, is available in the
+ respective service file.
+ 
+ 
+ [Test Plan]
+ 
+ To reproduce, simply install isc-dhcp-server via apt.
+ Now, if you see the /etc/default/isc-dhcp-server file, it sets 2 variables, 
namely, INTERFACESv4 and INTERFACESv6. However, if you check the respective 
services file, that is, /lib/systemd/system/isc-dhcp-server.service and 
/lib/systemd/system/isc-dhcp-server6.service, it is still using the INTERFACES 
variable. 
+ 
+ After the SRU is performed, the respective services files should use
+ INTERFACESv4 and INTERFACESv6 variable, instead of just INTERFACES.
+ 
+ To ensure smooth upgrade of this package, we'd check if the user hasn't
+ manually set a INTERFACESv{4,6} variable to workaround this bug. If they
+ have, then we simply check and make sure, we use the correct variable.
+ 
+ 
+ [Where problems could occur]
+ 
+ The problem could occur if the user has manually set some different
+ workaround this bug and so the usual upgrade could break some of their
+ old configuration.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1894172

Title:
  isc-dhcp-server using wrong env variable for INTERFACES

Status in isc-dhcp package in Ubuntu:
  Fix Released
Status in isc-dhcp source package in Bionic:
  Confirmed
Status in isc-dhcp source package in Focal:
  Confirmed
Status in isc-dhcp source package in Groovy:
  Confirmed

Bug description:
  [Impact]

  When checking isc-dhcp-server unit file it was seen that isc-dhcp-
  server is being started by:

  ConditionPathExists=/etc/default/isc-dhcp-server
  ConditionPathExists=|/etc/ltsp/dhcpd.conf
  ConditionPathExists=|/etc/dhcp/dhcpd.conf

  [Service]
  EnvironmentFile=/etc/default/isc-dhcp-server
  RuntimeDirectory=dhcp-server
  # The leases files need to be root:dhcpd even when dropping privileges
  ExecStart=/bin/sh -ec '\
      CONFIG_FILE=/etc/dhcp/dhcpd.conf; \
      if [ -f /etc/ltsp/dhcpd.conf ]; then CONFIG_FILE=/etc/ltsp/dhcpd.conf; 
fi; \
      [ -e /var/lib/dhcp/dhcpd.leases ] || touch /var/lib/dhcp/dhcpd.leases; \
      chown root:dhcpd /var/lib/dhcp /var/lib/dhcp/dhcpd.leases; \
      chmod 775 /var/lib/dhcp ; chmod 664 /var/lib/dhcp/dhcpd.leases; \
      exec dhcpd -user dhcpd -group dhcpd -f -4 -pf /run/dhcp-server/dhcpd.pid 
-cf $CONFIG_FILE $INTERFACES'

  But the /etc/default/isc-dhcp-server file sets $INTERFACESv4 and
  $INTERFACESv6.

  The previous upload(er) forgot to mention (and split) the INTERFACES
  variable to v4 and v6 and as a result, it has been this way for so
  long.

  The SRU would split the variables into respective names, thereby
  making sure that what /etc/default/isc-dhcp-serve sets, is available
  in the respective service file.

  
  [Test Plan]

  To reproduce, simply install isc-dhcp-server via apt.
  Now, if you see the /etc/default/isc-dhcp-server file, it sets 2 variables, 
namely, INTERFACESv4 and INTERFACESv6. However, if you check the respective 
services file, that is, /lib/systemd/system/isc-dhcp-server.service and 
/lib/systemd/system/isc-dhcp-server6.service, it is still using the INTERFACES 
variable. 

  After the SRU is performed, the respective services files should use
  INTERFACESv4 and INTERFACESv6 variable, instead of just INTERFACES.

  To ensure smooth upgrade of this package, we'd check if the user
  hasn't manually set a INTERFACESv{4,6} variable to workaround this
  bug. If they have, then we simply check and make sure, we use the
  correct variable.

  
  [Where problems could occur]

  The problem could occur if the user has manually set some different
  workaround this bug and so the usual upgrade could break some of their
  old configuration.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1894172/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to