Ask Your Question
0

neutron agents registering as 'localhost'

asked 2013-07-23 22:16:37 -0500

jamo gravatar image

Hello,

In my current setup my agents are registering with my server with the name 'localhost'. my hostnames are short one liners with no "delimiting dots". for example: democomputenode

however, my quantum agent-list output is showing me:

+--------------------------------------+--------------------+------------+-------+----------------+ | id | agent_type | host | alive | admin_state_up | +--------------------------------------+--------------------+------------+-------+----------------+ | 7fb186eb-3297-4037-bc1e-9dda177aaf76 | L3 agent | localhost | :-) | True | | a0938264-81a1-4d30-84d8-de9d70f351e6 | DHCP agent | localhost | :-) | True | | ce7e534b-3e8c-4cdf-9636-eaabd9b8e2d1 | Open vSwitch agent | localhost | :-) | True | +--------------------------------------+--------------------+------------+-------+----------------+

however, if i change my hostname to something like 'democomputenode.domain01' it will register with that full hostname.

+--------------------------------------+--------------------+-------------------------+-------+----------------+ | id | agent_type | host | alive | admin_state_up | +--------------------------------------+--------------------+-------------------------+-------+----------------+ | 7fb186eb-3297-4037-bc1e-9dda177aaf76 | L3 agent | localhost | :-) | True | | a0938264-81a1-4d30-84d8-de9d70f351e6 | DHCP agent | localhost | :-) | True | | ce7e534b-3e8c-4cdf-9636-eaabd9b8e2d1 | Open vSwitch agent | democomputenode.domain01 | xxx | True | +--------------------------------------+--------------------+-------------------------+-------+----------------+

A colleague of mine is not seeing this issue, for some reason.

I'm wondering what I might have broken in my setup, or if I've hit some corner case bug.

This becomes a real problem when I have lots of nodes all registering their agents as 'localhost' the agent-list will only list a single entry for these agents and there is no way to tell if any are having trouble (with the 'xxx' alive status) if just one remains up.

any thoughts?

Thanks, JamO

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2013-08-02 17:29:54 -0500

patrickvinas gravatar image

Have you tried manually changing the host field for the agents in the quantum/neutron database?

edit flag offensive delete link more
0

answered 2013-07-24 06:21:32 -0500

gongysh gravatar image

two solutions: 1. make sure your hostname works 2. add host=<anydifferentvlaue> into your neutron.conf

edit flag offensive delete link more
0

answered 2013-07-24 15:08:17 -0500

jamo gravatar image

Thanks for the reply.

I think I figured it out. I must not have had an entry in /etc/hosts to begin with and my initial agent registered with default of localhost. And, only adding an entry to /etc/hosts is not good enough. you have to also issue the "hostname <name>" cmd -or- reboot for the new hostname to be used.

edit flag offensive delete link more
0

answered 2013-07-24 21:37:42 -0500

jamo gravatar image

I take it back. I'm still seeing this issue in my setup with a valid hostname in use. However, if I use the "host" variable defined in my quantum.conf file it will use that name when registering. I can't track down what's broken when I expect the agents to just use the hostname for registering it's agents.

I build a new openstack cloud from scratch and ended up in the same state where my neutron agents are registering as localhost. Now, I'm seeing it regardless of "delimiting dots". AFAIK my hostname configuration is proper. Here is a log of what I have using the l3-agent as an example:

STOP SERVICE ON NN:

root@demonetworknodea:~# service quantum-l3-agent stop

IT'S DOWN ON QUANTUM SERVER:

root@democloudcontroller:~# quantum agent-list +--------------------------------------+--------------------+-----------+-------+----------------+ | id | agent_type | host | alive | admin_state_up | +--------------------------------------+--------------------+-----------+-------+----------------+ | 0d7004dd-b692-4e59-89c7-7f99974610d0 | L3 agent | localhost | xxx | True | | addd44d6-83c0-49e7-bad0-30d5991b4c07 | DHCP agent | localhost | :-) | True | | baac0249-8896-4065-bbf3-5e76d8e2c7d1 | Open vSwitch agent | localhost | :-) | True | +--------------------------------------+--------------------+-----------+-------+----------------+

HOSTNAME CHECKS ON NN SEEM PROPER:

root@demonetworknodea:~# hostname demonetworknodea root@demonetworknodea:~# cat /etc/hostname demonetworknodea root@demonetworknodea:~# egrep cat /etc/hostname /etc/hosts 127.0.0.1 demonetworknodea

START L3 AGENT ON NN:

root@demonetworknodea:~# service quantum-l3-agent start

IT'S UP AND REGISTERED AS LOCALHOST:

root@democloudcontroller:~# quantum agent-list +--------------------------------------+--------------------+-----------+-------+----------------+ | id | agent_type | host | alive | admin_state_up | +--------------------------------------+--------------------+-----------+-------+----------------+ | 0d7004dd-b692-4e59-89c7-7f99974610d0 | L3 agent | localhost | :-) | True | | addd44d6-83c0-49e7-bad0-30d5991b4c07 | DHCP agent | localhost | :-) | True | | baac0249-8896-4065-bbf3-5e76d8e2c7d1 | Open vSwitch agent | localhost | :-) | True | +--------------------------------------+--------------------+-----------+-------+----------------+

CHANGE HOSTNAME ON NN AND RESTART SERVICE:

root@demonetworknodea:~# cat /etc/hostname demonetworknodea.domain root@demonetworknodea:~# egrep cat /etc/hostname /etc/hosts 127.0.0.1 demonetworknodea.domain root@demonetworknodea:~# hostname cat /etc/hostname root@demonetworknodea:~# hostname demonetworknodea.domain root@demonetworknodea:~# service quantum-l3-agent restart quantum-l3-agent stop/waiting quantum-l3-agent start/running, process 25141 root@demonetworknodea:~#

STILL REGISTERED AS LOCALHOST ON CONTROLLER:

root@democloudcontroller:~# quantum agent-list +--------------------------------------+--------------------+-----------+-------+----------------+ | id | agent_type | host | alive | admin_state_up | +--------------------------------------+--------------------+-----------+-------+----------------+ | 0d7004dd-b692-4e59-89c7-7f99974610d0 | L3 agent | localhost | :-) | True | | addd44d6-83c0-49e7-bad0-30d5991b4c07 | DHCP agent | localhost | :-) | True | | baac0249-8896-4065-bbf3-5e76d8e2c7d1 | Open vSwitch agent | localhost | :-) | True | +--------------------------------------+--------------------+-----------+-------+----------------+

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-07-23 22:16:37 -0500

Seen: 121 times

Last updated: Aug 02 '13