<div dir="ltr"><div>Hi Lucas,</div><div><br></div><div>Its always same, my OVSDB local instance is listening in unix:/var/run/openvswitch/db.sock</div><div><br></div><div>[root@zu-ovn-compute0 ~]# ps ax | grep ovn-controller<br>15398 ? S<s 0:00 ovn-controller unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --no-chdir --log-file=/var/log/openvswitch/ovn-controller.log --pidfile=/var/run/openvswitch/ovn-controller.pid --detach<br>15807 pts/0 S+ 0:00 grep --color=auto ovn-controller</div><div><br></div><div>[root@zu-ovn-compute0 ~]# grep ovsdb_connection /etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini <br>ovsdb_connection = unix:/var/run/openvswitch/db.sock<br></div><div><br></div><div>[root@zu-ovn-compute0 ~]# tail -f /var/log/neutron/networking-ovn-metadata-agent.log <br></div><div>2019-08-16 10:29:08.391 15647 CRITICAL neutron [-] Unhandled error: Exception: Could not connect to unix:/var/run/openvswitch/db.sock<br>2019-08-16 10:29:08.391 15647 ERROR neutron Traceback (most recent call last):<br>2019-08-16 10:29:08.391 15647 ERROR neutron File "/usr/bin/networking-ovn-metadata-agent", line 10, in <module><br>2019-08-16 10:29:08.391 15647 ERROR neutron sys.exit(main())<br>2019-08-16 10:29:08.391 15647 ERROR neutron File "/usr/lib/python2.7/site-packages/networking_ovn/cmd/eventlet/agents/metadata.py", line 17, in main<br>2019-08-16 10:29:08.391 15647 ERROR neutron metadata_agent.main()<br>2019-08-16 10:29:08.391 15647 ERROR neutron File "/usr/lib/python2.7/site-packages/networking_ovn/agent/metadata_agent.py", line 38, in main<br>2019-08-16 10:29:08.391 15647 ERROR neutron agt.start()<br>2019-08-16 10:29:08.391 15647 ERROR neutron File "/usr/lib/python2.7/site-packages/networking_ovn/agent/metadata/agent.py", line 139, in start<br>2019-08-16 10:29:08.391 15647 ERROR neutron self.ovs_idl = ovsdb.MetadataAgentOvsIdl().start()<br>2019-08-16 10:29:08.391 15647 ERROR neutron File "/usr/lib/python2.7/site-packages/networking_ovn/agent/metadata/ovsdb.py", line 59, in start<br>2019-08-16 10:29:08.391 15647 ERROR neutron 'Open_vSwitch')<br>2019-08-16 10:29:08.391 15647 ERROR neutron File "/usr/lib/python2.7/site-packages/ovsdbapp/backend/ovs_idl/idlutils.py", line 120, in get_schema_helper<br>2019-08-16 10:29:08.391 15647 ERROR neutron raise Exception("Could not connect to %s" % connection)<br>2019-08-16 10:29:08.391 15647 ERROR neutron Exception: Could not connect to unix:/var/run/openvswitch/db.sock<br>2019-08-16 10:29:08.391 15647 ERROR neutron</div><div><br></div><div>[root@zu-ovn-compute0 ~]# systemctl status openvswitch<br>● openvswitch.service - Open vSwitch<br> Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled; vendor preset: disabled)<br> Active: active (exited) since Jum 2019-08-16 10:27:01 EDT; 4min 22s ago<br> Main PID: 15323 (code=exited, status=0/SUCCESS)<br> Tasks: 0<br> CGroup: /system.slice/openvswitch.service<br><br>Agu 16 10:27:01 zu-ovn-compute0 systemd[1]: Starting Open vSwitch...<br>Agu 16 10:27:01 zu-ovn-compute0 systemd[1]: Started Open vSwitch.</div><div><br></div><div dir="ltr">[root@zu-ovn-compute0 ~]# systemctl status ovn-controller<br>● ovn-controller.service - OVN controller daemon<br> Loaded: loaded (/usr/lib/systemd/system/ovn-controller.service; enabled; vendor preset: disabled)<br> Active: active (running) since Jum 2019-08-16 10:27:12 EDT; 4min 22s ago<br> Main PID: 15398 (ovn-controller)<br> Tasks: 1<br> CGroup: /system.slice/ovn-controller.service<br> └─15398 ovn-controller unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --no-chdir --log-file=/var/log/openvswitch/ovn-controller...<br><br>Agu 16 10:27:12 zu-ovn-compute0 systemd[1]: Starting OVN controller daemon...<br>Agu 16 10:27:12 zu-ovn-compute0 ovn-ctl[15386]: Starting ovn-controller [ OK ]<br>Agu 16 10:27:12 zu-ovn-compute0 systemd[1]: Started OVN controller daemon.</div><div dir="ltr"><div><br></div><div><span style="font-family:arial,helvetica,sans-serif"><span lang="en"><span>Best Regards,<br></span></span></span></div><span lang="en"><span><span style="font-family:arial,helvetica,sans-serif">Zufar Dhiyaulhaq</span><br></span></span></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 16, 2019 at 9:21 PM Lucas Alvares Gomes <<a href="mailto:lucasagomes@gmail.com">lucasagomes@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Zufar,<br>
<br>
The ovn-metadata-agent is trying to connection with the local OVSDB<br>
instance via UNIX socket. The same socket used by the "ovn-controller"<br>
process running on your compute nodes. For example:<br>
<br>
$ ps ax | grep ovn-controller<br>
1640 ? S<sl 0:04 ovn-controller<br>
unix:/usr/local/var/run/openvswitch/db.sock -vconsole:emer<br>
-vsyslog:err -vfile:info --no-chdir<br>
--log-file=/opt/stack/logs/ovn-controller.log<br>
--pidfile=/usr/local/var/run/openvswitch/ovn-controller.pid --detach<br>
<br>
Can you see the "unix:/usr/local/var/run/openvswitch/db.sock" ? That's<br>
the UNIX socket path that needs to be passed to the ovn-metadata-agent<br>
via configuration option.<br>
<br>
You can find that configuration option at:<br>
<br>
$ grep ovsdb_connection /etc/neutron/networking_ovn_metadata_agent.ini<br>
ovsdb_connection = unix:/usr/local/var/run/openvswitch/db.sock<br>
<br>
Hope that helps,<br>
Lucas<br>
<br>
On Fri, Aug 16, 2019 at 5:53 AM Zufar Dhiyaulhaq<br>
<<a href="mailto:zufardhiyaulhaq@gmail.com" target="_blank">zufardhiyaulhaq@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> I have set up OpenStack with OVN enabled (manual install) and I can create Instance, associate floating IP and test the ping.<br>
><br>
> But my Instance not getting metadata from OpenStack. I check the reference architecture, <a href="https://docs.openstack.org/networking-ovn/queens/admin/refarch/refarch.html" rel="noreferrer" target="_blank">https://docs.openstack.org/networking-ovn/queens/admin/refarch/refarch.html</a> the compute nodes should have installed ovn-metadata-agent but I don't find any configuration document about ovn-metadata-agent.<br>
><br>
> I have configured the configuration files like this:<br>
><br>
> [DEFAULT]<br>
> nova_metadata_ip = 10.100.100.10<br>
> [ovs]<br>
> ovsdb_connection = unix:/var/run/openvswitch/db.sock<br>
> [ovn]<br>
> ovn_sb_connection = tcp:<a href="http://10.101.101.10:6642" rel="noreferrer" target="_blank">10.101.101.10:6642</a><br>
><br>
> But the agent always fails. Full logs: <a href="http://paste.openstack.org/show/757805/" rel="noreferrer" target="_blank">http://paste.openstack.org/show/757805/</a><br>
><br>
> Anyone know whats happen and how to fix this error?<br>
><br>
> Best Regards,<br>
> Zufar Dhiyaulhaq<br>
</blockquote></div>