~midonet-drivers/python-networking-midonet/liberty

« back to all changes in this revision

Viewing changes to specs/kilo/agent.rst

  • Committer: Jaume Devesa
  • Date: 2015-08-25 12:33:00 UTC
  • Revision ID: devvesa@gmail.com-20150825123300-x39xyxc5wjsrm7me
Removing tarball data

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
..
2
 
 This work is licensed under a Creative Commons Attribution 4.0 International
3
 
 License.
4
 
 
5
 
 http://creativecommons.org/licenses/by/4.0/
6
 
 
7
 
=========
8
 
Agent API
9
 
=========
10
 
 
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.
17
 
 
18
 
 
19
 
Problem Description
20
 
===================
21
 
 
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.
25
 
 
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.
32
 
 
33
 
 
34
 
Proposed Change
35
 
===============
36
 
 
37
 
Implement the existing 'agent' Neutron extenion API in the MidoNet Neutron
38
 
plugin that provide (at the very least) the following:
39
 
 
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
42
 
   membership API
43
 
 * Show the IP addresses of the host that the agent is running on
44
 
 * Show the aliveness of the agents
45
 
 
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.
50
 
 
51
 
The following fields exist in the Neutron agent extension that MidoNet can
52
 
provide:
53
 
 
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
60
 
   field of the API.
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:
64
 
 
65
 
::
66
 
        {
67
 
            "interfaces":
68
 
                [
69
 
                    {"name": INTERFACE_NAME, "ip_addresses": [IP_ADDRESSES]}
70
 
                ]
71
 
        }
72
 
 
73
 
 
74
 
Since the 'agent' API is designed with OpenStack agents in mind, however, there
75
 
are fields in the API that MidoNet cannot provide.
76
 
 
77
 
The following fields are not supported by the MidoNet plugin at the time of
78
 
this proposal:
79
 
 
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
83
 
   do not support this.
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
87
 
   provide this data.
88
 
 
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
98
 
agent data.
99
 
 
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
102
 
an agent.
103
 
 
104
 
 
105
 
REST API
106
 
--------
107
 
 
108
 
No change except that some fields will be unsupported as explained above.
109
 
 
110
 
 
111
 
DB Model
112
 
--------
113
 
 
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.
116
 
 
117
 
 
118
 
Security
119
 
--------
120
 
 
121
 
No impact
122
 
 
123
 
 
124
 
Client
125
 
------
126
 
 
127
 
No code change is made, but 'neutron agent-delete` command is not supported
128
 
since the MidoNet plugin does not allow agent deletion.
129
 
 
130
 
See the Neutron CLI documentation for more details on the 'agent' commands[2].
131
 
 
132
 
 
133
 
References
134
 
==========
135
 
 
136
 
Because of the lack of API documentation available, the Neutron agent extension
137
 
API reference is its source code:
138
 
 
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