2
This work is licensed under a Creative Commons Attribution 4.0 International
5
http://creativecommons.org/licenses/by/4.0/
11
In a Neutron-MidoNet deployment, where numerous agents are running on various
12
hosts to provide services, it is important that the operators have a way to
13
view these agents to check their existence and health. Neutron already
14
provides this feature with its 'agent' extension API [1]. This document
15
describes the design of the 'agent' extension API implementation by the MidoNet
16
Neutron plugin that provides this feature also for the MidoNet agents.
22
There is currently no way to display the information about the MidoNet agents
23
that are deployed using the Neutron API. Such information is useful for
24
operators to see their liveness and the location that they are deployed on.
26
Additionally, the operators need to find out the IDs of the agents, as well as
27
the IP addresses of the hosts that the agents are running on, to be able to
28
execute the 'agent_membership' API, where both of these values are needed in
29
the input. Without executing the 'agent_membership' API, the MidoNet agents
30
cannot create tunnels among themselves, and VMs running on remote hosts would
31
not be able to connect to each other.
37
Implement the existing 'agent' Neutron extenion API in the MidoNet Neutron
38
plugin that provide (at the very least) the following:
40
* Display all the MidoNet agents deployed, with the 'id' field indicating the
41
globally unique identifier of each agent that can be used in the agent
43
* Show the IP addresses of the host that the agent is running on
44
* Show the aliveness of the agents
46
The decision to provide these using the existing 'agent' Neutron extension as
47
opposed to creating a new vendor extension is that there are significant
48
overlaps between the two and the 'agent' extension provides integration with
49
Horizon and neutron CLI.
51
The following fields exist in the Neutron agent extension that MidoNet can
54
* 'id': Unique identifier of the agent.
55
* 'agent_type': Represents the type of the agent. 'Midonet agent' is the type
56
for the MidoNet agents.
57
* 'binary': Represents the package name. For MidoNet, it is 'midolman'.
58
* 'alive': Represents the liveness of the agent.
59
* 'description': The description of the agent. This is the only updatable
61
* 'configurations': A dictionary that includes configurations specific to the
62
agent. For MidoNet, this dictionary contains the IP addresses and the
63
interfaces of the host:
69
{"name": INTERFACE_NAME, "ip_addresses": [IP_ADDRESSES]}
74
Since the 'agent' API is designed with OpenStack agents in mind, however, there
75
are fields in the API that MidoNet cannot provide.
77
The following fields are not supported by the MidoNet plugin at the time of
80
* 'host': The host name where the agent is running. While this information is
81
useful, it is not currently supported by MidoNet.
82
* 'topic': AMQP message topic to communicate with the agent. MidoNet agents
84
* 'admin_state_up': Sets the administrative status of the agent. MidoNet does
85
not support this. An attempt to update gets an 'unsupported' error response.
86
* 'heartbeat_timestamp': The heartbeat for aliveness. MidoNet agents do not
89
MidoNet agents, when they spawn, report their existence to the MidoNet Network
90
State Database (NSDB). NSDB is also notified when the agent goes down. The
91
MidoNet Cluster, through its RPC service, exposes an API to provide this data
92
to the Neutron plugin. The RPC API provides all the information the plugin
93
needs to populate the supported fields, and it also contains the most
94
up-to-date information of the agents' health. Because all the required agent
95
information can be retrieved via the Cluster API on each Neutron's agent API,
96
Neutron's agents DB table does not need to be populated for the MidoNet agents.
97
The plugin is responsible for merging the OpenStack agent data and the MidoNet
100
Lastly, deletion of agents, supported by Neutron API, is not supported by the
101
MidoNet plugin. Unsupported exception is thrown when a user attempts to delete
108
No change except that some fields will be unsupported as explained above.
114
No change, and since all the MidoNet agent data are provided by MidoNe cluster,
115
the agents database table in Neutron will be unused.
127
No code change is made, but 'neutron agent-delete` command is not supported
128
since the MidoNet plugin does not allow agent deletion.
130
See the Neutron CLI documentation for more details on the 'agent' commands[2].
136
Because of the lack of API documentation available, the Neutron agent extension
137
API reference is its source code:
139
[1] https://github.com/openstack/neutron/blob/master/neutron/extensions/agent.py
140
[2] http://docs.openstack.org/cli-reference/content/neutronclient_commands.html