osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[neutron][OVN] Instance not getting metadata


Hi Lucas,

Its always same, my OVSDB local instance is listening in
unix:/var/run/openvswitch/db.sock

[root at zu-ovn-compute0 ~]#  ps ax | grep ovn-controller
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
15807 pts/0    S+     0:00 grep --color=auto ovn-controller

[root at zu-ovn-compute0 ~]#  grep ovsdb_connection
/etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini
ovsdb_connection = unix:/var/run/openvswitch/db.sock

[root at zu-ovn-compute0 ~]# tail -f
/var/log/neutron/networking-ovn-metadata-agent.log
2019-08-16 10:29:08.391 15647 CRITICAL neutron [-] Unhandled error:
Exception: Could not connect to unix:/var/run/openvswitch/db.sock
2019-08-16 10:29:08.391 15647 ERROR neutron Traceback (most recent call
last):
2019-08-16 10:29:08.391 15647 ERROR neutron   File
"/usr/bin/networking-ovn-metadata-agent", line 10, in <module>
2019-08-16 10:29:08.391 15647 ERROR neutron     sys.exit(main())
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
2019-08-16 10:29:08.391 15647 ERROR neutron     metadata_agent.main()
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
2019-08-16 10:29:08.391 15647 ERROR neutron     agt.start()
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
2019-08-16 10:29:08.391 15647 ERROR neutron     self.ovs_idl =
ovsdb.MetadataAgentOvsIdl().start()
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
2019-08-16 10:29:08.391 15647 ERROR neutron     'Open_vSwitch')
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
2019-08-16 10:29:08.391 15647 ERROR neutron     raise Exception("Could not
connect to %s" % connection)
2019-08-16 10:29:08.391 15647 ERROR neutron Exception: Could not connect to
unix:/var/run/openvswitch/db.sock
2019-08-16 10:29:08.391 15647 ERROR neutron

[root at zu-ovn-compute0 ~]# systemctl status openvswitch
â?? openvswitch.service - Open vSwitch
   Loaded: loaded (/usr/lib/systemd/system/openvswitch.service; enabled;
vendor preset: disabled)
   Active: active (exited) since Jum 2019-08-16 10:27:01 EDT; 4min 22s ago
 Main PID: 15323 (code=exited, status=0/SUCCESS)
    Tasks: 0
   CGroup: /system.slice/openvswitch.service

Agu 16 10:27:01 zu-ovn-compute0 systemd[1]: Starting Open vSwitch...
Agu 16 10:27:01 zu-ovn-compute0 systemd[1]: Started Open vSwitch.

[root at zu-ovn-compute0 ~]# systemctl status ovn-controller
â?? ovn-controller.service - OVN controller daemon
   Loaded: loaded (/usr/lib/systemd/system/ovn-controller.service; enabled;
vendor preset: disabled)
   Active: active (running) since Jum 2019-08-16 10:27:12 EDT; 4min 22s ago
 Main PID: 15398 (ovn-controller)
    Tasks: 1
   CGroup: /system.slice/ovn-controller.service
           â??â??15398 ovn-controller unix:/var/run/openvswitch/db.sock
-vconsole:emer -vsyslog:err -vfile:info --no-chdir
--log-file=/var/log/openvswitch/ovn-controller...

Agu 16 10:27:12 zu-ovn-compute0 systemd[1]: Starting OVN controller
daemon...
Agu 16 10:27:12 zu-ovn-compute0 ovn-ctl[15386]: Starting ovn-controller [
 OK  ]
Agu 16 10:27:12 zu-ovn-compute0 systemd[1]: Started OVN controller daemon.

Best Regards,
Zufar Dhiyaulhaq


On Fri, Aug 16, 2019 at 9:21 PM Lucas Alvares Gomes <lucasagomes at gmail.com>
wrote:

> Hi Zufar,
>
> The ovn-metadata-agent is trying to connection with the local OVSDB
> instance via UNIX socket. The same socket used by the "ovn-controller"
> process running on your compute nodes. For example:
>
> $ ps ax | grep ovn-controller
>  1640 ?        S<sl   0:04 ovn-controller
> unix:/usr/local/var/run/openvswitch/db.sock -vconsole:emer
> -vsyslog:err -vfile:info --no-chdir
> --log-file=/opt/stack/logs/ovn-controller.log
> --pidfile=/usr/local/var/run/openvswitch/ovn-controller.pid --detach
>
> Can you see the "unix:/usr/local/var/run/openvswitch/db.sock" ? That's
> the UNIX socket path that needs to be passed to the ovn-metadata-agent
> via configuration option.
>
> You can find that configuration option at:
>
> $ grep ovsdb_connection /etc/neutron/networking_ovn_metadata_agent.ini
> ovsdb_connection = unix:/usr/local/var/run/openvswitch/db.sock
>
> Hope that helps,
> Lucas
>
> On Fri, Aug 16, 2019 at 5:53 AM Zufar Dhiyaulhaq
> <zufardhiyaulhaq at gmail.com> wrote:
> >
> > Hi,
> >
> > I have set up OpenStack with OVN enabled (manual install) and I can
> create Instance, associate floating IP and test the ping.
> >
> > But my Instance not getting metadata from OpenStack. I check the
> reference architecture,
> https://docs.openstack.org/networking-ovn/queens/admin/refarch/refarch.html
> the compute nodes should have installed ovn-metadata-agent but I don't find
> any configuration document about ovn-metadata-agent.
> >
> > I have configured the configuration files like this:
> >
> > [DEFAULT]
> > nova_metadata_ip = 10.100.100.10
> > [ovs]
> > ovsdb_connection = unix:/var/run/openvswitch/db.sock
> > [ovn]
> > ovn_sb_connection = tcp:10.101.101.10:6642
> >
> > But the agent always fails. Full logs:
> http://paste.openstack.org/show/757805/
> >
> > Anyone know whats happen and how to fix this error?
> >
> > Best Regards,
> > Zufar Dhiyaulhaq
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190816/1e60f7d8/attachment-0001.html>