When using VLAN public interfaces the ip_maskbits_iface in /etc/ctdb/functions does not correctly parse the iface name. The following error is an example of the result: 2015/12/02 01:31:09.760391 [26341]: 10.interface: /etc/ctdb/functions: line 193: /proc/sys/net/ipv4/conf/eth1.3970@eth1/promote_secondaries: No such file or directory The old version of this function handled this correctly: ip_maskbits_iface () { _addr="$1" ip addr show to "${_addr}/32" 2>/dev/null | \ awk '$1 == "inet" { print gensub(".*/", "", 1, $2), $NF }' } HOWEVER the new version of this function does not appear to parse correctly and leaves the "@eth1": ip_maskbits_iface () { _addr="$1" case "$_addr" in *:*) _family="inet6" ; _bits=128 ;; *) _family="inet" ; _bits=32 ;; esac ip addr show to "${_addr}/${_bits}" 2>/dev/null | \ awk -v family="${_family}" \ 'NR == 1 { iface = $2; sub(":$", "", iface) } \ $1 ~ /inet/ { mask = $2; sub(".*/", "", mask); \ print mask, iface, family }' }
Is it possible that this is fixed in Samba (which has included ctdb with Samba 4.2) with https://git.samba.org/?p=samba.git;a=commitdiff;h=87c5c96b76 ?
James, can you please try to see if the following commit fixes the problem? https://git.samba.org/?p=martins/samba.git;a=commitdiff;h=87c5c96b767aa317dd620f89ac3e11bb40dae70f If not, can you please paste the output of "ip addr show eth1.3970" so I can see how it behaves with the parsing code? Thanks...
Yep, my question is the same as Volker's. Unfortunate scrolling in my browser meant I only saw the 1st line of his response... :-(
Yes Volker that does fix the issue! - 'NR == 1 { iface = $2; sub(":$", "", iface) } \ + 'NR == 1 { iface = $2; sub(":$", "", iface) ; \ + sub("@.*", "", iface) } \ Once the /etc/ctdb/functions file has the above change everything works fine.
This is fixed in CTDB 2.5.6, which has just been released. From the release notes... This will be the last stable release of CTDB 2.5.x. CTDB 2.5.6 should only be used with Samba releases prior to Samba 4.2.x (i.e. Samba releases 3.6.x, 4.0.x and 4.1.x). Please note that Samba releases 3.6.x, 4.0.x and 4.1.x are out of support. If you are still using any of these releases for clustered samba with CTDB 2.5.x, please switch to latest Samba 4.3.x or 4.4.0 (Since Samba 4.2.0 release CTDB is part of Samba).