ifconfig does not detect wsrep_node_address correctly on german debian installation

Bug #1167368 reported by shinguz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL patches by Codership
Fix Released
Medium
Alex Yurchenko
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Status tracked in 5.6
5.5
Fix Released
Undecided
Unassigned
5.6
Fix Released
Undecided
Unassigned

Bug Description

On German translated Debian 6 installation

/sbin/ifconfig | grep -E '^[[:space:]]+inet addr:'

does not give correct result because in translation it looks as follows:

eth0 Link encap:Ethernet Hardware Adresse 00:16:d3:b3:7e:d2
          inet Adresse:192.168.1.216 Bcast:192.168.1.255 Maske:255.255.255.0
          inet6-Adresse: 2001:4dd0:ff00:809d:216:d3ff:feb3:7ed2/64 Gültigkeitsbereich:Global
          inet6-Adresse: fe80::216:d3ff:feb3:7ed2/64 Gültigkeitsbereich:Verbindung

Workaround: set wsrep_node_address manually.

IMHO ifconfig is NOT a good way to determine the correct interface. It is old fashioned and should not be used any more I was told.

What about:

ip addr show | grep inet | grep -v::1| grep -v 127.0.0.1 | head -n 1
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
    inet 192.168.1.222/24 brd 192.168.1.255 scope global eth0
    inet 192.168.1.88/24 brd 192.168.1.255 scope global secondary eth0:0
    inet6 2001:4dd0:ff00:809d:216:d3ff:feb9:a992/64 scope global dynamic
    inet6 fe80::216:d3ff:feb9:a992/64 scope link

From the Galera Cluster Training at LinuxHotel

PS: This is also not working on IPv6 I would assume whereas ip addr show could work...

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

> Workaround: set wsrep_node_address manually.

This is not a workaround, it is the proper node configuration! User is not supposed to rely on autodetection of node address, since it is clearly impossible to do correctly in the general case (e.g. 2 or more non-local addresses).

However ip addr note taken.

Changed in codership-mysql:
assignee: nobody → Alex Yurchenko (ayurchen)
milestone: none → 5.5.30-23.7.4
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Alex Yurchenko (ayurchen) wrote :
Changed in codership-mysql:
status: Confirmed → Fix Committed
Revision history for this message
shinguz (oli-sennhauser) wrote :

We were discussing this further... I was told, that the correct way to do this would be to set

LC_ALL=C

in the beginning of the script. That would make it less language dependent and thus more robust!

Changed in codership-mysql:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1332

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.