Merge lp:~bgh/neutron/bug850261 into lp:neutron/diablo

Proposed by Brad Hall
Status: Merged
Merge reported by: Brad Hall
Merged at revision: not available
Proposed branch: lp:~bgh/neutron/bug850261
Merge into: lp:neutron/diablo
Diff against target: 205 lines (+91/-57)
1 file modified
quantum/plugins/openvswitch/README (+91/-57)
To merge this branch: bzr merge lp:~bgh/neutron/bug850261
Reviewer Review Type Date Requested Status
Somik Behera netstack-core Approve
Salvatore Orlando Approve
Review via email: mp+76309@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

LGTM.

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Forgot to approve (or +1 in gerritspeak)

review: Approve
Revision history for this message
Somik Behera (somikbehera) wrote :

89 +The OVS quantum service requires access to a mysql database in order
90 +to store configuration and mappings that will be used by the agent.
91 +Here is how to set up the database on the host that you will be
92 +running the quantum service on.

I would say "Open vSwitch" here instead of "OVS"

Rest looks good!

review: Approve (netstack-core)
Revision history for this message
Brad Hall (bgh) wrote :

Thanks for the reviews!

Revision history for this message
wallace (mczhou82) wrote :

hey, guys,I'am using openvswitch + nova,but without quantum,just adding flags:
"--linuxnet_ovs_integration_bridge=ovs-br"
"--linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver"
"--libvirt_vif_type=ethernet"
"--libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver"

to ovs,I wrote a script to add modules(openvswitch_mod.ko & brcompat_mod.ko) and "ovs-vsctl add-br ovs-br"

