Merge "Enable lo interface in the amphora-haproxy netns"

This commit is contained in:
Zuul 2021-07-01 00:53:28 +00:00 committed by Gerrit Code Review
commit 6ac6dcbcbf
3 changed files with 13 additions and 1 deletions

View File

@ -390,7 +390,7 @@ class RH(BaseOS):
if not network_dir:
network_dir = self.get_network_path()
if not ignore:
ignore = shutil.ignore_patterns('ifcfg-eth0*', 'ifcfg-lo*')
ignore = shutil.ignore_patterns('ifcfg-eth0*')
super().create_netns_dir(
network_dir, netns_network_dir, ignore)

View File

@ -26,7 +26,11 @@ ExecStart=-/bin/sh -c '/usr/bin/sort -k 1 /var/lib/octavia/plugged_interfaces >
ExecStart=-/bin/sh -c '/sbin/ip link | awk \'{getline n; print $0,n}\' | awk \'{sub(":","",$2)} { for(i=1;i<=NF;i++) if ($i == "link/ether") {print $(i+1) " " $2} }\' | sort -k 1 | join -j 1 - /var/lib/octavia/plugged_interfaces.sorted | awk \'{system("ip link set "$2" netns {{ amphora_nsname }} name "$3"")}\''
# Bring up all of the namespace interfaces
{%- if HasIFUPAll %}
# Ubuntu seems to not correctly set up the lo iface when calling ifup -a
# Disable it first, before setting it up.
ExecStart=-/sbin/ip netns exec {{ amphora_nsname }} ifdown lo
ExecStart=-/sbin/ip netns exec {{ amphora_nsname }} ifup -a
{%- else %}
ExecStart=-/sbin/ip netns exec {{ amphora_nsname }} ifup lo
ExecStart=-/bin/awk '{system("/sbin/ip netns exec {{ amphora_nsname }} ifup " $2)}' /var/lib/octavia/plugged_interfaces
{%- endif %}

View File

@ -0,0 +1,8 @@
---
fixes:
- |
Fixed an issue with the ``lo`` interface in the ``amphora-haproxy`` network
namespace. The ``lo`` interface was down and prevented haproxy to
communicate with other haproxy processes (for persistent stick tables) on
configuration change. It delayed old haproxy worker cleanup and increased
the memory consumption usage after reloading the configuration.