Bug #109996 There is no local IP address matching the one configured for the local node
Submitted: 9 Feb 2023 4:31 Modified: 6 Apr 2023 17:50
Reporter: Fooder fooder Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:8.0.32 OS:Ubuntu (Ubuntu 22.04)
Assigned to: CPU Architecture:x86

[9 Feb 2023 4:31] Fooder fooder
Description:
I have setup a MySQL innodb cluster based on 3 systemd-nspawn containers. I tried to verify HA of the cluster by rebooting a randomly chosen container and then  checking if the MySQL instance within the rebooted container can successfully rejoin the cluster. But the instance failed to rejoin. The relevant log:

[GCS] There is no local IP address matching the one configured for the local node

I verified that when the MySQL instance was being started by Systemd, no IP had yet been assigned by DHCP. Journalctl shows the MySQL server was started after the network target but before the network-online target after which an IP was available.

I overrode the original MySQL systemd service unit configuraiton:
Unit]
After=network-online.target
Wants=network-online.target

Then this issue is fixed.

There are two other issues with same bug message as this one, but the cause is different.
https://bugs.mysql.com/bug.php?id=92665
https://bugs.mysql.com/bug.php?id=93004

How to repeat:
a MySQL innodb cluster based on 3 systemd-nspawn containers. The containers do not use private network but a host bridge which allows them to share the same network sub-net with the host.

To reproduce the issue, the IP assignment by DHCP should have a latency window so that MySQL should be started by Systemd in this window and it shouldn't have a valid IP to rejoin the cluster.

Suggested fix:
The service unit file contained in MySQL packages (rpm, deb...) for download should use After=network-online.target instead of After=network.target
[9 Feb 2023 14:31] MySQL Verification Team
Hi,

Thanks for this report, great catch!!! This is not only related to group replication but many other scenarios as well.

kind regards
[6 Apr 2023 17:50] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Server 8.0.33 release, and here's the proposed changelog entry from the documentation team:

Changed the MySQL systemd service unit configuration from
After=network-online.target to Wants=network-online.target to ensure that
all configured network devices are available and have an IP address
assigned before the service is started.

Thank you for the bug report.