Then euca-run-instances, it's ok.
So, can someone tell me,why to choose quantum as a ovs plugin in openstack, or it can do something better than I'm doing now?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'quantum/plugins/openvswitch/README'
2--- quantum/plugins/openvswitch/README 2011-07-21 16:24:24 +0000
3+++ quantum/plugins/openvswitch/README 2011-09-21 17:02:23 +0000
4@@ -1,28 +1,50 @@
5 # -- Background
6
7-The quantum openvswitch plugin is a simple plugin that allows you to manage
8+The quantum openvswitch plugin is a plugin that allows you to manage
9 connectivity between VMs on hypervisors running openvswitch.
10
11-The quantum openvswitch plugin consists of two components:
12-
13-1) The plugin itself: The plugin uses a database backend (mysql for now) to
14- store configuration and mappings that are used by the agent.
15-
16-2) An agent which runs on the hypervisor (dom0) and communicates with
17- openvswitch. The agent gathers the configuration and mappings from the
18- mysql database running on the quantum host.
19-
20-The sections below describe how to configure and run the quantum service with
21-the openvswitch plugin.
22-
23-# -- Nova configuration
24-
25-- Make sure to set up nova using flat networking. Also, make sure that the
26- integration bridge (see below under agent configuration) matches the
27- flat_network_bridge specified in your nova flag file. Here are the relevant
28- entries from my nova flag file.
29---network_manager=nova.network.manager.FlatManager
30---flat_network_bridge=xapi1
31+The quantum openvswitch plugin consists of three components:
32+
33+1) The plugin itself: The plugin uses a database backend (mysql for
34+ now) to store configuration and mappings that are used by the
35+ agent. The mysql server runs on a central server (often the same
36+ host as nova itself).
37+
38+2) The quantum service host which will be running quantum. This can
39+ be run on the server running nova.
40+
41+3) An agent which runs on the hypervisor (dom0) and communicates with
42+ openvswitch. The agent gathers the configuration and mappings from
43+ the mysql database running on the quantum host.
44+
45+The sections below describe how to configure and run the quantum
46+service with the openvswitch plugin.
47+
48+# -- Nova configuration (controller node)
49+
50+1) Make sure to set up nova using the quantum network manager in the
51+ nova.conf on the node that will be running nova-network.
52+
53+--network_manager=nova.network.quantum.manager.QuantumManager
54+
55+# -- Nova configuration (compute node(s))
56+
57+1a) (If you're using xen) Configure the integration bridge and vif driver
58+# Note that the integration bridge could be different on each compute node so
59+# be careful to specify the right one in each nova.conf
60+--xenapi_ovs_integration_bridge=xapi1
61+--linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
62+
63+1b) (If you're using qemu/kvm) Configure the bridge, vif driver, and
64+ libvirt/vif type
65+
66+--libvirt_ovs_integration_bridge=br-int
67+--libvirt_type=qemu
68+--libvirt_vif_type=ethernet
69+--libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver
70+# This last one isn't actually required yet as DHCP isn't integrated
71+ with the QuantumManager yet.
72+--linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
73
74 # -- Quantum configuration
75
76@@ -31,13 +53,15 @@
77 - edit ../../plugins.ini and change the provider line to be:
78 provider = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin
79
80-# -- Database config. The OVS quantum service requires access to a mysql
81-# database in order to store configuration and mappings that will be used by
82-# the agent. Here is how to set up the database on the host that you will be
83-# running the quantum service on.
84-
85-MySQL should be installed on the host, and all plugins and clients must be
86-configured with access to the database.
87+# -- Database config.
88+
89+The Open vSwitch quantum service requires access to a mysql database in order
90+to store configuration and mappings that will be used by the agent. Here is
91+how to set up the database on the host that you will be running the quantum
92+service on.
93+
94+MySQL should be installed on the host, and all plugins and clients
95+must be configured with access to the database.
96
97 To prep mysql, run:
98
99@@ -46,67 +70,77 @@
100 Make sure any xenserver running the ovs quantum agent will be able to
101 communicate with the host running the quantum service:
102
103-//log in to mysql service
104+# log in to mysql service
105 $ mysql -u root -p
106-// grant access to user-remote host combination. Note: if you're going to use
107-// a wildcard here it should be a management network with only trusted hosts.
108+# The Open vSwitch Quantum agent running on each compute node must be able to
109+# make a mysql connection back to the main database server.
110 mysql> GRANT USAGE ON *.* to root@'yourremotehost' IDENTIFIED BY 'newpassword';
111-//force update of authorization changes
112+# force update of authorization changes
113 mysql> FLUSH PRIVILEGES;
114
115-# -- Plugin configuration.
116+# -- Plugin configuration
117
118-- Edit the configuration file (ovs_quantum_plugin.ini). Make sure it matches
119- your mysql configuration. This file must be updated with the addresses and
120- credentials to access the database. This file will be included in the agent
121- distribution tarball (see below) and the agent will use the credentials here
122- to access the database.
123+- Edit the configuration file (ovs_quantum_plugin.ini). Make sure it
124+ matches your mysql configuration. This file must be updated with
125+ the addresses and credentials to access the database. This file
126+ will be included in the agent distribution tarball (see below) and
127+ the agent will use the credentials here to access the database.
128
129 # -- XenServer Agent configuration
130
131 - Create the agent distribution tarball
132
133 $ make agent-dist
134-- Copy the resulting tarball to your xenserver(s) (copy to dom0, not the nova
135- compute node)
136-- Unpack the tarball and run xenserver_install.sh. This will install all of the
137- necessary pieces into /etc/xapi.d/plugins. It will also spit out the name
138- of the integration bridge that you'll need for your nova configuration.
139- Make sure to specify this in your nova flagfile as --flat_network_bridge.
140+
141+- Copy the resulting tarball to your xenserver(s) (copy to dom0, not
142+ the nova compute node)
143+
144+- Unpack the tarball and run xenserver_install.sh. This will install
145+ all of the necessary pieces into /etc/xapi.d/plugins. It will also
146+ output the name of the integration bridge that you'll need for your nova
147+ configuration. Make sure to specify this in your nova flagfile as
148+ --xenapi_ovs_integration_bridge.
149+
150+ NOTE: Make sure the integration bridge that the script emits is the
151+ same as the one in your ovs_quantum_plugin.ini file.
152+
153 - Run the agent [on your hypervisor (dom0)]:
154+
155 $ /etc/xapi.d/plugins/ovs_quantum_agent.py /etc/xapi.d/plugins/ovs_quantum_plugin.ini
156
157 # -- KVM Agent configuration
158
159-- Copy ovs_quantum_agent.py and ovs_quantum_plugin.ini to the Linux host and run:
160+- Edit ovs_quantum_plugin.ini and make sure the integration bridge is set to
161+ br-int.
162+
163+- Copy ovs_quantum_agent.py and ovs_quantum_plugin.ini to the compute
164+ node and run:
165 $ python ovs_quantum_agent.py ovs_quantum_plugin.ini
166
167 # -- Getting quantum up and running
168
169 - Start quantum [on the quantum service host]:
170-~/src/quantum $ PYTHONPATH=.:$PYTHONPATH python bin/quantum etc/quantum.conf
171+~/src/quantum $ python bin/quantum etc/quantum.conf
172 - Run ovs_quantum_plugin.py via the quantum plugin framework cli [on the
173 quantum service host]
174-~/src/quantum$ PYTHONPATH=.:$PYTHONPATH python quantum/cli.py
175+~/src/quantum$ python bin/cli
176
177 This will show help all of the available commands.
178
179-An example session looks like this:
180+An example session (to attach a vm interface with id 'foo') looks like
181+this:
182
183 $ export TENANT=t1
184-$ PYTHONPATH=. python quantum/cli.py create_net $TENANT network1
185+$ export VIF_UUID=foo # This should be the uuid of the virtual interface
186+$ python bin/cli create_net $TENANT network1
187 Created a new Virtual Network with ID:e754e7c0-a8eb-40e5-861a-b182d30c3441
188 $ export NETWORK=e754e7c0-a8eb-40e5-861a-b182d30c3441
189-$ PYTHONPATH=. python quantum/cli.py create_port $TENANT $NETWORK
190+$ python bin/cli create_port $TENANT $NETWORK
191 Created Virtual Port:5a1e121b-ccc8-471d-9445-24f15f9f854c on Virtual Network:e754e7c0-a8eb-40e5-861a-b182d30c3441
192 $ export PORT=5a1e121b-ccc8-471d-9445-24f15f9f854c
193-$ PYTHONPATH=. python quantum/cli.py plug_iface $TENANT $NETWORK $PORT ubuntu1-eth1
194-Plugged interface "ubuntu1-eth1" to port:5a1e121b-ccc8-471d-9445-24f15f9f854c on network:e754e7c0-a8eb-40e5-861a-b182d30c3441
195+$ python bin/cli plug_iface $TENANT $NETWORK $PORT $VIF_UUID
196+Plugged interface "foo" to port:5a1e121b-ccc8-471d-9445-24f15f9f854c on network:e754e7c0-a8eb-40e5-861a-b182d30c3441
197
198 (.. repeat for more ports and interface combinations..)
199
200-# -- Other items
201-
202-- To get a listing of the vif names in the format that the ovs quantum service
203- will expect them in, issue the following command on the hypervisor (dom0):
204-$ for vif in `xe vif-list params=uuid --minimal | sed s/,/" "/g`; do echo $(xe vif-list params=vm-name-label uuid=${vif} --minimal)-eth$(xe vif-list params=device uuid=${vif} --minimal); done
205+See the main quantum documentation for more details on the commands.

Subscribers

People subscribed via source and target branches