#965 Issue closed: wickedd-dhcp SLES12

Labels: documentation, support / question, fixed / solved / done

gozora opened issue at 2016-08-16 11:31:

Relax-and-Recover (rear) Issue Template

Please fill in the following items before submitting a new issue:

  • rear version (/usr/sbin/rear -V): Relax-and-Recover 1.18 / Git
  • OS version (cat /etc/rear/os.conf or lsb_release -a): SUSE Linux Enterprise Server 12 SP1
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
ONLY_INCLUDE_VG=( "vg00" )

EXCLUDE_BACKUP=( ${EXCLUDE_BACKUP[@]} fs:/crash fs:/usr/sap fs:/oracle )

BACKUP_PROG_EXCLUDE=( ${BACKUP_PROG_EXCLUDE[@]} '/mnt/*' )

ISO_MKISOFS_BIN=/usr/bin/ebiso
BACKUP=NETFS
OUTPUT=ISO

BACKUP_URL=nfs://beta/mnt/rear
OUTPUT_URL=nfs://beta/mnt/rear/iso
EXCLUDE_MD=( $(grep -o -E '^md[0-9]+' /proc/mdstat) ) # exclude all md devices

GRUB_RESCUE=y

COPY_AS_IS=( ${COPY_AS_IS[@]} /sbin/sysctl /etc/sysctl.conf /sbin/vconfig /sbin/if* /etc/sysconfig/network /sbin/shutdown.wrap )
  • Brief description of the issue dhcp configuration with wicked
  • Work-around, if any

@jsmeix this is more a question for you rather that issue.
You've mentioned to use dhcp for rear testing. In SLES2 SP1 I have wicked running for network management, but rear have hard coded binaries to look for (wicked is not part of them).
from 21_include_dhclient.sh:

for x in "${DHCLIENT_BIN##*/}" \
        "${DHCLIENT6_BIN##*/}" \
        dhcpcd dhclient \
        dhcp6c dhclient6 ;
do
...

As you can see here even if dhcp is running on SLES12 SP1, it can't work "out of the box" in rear recover.

Can you please share with me how do you have your environment set ?

gozora commented at 2016-08-16 12:05:

It looks like it might appear to work on SLES12 SP1 however IP set is definitely not assigned by DHCP.

On my system process responsible for DHCP configuration is this one:
/usr/lib/wicked/bin/wickedd-dhcp4 --systemd --foreground

following code in 21_include_dhclient.sh is responsible to set whether DHCP will or will not be in use:

   dhcp_interfaces_active() {
   local my_dhclients
   my_dhclients=${dhclients}
   my_dhclients=${dhclients// /|}
   ps -e | grep -qEs "[ /]($my_dhclients)"
   if [ $? -eq 0 ]; then
        # if we find a dhcp client being active we automatically
        # include DHCP CLIENT support in Relax-and-Recover
        Log "Running DHCP client found, enabling USE_DHCLIENT"
        USE_DHCLIENT=y
   fi

In other words USE_DHCP will be set to 'y' only if one of following daemons is running on OS: dhcpcd dhclient dhcp6c dhclient6 dhclient dhcp6c dhclient6 this condition is not met (at least) on my SLES12 SP1, for this reason rear recover will handle network setup as if it would be a static one.

In order to confirm this, can you please boot your recovery medium an check if you have lines similar to these in your /etc/rear/recover.conf?

USE_DHCLIENT=y
DHCLIENT_BIN=dhclient

Thx

V.

jsmeix commented at 2016-08-16 12:59:

@gozora
probably no real surprise: currently I know nothing at all
about SUSE's wicked (and I was grateful for that up to now ;-)
I ask for patience until I got https://github.com/rear/rear/issues/963 done.

jsmeix commented at 2016-08-16 13:05:

On my original system (now SLES12-SP2-rc1):

USE_DHCLIENT="yes"

In the recovery system:

RESCUE d245:~ # grep -i dhc /etc/rear/rescue.conf
# The following 3 lines were added through 21_include_dhclient.sh
USE_DHCLIENT=yes
DHCLIENT_BIN=dhclient
DHCLIENT6_BIN=dhclient6
RESCUE d245:~ # 

jsmeix commented at 2016-08-16 13:10:

@gozora
do you know that on the recovery system boot screen
where you select what to boot, you can press the 'tab' key
to get the kernel command line for the currently selected entry
and when you append ' debug' to the kernel command line
the system-setup scripts of the recovery system
are run with 'set -x' and need an 'enter' keypress before
each one starts so that you can more easily debug what
exactly the recovery system-setup scripts do, cf.
skel/default/etc/scripts/system-setup

gozora commented at 2016-08-16 13:57:

I ask for patience until I got #963 done.

Sure no rush here ...

with USE_DHCLIENT="yes" it works for me fine as well, and brought some light to understanding this whole setup.

Thanks for that debug hint, it is definitely useful, btw you can use it same way on UEFI based systems, only difference is that you need to press 'e' while in grub2 menu ;-)


[Export of Github issue for rear/rear.]