Deploying neutron-gateway fails if ipv6 is disabled on the host or instance

Bug #1882305 reported by David A. Desrosiers
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Neutron Gateway Charm
Triaged
Medium
Unassigned

Bug Description

When deploying cs:openstack-base, if ipv6 is disabled on the target nodes at the kernel level, neutron-gateway will fail with the following message in the logs, and the hook will exit 1, instead of 0, causing the unit to go into 'error' state:

2020-06-05 18:38:13 DEBUG config-changed net.ipv4.neigh.default.gc_thresh1 = 128
2020-06-05 18:38:13 DEBUG config-changed net.ipv4.neigh.default.gc_thresh2 = 28672
2020-06-05 18:38:13 DEBUG config-changed net.ipv4.neigh.default.gc_thresh3 = 32768
2020-06-05 18:38:13 DEBUG config-changed sysctl: cannot stat /proc/sys/net/ipv6/neigh/default/gc_thresh1: No such file or directory
2020-06-05 18:38:13 DEBUG config-changed sysctl: cannot stat /proc/sys/net/ipv6/neigh/default/gc_thresh2: No such file or directory
2020-06-05 18:38:13 DEBUG config-changed sysctl: cannot stat /proc/sys/net/ipv6/neigh/default/gc_thresh3: No such file or directory
2020-06-05 18:38:13 DEBUG config-changed net.nf_conntrack_max = 1000000
2020-06-05 18:38:13 DEBUG config-changed net.netfilter.nf_conntrack_buckets = 204800
2020-06-05 18:38:13 DEBUG config-changed net.netfilter.nf_conntrack_max = 1000000
2020-06-05 18:38:13 DEBUG config-changed none
2020-06-05 18:38:13 DEBUG config-changed Traceback (most recent call last):
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/config-changed", line 387, in <module>
2020-06-05 18:38:13 DEBUG config-changed main()
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/config-changed", line 379, in main
2020-06-05 18:38:13 DEBUG config-changed hooks.execute(sys.argv)
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/charmhelpers/core/hookenv.py", line 943, in execute
2020-06-05 18:38:13 DEBUG config-changed self._hooks[hook_name]()
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1706, in wrapped_f
2020-06-05 18:38:13 DEBUG config-changed stopstart, restart_functions)
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/charmhelpers/core/host.py", line 741, in restart_on_change_helper
2020-06-05 18:38:13 DEBUG config-changed r = lambda_f()
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1705, in <lambda>
2020-06-05 18:38:13 DEBUG config-changed (lambda: f(*args, **kwargs)), __restart_map_cache['cache'],
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 93, in _harden_inner2
2020-06-05 18:38:13 DEBUG config-changed return f(*args, **kwargs)
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/config-changed", line 147, in config_changed
2020-06-05 18:38:13 DEBUG config-changed '/etc/sysctl.d/50-quantum-gateway.conf')
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/charmhelpers/core/sysctl.py", line 75, in create
2020-06-05 18:38:13 DEBUG config-changed raise e
2020-06-05 18:38:13 DEBUG config-changed File "/var/lib/juju/agents/unit-neutron-gateway-0/charm/hooks/charmhelpers/core/sysctl.py", line 69, in create
2020-06-05 18:38:13 DEBUG config-changed check_call(call)
2020-06-05 18:38:13 DEBUG config-changed File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
2020-06-05 18:38:13 DEBUG config-changed raise CalledProcessError(retcode, cmd)
2020-06-05 18:38:13 DEBUG config-changed subprocess.CalledProcessError: Command '['sysctl', '-p', '/etc/sysctl.d/50-quantum-gateway.conf']' returned non-zero exit status 255.
2020-06-05 18:38:13 ERROR juju.worker.uniter.operation runhook.go:136 hook "config-changed" (via explicit, bespoke hook script) failed: exit status 1

The machine in this case, is maas-provisioned, and contains the kernel arg 'ipv6.disable=1', among others, which is inherited by the machines, VMs and units that maas and juju deploy.

Removing this arg from the neutron-gateway/0 node, re-running 'update-grub' and rebooting that node, allows the charm hooks to continue without error (after 'juju resolved neutron-gateway/0' of course).

Ideally, if ipv6 is disabled, the ipv6-specific tunables should be excluded from the hook, and only the ipv4 tunables applied.

Changed in charm-neutron-gateway:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Imtiaz Chowdhury (chowdhury-imtiaz) wrote :

I also ran into this issue while trying to deploy OpenStack Ussuri with Kolla Ansible.

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.