1

I constantly see this line of Error in neutron . I dont know how to solve it.

ERROR neutron.agent.dhcp.agent [-] Unexpected number of DHCP interfaces for metadata proxy, expected 1, got 3

thanks in advance

Aref
  • 144
  • 1
  • 7
  • 1
    Try to disable IPV6 if you don't need it. check from the source code is a good way: https://github.com/openstack/neutron/blob/1fa2e49f01e0f6779c396b8d22acd97a1e9baa72/neutron/agent/dhcp/agent.py#L761 – Victor Lee Apr 12 '22 at 08:54
  • @VictorLee Thanks I disabled it and it works for me. Can you tell me what's the reason of that, it is not understandable for me – Aref Apr 18 '22 at 07:31
  • bcz it won't check the **dhcp_ifaces** while you disable IPV6 that the process won't get into `if netutils.is_ipv6_enabled():` code block, search from source code according to your error tips. It just for resolving this error tips, I guess it's not a good method while you need to setting IPV6 or using more than one **dhcp_ifaces**. – Victor Lee Apr 18 '22 at 07:39
  • exactly its not good method. I re-enable ipv6 and its working too. I am affraid to occure later – Aref Apr 18 '22 at 07:44
  • yeah I checked the code. but nothing found. I was wondering whats the best solution for that – Aref Apr 18 '22 at 07:46
  • @VictorLee did you encounter the same issue, what would you do? – Aref Apr 18 '22 at 08:02
  • No, I didn't met that issue. I think you could check the configure option `dhcp_agents_per_network` in **/etc/kolla/neutron-server/neutron.conf** or other `neutron` components. And maybe you should try the method which mentioned by SMJ. – Victor Lee Apr 18 '22 at 08:39

2 Answers2

0

It's so simple. Just delete all DHCP agents from OpenStack and add a new agent to every controller node, then recover your MariaDB database with the Kolla-ansible module. make sure that you have enough IPs to create new DHCP agents and that your network interface is configured correctly.

SMJ
  • 11
  • 3
0

I ran into the exact same error message after upgrading neutron to victoria and opened a bug ticket for this. It ended up to be a bug in the ipv6 metadata implementation and is already fixed in the stable branches of neutron. https://bugs.launchpad.net/neutron/+bug/1989979