BUG: nmb on + systemd + more than 1 ethernet card.

3 ethernet cards, all with static IPs, only he first one (eth0 having the default route) gets an IP when nmb is enabled and you boot in systemd. No problem in systemV.
Tested on 2 12.1 systems 32 and 64bit. Reproducible: always.

See bug report here: https://bugzilla.novell.com/show_bug.cgi?id=735943

Could someone with a 12.1 system and a single netcard (with a static IP configured with if-up) enable nmb and boot in systemd? … and tell me if it takes 5 minutes for the login prompt to appear? Yes, in the worst case, you might have to wait 5 minutes.

My question is (as in the bug report) if the presence of several netcards turns nmb into a bottleneck while booting in systemd … but I can not test on a machine with a single netcard … because there isn’t any here.

On 12/13/2011 10:26 AM, please try again wrote:
>
> Could someone with a 12.1 system and a single netcard (with a static
> IP configured with if-up) enable nmb and boot in systemd? … and tell
> me if it takes 5 minutes for the login prompt to appear? Yes, in the
> worst case, you might have to wait 5 minutes.
>
> My question is (as in the bug report) if the presence of several
> netcards turns nmb into a bottleneck while booting in systemd … but I
> can not test on a machine with a single netcard … because there isn’t
> any here.
>

Please try again;

Have you read the sticky by swerdna at the top of the networking forum?

http://forums.opensuse.org/english/get-technical-help-here/network-internet/468521-problem-samba-opensuse-12-1-re-systemd.html

and these two Bugzilla reports:

https://bugzilla.novell.com/show_bug.cgi?id=731308

https://bugzilla.novell.com/show_bug.cgi?id=725503

This appears to be a known problem, or am I missing something?


P.V.
“We’re all in this together, I’m pulling for you” Red Green

Oops, no.

I didn’t experience #731308](Access Denied). I finally found the culprit of #735943](Access Denied) and submitted a patch (which I’m aware is a hack).

--- cifs.orig	2011-12-13 09:49:26.634591790 -0800
+++ cifs	2011-12-13 10:48:27.579907055 -0800
@@ -28,7 +28,7 @@
 configname="$1"
 shift
 interface="$1"
-if  $interface = "lo" ]; then
+if  "x$interface" == "xlo" ]; then
   exit 0
 fi
 shift
@@ -60,7 +60,7 @@
 		state=`read_cached_config_data dhcp4_state "$interface"`
 
 		if rc_active nmb; then
-			log_msg=$( rcnmb start 2>&1)
+		#	log_msg=$( rcnmb start 2>&1)
 			log_dbg "${log_msg}"
 		fi
 		# Restart cifs only if IPaddress changes and cifs is active

Commenting out the line in red in /etc/sysconfig/network/scripts/cifs resolves the stall (5 minutes) in systemd as well as the netcards issue, while still starting the nmb service. But I haven’t tried to copy data from and to the samba servers yet … so I should be prepared to bad surprises (after reading @swerdna’s post).

On 12/13/2011 8:06 PM, please try again wrote:
>
> venzkep;2418047 Wrote:
>>
>> Please try again;
<snip>
> I finally found
> the culprit of ‘#735943
> (https://bugzilla.novell.com/show_bug.cgi?id=735943) and submitted a
> patch (which I’m aware is a hack).
>
>
> Code:
> --------------------
> — cifs.orig 2011-12-13 09:49:26.634591790 -0800
> +++ cifs 2011-12-13 10:48:27.579907055 -0800
> @@ -28,7 +28,7 @@
> configname="$1"
> shift
> interface="$1"
> -if $interface = “lo” ]; then
> +if “x$interface” == “xlo” ]; then
> exit 0
> fi
> shift
> @@ -60,7 +60,7 @@
> state=read_cached_config_data dhcp4_state "$interface"
>
> if rc_active nmb; then
> - log_msg=$( rcnmb start 2>&1)
> + # log_msg=$( rcnmb start 2>&1)
> log_dbg “${log_msg}”
> fi
> # Restart cifs only if IPaddress changes and cifs is active
>
> --------------------
>
>
> Commenting out the line in red in /etc/sysconfig/network/scripts/cifs
> resolves the stall (5 minutes) in systemd as well as the netcards issue,
> while still starting the nmb service. But I haven’t tried to copy data
> from and to the samba servers yet … so I should be prepared to bad
> surprises (after reading @swerdna’s post).
>
>
Please try again;

Glad to hear you have this sorted out. I’ve been waiting for these bugs to be ironed out
before upgrading our 11.4 servers. I’ve had no actual experience with 12.1 yet, maybe mid
January.


P.V.
“We’re all in this together, I’m pulling for you” Red Green

Yes, confirmed!
I thought it was an kdm or gdm problem. So, it took me two days on it: changing kernel, DE(gnome to kde4) and DM(gdm, kdm and now lightdm).

Thanks for information and letting us know about the patch.
Regards,

Gilberto

Here’s the patch I’m using now (in /etc/sysconfig/network/scripts):

--- ./cifs.orig   2012-02-02 20:58:46.837670292 -0800
+++ ./cifs        2012-02-02 21:00:18.155499818 -0800
@@ -28,7 +28,7 @@
 configname="$1"
 shift
 interface="$1"
-if  $interface = "lo" ]; then
+if  "x$interface" == "xlo" ]; then
   exit 0
 fi
 shift
@@ -60,12 +60,12 @@
                state=`read_cached_config_data dhcp4_state "$interface"`
 
                if rc_active nmb; then
-                       log_msg=$( rcnmb **start** 2>&1)
+                       log_msg=$(systemctl --ignore-dependencies **restart** nmb.service 2>&1)
                        log_dbg "${log_msg}"
                fi
                # Restart cifs only if IPaddress changes and cifs is active
                if  "$state" == "new" ] && rc_active cifs; then
-                       log_msg=$( rccifs restart 2>&1)
+                       log_msg=$(systemctl --ignore-dependencies restart cifs.service 2>&1)
                        log_dbg "${log_msg}"
                fi
                ;;

Notice that I had to use “restart” instead of “start”. Otherwise it doesn’t work.
Here’s a bash script it you prefer. I’m not sure that patch works, as I had to recreate the original:


#! /bin/bash

# patching /etc/sysconfig/network/scripts/cifs
if ( ! grep -q xlo /etc/sysconfig/network/scripts/cifs ) ; then
        echo "*** patching /etc/sysconfig/network/scripts/cifs..."
        cat << EOFCIFS | sed -i -f -  /etc/sysconfig/network/scripts/cifs
s|if \ \$interface = "lo" ];|if  "x\$interface" == "xlo" ];|
s|log_msg=\$( rcnmb start 2>\&1)|log_msg=\$(systemctl --ignore-dependencies restart nmb.service 2>\&1)|
s|log_msg=\$( rccifs restart 2>\&1)|log_msg=\$(systemctl --ignore-dependencies restart cifs.service 2>\&1)|
EOFCIFS
fi