<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Olaph</id>
		<title>OpenStack - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Olaph"/>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/wiki/Special:Contributions/Olaph"/>
		<updated>2026-06-27T17:41:45Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.2</generator>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16284</id>
		<title>XenServer/XenAndXenServer</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16284"/>
				<updated>2013-02-17T01:13:18Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- ## page was renamed from XenXCPAndXenServer --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
To get started, take a look at: [[XenServer/GettingStarted|Getting started with XenServer and [[OpenStack]]]]&lt;br /&gt;
&lt;br /&gt;
= Official Docs =&lt;br /&gt;
&lt;br /&gt;
You can find this information in the official docs:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-compute/admin/content/introduction-to-xen.html&lt;br /&gt;
&lt;br /&gt;
= Introduction to using Xen, XCP and [[XenServer]] with [[OpenStack]] =&lt;br /&gt;
&lt;br /&gt;
In this section we will describe Xen, XCP, and [[XenServer]], the&lt;br /&gt;
differences between them, and how to use them with [[OpenStack]].  Xen's&lt;br /&gt;
architecture is different from KVM's in important ways, and we discuss those&lt;br /&gt;
differences and when each might make sense in your [[OpenStack]] cloud.&lt;br /&gt;
&lt;br /&gt;
== Basic terminology ==&lt;br /&gt;
&lt;br /&gt;
=== Xen ===&lt;br /&gt;
Xen is a hypervisor.  It provides the&lt;br /&gt;
fundamental isolation between virtual machines.  Xen is open source (GPLv2)&lt;br /&gt;
and is managed by Xen.org, an cross-industry organization. &lt;br /&gt;
Xen is a component of many different products and projects.  The&lt;br /&gt;
hypervisor itself is very similar across all these projects, but the way that&lt;br /&gt;
it is managed can be different, which can cause confusion if you're not clear&lt;br /&gt;
which toolstack you are using.  Make sure you know what toolstack you want&lt;br /&gt;
before you get started.&lt;br /&gt;
&lt;br /&gt;
=== XCP ===&lt;br /&gt;
XCP is an open source (GPLv2) toolstack&lt;br /&gt;
for Xen.  It is designed specifically as platform for enterprise and cloud&lt;br /&gt;
computing, and is well integrated with [[OpenStack]].&lt;br /&gt;
&lt;br /&gt;
=== Citrix [[XenServer]] ===&lt;br /&gt;
&lt;br /&gt;
Citrix [[XenServer]] is a commercial&lt;br /&gt;
product.  It is based on XCP, and exposes the same toolstack and managment&lt;br /&gt;
API.  As an analogy, think of [[XenServer]] being based on XCP in the way that Red&lt;br /&gt;
Hat Enterprise Linux is based on Fedora.  [[XenServer]] has a free version (which&lt;br /&gt;
is very similar to XCP) and paid-for versions with additional features&lt;br /&gt;
enabled.&lt;br /&gt;
&lt;br /&gt;
=== xapi / XAPI / XenAPI ===&lt;br /&gt;
&lt;br /&gt;
Both [[XenServer]] and XCP include Xen, Linux, and the primary control&lt;br /&gt;
daemon known as xapi.&lt;br /&gt;
&lt;br /&gt;
The API shared between XCP and [[XenServer]] is called &amp;quot;&amp;quot;XenAPI&amp;quot;&amp;quot;.  [[OpenStack]] usually refers to XenAPI, to&lt;br /&gt;
indicate that the integration works equally well on XCP and [[XenServer]].&lt;br /&gt;
Sometimes, a careless person will refer to [[XenServer]] specifically, but you can&lt;br /&gt;
be reasonably confident that anything that works on [[XenServer]] will also work&lt;br /&gt;
on the latest version of XCP.&lt;br /&gt;
&lt;br /&gt;
== Privileged and unprivileged domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen host will run a number of virtual machines, VMs, or domains (the&lt;br /&gt;
terms are synonymous on Xen).  One of these is in charge of running the rest&lt;br /&gt;
of the system, and is known as &amp;quot;domain 0&amp;quot;, or &amp;quot;dom0&amp;quot;.  It is the first domain&lt;br /&gt;
to boot after Xen, and owns the storage and networking hardware, the device&lt;br /&gt;
drivers, and the primary control software.  Any other VM is unprivileged, and&lt;br /&gt;
are known as a &amp;quot;domU&amp;quot; or &amp;quot;guest&amp;quot;.  All customer VMs are unprivileged of&lt;br /&gt;
course, but you should note that on Xen the [[OpenStack]] control software&lt;br /&gt;
(nova-compute) also runs in a domU.  This gives a level of security isolation&lt;br /&gt;
between the privileged system software and the [[OpenStack]] sofware (much of&lt;br /&gt;
which is customer-facing).  This architecture is described in more detail&lt;br /&gt;
later.&lt;br /&gt;
&lt;br /&gt;
There is an ongoing project to split domain 0 into multiple privileged&lt;br /&gt;
domains known as &amp;quot;&amp;quot;driver domains&amp;quot;&amp;quot; and &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;stub domains&amp;quot;&amp;quot;.  This would give even better separation&lt;br /&gt;
between critical components.  This is an ongoing research project and you&lt;br /&gt;
shouldn't worry about it right now.  The current architecture just has three&lt;br /&gt;
levels of separation: dom0, the [[OpenStack]] domU, and the completely&lt;br /&gt;
unprivileged customer VMs.&lt;br /&gt;
&lt;br /&gt;
== Paravirtualized versus hardware virtualized domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen virtual machine can be &amp;quot;&amp;quot;paravirtualized&lt;br /&gt;
(PV)&amp;quot;&amp;quot; or &amp;quot;&amp;quot;hardware virtualized&lt;br /&gt;
(HVM)&amp;quot;&amp;quot;.  This refers to the interaction between Xen, domain 0, and&lt;br /&gt;
the guest VM's kernel.  PV guests are aware of the fact that they are&lt;br /&gt;
virtualized and will co-operate with Xen and domain 0; this gives them better&lt;br /&gt;
performance characteristics.  HVM guests are not aware of their environment,&lt;br /&gt;
and the hardware has to pretend that they are running on an unvirtualized&lt;br /&gt;
machine.  HVM guests have the advantage that there is no need to modify the&lt;br /&gt;
guest operating system, which is essential when running Windows.&lt;br /&gt;
&lt;br /&gt;
In [[OpenStack]], customer VMs may run in either PV or HVM mode.  However,&lt;br /&gt;
the [[OpenStack]] domU (that's the one running nova-compute) &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;must&amp;quot;&amp;quot; be running in PV mode.&lt;br /&gt;
&lt;br /&gt;
= Deployment architecture =&lt;br /&gt;
&lt;br /&gt;
When you deploy [[OpenStack]] on XCP or [[XenServer]] you will get something&lt;br /&gt;
similar to this:&lt;br /&gt;
&lt;br /&gt;
[[Image:XenServer-dom0-domU.png]]&lt;br /&gt;
&lt;br /&gt;
Key things to note:&lt;br /&gt;
&lt;br /&gt;
* The hypervisor: Xen&lt;br /&gt;
* Domain 0: runs xapi and some small pieces from [[OpenStack]] (some xapi plugins and network isolation rules). The majority of this is provided by [[XenServer]] or XCP (or yourself using Kronos).&lt;br /&gt;
* [[OpenStack]] domU: The nova-compute code runs in a paravirtualized virtual machine, running on the host under management. Each host runs a local instance of nova-compute.  It will often also be running nova-network (depending on your network mode).  In this case, nova-network is managing the addresses given to the tenant VMs through DHCP.&lt;br /&gt;
* Nova uses the XenAPI Python library to talk to xapi, and it uses the Host Internal Management Network to reach from the domU to dom0 without leaving the host.&lt;br /&gt;
&lt;br /&gt;
Some notes on the networking:&lt;br /&gt;
* The above diagram assumes FlatDHCP networking (the [[DevStack]] default).&lt;br /&gt;
* There are three main [[OpenStack]] networks: Management traffic (RabbitMQ, MySQL, etc), Tenant network traffic (controlled by nova-network) and Public traffic (floating IPs, public API end points).&lt;br /&gt;
* Each network that leaves the host has been put through a separate physical network interface.  This is the simplest model, but it's not the only one possible.  You may choose to isolate this traffic using VLANs instead, for example.&lt;br /&gt;
* nova-compute generally talks to [[XenServer]] using a host local private network called either &amp;quot;Guest Installer Network&amp;quot; or &amp;quot;Host Internal Managmenet Network&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another example of how to deploy [[OpenStack]] on a system with only two physical network interfaces is:&lt;br /&gt;
&lt;br /&gt;
[[Image:XenServer$$XenXCPAndXenServer$DevStackDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
== [[XenServer]] pools ==&lt;br /&gt;
&lt;br /&gt;
Before [[OpenStack]] 2012.1 (&amp;quot;Essex&amp;quot;), all [[XenServer]] machines used with&lt;br /&gt;
[[OpenStack]] are standalone machines, usually only using local storage.&lt;br /&gt;
&lt;br /&gt;
However in 2012.1 and later, the host-aggregates feature allows you to&lt;br /&gt;
create pools of [[XenServer]] hosts (configuring shared storage is still an out of&lt;br /&gt;
band activity). This move will enable live migration when using shared&lt;br /&gt;
storage.&lt;br /&gt;
&lt;br /&gt;
== Xen and libvirt ==&lt;br /&gt;
&lt;br /&gt;
It may possible to manage Xen using libvirt.  This would be necessary&lt;br /&gt;
for any Xen-based system that isn't using the XCP toolstack, such as SUSE&lt;br /&gt;
Linux or Oracle Linux.  Unfortunately, this is not well tested or supported&lt;br /&gt;
today, and using the XCP or [[XenServer]] toolstacks with the [[OpenStack]] XenAPI&lt;br /&gt;
backend is the only recommended method.&lt;br /&gt;
&lt;br /&gt;
= Further reading =&lt;br /&gt;
&lt;br /&gt;
What is Xen? by Xen.org: http://xen.org/files/Marketing/WhatisXen.pdf.&lt;br /&gt;
&lt;br /&gt;
Xen Hypervisor project: http://xen.org/products/xenhyp.html.&lt;br /&gt;
&lt;br /&gt;
XCP project: http://xen.org/products/cloudxen.html.&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16280</id>
		<title>XenServer/XenAndXenServer</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16280"/>
				<updated>2013-02-17T01:12:14Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: Reverted edits by Olaph (talk) to last revision by JohnGarbutt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ## page was renamed from XenXCPAndXenServer --&amp;gt;&lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
To get started, take a look at: [[XenServer/GettingStarted|Getting started with XenServer and [[OpenStack]]]]&lt;br /&gt;
&lt;br /&gt;
= Official Docs =&lt;br /&gt;
&lt;br /&gt;
You can find this information in the official docs:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-compute/admin/content/introduction-to-xen.html&lt;br /&gt;
&lt;br /&gt;
= Introduction to using Xen, XCP and [[XenServer]] with [[OpenStack]] =&lt;br /&gt;
&lt;br /&gt;
In this section we will describe Xen, XCP, and [[XenServer]], the&lt;br /&gt;
differences between them, and how to use them with [[OpenStack]].  Xen's&lt;br /&gt;
architecture is different from KVM's in important ways, and we discuss those&lt;br /&gt;
differences and when each might make sense in your [[OpenStack]] cloud.&lt;br /&gt;
&lt;br /&gt;
== Basic terminology ==&lt;br /&gt;
&lt;br /&gt;
=== Xen ===&lt;br /&gt;
Xen is a hypervisor.  It provides the&lt;br /&gt;
fundamental isolation between virtual machines.  Xen is open source (GPLv2)&lt;br /&gt;
and is managed by Xen.org, an cross-industry organization. &lt;br /&gt;
Xen is a component of many different products and projects.  The&lt;br /&gt;
hypervisor itself is very similar across all these projects, but the way that&lt;br /&gt;
it is managed can be different, which can cause confusion if you're not clear&lt;br /&gt;
which toolstack you are using.  Make sure you know what toolstack you want&lt;br /&gt;
before you get started.&lt;br /&gt;
&lt;br /&gt;
=== XCP ===&lt;br /&gt;
XCP is an open source (GPLv2) toolstack&lt;br /&gt;
for Xen.  It is designed specifically as platform for enterprise and cloud&lt;br /&gt;
computing, and is well integrated with [[OpenStack]].&lt;br /&gt;
&lt;br /&gt;
=== Citrix [[XenServer]] ===&lt;br /&gt;
&lt;br /&gt;
Citrix [[XenServer]] is a commercial&lt;br /&gt;
product.  It is based on XCP, and exposes the same toolstack and managment&lt;br /&gt;
API.  As an analogy, think of [[XenServer]] being based on XCP in the way that Red&lt;br /&gt;
Hat Enterprise Linux is based on Fedora.  [[XenServer]] has a free version (which&lt;br /&gt;
is very similar to XCP) and paid-for versions with additional features&lt;br /&gt;
enabled.&lt;br /&gt;
&lt;br /&gt;
=== xapi / XAPI / XenAPI ===&lt;br /&gt;
&lt;br /&gt;
Both [[XenServer]] and XCP include Xen, Linux, and the primary control&lt;br /&gt;
daemon known as xapi.&lt;br /&gt;
&lt;br /&gt;
The API shared between XCP and [[XenServer]] is called &amp;quot;&amp;quot;XenAPI&amp;quot;&amp;quot;.  [[OpenStack]] usually refers to XenAPI, to&lt;br /&gt;
indicate that the integration works equally well on XCP and [[XenServer]].&lt;br /&gt;
Sometimes, a careless person will refer to [[XenServer]] specifically, but you can&lt;br /&gt;
be reasonably confident that anything that works on [[XenServer]] will also work&lt;br /&gt;
on the latest version of XCP.&lt;br /&gt;
&lt;br /&gt;
== Privileged and unprivileged domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen host will run a number of virtual machines, VMs, or domains (the&lt;br /&gt;
terms are synonymous on Xen).  One of these is in charge of running the rest&lt;br /&gt;
of the system, and is known as &amp;quot;domain 0&amp;quot;, or &amp;quot;dom0&amp;quot;.  It is the first domain&lt;br /&gt;
to boot after Xen, and owns the storage and networking hardware, the device&lt;br /&gt;
drivers, and the primary control software.  Any other VM is unprivileged, and&lt;br /&gt;
are known as a &amp;quot;domU&amp;quot; or &amp;quot;guest&amp;quot;.  All customer VMs are unprivileged of&lt;br /&gt;
course, but you should note that on Xen the [[OpenStack]] control software&lt;br /&gt;
(nova-compute) also runs in a domU.  This gives a level of security isolation&lt;br /&gt;
between the privileged system software and the [[OpenStack]] sofware (much of&lt;br /&gt;
which is customer-facing).  This architecture is described in more detail&lt;br /&gt;
later.&lt;br /&gt;
&lt;br /&gt;
There is an ongoing project to split domain 0 into multiple privileged&lt;br /&gt;
domains known as &amp;quot;&amp;quot;driver domains&amp;quot;&amp;quot; and &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;stub domains&amp;quot;&amp;quot;.  This would give even better separation&lt;br /&gt;
between critical components.  This is an ongoing research project and you&lt;br /&gt;
shouldn't worry about it right now.  The current architecture just has three&lt;br /&gt;
levels of separation: dom0, the [[OpenStack]] domU, and the completely&lt;br /&gt;
unprivileged customer VMs.&lt;br /&gt;
&lt;br /&gt;
== Paravirtualized versus hardware virtualized domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen virtual machine can be &amp;quot;&amp;quot;paravirtualized&lt;br /&gt;
(PV)&amp;quot;&amp;quot; or &amp;quot;&amp;quot;hardware virtualized&lt;br /&gt;
(HVM)&amp;quot;&amp;quot;.  This refers to the interaction between Xen, domain 0, and&lt;br /&gt;
the guest VM's kernel.  PV guests are aware of the fact that they are&lt;br /&gt;
virtualized and will co-operate with Xen and domain 0; this gives them better&lt;br /&gt;
performance characteristics.  HVM guests are not aware of their environment,&lt;br /&gt;
and the hardware has to pretend that they are running on an unvirtualized&lt;br /&gt;
machine.  HVM guests have the advantage that there is no need to modify the&lt;br /&gt;
guest operating system, which is essential when running Windows.&lt;br /&gt;
&lt;br /&gt;
In [[OpenStack]], customer VMs may run in either PV or HVM mode.  However,&lt;br /&gt;
the [[OpenStack]] domU (that's the one running nova-compute) &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;must&amp;quot;&amp;quot; be running in PV mode.&lt;br /&gt;
&lt;br /&gt;
= Deployment architecture =&lt;br /&gt;
&lt;br /&gt;
When you deploy [[OpenStack]] on XCP or [[XenServer]] you will get something&lt;br /&gt;
similar to this:&lt;br /&gt;
&lt;br /&gt;
[[Image:XenServer$$XenXCPAndXenServer$XenServer-dom0-domU.png]]&lt;br /&gt;
&lt;br /&gt;
Key things to note:&lt;br /&gt;
&lt;br /&gt;
* The hypervisor: Xen&lt;br /&gt;
* Domain 0: runs xapi and some small pieces from [[OpenStack]] (some xapi plugins and network isolation rules). The majority of this is provided by [[XenServer]] or XCP (or yourself using Kronos).&lt;br /&gt;
* [[OpenStack]] domU: The nova-compute code runs in a paravirtualized virtual machine, running on the host under management. Each host runs a local instance of nova-compute.  It will often also be running nova-network (depending on your network mode).  In this case, nova-network is managing the addresses given to the tenant VMs through DHCP.&lt;br /&gt;
* Nova uses the XenAPI Python library to talk to xapi, and it uses the Host Internal Management Network to reach from the domU to dom0 without leaving the host.&lt;br /&gt;
&lt;br /&gt;
Some notes on the networking:&lt;br /&gt;
* The above diagram assumes FlatDHCP networking (the [[DevStack]] default).&lt;br /&gt;
* There are three main [[OpenStack]] networks: Management traffic (RabbitMQ, MySQL, etc), Tenant network traffic (controlled by nova-network) and Public traffic (floating IPs, public API end points).&lt;br /&gt;
* Each network that leaves the host has been put through a separate physical network interface.  This is the simplest model, but it's not the only one possible.  You may choose to isolate this traffic using VLANs instead, for example.&lt;br /&gt;
* nova-compute generally talks to [[XenServer]] using a host local private network called either &amp;quot;Guest Installer Network&amp;quot; or &amp;quot;Host Internal Managmenet Network&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another example of how to deploy [[OpenStack]] on a system with only two physical network interfaces is:&lt;br /&gt;
&lt;br /&gt;
[[Image:XenServer$$XenXCPAndXenServer$DevStackDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
== [[XenServer]] pools ==&lt;br /&gt;
&lt;br /&gt;
Before [[OpenStack]] 2012.1 (&amp;quot;Essex&amp;quot;), all [[XenServer]] machines used with&lt;br /&gt;
[[OpenStack]] are standalone machines, usually only using local storage.&lt;br /&gt;
&lt;br /&gt;
However in 2012.1 and later, the host-aggregates feature allows you to&lt;br /&gt;
create pools of [[XenServer]] hosts (configuring shared storage is still an out of&lt;br /&gt;
band activity). This move will enable live migration when using shared&lt;br /&gt;
storage.&lt;br /&gt;
&lt;br /&gt;
== Xen and libvirt ==&lt;br /&gt;
&lt;br /&gt;
It may possible to manage Xen using libvirt.  This would be necessary&lt;br /&gt;
for any Xen-based system that isn't using the XCP toolstack, such as SUSE&lt;br /&gt;
Linux or Oracle Linux.  Unfortunately, this is not well tested or supported&lt;br /&gt;
today, and using the XCP or [[XenServer]] toolstacks with the [[OpenStack]] XenAPI&lt;br /&gt;
backend is the only recommended method.&lt;br /&gt;
&lt;br /&gt;
= Further reading =&lt;br /&gt;
&lt;br /&gt;
What is Xen? by Xen.org: http://xen.org/files/Marketing/WhatisXen.pdf.&lt;br /&gt;
&lt;br /&gt;
Xen Hypervisor project: http://xen.org/products/xenhyp.html.&lt;br /&gt;
&lt;br /&gt;
XCP project: http://xen.org/products/cloudxen.html.&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16279</id>
		<title>XenServer/XenAndXenServer</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16279"/>
				<updated>2013-02-17T01:08:33Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- ## page was renamed from XenXCPAndXenServer --&amp;gt;&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
To get started, take a look at: [[XenServer/GettingStarted|Getting started with XenServer and [[OpenStack]]]]&lt;br /&gt;
&lt;br /&gt;
= Official Docs =&lt;br /&gt;
&lt;br /&gt;
You can find this information in the official docs:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-compute/admin/content/introduction-to-xen.html&lt;br /&gt;
&lt;br /&gt;
= Introduction to using Xen, XCP and [[XenServer]] with OpenStack =&lt;br /&gt;
&lt;br /&gt;
In this section we will describe Xen, XCP, and [[XenServer]], the&lt;br /&gt;
differences between them, and how to use them with OpenStack.  Xen's&lt;br /&gt;
architecture is different from KVM's in important ways, and we discuss those&lt;br /&gt;
differences and when each might make sense in your OpenStack cloud.&lt;br /&gt;
&lt;br /&gt;
== Basic terminology ==&lt;br /&gt;
&lt;br /&gt;
=== Xen ===&lt;br /&gt;
Xen is a hypervisor.  It provides the&lt;br /&gt;
fundamental isolation between virtual machines.  Xen is open source (GPLv2)&lt;br /&gt;
and is managed by Xen.org, an cross-industry organization. &lt;br /&gt;
Xen is a component of many different products and projects.  The&lt;br /&gt;
hypervisor itself is very similar across all these projects, but the way that&lt;br /&gt;
it is managed can be different, which can cause confusion if you're not clear&lt;br /&gt;
which toolstack you are using.  Make sure you know what toolstack you want&lt;br /&gt;
before you get started.&lt;br /&gt;
&lt;br /&gt;
=== XCP ===&lt;br /&gt;
XCP is an open source (GPLv2) toolstack&lt;br /&gt;
for Xen.  It is designed specifically as platform for enterprise and cloud&lt;br /&gt;
computing, and is well integrated with [[OpenStack]].&lt;br /&gt;
&lt;br /&gt;
=== Citrix [[XenServer]] ===&lt;br /&gt;
&lt;br /&gt;
Citrix [[XenServer]] is a commercial&lt;br /&gt;
product.  It is based on XCP, and exposes the same toolstack and managment&lt;br /&gt;
API.  As an analogy, think of [[XenServer]] being based on XCP in the way that Red&lt;br /&gt;
Hat Enterprise Linux is based on Fedora.  [[XenServer]] has a free version (which&lt;br /&gt;
is very similar to XCP) and paid-for versions with additional features&lt;br /&gt;
enabled.&lt;br /&gt;
&lt;br /&gt;
=== xapi / XAPI / XenAPI ===&lt;br /&gt;
&lt;br /&gt;
Both [[XenServer]] and XCP include Xen, Linux, and the primary control&lt;br /&gt;
daemon known as xapi.&lt;br /&gt;
&lt;br /&gt;
The API shared between XCP and [[XenServer]] is called &amp;quot;&amp;quot;XenAPI&amp;quot;&amp;quot;.  OpenStack usually refers to XenAPI, to&lt;br /&gt;
indicate that the integration works equally well on XCP and [[XenServer]].&lt;br /&gt;
Sometimes, a careless person will refer to [[XenServer]] specifically, but you can&lt;br /&gt;
be reasonably confident that anything that works on [[XenServer]] will also work&lt;br /&gt;
on the latest version of XCP.&lt;br /&gt;
&lt;br /&gt;
== Privileged and unprivileged domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen host will run a number of virtual machines, VMs, or domains (the&lt;br /&gt;
terms are synonymous on Xen).  One of these is in charge of running the rest&lt;br /&gt;
of the system, and is known as &amp;quot;domain 0&amp;quot;, or &amp;quot;dom0&amp;quot;.  It is the first domain&lt;br /&gt;
to boot after Xen, and owns the storage and networking hardware, the device&lt;br /&gt;
drivers, and the primary control software.  Any other VM is unprivileged, and&lt;br /&gt;
are known as a &amp;quot;domU&amp;quot; or &amp;quot;guest&amp;quot;.  All customer VMs are unprivileged of&lt;br /&gt;
course, but you should note that on Xen the OpenStack control software&lt;br /&gt;
(nova-compute) also runs in a domU.  This gives a level of security isolation&lt;br /&gt;
between the privileged system software and the OpenStack sofware (much of&lt;br /&gt;
which is customer-facing).  This architecture is described in more detail&lt;br /&gt;
later.&lt;br /&gt;
&lt;br /&gt;
There is an ongoing project to split domain 0 into multiple privileged&lt;br /&gt;
domains known as &amp;quot;&amp;quot;driver domains&amp;quot;&amp;quot; and &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;stub domains&amp;quot;&amp;quot;.  This would give even better separation&lt;br /&gt;
between critical components.  This is an ongoing research project and you&lt;br /&gt;
shouldn't worry about it right now.  The current architecture just has three&lt;br /&gt;
levels of separation: dom0, the OpenStack domU, and the completely&lt;br /&gt;
unprivileged customer VMs.&lt;br /&gt;
&lt;br /&gt;
== Paravirtualized versus hardware virtualized domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen virtual machine can be &amp;quot;&amp;quot;paravirtualized&lt;br /&gt;
(PV)&amp;quot;&amp;quot; or &amp;quot;&amp;quot;hardware virtualized&lt;br /&gt;
(HVM)&amp;quot;&amp;quot;.  This refers to the interaction between Xen, domain 0, and&lt;br /&gt;
the guest VM's kernel.  PV guests are aware of the fact that they are&lt;br /&gt;
virtualized and will co-operate with Xen and domain 0; this gives them better&lt;br /&gt;
performance characteristics.  HVM guests are not aware of their environment,&lt;br /&gt;
and the hardware has to pretend that they are running on an unvirtualized&lt;br /&gt;
machine.  HVM guests have the advantage that there is no need to modify the&lt;br /&gt;
guest operating system, which is essential when running Windows.&lt;br /&gt;
&lt;br /&gt;
In OpenStack, customer VMs may run in either PV or HVM mode.  However,&lt;br /&gt;
the OpenStack domU (that's the one running nova-compute) &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;must&amp;quot;&amp;quot; be running in PV mode.&lt;br /&gt;
&lt;br /&gt;
= Deployment architecture =&lt;br /&gt;
&lt;br /&gt;
When you deploy OpenStack on XCP or [[XenServer]] you will get something&lt;br /&gt;
similar to this:&lt;br /&gt;
&lt;br /&gt;
[[Image:XenServer-dom0-domU.png]]&lt;br /&gt;
&lt;br /&gt;
Key things to note:&lt;br /&gt;
&lt;br /&gt;
* The hypervisor: Xen&lt;br /&gt;
* Domain 0: runs xapi and some small pieces from OpenStack (some xapi plugins and network isolation rules). The majority of this is provided by [[XenServer]] or XCP (or yourself using Kronos).&lt;br /&gt;
* OpenStack domU: The nova-compute code runs in a paravirtualized virtual machine, running on the host under management. Each host runs a local instance of nova-compute.  It will often also be running nova-network (depending on your network mode).  In this case, nova-network is managing the addresses given to the tenant VMs through DHCP.&lt;br /&gt;
* Nova uses the XenAPI Python library to talk to xapi, and it uses the Host Internal Management Network to reach from the domU to dom0 without leaving the host.&lt;br /&gt;
&lt;br /&gt;
Some notes on the networking:&lt;br /&gt;
* The above diagram assumes FlatDHCP networking (the [[DevStack]] default).&lt;br /&gt;
* There are three main OpenStack networks: Management traffic (RabbitMQ, MySQL, etc), Tenant network traffic (controlled by nova-network) and Public traffic (floating IPs, public API end points).&lt;br /&gt;
* Each network that leaves the host has been put through a separate physical network interface.  This is the simplest model, but it's not the only one possible.  You may choose to isolate this traffic using VLANs instead, for example.&lt;br /&gt;
* nova-compute generally talks to [[XenServer]] using a host local private network called either &amp;quot;Guest Installer Network&amp;quot; or &amp;quot;Host Internal Managmenet Network&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another example of how to deploy OpenStack on a system with only two physical network interfaces is:&lt;br /&gt;
&lt;br /&gt;
[[Image:DevStackDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
== [[XenServer]] pools ==&lt;br /&gt;
&lt;br /&gt;
Before OpenStack 2012.1 (&amp;quot;Essex&amp;quot;), all [[XenServer]] machines used with&lt;br /&gt;
OpenStack are standalone machines, usually only using local storage.&lt;br /&gt;
&lt;br /&gt;
However in 2012.1 and later, the host-aggregates feature allows you to&lt;br /&gt;
create pools of [[XenServer]] hosts (configuring shared storage is still an out of&lt;br /&gt;
band activity). This move will enable live migration when using shared&lt;br /&gt;
storage.&lt;br /&gt;
&lt;br /&gt;
== Xen and libvirt ==&lt;br /&gt;
&lt;br /&gt;
It may possible to manage Xen using libvirt.  This would be necessary&lt;br /&gt;
for any Xen-based system that isn't using the XCP toolstack, such as SUSE&lt;br /&gt;
Linux or Oracle Linux.  Unfortunately, this is not well tested or supported&lt;br /&gt;
today, and using the XCP or [[XenServer]] toolstacks with the OpenStack XenAPI&lt;br /&gt;
backend is the only recommended method.&lt;br /&gt;
&lt;br /&gt;
= Further reading =&lt;br /&gt;
&lt;br /&gt;
What is Xen? by Xen.org: http://xen.org/files/Marketing/WhatisXen.pdf.&lt;br /&gt;
&lt;br /&gt;
Xen Hypervisor project: http://xen.org/products/xenhyp.html.&lt;br /&gt;
&lt;br /&gt;
XCP project: http://xen.org/products/cloudxen.html.&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Obsolete:ZoneTesting&amp;diff=16277</id>
		<title>Obsolete:ZoneTesting</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Obsolete:ZoneTesting&amp;diff=16277"/>
				<updated>2013-02-17T01:02:25Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Testing Zones with One Physical Host =&lt;br /&gt;
&lt;br /&gt;
I recently had need to set up multiple instance of nova (multiple ''zones'') on one physical host, for testing purposes.  This documents how I did it.  Note that the zones share a single keystone and glance instance, and I do not document setting that up here.&lt;br /&gt;
&lt;br /&gt;
== Separating Zone Configuration/Information ==&lt;br /&gt;
&lt;br /&gt;
In order to keep the zones as separate as possible, I made separate directories for each one and placed all the configuration in there.  This is not strictly necessary—the main difference between the zones is the nova.conf—but I happen to use other files in the directory to automate starting up the nova daemons I need.  (I will not document my preferred automation here, but could be convinced to do so under separate cover. -Vek &amp;lt;kevin.mitchell@rackspace.com&amp;gt;)  If you're using the sqlite backend for storing the nova database, this also provides a convenient place to store the database files, but I use the mysql backend and will document the differences here.&lt;br /&gt;
&lt;br /&gt;
Once you've decided on how you're going to keep your zones separate, the next step is to set up the nova configuration.  The important configuration options to pay attention to are:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|  `--sql_connection` &lt;br /&gt;
|-&lt;br /&gt;
|  `--connection_type` &lt;br /&gt;
|-&lt;br /&gt;
|  `--allow_admin_api` &lt;br /&gt;
|-&lt;br /&gt;
|  `--fake_network` &lt;br /&gt;
|-&lt;br /&gt;
|  `--enable_zone_routing` &lt;br /&gt;
|-&lt;br /&gt;
|  `--zone_name` &lt;br /&gt;
|-&lt;br /&gt;
|  `--build_plan_encryption_key` &lt;br /&gt;
|-&lt;br /&gt;
|  `--scheduler_driver` &lt;br /&gt;
|-&lt;br /&gt;
|  `--default_host_filter` &lt;br /&gt;
|-&lt;br /&gt;
|  `--ec2_listen_port` &lt;br /&gt;
|-&lt;br /&gt;
|  `--osapi_listen_port` &lt;br /&gt;
|-&lt;br /&gt;
|  `--rabbit_port` &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For generating a value for `--build_plan_encryption_key`, I use a snippet of Python code like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#!highlight python&lt;br /&gt;
import random&lt;br /&gt;
charset = &amp;quot;0123456789abcdef&amp;quot;&lt;br /&gt;
print ''.join([random.choice(charset) for i in range(32)])&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Initializing Databases ==&lt;br /&gt;
&amp;lt;span id=&amp;quot;databases&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have the appropriate configuration file, it is necessary to initialize the database.  For mysql, you need to create the databases before they can be initialized; for this, use the `mysql` command to connect to the database server and use &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;CREATE DATABASE 'name';&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot; to create the database for each zone.  (This step may be safely skipped for sqlite setups.)  Then it is time to initialize the database; for each zone you're setting up, do:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ /path/to/nova-manage --flagfile=/path/to/zone/nova.conf db sync&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you take an update to nova, make sure to re-run this command for each database.&lt;br /&gt;
&lt;br /&gt;
== Setting Up Multiple RabbitMQ Instances ==&lt;br /&gt;
&amp;lt;span id=&amp;quot;multirabbit&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each zone must have its own instance of RabbitMQ.  As it turns out, this is easy to do; under Debian-derived systems, create `/etc/default/rabbitmq` and give it the following contents:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
NODE_COUNT=3&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value you choose should be the same as the number of zones you're running on this host.  This will cause `NODE_COUNT` instances of the RabbitMQ server to be started with sequential port numbers, starting with 5672; use these values for `--rabbit_port` in the zone's nova.conf.&lt;br /&gt;
&lt;br /&gt;
== [Pending] Keystone Configuration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#!wiki caution&lt;br /&gt;
'''Work in Progress'''&lt;br /&gt;
&lt;br /&gt;
Keystone integration is still a work in progress.  This discussion should be mostly stable, but does not include all the particulars of setting up Keystone.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Configuring Keystone is actually the most complex part of the operation.  To begin with, you need to set up a Keystone ''tenant'' for each zone:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ keystone-manage tenant add zone1tenant&lt;br /&gt;
$ keystone-manage tenant add zone2tenant&lt;br /&gt;
...&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, you need to set up admin users for the zones:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ keystone-manage user add zone1admin password zone1tenant&lt;br /&gt;
$ keystone-manage role grant Admin zone1admin zone1tenant&lt;br /&gt;
$ keystone-manage user add zone2admin password zone2tenant&lt;br /&gt;
$ keystone-manage role grant Admin zone2admin zone2tenant&lt;br /&gt;
...&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we come to the hard part—creating endpoint templates.  This will look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ keystone-manage endpointTemplates add zone1region nova_compat \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.0 \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.0 \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.0 1 0&lt;br /&gt;
$ keystone-manage endpointTemplates add zone1region compute \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.0 \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.0 \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.0 1 0&lt;br /&gt;
$ keystone-manage endpointTemplates add zone1region nova \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.1/%tenant_id% \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.1/%tenant_id% \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.1/%tenant_id% 1 0&lt;br /&gt;
$ keystone-manage endpointTemplates add zone1region compute_v1 \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.1/%tenant_id% \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.1/%tenant_id% \&lt;br /&gt;
    http://&amp;lt;IP&amp;gt;:&amp;lt;zone1port&amp;gt;/v1.1/%tenant_id% 1 0&lt;br /&gt;
...&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Take note of the IDs for each of these templates as you create them, because it is also necessary to link them to the tenants you created above:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ keystone-manage endpoint add zone1tenant 1&lt;br /&gt;
$ keystone-manage endpoint add zone1tenant 2&lt;br /&gt;
$ keystone-manage endpoint add zone1tenent 3&lt;br /&gt;
$ keystone-manage endpoint add zone1tenant 4&lt;br /&gt;
...&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#!wiki caution&lt;br /&gt;
'''Take care in endpoint assignments'''&lt;br /&gt;
&lt;br /&gt;
Endpoint templates for the zone1region should only be assigned to zone1tenant, those for zone2region should only be assigned to zone2tenant, etc.  This is the mechanism by which the `nova` client tool looks up the actual zone endpoint to contact.  Also note that the zones mechanism within nova uses the `nova` client tool, so you must set up endpoint templates and endpoints for all zones you set up.&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Connecting Zones ==&lt;br /&gt;
&lt;br /&gt;
We're finally to the last step.  Start up each of the zones in question and use the `nova` client tool to verify the operation of each zone in turn, using the users you set up above.  Then, pick a zone to be the ''parent'' zone; ''child'' zones don't know anything about their parents (and can in fact have multiple parents), but parent zones must be told about each child zone they are to use.  This is done using the `zone-add` command to `nova`.  As an example, let's assume `zone1` is the parent zone and `zone2` is the child; the `nova zone-add` invocation will look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
$ export NOVA_USERNAME=zone1admin&lt;br /&gt;
$ export NOVA_API_KEY=password&lt;br /&gt;
$ export NOVA_PROJECT_ID=zone1tenant&lt;br /&gt;
$ export NOVA_URL=http://&amp;lt;keystoneIP&amp;gt;:&amp;lt;keystonePort&amp;gt;&lt;br /&gt;
$ nova zone-add --zone_username zone2admin --password password $NOVA_URL&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that `NOVA_URL` is pointing to Keystone, here; keystone uses the endpoint templates to match up the username (`zone2admin`) with the zone endpoint.  Subsequent calls to &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;nova zone-list&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will display the details about the zones visible to `zone1`.  (Note that zone information is updated at regular intervals, so initially values may show up as &amp;quot;n/a&amp;quot; until the first update.)&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* http://nova.openstack.org/devref/distributed_scheduler.html&lt;br /&gt;
* http://nova.openstack.org/devref/zone.html&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Obsolete:GerritJenkinsGit&amp;diff=16234</id>
		<title>Obsolete:GerritJenkinsGit</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Obsolete:GerritJenkinsGit&amp;diff=16234"/>
				<updated>2013-02-17T00:19:09Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= Gerrit, Jenkins, and GitHub =&lt;br /&gt;
For a quick reference, please see [[GerritWorkflow]] instead.&lt;br /&gt;
&lt;br /&gt;
[https://github.com/ GitHub] is a resource for managing Git code repositories and interacting with other developers. [http://jenkins-ci.org/ Jenkins] is used to continuously test all of the components of [[OpenStack]] to ensure functionality and to verify that each change to the code base works as intended. [http://code.google.com/p/gerrit/ Gerrit] is a code review system originally developed for use by the Android Open Source Project and allows us to build a workflow where every change is peer-reviewed and tested by Jenkins before being merged into the main repository.&lt;br /&gt;
&lt;br /&gt;
After making a change in their local Git repository, developers can easily push that change to Gerrit as a proposed change for the project.  Jenkins will automatically run functional tests on the code and provide feedback on the change in Gerrit.  Any [[OpenStack]] developer can provide feedback (in the form of a comment, or even line-by-line annotations) using Gerrit, and the core developers of the project can indicate whether they approve of the patch as is, or would like to see changes before it is integrated.  Once patches are merged by Gerrit, the repository is pushed to the canonical public repository on GitHub.&lt;br /&gt;
&lt;br /&gt;
== Using Gerrit ==&lt;br /&gt;
The next sections describe how Gerrit fits into the developer workflow.&lt;br /&gt;
&lt;br /&gt;
=== Gerrit Accounts ===&lt;br /&gt;
Gerrit lives at https://review.openstack.org/. Visit and click the '''Sign In''' link at the top-right corner of the page. Log in with your Launchpad ID.&lt;br /&gt;
&lt;br /&gt;
Because Gerrit uses Launchpad OpenID single sign-on, you won't need a separate password for Gerrit, and once you log in to one of Launchpad,  Gerrit, or Jenkins, you won't have to enter your password for the others.&lt;br /&gt;
&lt;br /&gt;
Gerrit accounts are automatically synchronized with Launchpad, so your Gerrit account should already have the same username, full name,  email address, ssh keys, and group membership.&lt;br /&gt;
&lt;br /&gt;
Some information in Launchpad is not publicly available and so may not be copied over.  The first time you log into Gerrit, you should click the '''Settings''' link at the top of the page, and then make sure that your '''Contact Information''', '''SSH Public Keys''', and '''Groups''' look correct.  If not, please register your email address and SSH keys.  If your group membership is not correct, please email openstack-ci-admins@lists.launchpad.net .&lt;br /&gt;
&lt;br /&gt;
Ensure that you have run these steps to let git know about your email address:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git config --global user.name &amp;quot;Firstname Lastname&amp;quot;&lt;br /&gt;
git config --global user.email &amp;quot;your_email@youremail.com&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting up Git for Use with Gerrit ===&lt;br /&gt;
For a more comprehensive look at using Gerrit, see [https://review.openstack.org/Documentation/user-upload.html the Gerrit manual].&lt;br /&gt;
&lt;br /&gt;
==== Change-Id Hook ====&lt;br /&gt;
Gerrit uses a '''Change-Id''' footer in commits so that it can link Git commits to changes stored in its database.  When you upload a revised change (to correct a problem or respond to code review comments), Gerrit will use the Change-Id footer to attach the commit as a new patchset on the existing gerrit change.  This works best if the Change-Id is already in the original commit message, before it is even sent to Gerrit.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;git review&amp;quot; installs a commit hook into your repository that automatically adds Change-Id lines to your commits..&lt;br /&gt;
&lt;br /&gt;
The Gerrit manual goes into more detail about [https://review.openstack.org/Documentation/user-changeid.html change IDs].&lt;br /&gt;
&lt;br /&gt;
Install the git-review tool, which is the tool [[OpenStack]] uses to simplify submission of reviews to Gerrit.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo pip install git-review&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Pushing Changes from Git ====&lt;br /&gt;
Simply running '''git review''' should be sufficient to push your changes to Gerrit, assuming your repository is set up as described above, you don't need to read the rest of this section unless you want to use an alternate workflow.&lt;br /&gt;
&lt;br /&gt;
If you want to push your changes without using git-review, you can push changes to gerrit like you would any other git repository, using the following syntax (assuming &amp;quot;gerrit&amp;quot; is configured as a remote repository):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git push gerrit HEAD:refs/for/$BRANCH[/$TOPIC]&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where $BRANCH is the name of the Gerrit branch to push to (usually &amp;quot;master&amp;quot;), and you may optionally specify a Gerrit topic by appending it after a slash character.&lt;br /&gt;
&lt;br /&gt;
==== Git SSH Commands ====&lt;br /&gt;
If you find you are frequently executing Gerrit commands via SSH, you may wish to add something like the following to your '''~/.ssh/config''' file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
Host review&lt;br /&gt;
  Hostname review.openstack.org&lt;br /&gt;
  Port 29418&lt;br /&gt;
  User USERNAME&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which may shorten some SSH commands; the following are equivalent:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ssh -p 29418 review.openstack.org gerrit ls-projects&lt;br /&gt;
ssh review gerrit ls-projects&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reviewing a Change ==&lt;br /&gt;
Log in to https://review.openstack.org/ to see proposed changes, and review them.&lt;br /&gt;
&lt;br /&gt;
To provide a review for a proposed change in the Gerrit UI, click on the Review  button (it will be next to the buttons that will provide unified or side-by-side  diffs in the browser). In the code review, you can add a message, as well as a  vote (+1,0,-1).&lt;br /&gt;
&lt;br /&gt;
Any Openstack developer may propose or comment on a change (including voting +1/0/-1 on it).  Openstack projects have a policy requiring two positive reviews from core reviewers.  A vote of +2 is allowed from core reviewers, and should be used to indicate that they are a core reviewer and are leaving a vote that should be counted as such.&lt;br /&gt;
&lt;br /&gt;
When a review has two +2 reviews and one of the core team believes it is ready to be merged, he or she should leave a +1 vote in the &amp;quot;Approved&amp;quot; category.  You may do so by clicking the &amp;quot;Review&amp;quot; button again, with or without changing your code review vote and optionally leaving a comment.  When a +1 Approved review is received, Jenkins will run tests on the change, and if they pass, it will be merged.&lt;br /&gt;
&lt;br /&gt;
=== Gerrit Best Practices ===&lt;br /&gt;
If you are working on unrelated changes, you should use a [http://progit.org/book/ch3-4.html topic branch] so that there  isn't a dependency between the changes.&lt;br /&gt;
&lt;br /&gt;
When you start working on a new change, make sure you have the current repository head from GitHub.&lt;br /&gt;
&lt;br /&gt;
For more information about uploading changes to gerrit, see the [https://review.openstack.org/Documentation/user-upload.html Uploading Changes] section of the Gerrit manual.&lt;br /&gt;
&lt;br /&gt;
=== Gerrit Errors ===&lt;br /&gt;
==== missing Change-Id in commit message ====&lt;br /&gt;
If you see an error like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ! [remote rejected] HEAD -&amp;gt; refs/for/master (missing Change-Id in commit message)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that you have the [[#Change-Id_Hook|Change-Id hook]] installed.  If you don't, install it now, and the run '''git commit --amend''' and re-save your commit message.  The hook will then add a Change-Id line.&lt;br /&gt;
&lt;br /&gt;
If you did have the hook installed, there may be a syntax error with the Change-Id line.  It must be in the last paragraph of the commit message, and it must be at the beginning of the line.  Your commit message should look like this in your editor:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
The text of your commit message is here.&lt;br /&gt;
&lt;br /&gt;
Change-Id: I5f55e68d1bdb42a0fa6f0b1a5432786d0395da51&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== squash commits first ====&lt;br /&gt;
If you see this message:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ! [remote rejected] HEAD -&amp;gt; refs/for/master (squash commits first)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It means that you are trying to update an existing change in Gerrit, but you created two separate commits.  Normally to update a change you should amend an existing commit (see [[GerritWorkflow#Updating_a_Change|Updating a Change]]).  If you have already made a second commit, you will need squash the last two commits in your tree.  To do that, run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git rebase -i HEAD~2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your editor should appear with two commits listed, one per line. Change the word &amp;quot;pick&amp;quot; on the second line to &amp;quot;squash&amp;quot;, so that it looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
pick 1458567 Fix bug 1014727&lt;br /&gt;
pick 7284e97 Document underlying technologies&lt;br /&gt;
pick fac4698 Clean up on section&lt;br /&gt;
pick xxxxxxx 2nd commit back&lt;br /&gt;
squash yyyyyyy head&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And save.  You should then be able to upload your commit with '''git review'''.&lt;br /&gt;
&lt;br /&gt;
==== can not create new references ====&lt;br /&gt;
&lt;br /&gt;
If you try to send a draft with '''git review -D''' and it fails like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 ! [remote rejected] HEAD -&amp;gt; refs/draft/master (can not create new references) &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then check that you are running git-review version 1.16 or later. You can install the lastest version with pip:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
pip install git-review&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Gerrit Merge Problems ===&lt;br /&gt;
Gerrit will fast-forward or merge changes as necessary when they are approved.  If a conflict would be created by a merge, gerrit will not merge the change and will record an error message in the comments for the change.  In these cases, you may need to [http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html rebase] or [http://www.kernel.org/pub/software/scm/git/docs/git-merge.html merge] the change, or if the repository head has changed significantly, you may need to change the patch.&lt;br /&gt;
&lt;br /&gt;
If you don't already have the patch in your local repository, Gerrit provides commands on the web page for each change indicating how to download that change.  You can then use git to correct the problem.&lt;br /&gt;
&lt;br /&gt;
If you encounter other error messages from Gerrit, the  [https://review.openstack.org/Documentation/error-messages.html Error Messages]  section of the Gerrit manual may offer some tips.&lt;br /&gt;
&lt;br /&gt;
=== Test Failures ===&lt;br /&gt;
When a new patchset is uploaded to Gerrit, that project's &amp;quot;check&amp;quot; tests are run on the patchset by Jenkins. Once completed the test results are reported to Gerrit by Jenkins in the form of a Verified: +/-1 vote. After code reviews have been completed and a change receives an Approved: +1 vote that project's &amp;quot;gate&amp;quot; tests are run on the change by Jenkins. Jenkins reports the results of these tests back to Gerrit in the form of a Verified: +/-2 vote. Code merging will only occur after the gate tests have passed successfully and received a Verified: +2. You can view the state of tests currently being run on the [http://status.openstack.org/zuul/ Zuul Status] and [https://jenkins.openstack.org/ Jenkins Dashboard] pages.&lt;br /&gt;
&lt;br /&gt;
If a change fails tests in Jenkins, please follow the steps below:&lt;br /&gt;
&lt;br /&gt;
# Jenkins leaves a comment in the review with links to the log files for the test run.  Follow those links and examine the output from the test.  It will include a console log, and in the case of unit tests, HTML output from the test runner, or in the case of a devstack-gate test, it may contain quite a large number of system logs.&lt;br /&gt;
# Examine the console log or other relevant log files to determine the cause of the error.  If it is related to your change, you should fix the problem and upload a new patchset.&lt;br /&gt;
# If the problem is due to non-deterministic behavior already merged, and is unrelated to your change, you should do the following to help other developers who may be affected by the same issue, and to focus attention of QA, CI, and other developers working to fix high-impact bugs and improve test systems:&lt;br /&gt;
# Visit http://status.openstack.org/rechecks/ to see if one of the bugs listed there matches the error you've seen.  If your error isn't there, then:&lt;br /&gt;
#* Identify which project(s) are affected, and search for a related bug on [https://bugs.launchpad.net/ Launchpad].  If you do not find an existing bug, file a new one (and be sure to include the error message).  If the problem is due to an infrastructure problem (such as Jenkins, Gerrit, etc.), file (or search for) the bug against the &amp;quot;openstack-ci&amp;quot; project.&lt;br /&gt;
# Once you have a bug number in hand:&lt;br /&gt;
#* To re-run the check jobs (before a change has been approved), leave a comment with the form &amp;quot;recheck bug ####&amp;quot;.&lt;br /&gt;
#* To re-run the gate jobs (after a change has been approved), leave a comment with the form &amp;quot;reverify bug ####&amp;quot;.&lt;br /&gt;
# This will update the [http://status.openstack.org/rechecks/ rechecks status page] and help others quickly identify the issue if it occurs again.&lt;br /&gt;
&lt;br /&gt;
If you need to re-run tests and it does not make sense to include a bug number (perhaps there is no error, you've just made a draft change visible and want it tested or you're updating test results because you know that a related branch has changed since the last time they were run), you may leave a comment with the form &amp;quot;recheck no bug&amp;quot; (or &amp;quot;reverify no bug&amp;quot;).  Please only do this if you are certain there is no bug that needs to be addressed.&lt;br /&gt;
&lt;br /&gt;
=== Merge Commits ===&lt;br /&gt;
When a branch is pushed to gerrit (either manually, or via git-review), each commit in the branch that is not in Gerrit's copy of the tree is turned into a new change for review (unless that commit has a Change-Id that corresponds to an existing change, in which case, the change is updated).  This means that if a developer merges a branch from another source into their local repository and pushes to Gerrit, hundreds of new changes may be created.  This is almost certainly not what was intended.  For that reason, Gerrit is configured not to accept merge commits in the general case.&lt;br /&gt;
&lt;br /&gt;
'''Caution: The following describes an experimental process and is not generally applicable yet:'''&lt;br /&gt;
&lt;br /&gt;
However, merge commits are very useful for feature branches -- development branches that fork from the main line of development, occasionally receiving updates from the main line, and when development is complete, merging back into the main line.  For these purposes, members of the $PROJECT-drivers group are permitted to upload merge commits to Gerrit.  These users must take special care when dealing with merge commits to avoid the problems mentioned above.  The following tips will help avoid problems with merge commits:&lt;br /&gt;
&lt;br /&gt;
* Don't merge branches from gerrit and outside of gerrit (eg, GitHub or personal branches).&lt;br /&gt;
* When developing, follow the branching model described in [[GerritWorkflow]], this will avoid creating merge commits locally.&lt;br /&gt;
* Use git-review to upload your changes to Gerrit.  By default, if git-review would create or update more than one commit, it will list the commits and ask you if that is what you intend to do.  Pay attention to that, and if you see that too many commits are being uploaded, say &amp;quot;no&amp;quot; and clean up your local branch.&lt;br /&gt;
* To merge master into a feature branch, do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git checkout feature-branch&lt;br /&gt;
git pull --ff-only origin feature-branch&lt;br /&gt;
git checkout -b merge-branch&lt;br /&gt;
git merge origin/master&lt;br /&gt;
git review -R feature-branch&lt;br /&gt;
git checkout master&lt;br /&gt;
git branch -D merge-branch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that follows the same model described in [[GerritWorkflow]] of using a topic branch for each independent unit of local development.  In this case, the &amp;quot;merge-branch&amp;quot; branch is being used to generate the merge commit, and once submitted, is no longer needed and can be (optionally) removed.  You may continue to use your local copy of the feature-branch as normal, pulling fast-forward only commits from Gerrit.  The following similar process may be used to merge the feature branch into master, terminating development on that branch:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git checkout master&lt;br /&gt;
git pull --ff-only origin master&lt;br /&gt;
git checkout -b merge-branch&lt;br /&gt;
git merge origin/feature-branch&lt;br /&gt;
git review -R&lt;br /&gt;
git checkout master&lt;br /&gt;
git branch -D merge-branch&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Release Management =&lt;br /&gt;
== Milestones ==&lt;br /&gt;
Between the Milestone Branch Point and the release of the corresponding milestone, there needs to be a separate branch in Gerrit for changes destined for the milestone release.  Meanwhile, development on the master branch should continue as normal (with the addition that changes proposed for the milestone should also be proposed for master, and some changes for master may need to be applied to milestone-proposed).&lt;br /&gt;
&lt;br /&gt;
This process creates an ephemeral milestone-proposed branch that is only available in Gerrit during the milestone process.  When the milestone is released, a tag is applied to the final commit to record the state of the branch at the time.&lt;br /&gt;
&lt;br /&gt;
=== Create milestone-proposed Branch ===&lt;br /&gt;
This step should be performed by the [[OpenStack]] Release Manager at the Release Branch Point.&lt;br /&gt;
&lt;br /&gt;
* Go to https://review.openstack.org/ and sign in&lt;br /&gt;
* Select '''Admin''', '''Projects''', then the project&lt;br /&gt;
* Select '''Branches'''&lt;br /&gt;
* Enter '''milestone-proposed''' in the '''Branch Name''' field, and '''HEAD''' as the Initial Revision, then press '''Create Branch'''&lt;br /&gt;
&lt;br /&gt;
In your local checkout:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git checkout master&lt;br /&gt;
git pull&lt;br /&gt;
git checkout milestone-proposed&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Authoring Changes for milestone-proposed ===&lt;br /&gt;
Create topic branches as normal, but branch them from milestone-proposed rather than master.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git checkout milestone-proposed&lt;br /&gt;
git pull&lt;br /&gt;
git checkout -b MY-TOPIC-BRANCH&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Changes for milestone-proposed should be submitted with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git push gerrit HEAD:refs/for/milestone-proposed&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Submit Changes in master to milestone-proposed ===&lt;br /&gt;
If a change to master should also be included in milestone-proposed, use this procedure to cherry-pick that change and submit it for review.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git checkout milestone-proposed&lt;br /&gt;
git pull&lt;br /&gt;
git checkout -b master-to-mp&lt;br /&gt;
git cherry-pick &amp;lt;SHA1 or &amp;quot;master&amp;quot;&amp;gt;&lt;br /&gt;
git push gerrit HEAD:refs/for/milestone-proposed&lt;br /&gt;
git branch -D master-to-mp&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''git cherry-pick master''' will pick the most recent commit from master to apply, if you want a different patch, use the SHA1 of the commit instead.&lt;br /&gt;
&lt;br /&gt;
=== Submitting Changes in milestone-proposed to master ===&lt;br /&gt;
Changes that originate in milestone-proposed should also be submitted to master.  Use these commands to make an up-to-date topic branch from master, then cherry-pick changes from milestone-proposed to be applied to master.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git checkout master&lt;br /&gt;
git pull&lt;br /&gt;
git checkout -b mp-to-master&lt;br /&gt;
git cherry-pick &amp;lt;SHA1 or milestone-proposed&amp;gt;&lt;br /&gt;
git review&lt;br /&gt;
git branch -D mp-to-master&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''git cherry-pick milestone-proposed''' will pick the most recent commit from milestone-proposed to apply, if you want a different patch, use the SHA1 of the commit instead.&lt;br /&gt;
&lt;br /&gt;
=== Tagging a Release ===&lt;br /&gt;
This step should be performed by the [[OpenStack]] Release Manager when the release is made.&lt;br /&gt;
&lt;br /&gt;
To tag the tip of the milestone-proposed branch with a release tag and push that tag to gerrit and GitHub, run the following commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
git checkout milestone-proposed&lt;br /&gt;
git pull&lt;br /&gt;
git tag -s RELEASE-TAG-NAME&lt;br /&gt;
git push gerrit RELEASE-TAG-NAME&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running `git tag -s` signs the tag using GPG, so it's important to ensure that the person making the release have a valid GPG key.&lt;br /&gt;
&lt;br /&gt;
Make sure you're only adding a single tag when pushing to gerrit.&lt;br /&gt;
&lt;br /&gt;
=== End of Milestone ===&lt;br /&gt;
This step should be performed by the [[OpenStack]] Release Manager after the release is tagged.&lt;br /&gt;
&lt;br /&gt;
When the milestone process is complete and the released commit is tagged, remove the milestone-proposed branch.  The tag will persist, even after the branch is deleted, making it possible to restore the state of the tree.&lt;br /&gt;
&lt;br /&gt;
* Go to https://review.openstack.org/ and sign in&lt;br /&gt;
* Select '''Admin''', '''Projects''', then the project&lt;br /&gt;
* Select '''Branches'''&lt;br /&gt;
* Select the checkbox next to '''milestone-proposed''' and hit '''Delete'''&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
See the [https://review.openstack.org/Documentation/index.html Gerrit documentation],  especially the User Guide, for more information on how to use Gerrit.  It is also available within Gerrit by clicking on the '''Documentation''' link on the top of the page.&lt;br /&gt;
&lt;br /&gt;
The Mahara Project also [https://wiki.mahara.org/index.php/Developer_Area/Developer_Tools uses Git, Gerrit, and Jenkins] in a similar manner (though with Gitorious instead of GitHub).&lt;br /&gt;
&lt;br /&gt;
A description of many of the elements of the [http://sandofsky.com/blog/git-workflow.html git workflow]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=GenericMessagingSystem&amp;diff=16229</id>
		<title>GenericMessagingSystem</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=GenericMessagingSystem&amp;diff=16229"/>
				<updated>2013-02-17T00:15:35Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ##master-page:[[ProposalTemplate]] --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #format wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #language en --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Generic Messaging System Proposal ==&lt;br /&gt;
'''Drafter: ''' [[PaulGuth]]&lt;br /&gt;
&lt;br /&gt;
'''Drafters Email: ''' &amp;lt;&amp;lt;[[MailTo]](paul AT cloudscaling DOT com)&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Status: ''' To be completed by POC&lt;br /&gt;
&lt;br /&gt;
'''Proposal'''&lt;br /&gt;
&lt;br /&gt;
Nova currently supports only RabbitMQ as a messaging system for its internal RPC. We want to implement a generic interface that would allow people to use whatever messaging systems fit best in their environments. This should simplify management for organizations with established messaging infrastructures and also ease adoption for organizations that don't currently use RabbitMQ.&lt;br /&gt;
&lt;br /&gt;
We are addressing this by separating the RPC interface out from the queuing system, essentially creating an API that nova will use to access whatever messaging system is underneath. nova/rpc.py will become generic messaging functionality, simply:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; &lt;br /&gt;
create_connection(new=True)&lt;br /&gt;
create_consumer(conn, topic, proxy, fanout=False)&lt;br /&gt;
create_consumer_set(conn, consumers)&lt;br /&gt;
call(context, topic, msg)&lt;br /&gt;
cast(context, topic, msg)&lt;br /&gt;
fanout_cast(context, topic, msg)&lt;br /&gt;
multicall(context, topic, msg) &lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The specifics of the underlying messaging implementation become a separate driver. As part of this blueprint the driver for the existing AMQP system will be included so no changes will be visible to existing installations or documentation. However, after these changes anyone can plugin a new driver to implement whatever messaging system they prefer.&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=XMLTemplates&amp;diff=16228</id>
		<title>XMLTemplates</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=XMLTemplates&amp;diff=16228"/>
				<updated>2013-02-17T00:14:58Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ##master-page:[[ProposalTemplate]] --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #format wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #language en --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== XMLTemplates ==&lt;br /&gt;
'''Drafter: '''[[Vek]]&lt;br /&gt;
&lt;br /&gt;
'''Drafters Email: ''' &amp;lt;&amp;lt;[[MailTo]](kevin DOT mitchell AT rackspace DOT com)&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Status: ''' To be completed by POC&lt;br /&gt;
&lt;br /&gt;
Currently, request extensions have to deserialize data, manipulate it, and reserialize it. This happens for each extension. This is generally not much of a problem for JSON data, but XML is expensive to deserialize and reserialize, and it is currently impossible to extend the XML without directly editing the serializer or writing an independent serializer.&lt;br /&gt;
&lt;br /&gt;
This proposal is to establish new middleware which performs the XML serialization, and to also establish a means of creating XML templates, which can be extended by attaching slave templates to describe the extra data that an extension may wish to include.&lt;br /&gt;
&lt;br /&gt;
Much of the code for this is already written, and many elements of nova-api converted over to use template-based serializers in preference to the hand-coded serializers currently utilized.  This page is to document what has been done.&lt;br /&gt;
&lt;br /&gt;
=== Lazy Serialization ===&lt;br /&gt;
&lt;br /&gt;
The first and simplest part of the specification is lazy serialization.  Basically, this involves the creation of a LazySerializationMiddleware which is added to the openstackapi pipelines, and some modifications to nova.api.openstack.wsgi—specifically, Response is modified to track a lazy_serialization attribute (defaulting to True), and ResponseSerializer's serialize_body() method is modified to store the actual serializer and action (and template, if available) into the request if lazy_serialization is True.  The data itself is serialized as a JSON object in order to be passed through the webob pipeline (webob is designed to pass text response bodies, and extending it to allow raw objects to be passed between components would be difficult).&lt;br /&gt;
&lt;br /&gt;
=== Extensions ===&lt;br /&gt;
&lt;br /&gt;
Request extensions are also slightly modified; the loop that calls all the handlers for a particular request deserializes the body and passes that as a third parameter to all the handlers.  The handlers can modify the body in place, and additionally modify the template in the wsgi environment (if present; for data requested to be encoded in JSON format, no template will be present in the wsgi environment).&lt;br /&gt;
&lt;br /&gt;
=== XML Templates ===&lt;br /&gt;
&lt;br /&gt;
The most complicated part of the proposal is the introduction of an XML template.  XML templates can be constructed the same way an XML tree is constructed using the ElementTree interface of lxml; there exists a TemplateElement class and a SubTemplateElement() helper function that operate in a similar manner to ElementTree.  The critical difference is the use of selectors; when an object is serialized against an XML template, the object is passed in, and a selector (basically, a simple callable) is used to select the data to operate on.  There is a selector associated with each element, and selectors can also be attached as attribute values and as the text contents of the element; these selectors further refine the element's selector.  Subelements will also be passed the object selected by their parent, and have the chance to further refine selection for their own purposes.&lt;br /&gt;
&lt;br /&gt;
Once an element tree has been constructed, it can be wrapped up in a Template subclass.  There are two subclasses available—MasterTemplate and SlaveTemplate.  Both can serialize an object against the template directly, but MasterTemplate instances can additionally have SlaveTemplate instances attached which can further extend the serialization; the effect is as if the elements in the SlaveTemplate instances were merged with the elements in the MasterTemplate.  Additionally, MasterTemplate instances have version numbers, and automatically exclude SlaveTemplate instances which do not apply to that MasterTemplate version (SlaveTemplate instances have a minimum version and an optional maximum version for this selection criteria).  This makes it easy for extensions to modify a serializer to include their extended data.&lt;br /&gt;
&lt;br /&gt;
The existing code also includes a TemplateBuilder class, which can be used to ensure that a given template only ever needs to be built once; and an XMLTemplateSerializer, which is similar to the existing XMLDictSerializer.&lt;br /&gt;
&lt;br /&gt;
=== WSGI Environment ===&lt;br /&gt;
&lt;br /&gt;
The lazy serialization potentially adds 3 new variables to the WSGI environment.  (Note &amp;quot;potentially&amp;quot;—for JSON serialization, none of these variables are added.)  The '''nova.serializer''' variable contains a reference to the body serializer to use (typically a subclass of XMLDictSerializer or, preferably, a subclass of XMLTemplateSerializer), and the '''nova.action''' variable contains the action to pass to the serializer's serialize() method.  If the serializer has a get_template() method, the return value of that method will be assigned to the '''nova.template''' variable; extensions may attach their slave templates to this master template as necessary.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Blueprint: https://blueprints.launchpad.net/nova/+spec/xml-templates&lt;br /&gt;
----&lt;br /&gt;
[[Category:Proposal]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=SchedulerRaceReduction&amp;diff=16221</id>
		<title>SchedulerRaceReduction</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=SchedulerRaceReduction&amp;diff=16221"/>
				<updated>2013-02-17T00:07:36Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ##master-page:[[ProposalTemplate]] --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #format wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #language en --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[SchedulerRaceReduction]] ==&lt;br /&gt;
&lt;br /&gt;
'''Drafter: '''[[belliott]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The scheduler is subject to a race condition which can cause it to incorrectly identify available resources on a particular compute host. The problem occurs if multiple scheduler instances/threads concurrently issue an instance build request (i.e. ''run_instance'') to the same compute host. This situation may oversubscribe the given compute host and cause one or more ''run_instance'' requests to fail.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Compute host ''C'' has 3 GB of ram free.&lt;br /&gt;
&lt;br /&gt;
# Scheduler ''A'' sends a ''run_instance'' request ''R1'' to ''C'' trying to build a 2GB instance.&lt;br /&gt;
# Scheduler ''B'' sends a ''run_instance'' request ''R2'' to ''C'' trying to build a 2GB instance.&lt;br /&gt;
# Assume processing of ''R1'' and ''R2'' begins concurrently on ''C''.&lt;br /&gt;
&lt;br /&gt;
Obviously ''C'' cannot handle both requests, so at least 1 will fail.&lt;br /&gt;
&lt;br /&gt;
== Impact ==&lt;br /&gt;
&lt;br /&gt;
Instance build requests may fail, even if other compute hosts are available with free resources.&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
&lt;br /&gt;
* Compute hosts should have the final say over whether a ''run_instance'' request can be properly serviced. To this end, the compute host must be capable of identify whether it has free resources when a new ''run_instance'' request arrives.&lt;br /&gt;
* Compute hosts should serially verify resources available for ''run_instance'' requests to avoid concurrent competition by multiple callers.&lt;br /&gt;
* Schedulers should read the response to ''run_instance'' and possibly retry the request at a different compute host. &lt;br /&gt;
&lt;br /&gt;
[https://blueprints.launchpad.net/nova/+spec/scheduler-resource-race Blueprint]&lt;br /&gt;
&lt;br /&gt;
[https://bugs.launchpad.net/nova/+bug/1011852 Launchpad bug]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Nova/LibVirtVolumeMultipathiSCSI&amp;diff=16220</id>
		<title>Nova/LibVirtVolumeMultipathiSCSI</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Nova/LibVirtVolumeMultipathiSCSI&amp;diff=16220"/>
				<updated>2013-02-17T00:06:51Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ##master-page:[[ProposalTemplate]] --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #format wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #language en --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nova/LibVirtVolumeMultipathiSCSI ==&lt;br /&gt;
&lt;br /&gt;
'''Contributor: '''[[erikzaadi]]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Currently iSCSI Volumes are connected in LibVirt as single path devices (''/dev/disk/by-path/ip-IP:PORT-iscsi-IQN-lun-X'').&lt;br /&gt;
&lt;br /&gt;
Most storage vendors support multipath connections via iSCSI, allowing more robust and faster volumes.&lt;br /&gt;
&lt;br /&gt;
The iSCSI target can be inquired with the 'sendtargets' discovery method which returns all the available iSCSI ports.&lt;br /&gt;
&lt;br /&gt;
The LibvirtISCSIVolumeDriver class should then login to all the discovered iSCSI targets and use multipath to rescan multipath connections.&lt;br /&gt;
&lt;br /&gt;
After that, a new device will be available (usually ''/dev/dm-X'') which will be used as source device in LibVirt instead of ''/dev/disk/by-path/ip-IP:PORT-iscsi-IQN-lun-X''  &lt;br /&gt;
&lt;br /&gt;
The scope of changes intended by this blueprint includes:&lt;br /&gt;
&lt;br /&gt;
* Altering nova/virt/libvirt/volume.py:LibvirtISCSIVolumeDriver's behaviour to deal with multipath if installed on the nova-compute node.&lt;br /&gt;
* Should still work if multipath isn't installed&lt;br /&gt;
* Should work if the storage provider doesn't support multipath. &lt;br /&gt;
&lt;br /&gt;
=== Gerrit Review: ===&lt;br /&gt;
https://review.openstack.org/17946&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Nova/LibVirtVolumeMultipathiSCSI&amp;diff=16219</id>
		<title>Nova/LibVirtVolumeMultipathiSCSI</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Nova/LibVirtVolumeMultipathiSCSI&amp;diff=16219"/>
				<updated>2013-02-17T00:06:16Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ##master-page:[[ProposalTemplate]] --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #format wiki --&amp;gt;&lt;br /&gt;
&amp;lt;!-- #language en --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Nova/LibVirtVolumeMultipathiSCSI ==&lt;br /&gt;
&lt;br /&gt;
'''Contributor: '''[[erikzaadi]]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Currently iSCSI Volumes are connected in [[LibVirt]] as single path devices (''/dev/disk/by-path/ip-IP:PORT-iscsi-IQN-lun-X'').&lt;br /&gt;
&lt;br /&gt;
Most storage vendors support multipath connections via iSCSI, allowing more robust and faster volumes.&lt;br /&gt;
&lt;br /&gt;
The iSCSI target can be inquired with the 'sendtargets' discovery method which returns all the available iSCSI ports.&lt;br /&gt;
&lt;br /&gt;
The LibvirtISCSIVolumeDriver class should then login to all the discovered iSCSI targets and use multipath to rescan multipath connections.&lt;br /&gt;
&lt;br /&gt;
After that, a new device will be available (usually ''/dev/dm-X'') which will be used as source device in [[LibVirt]] instead of ''/dev/disk/by-path/ip-IP:PORT-iscsi-IQN-lun-X''  &lt;br /&gt;
&lt;br /&gt;
The scope of changes intended by this blueprint includes:&lt;br /&gt;
&lt;br /&gt;
* Altering nova/virt/libvirt/volume.py:LibvirtISCSIVolumeDriver's behaviour to deal with multipath if installed on the nova-compute node.&lt;br /&gt;
* Should still work if multipath isn't installed&lt;br /&gt;
* Should work if the storage provider doesn't support multipath. &lt;br /&gt;
&lt;br /&gt;
=== Gerrit Review: ===&lt;br /&gt;
https://review.openstack.org/17946&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=FlatManagerIPv6Support&amp;diff=16218</id>
		<title>FlatManagerIPv6Support</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=FlatManagerIPv6Support&amp;diff=16218"/>
				<updated>2013-02-17T00:04:44Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
* '''Launchpad Entry''': [[NovaSpec]]:cactus-flatmanager-ipv6-support&lt;br /&gt;
* '''Created''':2 February, 2011&lt;br /&gt;
* '''Contributors''': Hisaharu Ishii, Nachi Ueno, Koji Iida, Tushar Patil&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
IPV6 is already supported for FlatDHCP and VLAN network model in Bexar release. Add support to Flat network model also&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
* IPV4 address exhaustion&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
* Currently nova support FlatManager with single bridge that you specify in flat_network_bridge (br100 by default). This bridge needs to be created on all compute hosts by the user.&lt;br /&gt;
* Creating multiple networks is currently not supported&lt;br /&gt;
* If flat_injected is True, the compute host will attempt to inject network config into the guest. It attempts to modify /etc/network/interfaces and currently only works on debian based systems. To support a wider range of OSes, some other method may need to be devised to let the guest know which ip it should be using so that it can configure itself.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
* Add database column netmask_v6 in the networks database table.&lt;br /&gt;
* Modify ra_server database column of networks tables to gateway_v6.&lt;br /&gt;
** Reason : When we implemented IPv6 support for FlatDHCP and Vlan network model, we added new ra_server column in the networks database table. However we think for Flat network model, this name ra_server column is not suitable. Because for all 3 network models, routers acts as a gateway which forwards the packets from inside and outside of the cloud and for only VlanManager or FlatDHCPManager, routers advertises RA messages. Then in generally, those routers should be called as not &amp;quot;RA server&amp;quot; but just &amp;quot;gateway&amp;quot;.&lt;br /&gt;
* Populate netmask_v6 when you create networks using nova-manage network create commmand.&lt;br /&gt;
* update gateway_v6 column when network host is selected for a project. Get the ipv6 local link address of the bridge you have created on the network node manually and update this local link address in the gateway_v6 column of the network.&lt;br /&gt;
* Modify the interfaces.template to include following&lt;br /&gt;
** ###Start IPV6 static configuration&lt;br /&gt;
*** iface eth0 inet6 static&lt;br /&gt;
*** address %(address_v6)s&lt;br /&gt;
*** netmask %(netmask_v6)s&lt;br /&gt;
*** gateway %(gateway_v6)s&lt;br /&gt;
* ###END IPV6&lt;br /&gt;
** If use_ipv6 flag is set to True, then only the above IPV6 configuration will be injected in the /etc/network/interfaces of the VM instance.&lt;br /&gt;
* Modify libvirt_conn.py for filtering security groups&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== UI Changes ===&lt;br /&gt;
* There should be no visible changes to the end users, all this work will be behind the network/compute servers.&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
=== Migration ===&lt;br /&gt;
* Database migration is required for the newly added and modified columns to the networks and fixed_ips database tables.&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
* Unit tests will be added as the code is developed. System testing will be on Ubuntu Lucid.&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=VMware-vSphere-support&amp;diff=16217</id>
		<title>VMware-vSphere-support</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=VMware-vSphere-support&amp;diff=16217"/>
				<updated>2013-02-17T00:03:44Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
* '''Launchpad Nova blueprint''': [[NovaSpec]]:hypervisor-vmware-vsphere-support&lt;br /&gt;
* '''Created''': 19 December 2010&lt;br /&gt;
* '''Last updated''': 4 February 2010&lt;br /&gt;
* '''Contributors''': [https://launchpad.net/~ewanmellor Ewan Mellor], [https://launchpad.net/~ravi-gururaj Ravi Gururaj], [https://launchpad.net/~sateesh-chodapuneedi Sateesh Chodapuneedi]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
This blueprint proposes adding support to Nova for the use of VMware vSphere as a compute provider.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
R1. Support VMware vSphere 4.1 as a compute provider within Nova. As the deployment architecture, support both ESX and ESXi. VM storage is restricted to VMFS volumes on local drives. Note that vCenter is not required by the current design, and is not currently supported. Instead, Nova Compute talks directly to ESX/ESXi.&lt;br /&gt;
&lt;br /&gt;
R2. Integrate with Glance, so that VM images can be streamed from there for boot on ESXi.&lt;br /&gt;
&lt;br /&gt;
R3. Support Nova's VLAN-based network model (VlanManager).&lt;br /&gt;
&lt;br /&gt;
R4. Support Nova's flat networking model (FlatManager).&lt;br /&gt;
&lt;br /&gt;
R5. When vSphere support is not in use, the presence of this code will add no additional dependencies to nova-compute as a whole. This implies that any new dependencies must be loaded on-demand.&lt;br /&gt;
&lt;br /&gt;
R6. - Removed -&lt;br /&gt;
&lt;br /&gt;
R7. CPU load from Nova on the compute host should be negligible when idle.&lt;br /&gt;
&lt;br /&gt;
== Non-requirements ==&lt;br /&gt;
NR1. Shared storage support is excluded.&lt;br /&gt;
&lt;br /&gt;
NR2. Live migration support is excluded.&lt;br /&gt;
&lt;br /&gt;
NR3. Clustering support is excluded.&lt;br /&gt;
&lt;br /&gt;
NR4. Nova is not required to handle any automatic installation or configuration of the underlying hypervisor. The user will be responsible for configuring vSphere appropriately.&lt;br /&gt;
&lt;br /&gt;
NR5. Nova is not required to interrogate vCenter to find compute hosts. The user will be responsible for configuring Nova with the details for each compute host.&lt;br /&gt;
&lt;br /&gt;
NR6. Nova is not required to cope gracefully when compute nodes are concurrently managed by automatic vCenter operations or other third parties. Nova may assume that it &amp;quot;owns&amp;quot; the compute node entirely.&lt;br /&gt;
&lt;br /&gt;
NR7. Nova is not required to cope gracefully when compute nodes are subject to VMware Update Manager dynamic updates. A future blueprint will discuss the interaction between Nova's scheduler and update management on vSphere, to ensure that machines are drained of customer workloads before being upgraded.&lt;br /&gt;
&lt;br /&gt;
NR8. Support for iSCSI volume attach/detach is a future feature, not on the plan for Cactus.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
A1. The [[OpenStack]] project will not ship any VMware products or SDKs. In the current design, there is no need for a SDK from VMware (we are using python-suds (version 0.4)to address VMware's SOAP API directly).&lt;br /&gt;
&lt;br /&gt;
A2. Users will require licenses for VMware vSphere Essentials (or greater) for all &amp;quot;clouds&amp;quot; with up to three compute hosts, and VMware vSphere Standard (or greater) for all sensible clouds. See Licensing below.&lt;br /&gt;
&lt;br /&gt;
A3. The QA emphasis will be on ESXi, rather than ESX, with the assumption that anything supported by ESXi is also supported by ESX.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
Regarding A3's emphasis on ESXi: On http://www.vmware.com/products/vsphere/esxi-and-esx/overview.html, VMware state &amp;quot;vSphere 4.1 and its subsequent update and patch releases are the last releases to include both ESX and ESXi hypervisor architectures. Future major releases of VMware vSphere will include only the VMware ESXi architecture. For this reason, VMware recommends that deployments of vSphere 4.x utilize the ESXi hypervisor architecture.&amp;quot; Following this, we shift the QA burden towards ESXi, as we expect this to be the deployment architecture selected in most cases.&lt;br /&gt;
&lt;br /&gt;
Regarding R1's restriction to vSphere 4.1: this is to reduce the QA burden, as there is no known need to support older versions.&lt;br /&gt;
&lt;br /&gt;
NRs 1, 2, 3, 6, and 7 have been added to avoid increasing the QA burden.&lt;br /&gt;
&lt;br /&gt;
NRs 4 and 5 have been added to avoid increasing the development burden.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
The requirement to support ESXi implies that nothing can be installed inside the console domain. Instead, we will install nova-compute inside a virtual machine, one per compute node. nova-compute will be given the credentials to the local ESXi (or the controlling vCenter), and with these credentials it will perform all necessary actions through the VMware vSphere API over SOAP (see [http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/index.html VMware vSphere API Reference Documentation] and [http://www.vmware.com/support/pubs/sdk_pubs.html VMware APIs and SDK Documentation]). [http://www.sourceforge.net/projects/python-suds/ python-suds] will be used to make the SOAP calls.&lt;br /&gt;
&lt;br /&gt;
Disk streaming from Glance will also be handled within this VM. The VM will ask for a new virtual disk to be created, and streams the image, using HTTP calls, from Glance server to the virtual disk inside ESXi server. Once the streaming is finished, that disk will be available for the new customer VM.&lt;br /&gt;
&lt;br /&gt;
The connection from Nova to vCenter/ESXi will be through a nova.virt.vmwareapi_conn module, parallel with nova.virt.libvirt_conn and nova.virt.xenapi_conn (i.e. not through libvirt).&lt;br /&gt;
&lt;br /&gt;
== QA ==&lt;br /&gt;
Unit testing will be of similar style to that used by XenAPI, with a mock ESX stubbed in at the RPC layer (i.e. below nova.virt.vmware_conn).&lt;br /&gt;
&lt;br /&gt;
The system will be certified using a single host, 7 day stress test:&lt;br /&gt;
&lt;br /&gt;
* Spawn an instance using a random image from Glance server, on the spawned instance, perform VM life cycle operations as listed below&lt;br /&gt;
** 1. Reboot the instance and then sleep for sometime.&lt;br /&gt;
** 2. Suspend the instance and check for the state to change to “paused” and then sleep for sometime.&lt;br /&gt;
** 3. Resume the instance and check for state change to “active” and then sleep for sometime.&lt;br /&gt;
** 4. Snapshot the instance and check for image being uploaded to the glance host. Deletes the image from the Glance host (to avoid running out of space on glance host) and sleep for sometime.&lt;br /&gt;
** 5. Terminate the instance and check if the instance doesn’t find a listing in the servers’ list.&lt;br /&gt;
* Scale: 32 x 1GB VMs, each with a 10GB HDD * up to 2 VMs at a time being deployed&lt;br /&gt;
&lt;br /&gt;
The system test must succeed with zero failures in those 7 days: i.e. no failures to deploy, undeploy, power-on, or power-off VMs, and no nova-compute crashes.&lt;br /&gt;
&lt;br /&gt;
The test results collect so far can be seen at [[attachment:System Testing Output of 48 hours]]&lt;br /&gt;
&lt;br /&gt;
== Future ==&lt;br /&gt;
We need to figure out how machines can be updated automatically. Presumably, we want to drain a machine of customer workloads before installing updates and rebooting. It is an open question how best to integrate this with VMware Update Manager.&lt;br /&gt;
&lt;br /&gt;
Support for iSCSI volume attach/detach.&lt;br /&gt;
&lt;br /&gt;
== Development Resources ==&lt;br /&gt;
Citrix has committed a development team to implement the functionality specified here. Prototyping is underway, and will be pushed to Launchpad soon.&lt;br /&gt;
&lt;br /&gt;
No commitment has been made with regard to any &amp;quot;Future&amp;quot; features.&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
=== Why we can't use vSphere Hypervisor ===&lt;br /&gt;
From http://www.vmware.com/download/eula/esx_esxi_eula.html:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;3. GRANT AND USE RIGHTS FOR SOFTWARE&lt;br /&gt;
&lt;br /&gt;
&amp;quot;3.3 Restrictions. You may not (i) sell, lease, license, sublicense, distribute or otherwise transfer in whole or in part the Software or the Software License Key to another party; (ii) provide, disclose, divulge or make available to, or permit use of the Software in whole or in part by, any third party (except Designated Administrative Access) without VMware’s prior written consent; (iii) modify or create derivative works based upon the Software; or (iv) create, develop, license, install, use, or deploy any third party software or services to circumvent, enable, modify or provide access, permissions or rights which violate the technical restrictions of the Software, any additional licensing terms provided by VMware via product documentation, notification, and/or policy change posted at www.vmware.com, and the terms of this EULA.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Also, from http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;amp;cmd=displayKC&amp;amp;externalId=1023990:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;vCLI, PowerCLI, and vSphere SDK for Perl are limited to read-only access for the free vSphere Hypervisor edition. To enable full functionality of vCLI on a VMware ESXi host, the host must be licensed with vSphere Essentials, vSphere Essential Plus, vSphere Standard, vSphere Advanced, vSphere Enterprise, or vSphere Enterprise Plus.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We understand this to mean that vSphere Hypervisor (previously known as &amp;quot;Free ESXi&amp;quot;) may not be managed programmatically in a read-write manner, since VMware's own tools make that restriction. See also http://www.veeam.com/blog/veeam-and-free-esxi.html and http://www.virtualizationpractice.com/blog/?p=274.&lt;br /&gt;
&lt;br /&gt;
=== Why we can't use vSphere Essentials or Essentials Plus for more than three compute nodes ===&lt;br /&gt;
From http://www.vmware.com/download/eula/esx_esxi_eula.html:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;9. SOFTWARE PRODUCT SPECIFIC TERMS AND CONDITIONS&lt;br /&gt;
&lt;br /&gt;
&amp;quot;9.1 ESX/ESXi&lt;br /&gt;
&lt;br /&gt;
&amp;quot;c) VMware vSphere Essentials and VMware vSphere Essentials Plus&lt;br /&gt;
&lt;br /&gt;
&amp;quot;If you have licensed VMware vSphere Essentials or VMware vSphere Essentials Plus, the following additional license terms apply:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;VMware licenses VMware vSphere Essentials or VMware vSphere Essentials Plus editions (collectively &amp;quot;Editions&amp;quot;) to you solely for managing up to three (3) server hosts and your use of these Editions is limited to servers with up to two processors. For these Editions, the server hosts must be managed by the VMware vCenter Server that is provided with these Editions, and that same VMware vCenter Server cannot be used to manage other server hosts not included with these Editions.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
We understand this to mean that it is forbidden to use Essentials or Essentials Plus for any installation larger than three hosts.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
Nova may now use VMware vSphere as a compute provider. Docs for developers are available at http://nova.openstack.org/vmwareapi_readme.html.&lt;br /&gt;
&lt;br /&gt;
== Risk Assessment ==&lt;br /&gt;
The code changes are encapsulated in a module named vsphereapi that fits inside nova.virt (hypervisor abstraction layer). The risk of destabilization is &amp;quot;low&amp;quot; because the changes are well contained in vsphereapi module, and the bulk of the code will be executed only if the connection type is set to 'vsphereapi_conn', which is the case of VMware ESXi server as backend. The changes to the existing codepaths is minimal.&lt;br /&gt;
&lt;br /&gt;
== Discussion ==&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category:Spec]] [[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=NetworkServicePOC&amp;diff=16216</id>
		<title>NetworkServicePOC</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=NetworkServicePOC&amp;diff=16216"/>
				<updated>2013-02-17T00:02:30Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* '''Launchpad Entry''': https://code.launchpad.net/~ntt-pf-lab/nova/network-service&lt;br /&gt;
* '''Created''': [https://launchpad.net/~ishii-hisaharu Hisaharu Ishii]&lt;br /&gt;
* '''Contributors''': [https://launchpad.net/~ishii-hisaharu Hisaharu Ishii]&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
In the current Nova implementation, there are three types of network services: VLAN, flat, and flat DHCP.  For each deployment of Nova, only one of these services can be configured to be used at a time.  While the current network architecture in Nova works fine with this design, we would like to propose a more flexible design in which these network services are implemented more modularly, allowing them to be 'plugged-in' to Nova.  With this design, it would allow third-party network services to be easily integrated into Nova.&lt;br /&gt;
&lt;br /&gt;
In this POC implementation, we will try to solve the following issues in the current networking implementation:&lt;br /&gt;
&lt;br /&gt;
# ''Strong coupling of compute and network services'':  In the current implementation, there are fairly large amount of network-related code that exist inside the compute code.  This coupling makes it difficult swap the existing services with custom ones.&lt;br /&gt;
# ''Association of networking service at the deployment/application level'': Networking services should be associated at the level of smallergranularity so that within one deployment of Nova, it would be possible to have multiple types of networks.&lt;br /&gt;
# ''Lack of L2 support'': Because the currently available networking services are all L3-based networking, there is no option to create an L2-based network.  By making network services pluggable, it would make it easier to implement and use an L2(or any type of) network.&lt;br /&gt;
&lt;br /&gt;
Finally, it should be noted that despite these changes, all the currently available features should work the same way as they do now.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
Network services should be implemented in a pluggable manner so that various types of network service can be used with Nova.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
* Multiple virtual NICs per instance are supported.&lt;br /&gt;
* EC2 API does not support multiple NICs.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Network Service POC Overview ===&lt;br /&gt;
[[Image:openstack-network-service-apis-generic-vs-specific.png]]&lt;br /&gt;
&lt;br /&gt;
A pluggable network service is typically broken up into the following three parts:&lt;br /&gt;
&lt;br /&gt;
# '''net-api''': REST APIs for network management.  Each plugin is responsible for providing a management tool(just like nova-manage) to manage its networks.&lt;br /&gt;
# '''net-agent''': Pluggable module that defines generic interfaces called by the compute service.  These APIs are meant to be run on the compute node.&lt;br /&gt;
# '''net-service''': Pluggable service can optionally implement a network service, which is equivalent to nova-network service in the current Nova implementation, that handles various network tasks like DHCP, NAT, and IP allocation.&lt;br /&gt;
&lt;br /&gt;
Management of the networks, such as creating networks, allocating IPs  and virtual NICs are all accomplished through '''net-api'''.  All the network-related code that currently exist in the compute code are moved to '''net-agent''', thereby decoupling compute from the network services.  Since '''net-service''' is optional, Nova does not have any knowledge of its existence.  Only '''net-api''' and '''net-agent''' may access '''net-service'''.  For example, for '''nova-compute''' to request a service from '''net-service''', it must go through '''net-agent'''.&lt;br /&gt;
&lt;br /&gt;
=== Nova Network Service Plugins ===&lt;br /&gt;
Nova currently comes with three types of network managers:  ''VlanManager,'' ''FlatManager'' and''FlatDHCPManager''.  These are converted into separate plugins in the new model.  These plugins are defined in 'nova/networks' directory as distinct modules.  The actual paths of these plugin modules are:&lt;br /&gt;
&lt;br /&gt;
* '''VlanManager''':  ''nova.network.vlan''&lt;br /&gt;
* '''FlatManager''':  ''nova.network.flat''&lt;br /&gt;
* '''FlatDHCPManager''': ''nova.network.flat_dhcp''&lt;br /&gt;
&lt;br /&gt;
=== [[OpenStack]] Networking Concept ===&lt;br /&gt;
The networking in [[OpenStack]] consists of the following main concepts:&lt;br /&gt;
&lt;br /&gt;
* '''network''': Represents a logical network but does not specify whether it's L3 or L2.&lt;br /&gt;
* '''virtual NIC(VNIC)''': Represents a virtual network interface card that is attached to a VM instance.  One common example of VNIC is an ethernet card.&lt;br /&gt;
* '''port''':  Represents a virtual socket to plug the VNIC into for network connectivity.  A port belongs to a particular network.&lt;br /&gt;
&lt;br /&gt;
It is assumed that a VM instance is allowed to have multiple VNICs associated with it, with each one connecting to a port that belongs to different networks.&lt;br /&gt;
&lt;br /&gt;
=== Project-Network Service Association ===&lt;br /&gt;
A project is associated with a network service.  A project cannot be associated with more than one network service.  By default, every project is associated with a network service defined by the flag, ''--default_network_service'', where the value is the path to the plugin module.  If this flag is not set, it defaults to VLAN(''nova.network.vlan'').  New ''nova-manage'' commands are provided to help manage the association.&lt;br /&gt;
&lt;br /&gt;
=== Network Service Configuration File ===&lt;br /&gt;
A list of available network services are listed in a network service configuration file.  The location of this file is defined in the flag, ''--network_service_conf''.  If this flag is not defined, the default is ''/etc/nova/nova-network.conf''.  The format of this file is simply a list of Python module paths of the network services.  Any blank line and or one that starts with '#' is ignored.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# Example network services&lt;br /&gt;
nova.network.flat&lt;br /&gt;
nova.network.flat_dhcp&lt;br /&gt;
nova.network.vlan&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Network Management REST API ===&lt;br /&gt;
All the network management is done through the REST API implemented by each plugin.  In this proposal, only the [[OpenStack]] API is applicable.  The EC2 API still works the same way as before, but it does not support multiple NICs for an instance.&lt;br /&gt;
&lt;br /&gt;
Each plugin has its own REST API URL that contains its name in the path. The format of the URL is: '''http://server:port/version/plugin_name/...'''&lt;br /&gt;
&lt;br /&gt;
Flat, FlatDHCP and VLAN define the same APIs.  They are:&lt;br /&gt;
&lt;br /&gt;
* Create Network (and the IP addresses for the network)&lt;br /&gt;
** URL: '''http://server:port/version/plugin_name/networks'''&lt;br /&gt;
** Verb: POST&lt;br /&gt;
** Request parameters are the same as those for the 'nova-manage network create' command.&lt;br /&gt;
** Returns a list of network IDs created with status 200.&lt;br /&gt;
* Create virtual NIC&lt;br /&gt;
** URL: '''http://server:port/version/plugin_name/vnics'''&lt;br /&gt;
** Verb: POST&lt;br /&gt;
** Returns the ID of the new virtual NIC with status 200.&lt;br /&gt;
* Delete virtual NIC&lt;br /&gt;
** URL: '''http://server:port/version/plugin_name/vnics/vnic_id'''&lt;br /&gt;
** Verb: DELETE&lt;br /&gt;
** Returns status 200.&lt;br /&gt;
&lt;br /&gt;
The request and response formats are up to the plugins.  They should, however, support both JSON and XML.&lt;br /&gt;
&lt;br /&gt;
The routes for these APIs are set by the plugins themselves.  The way this is accomplished is explained in the implementation section below.&lt;br /&gt;
&lt;br /&gt;
Note: There is work being done for the new [[OpenStack]] Compute API(version 1.1).  It is important to keep the network APIs in sync with the new design. (At the time of this writing, it is NOT in sync).&lt;br /&gt;
&lt;br /&gt;
=== Data Store ===&lt;br /&gt;
Nova's database keeps the following data:&lt;br /&gt;
&lt;br /&gt;
* Association of projects and network services&lt;br /&gt;
* Association of instances and virtual NICs&lt;br /&gt;
&lt;br /&gt;
The actual data for virtual NICs, networks and ports are all plugin-specific, and therefore they belong in the data storage.  If the plugin uses SQL as its data store, then it is the plugin's responsibility to define the migration scripts, data models and DB APIs.&lt;br /&gt;
&lt;br /&gt;
For VLAN, Flat and FlatDHCP, a virtual NIC is an ethernet card,  a port is a fixed IP, and a network is the same as that of the current Nova implementation.&lt;br /&gt;
&lt;br /&gt;
* Nova is aware of the existence of Networks and VPorts, where VPorts belong to a Network.  VPorts represent ports in which you plug the VNICs into for network connectivity.  Network is a group of VPorts that could represent either L2 or L3 network.&lt;br /&gt;
* Compute's API takes in a list of list of VNIC IDs to associate with the instances that it is creating.&lt;br /&gt;
* [[OpenStack]] API to create a new instance should have a newly defined API that takes in VNICs as a mandatory parameter.  An exception should be thrown if VNICs are not supplied or invalid.&lt;br /&gt;
* The legacy [[OpenStack]] API to create a new instance(that does not accept VNICs as a parameter), creates a new VNIC and calls the new create VM API with this VNIC as a parameter.&lt;br /&gt;
* EC2 API creates a new VNIC for each instance to be created, and calls the Compute's API to create these instances.&lt;br /&gt;
* During the VM instantiation, the compute code does not make any RPC call to the network node, and does not perform any task related to networking.  Any network-related code that gets executed on the compute node is defined in a separate module called Network Agent.&lt;br /&gt;
* Network Service (the service that runs on the network node) is implemented by each plugin.  Only Network Agent, which is also implemented by the plugin, can access its own Network Service.&lt;br /&gt;
* A generic API to get the IP address for a given VNIC is defined by the Network Agent for file injection.&lt;br /&gt;
* A generic API to generate libvirt XML network interface definitions is defined by the Network Agent for generating the libvirt domain XML file.&lt;br /&gt;
* Firewall logic is moved from Compute to Network Agent.&lt;br /&gt;
* A generic API is defined by Network Agent to bind a VNIC to a VPort(in most cases, this is just assigning an IP address).&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Nova-manage script changes ===&lt;br /&gt;
''nova_manage'' script has new Project commands for network service management:&lt;br /&gt;
&lt;br /&gt;
* '''nova-manage project network_set''' ''project_id'' ''network_service''&lt;br /&gt;
** Sets a network service module path, ''network_service'', to a project with ID, ''project_id''.  If the project already has a network service set, it overwrites it.&lt;br /&gt;
* '''nova-manage project network_get''' ''project_id''&lt;br /&gt;
** Gets the network service that is associated with the project with ID, ''project_id''. Returns None if no network service is associated.&lt;br /&gt;
&lt;br /&gt;
network commands in ''nova-manage'' are obsolete as all the network management commands are moved to the plugin-specific management tool scripts.&lt;br /&gt;
&lt;br /&gt;
=== Network Service Classes ===&lt;br /&gt;
* '''NetworkServiceManager'''&lt;br /&gt;
** Defined in ''nova.network.service'', ''NetworkServiceManager'' class handles the loading of the available network service plugins, and provides access to these modules to other Nova services.  The configuration file to load the network service is read only once, and these modules are stored in memory.&lt;br /&gt;
* '''NetworkServiceRouteMap'''&lt;br /&gt;
** ''NetworkServiceRouteMap'' class is defined in ''nova.network.service'', which is a wrapper class to python-route map object that is responsible for adding the appropriate prefix to all the REST API routes.  Even though the routes for the API are set by the plugins themselves at the initialization of [[OpenStack]] API module, the route prefix, however, which includes the name of the plugins, is set by this class.&lt;br /&gt;
&lt;br /&gt;
=== Database Changes ===&lt;br /&gt;
In the Nova DB, the following new tables are added:&lt;br /&gt;
&lt;br /&gt;
'''ProjectNetworkServiceAssociation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
+ id (PK)&lt;br /&gt;
+ project_id&lt;br /&gt;
+ network_service&lt;br /&gt;
+ deleted, created_at, deleted_at, ...&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''InstanceVirtualNicAssociation'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
+ id (PK)&lt;br /&gt;
+ instance_id(FK - instances.id)&lt;br /&gt;
+ virtual_nic_id&lt;br /&gt;
+ deleted, created_at, deleted_at, ...&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the VLAN, FlatDHCP and Flat plugins have EthernetCards table which represents the VNIC:&lt;br /&gt;
&lt;br /&gt;
'''EthernetCards'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
+ id (PK)&lt;br /&gt;
+ mac_address&lt;br /&gt;
+ deleted, created_at, deleted_at, ...&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, for all the built-in plugins, ''networks'' table is ported over from Nova DB. For VLAN and FlatDHCP, ''fixed_ips'' and ''floating_ips'' tables are copied over. For Flat, ''fixed_ips'' table is ported over and renamed to ''ip_addresses''.&lt;br /&gt;
&lt;br /&gt;
=== Plug-in Generic API ===&lt;br /&gt;
As mentioned earlier, each plugin consists of several components, and some of these components are required  by Nova.  The actual implementation of these components are up to the plugins, but the plugins must define generic APIs to return these modules/classes to Nova.&lt;br /&gt;
&lt;br /&gt;
These generic APIs are:&lt;br /&gt;
&lt;br /&gt;
* get_os_service()&lt;br /&gt;
** Returns the module/class that implements generic APIs needed by Nova's [[OpenStack]]/EC2 APIs.&lt;br /&gt;
* get_os_api_service()&lt;br /&gt;
** Returns the module/class that implements generic APIs needed by Nova's [[OpenStack]] API.&lt;br /&gt;
* get_net_agent()&lt;br /&gt;
** Returns the module/class that implements generic APIs needed by Nova's compute.&lt;br /&gt;
&lt;br /&gt;
=== Net Agent Generic API ===&lt;br /&gt;
All the net agent APIs are generic.&lt;br /&gt;
&lt;br /&gt;
* get_default_vnic_id() : vnic_id&lt;br /&gt;
** Gets the default VNIC for the plugin.  This API must be implemented by all plugins because the current [[OpenStack]]/EC2 API to launch an instance does not require a parameter for VNICs, which means a VNIC must be created dynamically at the time of VM instantiation.  This API is called by the Compute API class, and is defined by the plugin's API module/class returned from ''get_api_service()''.   Flat, FlatDHCP and VLAN plugins simply create a new ethernet card.  It returns the new VNIC ID if successful, and None if it is not.&lt;br /&gt;
* get_project_vpn_address_and_port(project_id) : (vpn_ip, vpn_port)&lt;br /&gt;
** Gets a tuple of VPN IP address and VPN port for a given project.  This is only applicable if the service has any VPN data(like VLAN plugin).  It is used to construct the credential for the user.&lt;br /&gt;
* bind_vnics_to_ports(vnic_ids)&lt;br /&gt;
** For a list of ''vnic_id''s, the API binds them to the ports if they are not already bound.  This binding activates the network connectivity.  It is up to the plugin to determine which ports that these VNICs should be plugged into.   It does not return anything.  It is implemented by the net agent.&lt;br /&gt;
* setup_compute_network(vnic_ids)&lt;br /&gt;
** This method must be implemented to do any networking setup in the compute node, at the time of VM launch.&lt;br /&gt;
* teardown_compute_network(vnic_ids)&lt;br /&gt;
** This method must be implemented to perform any clean up on the compute host.  This method gets called when the VM terminates.&lt;br /&gt;
* requires_file_injection(vnic_id) : True/False&lt;br /&gt;
** Returns True if the network service associated with ''vnic_id'' requires injecting network information to the ''/etc/network/interfaces'' file.  This is implemented by the net agent.&lt;br /&gt;
* get_network_info(vnic_id) : (dictionary: cidr, cidr_v6, netmask, netmask_v6, gateway, gateway_v6, dhcp_server, broadcast, dns, ra_server, mac_address, ip_address, and address_v6)&lt;br /&gt;
** Gets network data associated with a VNIC with ID of ''vnic_id''.  The return value is a dictionary of network data for the VNIC.  There values can be None if they don't apply to that plugin.  It is defined in net agent, and is required to be implemented for file injection, Iptables setup, and libvirt XML creation.&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
* Unit tests will be added as the code is developed.&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
* Network service components, such as DHCP and Firewall, should be pluggable and optional.&lt;br /&gt;
* Firewall logic needs to be refactored.  The actual implementation should be plugin-specific, so it should not exist inside the compute/libvirt code as it does now.&lt;br /&gt;
* Project-network service association commands should be more user-friendly with validations and sanity checks.&lt;br /&gt;
* REST API should check that the project that is sent in the request matches the network service that the URL is asking for.&lt;br /&gt;
* Make the Network Management API follow the format of the new Compute API(1.1).&lt;br /&gt;
* Integrate with the multi-nic implementation currently underway.&lt;br /&gt;
* Consider the possibility of joining the three current network managers into one plugin.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=TroubleshootingNova&amp;diff=16215</id>
		<title>TroubleshootingNova</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=TroubleshootingNova&amp;diff=16215"/>
				<updated>2013-02-16T23:58:40Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Troubleshooting Tips for [[OpenStack]] Compute (Nova) =&lt;br /&gt;
&lt;br /&gt;
== Starting Points ==&lt;br /&gt;
&lt;br /&gt;
Most of the installation instructions are written for Ubuntu, but there is also information about Centos and Fedora. &lt;br /&gt;
&lt;br /&gt;
You can also check the [https://answers.launchpad.net/nova Answers area of the Launchpad site for Nova] to find asked and answered questions.&lt;br /&gt;
&lt;br /&gt;
== Log Files ==&lt;br /&gt;
&lt;br /&gt;
Log files are stored in /var/log/nova and there is a log file for each service, for example nova-compute.log. You can format the log strings using flags for the nova.log module. The flags used to set format strings are: logging_context_format_string and logging_default_format_string. If the log level is set to debug, you can also specify logging_debug_format_suffix to append extra formatting. For information about what variables are available for the formatter see: http://docs.python.org/library/logging.html#formatter &lt;br /&gt;
&lt;br /&gt;
You have two options for logging for [[OpenStack]] Compute based on configuration settings. In nova.conf, include the --logfile flag to enable logging. Alternatively you can set --use_syslog=1, and then the nova daemon logs to syslog.&lt;br /&gt;
&lt;br /&gt;
== Common Errors ==&lt;br /&gt;
&lt;br /&gt;
The Launchpad Answers site offers a place to ask and answer questions, and you can also mark questions as frequently asked questions. This section describes some errors people have posted to Launchpad Answers and IRC. We are constantly fixing bugs, so online resources are a great way to get the most up-to-date errors and fixes.&lt;br /&gt;
&lt;br /&gt;
=== Credential errors, 401, 403 forbidden errors ===&lt;br /&gt;
&lt;br /&gt;
A 403 forbidden error is caused by missing credentials. Through current installation methods, there are basically two ways to get the novarc file. The manual method requires getting it from within a project zipfile, and the scripted method just generates novarc out of the project zip file and sources it for you. If you do the manual method through a zip file, then the following novarc alone, you end up losing the creds that are tied to the user you created with nova-manage in the steps before.&lt;br /&gt;
&lt;br /&gt;
When you run nova-api the first time, it generates the certificate authority information, including openssl.cnf. If it gets started out of order, you may not be able to create your zip file. Once your CA information is available, you should be able to go back to nova-manage to create your zipfile. &lt;br /&gt;
&lt;br /&gt;
You may also need to check your proxy settings to see if they are causing problems with the novarc creation.&lt;br /&gt;
&lt;br /&gt;
=== Cannot Ping or SSH to an Instance ===&lt;br /&gt;
&lt;br /&gt;
Sometimes a particular instance shows &amp;quot;pending&amp;quot; or you cannot SSH to it. Sometimes networking settings are the problem. Sometimes the image itself is the problem. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#!rst&lt;br /&gt;
&lt;br /&gt;
One of the most commonly missed configuration areas is not allowing the proper access to VMs. Use the 'euca-authorize' command to enable access.  Below, you will find the commands to allow 'ping' and 'ssh' to your VMs::&lt;br /&gt;
&lt;br /&gt;
    euca-authorize -P icmp -t -1:-1 default&lt;br /&gt;
    euca-authorize -P tcp -p 22 default&lt;br /&gt;
&lt;br /&gt;
Another common issue is you cannot ping or SSH your instances after issuing the 'euca-authorize' commands.  Something to look at is the amount of 'dnsmasq' processes that are running.  If you have a running instance, check to see that TWO 'dnsmasq' processes are running.  If not, perform the following::&lt;br /&gt;
&lt;br /&gt;
    killall dnsmasq&lt;br /&gt;
    service nova-network restart&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With recent builds of Nova, IPv6 configuration is allowed, but if you cannot SSH to an image, add --use_ipv6=false to your nova.conf.&lt;br /&gt;
&lt;br /&gt;
For example, when using flat manager networking, you do not have a dhcp server, and an ami-tiny image doesn't support interface injection so you cannot connect to it. The fix for this type of problem is to use an Ubuntu image, which should obtain an IP address correctly with FlatManager network settings. To troubleshoot other possible problems with an instance, such as one that stays in a spawning state, first check your instances directory for i-ze0bnh1q dir to make sure it has the following files:&lt;br /&gt;
&lt;br /&gt;
* libvirt.xml&lt;br /&gt;
* disk&lt;br /&gt;
* disk-raw&lt;br /&gt;
* kernel&lt;br /&gt;
* ramdisk&lt;br /&gt;
* console.log (Once the instance actually starts you should see a console.log.)&lt;br /&gt;
&lt;br /&gt;
Check the file sizes to see if they are reasonable. If any are missing/zero/very small then nova-compute has somehow not completed download of the images from objectstore. &lt;br /&gt;
&lt;br /&gt;
Also check nova-compute.log for exceptions. Sometimes they don't show up in the console output.&lt;br /&gt;
&lt;br /&gt;
Next, check the /var/log/libvirt/qemu/i-ze0bnh1q.log file to see if it exists and has any useful error messages in it.&lt;br /&gt;
&lt;br /&gt;
Finally, from the instances/i-ze0bnh1q directory, try virsh create libvirt.xml and see if you get an error there.&lt;br /&gt;
&lt;br /&gt;
Also, when setting up nodes in [[FlatManger]], be sure to enable ipforward or none your node instances will be able to ping out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
/etc/sysctl.conf&lt;br /&gt;
Net ipv4 ip_forward = 1&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Slow Running VMs ===&lt;br /&gt;
&lt;br /&gt;
Why is my VM running slow as molasses?  There is a permissions issue where /dev/kvm is not writable, and the VM's drop into qemu mode.  This causes the slowdown, and can be addresses by the following:&lt;br /&gt;
&lt;br /&gt;
Verify with:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
cat /var/log/libvirt/qemu/(internal_id).log | grep -i kvm&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the results, look for:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
open /dev/kvm: Permission denied&lt;br /&gt;
Could not initialize KVM, will disable KVM support&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fix with:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
chgrp kvm /dev/kvm&lt;br /&gt;
chmod g+rwx /dev/kvm&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Filesystem Not Found on Custom-created Images ===&lt;br /&gt;
&lt;br /&gt;
When creating custom images, I get a / (root) filesystem not found error.&lt;br /&gt;
&lt;br /&gt;
This is likely due to your image having / (root) as /dev/sda1, etc…..this needs to be /dev/vda1 for the image to boot properly.&lt;br /&gt;
&lt;br /&gt;
Why /dev/vda1?&lt;br /&gt;
&lt;br /&gt;
In the libvirt xml templates it specifies the virtual drives be made as &amp;quot;vdX&amp;quot; only.&lt;br /&gt;
&lt;br /&gt;
So, vda1 would be the first one generated if you don't have advanced partitioning, and OpenStack can't boot the image.&lt;br /&gt;
&lt;br /&gt;
=== Nova services (nova-api) not starting ===&lt;br /&gt;
&lt;br /&gt;
Nova-api is not starting, so therefore, I can't start nova-compute. &lt;br /&gt;
&lt;br /&gt;
When I try a restart of the nova-api service, such as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
root@ubuntu2:~# service nova-api restart&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I get a response like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
pidfile /var/run/nova/nova-api.pid does not exist. Daemon not running?&lt;br /&gt;
Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
DEBUG:routes.middleware:Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
DEBUG:routes.middleware:Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
DEBUG:routes.middleware:Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
DEBUG:routes.middleware:Initialized with method overriding = True, and path info altering = True&lt;br /&gt;
(7030) wsgi starting up on http://0.0.0.0:8774/&lt;br /&gt;
(7030) wsgi starting up on http://0.0.0.0:8773/&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, you should set the daemonize flag to 1 (true) in /etc/nova/nova.conf, like so:&lt;br /&gt;
--daemonize=1&lt;br /&gt;
&lt;br /&gt;
Restart the services with this setting enabled and you should be able to start all the services again.&lt;br /&gt;
&lt;br /&gt;
=== Errors with IP addresses for VMs ===&lt;br /&gt;
&lt;br /&gt;
When you see that nova-network or nova-compute shows errors with the IP assigned to the virtual machines themselves, you see something like this: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2010-12-05 21:48:40-0600 [-] nova.exception.ProcessExecutionError: Unexpected error while running command.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify with this command: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
sudo -E dnsmasq --strict-order --bind-interfaces --conf-file= --pid-file=/var/lib/nova/networks/nova-br100.pid --listen-address=192.168.0.1 --except-interface=lo --dhcp-range=192.168.0.3,static,120s --dhcp-hostsfile=/var/lib/nova/networks/nova-br100.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
where the listen-address is the address that you see errors when sending commands to it.&lt;br /&gt;
&lt;br /&gt;
To verify that this is your error, you should see this type of response after sending the dnsmasq command:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
2010-12-05 21:48:40-0600 [-] Exit code: 2&lt;br /&gt;
2010-12-05 21:48:40-0600 [-] Stdout: ''&lt;br /&gt;
2010-12-05 21:48:40-0600 [-] Stderr: '\ndnsmasq: failed to bind listening socket for 192.168.0.1: Address already in use\n'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Fix with these commands:&lt;br /&gt;
&lt;br /&gt;
{{&lt;br /&gt;
--killall dnsmasq&lt;br /&gt;
--service nova-network restart&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot instances if problem persists.&lt;br /&gt;
&lt;br /&gt;
=== Database Locks ===&lt;br /&gt;
&lt;br /&gt;
If you are not running Nova as a root user, you may get errors that the database is locked, first from nova-scheduler, next from nova-compute. Here is an example: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
OperationalError: (OperationalError) database is locked&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check your permissions - if you installed as root but are trying to run Nova as another user, these errors may appear.&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=ReleaseNotes/Bexar&amp;diff=16214</id>
		<title>ReleaseNotes/Bexar</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=ReleaseNotes/Bexar&amp;diff=16214"/>
				<updated>2013-02-16T23:57:43Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Release Notes, Bexar =&lt;br /&gt;
&lt;br /&gt;
The Bexar release introduces large file support for OpenStack Object Storage (Swift), the OpenStack Image registry and Delivery service (Glance) and a lot of new features in OpenStack Compute (Nova).&lt;br /&gt;
&lt;br /&gt;
== New Features ==&lt;br /&gt;
&lt;br /&gt;
=== [[OpenStack]] Object Storage (Swift) ===&lt;br /&gt;
* Large objects (greater than 5 GB) can now be downloaded using OpenStack Object Storage. While there is still a limit on the size of a single uploaded object, with this release the download size of a single object is virtually unlimited with the concept of segmentation. Refer to [http://docs.openstack.org/openstack-object-storage/admin/content/ch04s08.html   Managing Large Objects] for more information.&lt;br /&gt;
* An experimental S3 compatibility middleware has been added to OpenStack Object Storage.  This middleware intercepts S3 style requests and authorization, and transforms them into swift requests.&lt;br /&gt;
* Initial i18n support for logging messages.&lt;br /&gt;
* Swauth is a swift compatible authentication and authorization service implemented on top of swift as wsgi middleware.  This will replace the dev_auth service in a future release.&lt;br /&gt;
* Advanced rate limiting middleware&lt;br /&gt;
&lt;br /&gt;
=== [[OpenStack]] Compute (Nova) ===&lt;br /&gt;
* Support for raw disk images with libvirt and XenAPI hypervisors, without the complexity of a separate ramdisk or kernel image.&lt;br /&gt;
* IPv6 support in all network modes but FlatManager. Use the new use_ipv6 flag, and refer to [[BexarIpv6supportReadme]] for more information.&lt;br /&gt;
* Support for a lot of new volume backends to provide highly available block volumes for VMs: Sheepdog, CEPH/RADOS, and iSCSI (XenAPI only)&lt;br /&gt;
* Microsoft Hyper-V support. Refer to [[HypervInstall]] for information.&lt;br /&gt;
* Lots of new features have been added around the Openstack API, for example admin features to pause, suspend, lock and password reset instances, but also support for per-instance diagnostics.&lt;br /&gt;
* New &amp;quot;rescue&amp;quot; mode allowing an instance to mount affected disks and fix problems (see rescue_image_id, rescue_kernel_id and rescue_ramdisk_id flags)&lt;br /&gt;
* Web-based serial console to access instances where networking fails (requires instances with serial console enabled). This is available through the Openstack API or the new euca-get-ajax-console tool (and introduces a new nova-ajax-console-proxy type of node)&lt;br /&gt;
* Possibility to do hardware staging: new added services can be specifically load-tested before being made generally available to cloud users (administered by the nova-manage service commands) &lt;br /&gt;
* Database versioning and migration support, for painless migration from one version to another&lt;br /&gt;
* Instances now use copy-on-write by default for better performance (you can use the use_cow_images flag to control that)&lt;br /&gt;
* Support for availability zones, through the introduction of a new scheduler: ZoneScheduler&lt;br /&gt;
* A DirectAPI, using introspection to exhibit features, is now available for developers to control Nova locally&lt;br /&gt;
* Some features that were partly implemented in the Austin release got finalized in Bexar: IP allocation was moved down the chain, project VPNs are supported and Nova now fully supports iptables-driven security groups.&lt;br /&gt;
* Finally, lots of efforts were spent unifying the code around common standards for using the new Glance clients, for i18n, logging, service handling (through eventlet), or using paste.deploy for the API nodes.&lt;br /&gt;
&lt;br /&gt;
=== [[OpenStack]] Image Registry and Delivery service (Glance) ===&lt;br /&gt;
* Glance APIs (for registry and delivery) were unified, and a specific client class created&lt;br /&gt;
* Support for uploading disk images directly through the glance REST-ful API&lt;br /&gt;
* Addition of the glance-upload tool which can register new AMI-like images or raw disk images&lt;br /&gt;
* Glance can now fetch image data on a S3-like backend.&lt;br /&gt;
* Documentation for Glance is now available at http://glance.openstack.org&lt;br /&gt;
* The dependency on Twisted was removed. Glance now uses only Eventlet for its server-side internals.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
There were also deliveries outside those core projects during the Bexar development timeframe, in particular:&lt;br /&gt;
&lt;br /&gt;
* The OpenStack Dashboard, a reference implementation of a web-based console for OpenStack Compute projects is now available. Refer to [[OpenStackDashboard]] for more information.&lt;br /&gt;
* A deployment tool to deploy Nova on multiple servers. Refer to [[NovaInstall/NovaDeploymentTool]] for more information.&lt;br /&gt;
* An official documentation site at http://docs.openstack.org, containing PDF and HTML versions of manuals plus the capability for user notes on each page.&lt;br /&gt;
&lt;br /&gt;
== Known Issues and Limitations ==&lt;br /&gt;
&lt;br /&gt;
=== Nova ===&lt;br /&gt;
* IPv6 is not supported in FlatManager network mode.&lt;br /&gt;
* You can't upload images to the [[S3ImageService]] (objectstore) from the Openstack API (only Glance is supported), see Bug 709355&lt;br /&gt;
* You can't use FlatDHCPManager network mode on a multiple machines deployment without using multiple interfaces (Bug 710959). Recommended mode of operation for deploying Nova on multiple machines is to use VLAN-supporting managed switches with VlanManager network mode.&lt;br /&gt;
* When a compute node dies, its instances may still be reported as running (Bug 661214)&lt;br /&gt;
* When a VM dies, a compute node won't realize until it's restarted (Bug 661260)&lt;br /&gt;
* Using &amp;quot;setup.py install&amp;quot; does not produce a complete setup (Bugs 683137 and 727794)&lt;br /&gt;
* When using XenAPI, the compute node doesn't clean up if a vm fails to spawn (Bug 694935) or if it loses its xapi session (Bug 692994)&lt;br /&gt;
* nova-network may fail to start if iptables entries were flushed and a floating IP address is assigned (Bug 711948). You can use the workaround in the bug.&lt;br /&gt;
&lt;br /&gt;
=== Glance ===&lt;br /&gt;
* The S3 and Swift backends do not currently support the POST /images/ API command in the Glance API. These backends only currently support fetching disk images via GET calls. Support for storing disk images in S3 and Swift directly through the Glance API is planned for the Cactus release&lt;br /&gt;
* There is a bug in the Swift backend that is preventing new-style account:user:key URIs from being used (Bug 717431)&lt;br /&gt;
* Some errors/exceptions returned via from the reference registry server implementation (glance-registry) are being improperly consumed by the glance-api server (Bug 704854)&lt;br /&gt;
&lt;br /&gt;
== Blueprints implemented during the Bexar release ==&lt;br /&gt;
&lt;br /&gt;
* Swift: [https://blueprints.launchpad.net/swift/1.2 List of blueprints completed for the Bexar release]&lt;br /&gt;
* Nova: [https://blueprints.launchpad.net/nova/bexar List of blueprints completed for the Bexar release]&lt;br /&gt;
* Glance: [https://blueprints.launchpad.net/glance/bexar List of blueprints completed for the Bexar release]&lt;br /&gt;
&lt;br /&gt;
== Bugs fixed during the Bexar release ==&lt;br /&gt;
&lt;br /&gt;
* Swift: See the bug list at: https://launchpad.net/swift/1.2/1.2.0&lt;br /&gt;
* Nova: See the bug list at: https://launchpad.net/nova/bexar/2011.1&lt;br /&gt;
* Glance: See the bug list at: https://launchpad.net/glance/bexar/0.1.7&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Obsolete:BexarIpv6supportReadme&amp;diff=16211</id>
		<title>Obsolete:BexarIpv6supportReadme</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Obsolete:BexarIpv6supportReadme&amp;diff=16211"/>
				<updated>2013-02-16T23:54:31Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#!wiki caution&lt;br /&gt;
'''This page is outdated'''&lt;br /&gt;
&lt;br /&gt;
The content of this page has not been updated for a very long time. Sections of this page are incorrect when referring to the current release.&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= [[OpenStack]] Compute (Nova) IPv4/IPv6 dual stack support  =&lt;br /&gt;
&lt;br /&gt;
* Date: Dec. 24, 2010 (Updated: Jan. 14, 2010)&lt;br /&gt;
* Author: NTT Information Sharing Platform Laboratories&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
In IPv4/IPv6 dual stack mode, instances can use both IPv4 and IPv6&lt;br /&gt;
addresses for communication. In IPv4/IPv6 dual stack mode, instances&lt;br /&gt;
can acquire their IPv6 global unicast address by stateless address&lt;br /&gt;
autoconfiguration mechanism [RFC 4862/2462]. IPv4/IPv6 dual stack mode&lt;br /&gt;
works with VlanManager, and FlatDHCPManager. In&lt;br /&gt;
VlanManager, different 64bit global routing prefix is used for each&lt;br /&gt;
project. In FlatDHCPManager, one 64bit global routing&lt;br /&gt;
prefix is used for all instances.&lt;br /&gt;
&lt;br /&gt;
== 1. Pre-requirement ==&lt;br /&gt;
* We tested following configuration only.&lt;br /&gt;
** Host OS: Ubuntu 10.04&lt;br /&gt;
* VM Image requirement:&lt;br /&gt;
** IPv6 stateless address autoconfiguration capability is required for each VM.&lt;br /&gt;
* Additional python module requirement:&lt;br /&gt;
** python-netaddr is required for all nodes which executes nova services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
   $ sudo apt-get install -y python-netaddr&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Additional software requirement:&lt;br /&gt;
** radvd is required on network node&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
   $ sudo apt-get install -y radvd&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* On network node, you have to type following commands&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
   $ sudo bash -c &amp;quot;echo 1 &amp;gt; /proc/sys/net/ipv6/conf/all/forwarding&amp;quot;&lt;br /&gt;
   $ sudo bash -c &amp;quot;echo 0 &amp;gt; /proc/sys/net/ipv6/conf/all/accept_ra&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2. Setting up of nova services ==&lt;br /&gt;
If you want to use IPv6 function, please set use_ipv6 flag to True. If not, set this flag to false.&lt;br /&gt;
(Please see [[NovaAdminManual]] to know how to configure your services.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  --use_ipv6&lt;br /&gt;
    Enable IPv6 dual stack support. &lt;br /&gt;
    Default: False&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 3. API changes ==&lt;br /&gt;
In this release, some API parameters and responses are modified to&lt;br /&gt;
adopt IPv6 feature.&lt;br /&gt;
&lt;br /&gt;
* DescribeInstancesV6&lt;br /&gt;
 Almost same API as original descibeInstances. You can see IPv6 address of an instance by using this API.&lt;br /&gt;
 We add dnsNameV6 element for result xml.&lt;br /&gt;
&lt;br /&gt;
* AuthorizeSecurityGroupIngress&lt;br /&gt;
 You can specify both IPv4 and IPv6 value for cidrIp input parameter.&lt;br /&gt;
&lt;br /&gt;
* RevokeSecurityGroupIngress&lt;br /&gt;
 You can specify both IPv4 and IPv6 value for cidrIp input parameter.&lt;br /&gt;
&lt;br /&gt;
* DescribeSecurityGroups&lt;br /&gt;
 You can see both IPv4 and IPv6 value in cidrIp element.&lt;br /&gt;
&lt;br /&gt;
== 4. Support library ==&lt;br /&gt;
We extend boto library to [[OpenStack]] ipv6 support.&lt;br /&gt;
You can use DescribeInstancesV6 and dnsNameV6 by using boto_v6 library in contrib directory.&lt;br /&gt;
&lt;br /&gt;
== 5. nova-manage command specification ==&lt;br /&gt;
New parameter fixed_range_v6 is added to command&lt;br /&gt;
'nova-manage network create'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
 nova-manage network create fixed_range num_networks network_size &lt;br /&gt;
                               [vlan_start] [vpn_start] [fixed_range_v6]&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can set ipv6 global routing prefix by fixed_range_v6 (default: fd00::/48).  When you&lt;br /&gt;
use FlatDHCPManager, the command uses the original value of fixed_range_v6.  When you use [[VlanManager]], the command creates prefixes of subnet&lt;br /&gt;
by incrementing subnet id.  Guest VMs uses this prefix for generating&lt;br /&gt;
his ipv6 global unicast address.&lt;br /&gt;
&lt;br /&gt;
usage example for VlanManager: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  nova-manage network create 10.0.1.0/24 3 32 100 1000 fd00:1::/48&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
usage example for FlatDHCPManager: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  nova/bin/nova-manage network create 10.0.2.0/24 3 32 0 0 fd00:1::/48&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that [vlan_start] [vpn_start] is not used by FlatDHCPManager&lt;br /&gt;
&lt;br /&gt;
== 6. Supported NWManager ==&lt;br /&gt;
* FlatDHCPManager&lt;br /&gt;
* VlanManager&lt;br /&gt;
&lt;br /&gt;
== 7. Current limitations ==&lt;br /&gt;
* Floating IP feature using IPv6 address is not supported.&lt;br /&gt;
* Not tested with [[OpenStack]] API.&lt;br /&gt;
* FlatManager is currently not supported.&lt;br /&gt;
* VM images which does not use  EUI-64 address for stateless address&lt;br /&gt;
 autoconfiguration will not work correctly in current IPv6&lt;br /&gt;
 support. Because current IPv6 support supposes that VM instances&lt;br /&gt;
 generate and configure their IPv6 address based on EUI-64&lt;br /&gt;
 specification (namely, their MAC address).&lt;br /&gt;
&lt;br /&gt;
== 8. Architecture summary of IPv6 support implementation ==&lt;br /&gt;
* In current IPv6 support implementation, IPv6 address assignment is&lt;br /&gt;
 done by stateless address autoconfiguration [RFC 4862/2462]. For this&lt;br /&gt;
 purpose, nova-network configures radvd for each VLAN. &lt;br /&gt;
&lt;br /&gt;
== 9. Contributors ==&lt;br /&gt;
* Nachi Ueno&lt;br /&gt;
* Hisaharu Ishii&lt;br /&gt;
* Koji Iida&lt;br /&gt;
* Daigoro Yokozeki&lt;br /&gt;
* Hiroshi Sakai&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Multinic-libvirt&amp;diff=16208</id>
		<title>Multinic-libvirt</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Multinic-libvirt&amp;diff=16208"/>
				<updated>2013-02-16T23:51:47Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* '''Launchpad Entry''': [[NovaSpec]]:multinic-libvirt&lt;br /&gt;
* '''Created''': Ilya Alekseyev&lt;br /&gt;
* '''Contributors''': Eldar Nugaev, Ilya Alekseyev&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
We need support for multiple network interfaces per instance for libvirt. Our vision based on http://wiki.openstack.org/multi-nic specification. with some additions. &lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
&lt;br /&gt;
This is implementation same functionality as in https://blueprints.launchpad.net/nova/+spec/multi-nic for libvirt.&lt;br /&gt;
Multiple NIC for libvirt allows users to have instances connected to several networks.&lt;br /&gt;
Implementation of this blueprint is first step in add support multi-nics for libvirt.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
https://blueprints.launchpad.net/nova/+spec/multi-nic&lt;br /&gt;
GD PoC branches:&lt;br /&gt;
https://code.launchpad.net/~ilyaalekseyev/nova/libvirt-multinic-experemental&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== UI Changes ===&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
 I. libvirt connection changes&lt;br /&gt;
    changes in libvirt_con.to_xml() propagate NIC data&lt;br /&gt;
 I. firewall rules changes&lt;br /&gt;
    All firewall drivers would be changed to support multiple networks per instance. iptable rules should be changed.&lt;br /&gt;
 I. network managers changes&lt;br /&gt;
# FlatManager: open question - seems it is not required to be changed, but we need to check it&lt;br /&gt;
# FlatDHCPManager should be changed to support multiple networks&lt;br /&gt;
# VlanManager should be changed to support multiple networks&lt;br /&gt;
 I. template changes&lt;br /&gt;
   Add support of several NICs to template:&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;#!highlight xml&lt;br /&gt;
#for $nic in $nics&lt;br /&gt;
        &amp;lt;interface type='bridge'&amp;gt;&lt;br /&gt;
            &amp;lt;source bridge='$nic.bridge_name'/&amp;gt;&lt;br /&gt;
            &amp;lt;mac address='$nic.mac_address'/&amp;gt;&lt;br /&gt;
            &amp;lt;!--   &amp;lt;model type='virtio'/&amp;gt;  CANT RUN virtio network right now --&amp;gt;&lt;br /&gt;
            &amp;lt;filterref filter=&amp;quot;nova-instance-$nic.name&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;parameter name=&amp;quot;IP&amp;quot; value=&amp;quot;$nic.ip_address&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;parameter name=&amp;quot;DHCPSERVER&amp;quot; value=&amp;quot;$nic.dhcp_server&amp;quot; /&amp;gt;           &lt;br /&gt;
#if $getVar('extra_params', False)&lt;br /&gt;
                $nic.extra_params&lt;br /&gt;
#end if&lt;br /&gt;
#if $getVar('ra_server', False)&lt;br /&gt;
                &amp;lt;parameter name=&amp;quot;RASERVER&amp;quot; value=&amp;quot;$nic.ra_server&amp;quot; /&amp;gt;&lt;br /&gt;
#end if&lt;br /&gt;
            &amp;lt;/filterref&amp;gt;&lt;br /&gt;
        &amp;lt;/interface&amp;gt;&lt;br /&gt;
#end for&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Migration ===&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
&lt;br /&gt;
We need both unit and integration tests. Second is more important.&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
http://ietherpad.com/arRVMd2Lwl&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Nova/Ipv6supportSpec&amp;diff=16207</id>
		<title>Nova/Ipv6supportSpec</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Nova/Ipv6supportSpec&amp;diff=16207"/>
				<updated>2013-02-16T23:50:39Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* '''Launchpad Entry''': [[NovaSpec]]:ipv6-support&lt;br /&gt;
* '''Created''': 2010-11-01&lt;br /&gt;
* '''Contributors''': Koji Iida, Hisaharu Ishii&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
* Support IPv4 and IPv6 dual protocol stacks&lt;br /&gt;
&lt;br /&gt;
http://etherpad.openstack.org/IPV6-Support&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
&lt;br /&gt;
  TBD&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
* IPv4 address exhaustion &amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
** especially in Asia Pacific region&lt;br /&gt;
** NGN (Next Generation Network) in Japan supports both IPv4 and IPv6.&lt;br /&gt;
** all public servers of US Government must be upgraded to IPv6 by FY 2012 &amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
    http://www.cio.gov/Documents/Transition-to-IPv6.pdf&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
* Basically, this blueprint depends on bexar-network-services http://etherpad.openstack.org/0bp9S20wZR blueprint.&lt;br /&gt;
* If bexar-network-services blueprint is deferred, we will implement this feature based on codebase of Austin Release.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
Bexar release: Limited implementation of IPv6 direct access model&lt;br /&gt;
&lt;br /&gt;
* Configuration flag to select IPv4 mode or IPv4/IPv6 dual stack mode&lt;br /&gt;
* In IPv4/IPv6 dual stack mode:&lt;br /&gt;
** IPv6 support coexist with current VlanManager&lt;br /&gt;
** Each VM is assigned both IPv6 global unicast address and IPv4 private address&lt;br /&gt;
*** Not support assignment  of only IPv4 address or only IPv6 address to VM.&lt;br /&gt;
* Pass-through IPv6 packets on network node&lt;br /&gt;
** Firewall rule management for IPv6 traffic&lt;br /&gt;
** nova-api support both IPv4 and IPv6 access&lt;br /&gt;
* In IPv4 mode, same to current implementation&lt;br /&gt;
&lt;br /&gt;
Followings will be addressed in 'C' release or later.&lt;br /&gt;
* Elastic IP feature for IPv6&lt;br /&gt;
* IPv6 support in FlatManager&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== UI Changes ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
=== Migration ===&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
Discussion summary of developer summit Bexar: http://etherpad.openstack.org/IPV6-Support&lt;br /&gt;
&lt;br /&gt;
Slides: [[attachment:IPv6_on_nova_draft_bp.pdf]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Obsolete:ArchitecturalOverview&amp;diff=16206</id>
		<title>Obsolete:ArchitecturalOverview</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Obsolete:ArchitecturalOverview&amp;diff=16206"/>
				<updated>2013-02-16T23:46:09Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= caution =&lt;br /&gt;
'''This page is outdated'''&lt;br /&gt;
&lt;br /&gt;
The content of this page has not been updated for a very long time. Sections of this page are incorrect when referring to the current release.&lt;br /&gt;
&lt;br /&gt;
== Architectural Overview for [[OpenStack]] Compute ==&lt;br /&gt;
Live Notes may be taken for this topic at: http://etherpad.openstack.org/Architecture and http://etherpad.openstack.org/nova-archdoc&lt;br /&gt;
&lt;br /&gt;
[[Image:overview.png]]&lt;br /&gt;
&lt;br /&gt;
=== “Small” components, loosely coupled ===&lt;br /&gt;
* Queue based (currently AMQP/RabbitMQ)&lt;br /&gt;
* Flexible schema for datastore (currently Redis)&lt;br /&gt;
* LDAP (allows for integration with MS Active Directory via translucent proxy)&lt;br /&gt;
* Workers &amp;amp; Web hooks (be of the web)&lt;br /&gt;
* Asynchronous everything (don't block)&lt;br /&gt;
* Components (queue, datastore, http endpoints, ...) should scale independently and allow visibility into internal state (for the pretty charts/operations)&lt;br /&gt;
&lt;br /&gt;
=== Development goals ===&lt;br /&gt;
* Testing &amp;amp; Continuous Integration&lt;br /&gt;
* Fakes (allows development on a laptop)&lt;br /&gt;
* Adaptable (goal is to make integration with existing resources at organization easier)&lt;br /&gt;
&lt;br /&gt;
=== Queue ===&lt;br /&gt;
* Each worker/agent listens on a general topic, and a subtopic for that node.  Example would be &amp;quot;compute&amp;quot; &amp;amp; &amp;quot;compute:hostname&amp;quot;&lt;br /&gt;
* Messages in the queue are currently '''Topic''', '''Method''', '''Arguments''' - which maps to a method in the python class for the worker&lt;br /&gt;
* exposed via method calls&lt;br /&gt;
** '''rpc.cast''' to broadcast the message and not wait for a response&lt;br /&gt;
** '''rpc.call''' to send a message and wait for the response&lt;br /&gt;
&lt;br /&gt;
=== Datastore ===&lt;br /&gt;
* Pre-Austin, data is stored in Redis 2.0 (RC)&lt;br /&gt;
* Do the work on write - make reads FAST&lt;br /&gt;
** maintain indexes / lists of common subsets&lt;br /&gt;
** use pools (SETs in redis) that are drained for IPs instead of tracking what is allocated&lt;br /&gt;
&lt;br /&gt;
=== Delta ===&lt;br /&gt;
* Scheduler does not exist (instances are distributed via the queue to the first worker that consumes the message)&lt;br /&gt;
* Object store in Nova is a naive stub which would be replaced with Cloud Files in Production (a simple object store that mimics Cloud Files might be good for development)&lt;br /&gt;
* Tornado should be phased out for WSGI-based web framework&lt;br /&gt;
&lt;br /&gt;
=== Networking ===&lt;br /&gt;
Currently, there are three strategies for networking, implemented by different managers:&lt;br /&gt;
&lt;br /&gt;
* FlatManager -- ip addresses are grabbed from a network and injected into the image on launch.  All instances are attached to the same manually configured bridge.&lt;br /&gt;
* FlatDHCPManager -- ip addresses are grabbed from a network, and a single bridge is created for all instances. A dhcp server is started to pass out addresses&lt;br /&gt;
* VlanManager -- each project gets its own vlan, bridge and network.  A dhcpserver is started for each vlan, and all instances are bridged into that vlan.&lt;br /&gt;
&lt;br /&gt;
The implementation of creating bridges, vlans, dhcpservers, and firewall rules is done by the driver linux_net.  This layer of abstraction is so that we can at some point support configuring hardware switches etc. using the same managers.&lt;br /&gt;
&lt;br /&gt;
For more discussion of network architecture, see [[Networking]].&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=DevQuickstart&amp;diff=16148</id>
		<title>DevQuickstart</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=DevQuickstart&amp;diff=16148"/>
				<updated>2013-02-16T22:37:37Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= [[OpenStack]] Bug Fixing Step-by-Step =&lt;br /&gt;
&lt;br /&gt;
== Step 1: Set Up Your Development Environment ==&lt;br /&gt;
&lt;br /&gt;
* 1.1) The easiest way to build a fully functional development environment is with [http://devstack.org  DevStack]. In order to use it, you will need a machine (or Vagrant box) running Ubuntu 11.10. If you've already got a machine up and running, skip to step 1.4. Otherwise, read on.&lt;br /&gt;
* 1.2) At this point you need to create a local virtual machine running Ubuntu 11.10. A common method, if you have the capability to run [[VirtualBox]], is to use Vagrant. Head over to https://github.com/bcwaldon/vagrant_devstack for further instructions.&lt;br /&gt;
* 1.3) If you can't run [https://www.virtualbox.org/wiki/Downloads   VirtualBox] or some other virtualization application locally, you'll need to look to the cloud! You can set up an account on Amazon EC2 or Rackspace Cloud to run a temporary machine.&lt;br /&gt;
* 1.4) Follow the guide at http://devstack.org to get your environment up and running.&lt;br /&gt;
* NOTE: If you prefer not to use devstack, you can still check out source code on your local machine and develop from there.&lt;br /&gt;
&lt;br /&gt;
== Step 2: Sign the CLA and Sign in to LaunchPad ==&lt;br /&gt;
&lt;br /&gt;
* 2.1) Head over to http://launchpad.net and click 'Log in / Register' in the top-right corner to sign up. Once you've created your account, you need to do a few more things&lt;br /&gt;
* 2.2) Sign the [[OpenStack]] CLA. You can sign it electronically at http://wiki.openstack.org/CLA&lt;br /&gt;
* 2.3) Add yourself to the Contributors wiki page. See the instructions at the top of this page: http://wiki.openstack.org/Contributors&lt;br /&gt;
* 2.4) Join the openstack-cla launchpad group. To do this, navigate to https://launchpad.net/~openstack-cla and click 'Join the team' on the right side of the page. Your request will be forwarded to the core [[OpenStack]] developers, who can then approve your request. Keep in mind, you must have completed the first two steps for your membership to be approved. Once you have submitted your request to join the team, feel free to move on. Just keep in mind that you must be approved before you can submit any code! &lt;br /&gt;
* NOTE: At this point, it would be a good idea to join the #openstack-dev IRC channel on Freenode. There are always developers around to help with code reviews or to answer any other general questions you may have. If you find that your request to join the openstack-cla team from step 3 is blocking your ability to submit code, feel free to ping someone in that chatroom!&lt;br /&gt;
&lt;br /&gt;
== Step 3: Claim a Bug ==&lt;br /&gt;
&lt;br /&gt;
* 3.1) The [[OpenStack]] projects keep all of their bug reports on LaunchPad. Follow one of the links below to see a list of open and unclaimed bugs for each specific project:&lt;br /&gt;
** [https://bugs.launchpad.net/nova/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status:list=CONFIRMED&amp;amp;field.status:list=TRIAGED&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search   Nova Bugs]&lt;br /&gt;
** [https://bugs.launchpad.net/glance/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status:list=CONFIRMED&amp;amp;field.status:list=TRIAGED&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search   Glance Bugs]&lt;br /&gt;
** [https://bugs.launchpad.net/swift/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status:list=CONFIRMED&amp;amp;field.status:list=TRIAGED&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search   Swift Bugs]&lt;br /&gt;
** [https://bugs.launchpad.net/keystone/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status:list=CONFIRMED&amp;amp;field.status:list=TRIAGED&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search   Keystone Bugs]&lt;br /&gt;
** [https://bugs.launchpad.net/horizon/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status:list=CONFIRMED&amp;amp;field.status:list=TRIAGED&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search   Horizon Bugs]&lt;br /&gt;
* NOTE: If you're still a beginner with [[OpenStack]], it might be a good idea to filter the bugs down to 'low-hanging-fruit'. Look for a link on the right to see this list.&lt;br /&gt;
* 3.2) Once you've searched through the list and found something you want to work on, open up the full bug report, click the yellow edit button in the 'Assigned to' column then click 'Assign me' in the box that pops up. You should also set the status to 'In Progress'.&lt;br /&gt;
&lt;br /&gt;
== Step 4: Fix the Bug ==&lt;br /&gt;
&lt;br /&gt;
Now that you've picked out what you're going to work on, head into your development environment and go crazy! We strongly suggest that you first write a failing test that reproduces the behavior detailed in the bug report. Core developers will end up asking for a test that verifies the fix when you get to the code review step, so you might as well take care of it up front. In order to run tests, look for the 'run_test.sh' shell script. It will run all of the tests for the project you are in and check for any style errors. &lt;br /&gt;
&lt;br /&gt;
If you find you can't reproduce the bug from the details in the report, feel free to ask around. Several bugs pop up due to mis-configured environments or only apply in extremely specific situations. Here are the lists of core members for each project:&lt;br /&gt;
&lt;br /&gt;
* Nova: https://launchpad.net/~nova-core/+members#active&lt;br /&gt;
* Glance: https://launchpad.net/~glance-core/+members#active&lt;br /&gt;
* Swift: https://launchpad.net/~swift-core/+members#active&lt;br /&gt;
* Keystone: https://launchpad.net/~keystone-core/+members#active&lt;br /&gt;
* Horizon: https://launchpad.net/~horizon-core/+members#active&lt;br /&gt;
&lt;br /&gt;
== Step 5: Propose the Fix ==&lt;br /&gt;
&lt;br /&gt;
* 5.1) There is a bit more work to be done before you can propose your patch. First you need to install 'git-review'. This tool adds a 'review' command to git which helps with some bootstrapping of your repo and individual patches to work with our code review tool. The easiest way to get git-review is to use pip: &lt;br /&gt;
  &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;pip install git-review&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 5.2) Next you need to ensure your fix is in a single commit with a link to the bug in the commit message. In order to do that, we suggest that you run 'git rebase -i origin/master'. This will open an interactive editor in which you can 'squash' your commits together. This process also allows you to edit the commit message that will be sent with the review. Your fix can be automatically linked back to the bug on launchpad if you place a string like 'Fixes bug XXXXXX' in your commit message. If you have troubles with this step, please head to (http://wiki.openstack.org/GerritWorkflow) or just grab someone on IRC.&lt;br /&gt;
* 5.3) Once you've installed git-review and cleaned up your patch, feel free to run 'git review'. A link to your review should be printed out to the screen. At this point you can move on to another bugfix! If you end up getting any feedback that you need to address, continue on to the next step&lt;br /&gt;
* 5.4) Once you fix any code-related problems and you are ready to resubmit your review, you need to once-again squash your new commit(s) into one. Make sure you don't remove the 'Change-Id: ...' line from your commit message as that is the piece of information Gerrit uses to tie your subsequent patches together into one review. You can run the same command, 'git review', to push up your updated code.&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=NetworkContainers&amp;diff=16142</id>
		<title>NetworkContainers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=NetworkContainers&amp;diff=16142"/>
				<updated>2013-02-16T22:32:18Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* '''Launchpad Entry''': [[NovaSpec]]:netcontainers&lt;br /&gt;
* '''Created''': 2011-04-06&lt;br /&gt;
* '''Contributors''':&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
'''Cisco’s Proposal on OpenStack:Network as a Service (NaaS)'''&lt;br /&gt;
&lt;br /&gt;
We are proposing OpenStack:Network as a Service, a first class OpenStack service. Though we share the requirements and many of the design concepts/principles with the other [[NetworkService]] proposal (many of the contributors are participants in both proposals), the main motivation for this blueprint is to provide OpenStack community a preview of the overall proposal and some of the new ideas, concepts for the OpenStack: NaaS consideration. This proposal also extends the [[NetworkService]] requirements specified in its draft.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Overview ===&lt;br /&gt;
OpenStack: NaaS provides a network abstraction layer and set of APIs (Figure 1) to enable: * Requesting and acquiring network connectivity by OpenStack:Compute for interconnecting two VM instances , both single virtual network (single vnic) or multi vnics to different virtual networks.&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Network Services (e.g. firewall, load balancers, Wide Area Acceleration Services) insertion at the appropriate virtual networks; and dynamically request “adaptive” network resources.&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Any OpenStack applications or services that needs Network resources visibility or consumption, examples: DR applications, Network Health / Monitoring Services, Chargeback / Billing services and so on.&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Network resources that are required to interconnect OpenStack “Zones” or geographically dispersed compute/storage resources.&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Network resources required to support new Services like Virtual Private Cloud, enterprise extensions.&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * In future, this NaaS could be expanded to support SLA, Network level QoS and other network based auditing/monitoring services.&amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Figure 1&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; [[Image:figure1.png]]&lt;br /&gt;
&lt;br /&gt;
Figure 2 shows OpenStack:Network Logical components. [[Image:figure2.png]]&lt;br /&gt;
&lt;br /&gt;
=== Virtual Networks ===&lt;br /&gt;
Today’s nova:network supports three “network models” (a)FlatNetwork (b)FlatNetworkwithDHCP (c) VLAN with VPN GW instance. The shortcomings of this model are well documented in other proposals and it’s rather restrictive. In this new Naas model, the Network Abstraction completely hides the technology used for achieving the network segmentation, example: Initially this may be achieved by VLAN tags, in future different vendors may employ their proprietary/ future standards based segmentation schemes, to provide scalability and flexibility. With that in mind, the Virtual networks are primarily L2 segments (with L3 services offered in future). This simplifies the network segment notion for all the other !Openstack services and hides the “platform specific” complexity to the network devices.(both physical and virtual form factors)&lt;br /&gt;
&lt;br /&gt;
=== [[NetContainer]](NC) ===  A logical entity that is initially created per OpenStack &amp;quot;Project&amp;quot;. Each NetContainer contains one or more virtual network segments, with one or more network services and in the future may have one or more NetContainers embedded.&lt;br /&gt;
&lt;br /&gt;
NetContainers can be instantiated based on already defined NC flavors or from ground up.&lt;br /&gt;
&lt;br /&gt;
=== NC Flavors ===&lt;br /&gt;
NC Flavors provides a Cloud Service Provider opportunity to “package” its offerings,&lt;br /&gt;
&lt;br /&gt;
* based on Qos , Examples: Gold, Silver or Bronze&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Flavors that specify application/service specific NC falvors, example: HIPPA complaint Network&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * simple Network resources based definition for a particular tenant or a Project, example: how many virtual networks that the Project’s user allowed to create, Max VMs, type of services supported, ...&amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NC Flavors are envisioned similar to the VM flavors like m1.tiny, m1.large and so on. There will be default basic NC flavors that can be further modified for a particular project requirement.&lt;br /&gt;
&lt;br /&gt;
'''NC Plugins:'''Plug-ins are Network device/vendor specific “wrappers” that are invoked for configuring required network resources at the physical/virtual switches and services.&lt;br /&gt;
&lt;br /&gt;
Figure 3 shows a hierarchical model of NaaS and its layers. Though the NetContainers can be requested and instantiated from already defined and available NC Flavors, NaaS will also provide direct NaaS APIs to request the NC with fine grained parameters, to provide flexibility.&lt;br /&gt;
&lt;br /&gt;
Figure 3 [[Image:figure3.png]]&lt;br /&gt;
&lt;br /&gt;
In the above diagram a logical representation of network segments shown. A cloud Service provider, P1 with a tenant T1, creating a project Pr1, that hosts Application A1 with three virtual networks AT1, AT2 and AT3.&lt;br /&gt;
&lt;br /&gt;
All NetContainers should be instantiated based on a NC flavor. Some flavors will support modification beyond the initial configuration, and some will be locked into the fairly rigid configurations that are initially instantiated. This would depend on the plugin’s capabilities, and gives a lot of flexibility to the plugin implementer. Those that provide more flexible containers will have an advantage, but it won’t preclude those that are more basic from being useful.&lt;br /&gt;
&lt;br /&gt;
Figure 4 shows the OpenStack:Network with “network devices” specific plug-ins and various sets of APIs.&lt;br /&gt;
&lt;br /&gt;
Figure 4&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; [[Image:figure4.png]]&lt;br /&gt;
&lt;br /&gt;
NaaS APIs accessibility, in terms of authorization, will follow the same model as of OpenStack:Compute&lt;br /&gt;
&lt;br /&gt;
=== API Set 1: NC APIs ===&lt;br /&gt;
These APIs provide the ability to create and &amp;quot;manage&amp;quot; NetContainers for a project;  * A NetContainer can be defined/created based on the NC flavors assigned by the CSP(Coud ServiceProvider) to that project * Attach/Create virtual networks for the Net Container * Instantiate/attach Network Services at the &amp;quot;appropriate&amp;quot; Virtual network segment &amp;quot;nodes&amp;quot;  * Query/Monitor NetContainer health * Monitoring in future&lt;br /&gt;
&lt;br /&gt;
=== API Set 2: Network Services APIs ===&lt;br /&gt;
These are sub-set of APIs that enable us to define services insertion and &amp;quot;bootstrap&amp;quot; parameters for the services.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Configuring/managing” the services itself is out of scope of this API set. &amp;quot;Configuring/Managing&amp;quot; of each service is vendor specific and its challenging to align them all under one model. Moreover each of the services may have their own SDK and different deployment model to support which is very complex to have it all under this set. However, OpenStack should provide a “generic” Network services configuration for well known services such as Firewall , Load balancer.&lt;br /&gt;
&lt;br /&gt;
Using this API, a tenant can&lt;br /&gt;
&lt;br /&gt;
* Select Services/Types Services that a &amp;quot;project&amp;quot; would like to consume and use&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * &amp;quot;Customize” the services – configure network “insertion” parameters&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * List/identify the services consumed and health&amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== API Set 3: NC Flavors API ===&lt;br /&gt;
This set of APIs primarily used by CSP for defining &amp;quot;resources&amp;quot;/services offering buckets related to Network &amp;amp; Network Services. Open For discussion : how much of these APIs are opened up further for a Project/tenant for customizing the “flavors”.&lt;br /&gt;
&lt;br /&gt;
Example of a flavor : Three tier App with Private, Public Virtual Networks with FW and LB services, VPN GW attached,&lt;br /&gt;
&lt;br /&gt;
Using this API set, CSP/Tenant can: * Create/Manage templates for a project and services offering.&amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the next section we discuss, how two main layers, NaaS:Core and Naas:Plugins, interact and their respective responsibilities&lt;br /&gt;
&lt;br /&gt;
=== Components responsibilities ===&lt;br /&gt;
==== NaaS:Core ====&lt;br /&gt;
Hold references to NetContainer instances&lt;br /&gt;
&lt;br /&gt;
* Provides API for container provisioning &amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Exposes catalog of available NetContainers and their attributes &amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Allows for operational/runtime control of NetContainers &amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * '''Discussion point:''' Map compute/storage to container? Or does Compute service manage that?&lt;br /&gt;
* Choice 1: NaaS owns connections, thus compute registers VMs with NaaS using params&lt;br /&gt;
* Choice 2: NaaS advertises container to compute, and compute manages connections&lt;br /&gt;
&lt;br /&gt;
==== NaaS:Plug-ins ====&lt;br /&gt;
* Owns what offerings are available (what containers are available)&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Owns mapping container to Network Devices environment (example : Network segment schemes – VLAN IDs, QinQ and so on)&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Owns container provisioning, including resource allocation, location, services, etc&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Support standard but extensible formats for !netcontainer type definitions and !netcontainer instance requests&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Standard way of reporting errors, such as missing information, unknown element, invalid config, etc&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * APIs for querying actual availability of specific container types (knows what resources are available, and which are consumed)&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Handles asynchronous conversation with NaaS :Core&lt;br /&gt;
&lt;br /&gt;
=== Use Cases ===&lt;br /&gt;
==== Use case 1: Create a Network resource for an Openstack project ====&lt;br /&gt;
'''Workflow for provisioning a container:'''&lt;br /&gt;
&lt;br /&gt;
* Customer selects !netcontainer service from NaaS offering,if any&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Customer provides required parameters to specify config preferences, policies, etc&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * NaaS creates request document from customer information&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * NaaS passes request document to plug-in&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Plug-in parses document and maps to resource requirements&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Plug-in evaluates resource req's against available resources&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Plug-in provisions resources as defined by container request&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Plug-in returns handle to new container (REST URL)&amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Use case 2: Network Services request network resources ====&lt;br /&gt;
* Insertion of a firewall requests another internal virtual network and external network segment&lt;br /&gt;
&lt;br /&gt;
==== Use case 3: Virtual Private Cloud/Enterprise Extensions ====&lt;br /&gt;
* Create a virtual network in a NC&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Create a VPN/Acceleration service instance and attach to the “private” network segment&amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Use case 4: Network Scheduler ====&lt;br /&gt;
* To support multiple !Openstack:Compute Zones and schedule network resources in conjunction with nova-scheduler.&lt;br /&gt;
&lt;br /&gt;
=== API Definitions ===&lt;br /&gt;
This set of APIs allow Openstack services and &amp;quot;Applications&amp;quot; to request  for Network Containers, Delete Network containers, modify Network  containers (NC) attributes, List all the available  NC flavors and  create new NC flavors. These APIs are consumed programmatically by  Openstack compute or other services.&lt;br /&gt;
&lt;br /&gt;
API definitions and data model will try and follow the Openstack:Compute API 1.1 as specified at http://docs.openstack.org/openstack-compute/developer/cs-devguide.pdf&lt;br /&gt;
&lt;br /&gt;
JSON is the default data serialization for [[OpenStack]]:Network APIs.&lt;br /&gt;
&lt;br /&gt;
'''Authentication:'''&lt;br /&gt;
&lt;br /&gt;
[[OpenStack]]: Network APIs will follow the same authentication model as  that of [[OpenStack]]:Compute and may support multiple authentication  schemes (OAuth, Basic Auth, Token) and so on.&lt;br /&gt;
&lt;br /&gt;
'''Key Concepts:'''&lt;br /&gt;
&lt;br /&gt;
'''Tenants:''' This may be mapped to a project or a org  based on the NaaS API invoking system. It’s a unique name/label that  identifies the NC ownership. Tenant could be mapped to a Project in  Openstack:compute service invocation. The tenant construct could be used  in future by “Data Services” to create a Network container for storage  related services. This also makes it future proof from changes that may  happen at [[OpenStack]]:compute and other consumer apps/services, example:  [[OpenStack]]: Computer evolving from projects to ORG/vDC/vApp kind of  constructs.&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;u&amp;gt;Flavor:&amp;lt;/u&amp;gt;''' Container definitions in terms - network resources properties. Example : # of Virtual Networks, Network Services attached,  Zone affinity in future.&lt;br /&gt;
&lt;br /&gt;
=== Summary of APIs ( work in progress) ===&lt;br /&gt;
Tenant Operations:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt; &amp;gt;|API Definition &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request Body &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Register Tenant &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|POST [[OpenStack]]:Networks API URL/config/tenant/create &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Tenant info &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|unregister a tenant &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|GET [[OpenStack]]:Network API URL/config/tenant/''UID''/delete &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Tenant Info &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|List tenants &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|GET [[OpenStack]]:Network API URL/tenants GET [[OpenStack]]:Network API URL/tenants/detail &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== example: Create Tenant ====&lt;br /&gt;
POST {''APP-URI}''/config/tenant/create&lt;br /&gt;
&lt;br /&gt;
Request Body&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;tenant&amp;gt;&lt;br /&gt;
  &amp;lt;name&amp;gt;TenantABC1&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;lt;description&amp;gt;Optional description here&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/tenant&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Response Codes:'''&lt;br /&gt;
&lt;br /&gt;
* 201 Created – Tenant has been created.  Location header gives URL of created tenant. &amp;lt;&amp;lt;BR&amp;gt;&amp;gt;400 Bad Request – Something was wrong with the request, such as missing data&lt;br /&gt;
* 404 Not Found – Domain specified by domainId was not found.&lt;br /&gt;
* 409 Conflict – Name conflicts with existing tenant&lt;br /&gt;
&lt;br /&gt;
'''NC Flavor Operations'''&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt; &amp;gt;|API Definition &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request Body &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Create NC Flavor &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|POST [[OpenStack]]:Networks API URL/config/ncflavor/create &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|NC Flavor info &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Modify NC Flavor &amp;lt;actions&amp;gt; &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Delete NC Flavor &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|List NC Flavors &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|GET [[OpenStack]]:Network API URL/ncflavors GET [[OpenStack]]:Network API URL/ncflavors/detail &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''[[NetContainer]] Operations'''&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt; &amp;gt;|API Definition &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request Body &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Create NetContainer &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|POST [[OpenStack]]:Networks API URL/config/netcontainer/create &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|NetContainer info &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Modify Net Container &amp;lt;actions&amp;gt; &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Delete Net Container &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|List NetContainers &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|GET [[OpenStack]]:Network API URL/netcontainers GET [[OpenStack]]:Network API URL/netcontainers/detail &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''' Network Services attachement'''&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|API Definition &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTh&amp;quot; style=&amp;quot;font-weight: bold;&amp;quot;&amp;gt;|Request Body &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|attach Services &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Network Services info &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|Config Services &amp;lt;serviceUID&amp;gt; &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;|list Services for a container &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;class=&amp;quot;confluenceTd&amp;quot;&amp;gt;| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Open''' '''Questions'''&lt;br /&gt;
&lt;br /&gt;
* NetContainers Definitions – How is it related to OVF netspec. How much we can overlap and make use of the OVF spec?&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * How do we resolve &amp;quot;dependency&amp;quot; while instantiating the NC or deleting it?&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * Explicit supported Services Enumeration?&amp;lt;&amp;lt;BR&amp;gt;&amp;gt; * How about supporting models like Security groups? Flexibility&amp;lt;&amp;lt;BR&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Neutron/ServiceInsertion&amp;diff=16136</id>
		<title>Neutron/ServiceInsertion</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Neutron/ServiceInsertion&amp;diff=16136"/>
				<updated>2013-02-16T22:27:23Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= WORK IN PROGRESS =&lt;br /&gt;
We are integrating all the information related to Services Insertion in only one wiki page&lt;br /&gt;
&lt;br /&gt;
= Services Insertion Model in Quantum =&lt;br /&gt;
* '''Launchpad Entries''':&lt;br /&gt;
&lt;br /&gt;
''''' [https://blueprints.launchpad.net/quantum/+spec/quantum-service-type services-type] '''''&lt;br /&gt;
&lt;br /&gt;
''''' [https://blueprints.launchpad.net/quantum/+spec/services-insertion-wrapper services-insertion-wrapper (folsom)] '''''&lt;br /&gt;
&lt;br /&gt;
* '''Contributors''': [https://launchpad.net/~salvatore-orlando Salvatore],[https://launchpad.net/~emagana Edgar Magana], [https://launchpad.net/~enikanorov Eugene], Ram Durairaj, Mani Ramasamy and Quantum Community.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This page contains the design spec for the service insertion blueprint. Despite being quite fleshed out the spec is not finalised yet, as some details are still subject to change, especially as far as the implementation plan is concerned. Please subscribe to this page to get every update, or check it as often as necessary.  The blueprint itself can be found at this address:&lt;br /&gt;
&lt;br /&gt;
This specification does not fully respects the blueprint template set for Quantum. This is because we are giving much more space to the design discussion. We will have another wiki page using the blueprint template once the design discussion is Finalized.&lt;br /&gt;
&lt;br /&gt;
== High level description ==&lt;br /&gt;
The ''service insertion'' feature aims at defining a framework for running L4/L7 network services on Quantum Logical Topologies. This framework will be immediately leveraged by the LBaaS effort; and in the near future by other advanced services which will be plugged into Quantum (for instance, VPN, and edge firewalls).&lt;br /&gt;
&lt;br /&gt;
== Defining Service Insertion ==&lt;br /&gt;
Before going in depth into design and implementation discussion, it might be worth to define in a detailed way what an advanced service is, and how it could be inserted in the Quantum logical topology. The diagram below show Quantum's basic network topology, with a logica router interconnecting internal and external networks; ports, which are used for VIF, DHCP server, router, and floating IP attachments are also shown in the diagram.&lt;br /&gt;
&lt;br /&gt;
[[Image:basic-topology.png]]&lt;br /&gt;
&lt;br /&gt;
From previous discussions it emerged that services can be inserted in the following modes:&lt;br /&gt;
&lt;br /&gt;
* Routed mode - Where the service is attached to a logical router, which then becomes a multi-service appliance.&lt;br /&gt;
&lt;br /&gt;
[[Image:routed-si.png]]&lt;br /&gt;
&lt;br /&gt;
* Floating Mode (In-path) - Where service runs in a standalone way. Please note that the &amp;quot;Floating&amp;quot; insertion is not automatically a network level insertion, as L3 routing might still occur. This mode has also been referred as &amp;quot;in-path or bump-in-the-wire&amp;quot; insertion.&lt;br /&gt;
&lt;br /&gt;
[[Image:in-path-si.png]]&lt;br /&gt;
&lt;br /&gt;
With reference to the diagram above, is is worth noting that an advanced service, even when inserted in floating mode, should still 'plug' into networks. In the example above, the service plugs into the external network and into an internal network. This should be reflected by ports on the relevant Quantum networks ''owned'' by the advanced service itself.&lt;br /&gt;
&lt;br /&gt;
* Re-directed Mode (Out-of-path) - Where the service also runs in a standalone way but in this case the traffic is first sent to the Router entity and then redirected to the Advanced Service, finally send it back to the routed with specific configuration. In particular, this model could be reduced to the first assuming that a standalone service is regarded as a peculiar case of router capable of providing only a specific service. This mode needs specific changes at the routing entity and may not be implemented in Grizzly release.&lt;br /&gt;
&lt;br /&gt;
[[Image:out-of-path-si.png]]&lt;br /&gt;
&lt;br /&gt;
All these three modes are not mutually exclusive. The diagram below shows how they can be combined. With reference to the diagram below, it is worth noting that the services inserted in routing and floating modes could have different implementations. This means for instance, that instances on the same Quantum networks could be load balanced using two different solutions.&lt;br /&gt;
&lt;br /&gt;
[[Image:mixnmatch-si.png]]&lt;br /&gt;
&lt;br /&gt;
== The Service Type concept ==&lt;br /&gt;
Just like the Quantum plugins allow for using several technologies for implementing the basic logical topologies, advanced services will use a similar mechanism. However, for advanced services, multiple different implementations of the same kind of service might co-exist in the same deployment. There are a number of reasons for this, most importantly the ability of giving tenants a choice among solutions. The '''Service Type''' concept tries to address the need for multiple, co-existing, service providers.&lt;br /&gt;
&lt;br /&gt;
A '''Service Type''' definitions might be regarded as list of services (and their providers) which can be offered to tenants. Each advanced service, regardless of its insertion mode, should be either directly or indirectly associated with a single service type.&lt;br /&gt;
&lt;br /&gt;
The Service Type resource might be described as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ServiceType:&lt;br /&gt;
{&lt;br /&gt;
  id: uuid,&lt;br /&gt;
  name: string,&lt;br /&gt;
  service_definitions: list&amp;lt;ServiceDefinition&amp;gt;&lt;br /&gt;
  default: {True¦False} # Only one service_type could be the default one. This is the service type which should be picked if none is specified in the API (think backward compatibility)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ServiceDefinition:&lt;br /&gt;
{&lt;br /&gt;
  id: uuid,&lt;br /&gt;
  name: string,&lt;br /&gt;
  type: enum(LB, VPN, FW) # or whatever you think is right&lt;br /&gt;
  provider: string # This ultimately must map to a python class (perhaps through a configuration variable)&lt;br /&gt;
  capabilities: list of API extensions which are enabled for this specify service provider&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the ''ServiceDefinition'' object might be regarded either as a resource of its own, or as a child resource of ''ServiceType''. The association between a service and a service type can happen in two ways, according to the insertion mode of the service.&lt;br /&gt;
&lt;br /&gt;
* ''Routed'' Insertion mode: The advanced service will be associated with Quantum logical router, which in turn is associated with a service_type resource;&lt;br /&gt;
&lt;br /&gt;
In order to ensure backward compatibility a default service type must be specified. This implies that all the services which will be inserted on a router will share the same service type.&lt;br /&gt;
&lt;br /&gt;
* ''Floating'' Insertion mode: The service type should be explicitly specified on the advanced service being created; if not, the default service type will be used.&lt;br /&gt;
&lt;br /&gt;
When an advanced service is created at the API layer one of the following two should be specified:&lt;br /&gt;
&lt;br /&gt;
# service_type_id # floating or out-of-path insertion&lt;br /&gt;
# router_id # routed or in-path insertion&lt;br /&gt;
&lt;br /&gt;
It should not be allowed to specify both parameters.&lt;br /&gt;
&lt;br /&gt;
The logical model for service insertion, augmented with the service type concept, is depicted in the following diagram:&lt;br /&gt;
&lt;br /&gt;
[[Image:svc-type.png]]&lt;br /&gt;
&lt;br /&gt;
The diagram shows a set of services deployed in routed mode (light blue), and a service deployed in floating mode (purple). Light blue and purple services are associated with different service types, which then can map to distinct implementations of the same services.&lt;br /&gt;
&lt;br /&gt;
== Dispatching calls to the plugins ==&lt;br /&gt;
The concept of service type implicitly allows for different paths for an API call, as it allows multiple providers to serve the same request. Eugene Nikanorov also addresses this topic in this wiki page: http://wiki.openstack.org/Quantum/ServiceIntegration&lt;br /&gt;
&lt;br /&gt;
There are two design alternatives to be considered:&lt;br /&gt;
&lt;br /&gt;
# A single plugin, augmented with the capability of serving requests for advanced services; call will then be redirected to provider-specific drivers.&lt;br /&gt;
# Multiple, self-contained plugins. Each plugin is specific to a given service provider and might implement one or more advanced service interfaces.&lt;br /&gt;
&lt;br /&gt;
For both design alternatives, it is pretty clear that each advanced service should have a 'service plugin interface', which is the plugin-side dual of the tenant-facing APIs. The core Quantum plugin similarly, defines a plugin interface that all plugins must implement.&lt;br /&gt;
&lt;br /&gt;
=== Single Plugin Approach ===&lt;br /&gt;
The diagram below show a Quantum Plugin which implements both core and advanced services interface. The plugin is capable of interpreting the service_type attribute, and dispatching the call to the appropriate, provider-specific driver.&lt;br /&gt;
&lt;br /&gt;
[[Image:single-plugin.png]]&lt;br /&gt;
&lt;br /&gt;
For this approach it should be possible to leverage the &amp;quot;mixin&amp;quot; mechanism which proved successful when integrating DHCP and L3 services. The possibility of augmenting the Quantum plugin with the capability of handling advanced services should definitely be allowed. In this case there will still be a single Quantum plugin; Appropriate ''service drivers'' should be specified in the configuration file. For each service multiple drivers might be specified; The service driver should not be seen as a driver for a specific appliance implementing the service. It is rather a driver managing the service for a given provider.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Plugins Approach ===&lt;br /&gt;
The diagram below show how service type are mapped to multiple plugins when adopting this approach. Each plugin implements an interface which is specific for the kind of service it implements. The API layer has a dispatcher component which forwards the call to the appropriate plugin, according to the service type associated with the advanced service specified at the API layer.&lt;br /&gt;
&lt;br /&gt;
[[Image:multi-plugin.png]]&lt;br /&gt;
&lt;br /&gt;
It is a Quantum principle that plugins are required only to implement the plugin interface. Hence they are not required to adopt the mixin mechanism; hence another aspect to consider is that there could be multiplie plugins at the same type, and the intelligence of dispatching a call to one plugin or another should reside in the API layer.&lt;br /&gt;
&lt;br /&gt;
In this case several plugins might be configured at the same time. The API layer will need to figure out, for each router and/or advanced service, to which plugin the API call should be dispatched. It is also worth noting that a plugin should not be constrained to implement a single advanced services. It might well be that plugins implement a set of services; this is particularly the case of plugins which will be interfaced with integrated services appliances or application delivery controllers.&lt;br /&gt;
&lt;br /&gt;
In this case the diagram above could be generalised as follow (the reference to the configuration file is an implementation detail at this stage):&lt;br /&gt;
&lt;br /&gt;
[[Image:multi-plugin-2.png]]&lt;br /&gt;
&lt;br /&gt;
=== Evaluation of pro and cons of both Approaches ===&lt;br /&gt;
The diagrams below depicts, at a very high level, the different flows of the single versus multiple plugins approaches. The single plugin approach is reported on the right, whereas the multiple plugin approach is reported on the left.&lt;br /&gt;
&lt;br /&gt;
[[Image:single-vs-multi.png]]&lt;br /&gt;
&lt;br /&gt;
* multiple plugins will require the API to manipulate data from different sources. Even if each plugin will return data in the same format, we will still need logic to handle collecting data from multiple sources on GET requests, and dispatching commands to the appropriate destination on POST/PUT/DELETE.&lt;br /&gt;
* currently all plugins already implement the &amp;quot;mixin&amp;quot; approach for augmenting the L2 feature with L3 and DHCP features. This mechanism could be extended.&lt;br /&gt;
* compatibility between plugins (not something we need to worry from day 1, but still an interesting problem)&lt;br /&gt;
* interactions among plugins; with a single plugin, the data model has all the information it needs. With multiple plugins will have to interact with the &amp;quot;base&amp;quot; plugin (or in some cases even among them); this could be achieved throughout the plugin interfaces.&lt;br /&gt;
* the single plugin, multiple drivers, model works very well when the Quantum database holds all the required information necessary to operate. This implies that items such as device management, resource allocation, and similars, are described using a model shared by all plugins. Although this might be mitigated by either introducing driver-specific extensions, or moving such capabilities in the driver, this is clearly a case in which the multiple plugins approach is preferred.&lt;br /&gt;
&lt;br /&gt;
== A few notes on the scope of this blueprint ==&lt;br /&gt;
This blueprint which focuses on:&lt;br /&gt;
&lt;br /&gt;
* Providing the infrastructure for allowing implementations of these services to serve API requests; multiple implementations for each class of service should be allowed to coexist at the same time in a Quantum deployment.&lt;br /&gt;
* Defining a set of API calls (as well supporting logic and data model) for defining which, where, and how services might be attached on the logical topology defined by the basic Quantum topology;&lt;br /&gt;
* Allowing providers of such services to expose implementation-specific service extensions and advertising them to API users.&lt;br /&gt;
&lt;br /&gt;
Defining which services might be inserted, and how they should be presented to tenants is beyond the scope of this blueprint. Activity is already ongoing for the Load Balancing service; for more information please refer to lbaas-* blueprints in the Quantum framework.&lt;br /&gt;
&lt;br /&gt;
Most of the concepts expressed in this blueprint are not new to the Quantum community and can be found in this wiki page authored by Edgar Magana from Cisco: http://wiki.openstack.org/QuantumServicesInsertion&lt;br /&gt;
&lt;br /&gt;
''Further notes (or what this design specification is not about):''&lt;br /&gt;
&lt;br /&gt;
* There might be scenarios where service insertion happens at network level, as shown in Sasha Ratkovic's presentation. For the scope of this blueprint we will consider only router-level insertion, assuming that network-level insertion could be reduced to a case in which the service is inserted on a router connected to a single network only.&lt;br /&gt;
* There are also definitely scenarios where service insertion happens at the port level; in this case the insertion might be simply represented by attributes applied to the port itself. For an example please refer to the proposed https://review.openstack.org/#/c/14262/.&lt;br /&gt;
* The concept of port group, presented by Sasha Ratkovic at the Openstack Design Summit is also outside of the scope of this blueprint.&lt;br /&gt;
* Whether advanced services will be realized as new resource (as described in the LBaaS proposal) or as policies (as described by Sasha Ratkovic proposal), is also beyond the scope of this blueprint.&lt;br /&gt;
&lt;br /&gt;
At this stage the careful reader might be wondering whether this blueprint is actually about anything. With all due honesty by defining a (small) set of items we want to address, and a (very large) of items that we definitely do not want to address, it might be argued that this blueprint is actually pretty well scoped, leaving a very thin, blurred, area of items which might or might not be addressed by it.&lt;br /&gt;
&lt;br /&gt;
= Work Tasks =&lt;br /&gt;
== API ==&lt;br /&gt;
The service insertion API might be implemented as a Quantum extension for the Grizzly release cycle, or be part of the core if there is a total agreement on it. Service insertion support will require the following changes in the Quantum API:&lt;br /&gt;
&lt;br /&gt;
* Service Type management. CRUD operations should be available on a ServiceType object.&lt;br /&gt;
* Regular tenants typically should be allowed to read only&lt;br /&gt;
* Administrators would have right to create, modify, and delete those object. Also, the provider attribute might be hidden in response returned to regular tenants.&lt;br /&gt;
&lt;br /&gt;
''Note'': default policy settings might always be overridden as they're specified in ''etc/policy.json''&lt;br /&gt;
&lt;br /&gt;
The Router resource should therefore be extended with the following attribute:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  services:service_type_id # which refers to service_type object&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each advanced service should allow for specifying either a service type id (for floating mode insertion) or a router_id (for routed mode insertion).&lt;br /&gt;
&lt;br /&gt;
If a router supports multiple services, the tenant might be given the ability of enabling or  disabling specific services on a router, in accordance with the service_type associated with the router. This feature might be used by tenants to keep advanced service usage within quota limits.&lt;br /&gt;
&lt;br /&gt;
* Option 1: Resource action    /routers/&amp;lt;router_id&amp;gt;/enable_service&lt;br /&gt;
** /routers/&amp;lt;router_id&amp;gt;/disable_service&lt;br /&gt;
* Option 2: List Attribute&lt;br /&gt;
* Option 3: Sub-Resource       POST /routers/&amp;lt;router_id&amp;gt;/enabled_services&lt;br /&gt;
&lt;br /&gt;
Option 1 is currently the preferred one, as it is consistent with &amp;quot;the Openstack way&amp;quot; of defining APIs executing actions on resources beyond the ones that can be expressed as HTTP methods.&lt;br /&gt;
&lt;br /&gt;
== Service Configuration ==&lt;br /&gt;
The configuration file should contains references to the drivers/plugins corresponding to the various advanced services. These information will be used by the plugin manager.&lt;br /&gt;
&lt;br /&gt;
The configuration file might also contain service type definitions, which could alternatively be stored in the Quantum 'core' database (see section on Data Model Changes).&lt;br /&gt;
&lt;br /&gt;
== Plugin Manager ==&lt;br /&gt;
A mechanism for loading multiple plugins will be required for the multi-plugin approach. The PluginAwareExtensionManager does not manage plugin loading, but some work will be required on it for handling plugin-specific API extensions, as it currently assumes that there's only a single plugin.&lt;br /&gt;
&lt;br /&gt;
== Data Model Changes ==&lt;br /&gt;
ServiceType definition, if modeled into the Quantum DB will require two model classes. The ServiceType class will have a 1:n relationship with the ServiceDefinition class. This class will have an attribute for defining the type of the advanced services provider. This could either be another class in the model or extracted from the Quantum configuration file.&lt;br /&gt;
&lt;br /&gt;
ServiceProvider definition could as well be either another model class or information extracted from the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Changes to the basic plugin Interface ==&lt;br /&gt;
The service insertion feature will add a new interface which might be implemented as a new mixin to be inherited by the &amp;quot;core&amp;quot; plugin (a completely standalone class is a viable alternative, albeit less straightforward)&lt;br /&gt;
&lt;br /&gt;
== Managing API dispatching ==&lt;br /&gt;
This task is about implementing the single plugin/multiple drivers or multi-plugin approaches, as discussed earlier in this spec document.&lt;br /&gt;
&lt;br /&gt;
= Potential changes to the current implementation =&lt;br /&gt;
# Floating IPs: despite being shipped with Folsom, this feature might actually be regarded as an 'advanced service', and should probably fit in the service insertion framework.&lt;br /&gt;
# External Gateway: This might be possibly be regarded as an advanced service too. For instance, a SNAT service.&lt;br /&gt;
# DHCP:  think about how the DHCP service we implement today through the agent fits in the service insertion model. We are not exposing specifically any DHCP API, creating implicitly an instance of this service for each subnet for which ''dhcp_enable=True''. We can either leave DHCP as it is, or include it in the service insertion model.&lt;br /&gt;
&lt;br /&gt;
NOTE: For the cases listed above it is very important to preserve backward compatibility.&lt;br /&gt;
&lt;br /&gt;
= POC Proposal =&lt;br /&gt;
A POC of the service insertion model could be offered regardless of actual advanced services being implemented on top of Quantum. This POC might use 'dummy' advanced services plugins. Another options would be reworking the Floating IP and possibly also the external gateway concepts as advanced services and use them for the PoC.&lt;br /&gt;
&lt;br /&gt;
= Mapping tasks to Grizzly milestones =&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
| '''Task''' &lt;br /&gt;
| '''Importance''' &lt;br /&gt;
|-&lt;br /&gt;
| Service Type definition &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| Plugin/Driver management &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| API Call Dispatching &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| PoC with dummy plugins &lt;br /&gt;
| High &lt;br /&gt;
|-&lt;br /&gt;
| PoC with LBaaS &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| APIs for service type management &lt;br /&gt;
| Undecided &lt;br /&gt;
|-&lt;br /&gt;
| Service types in Quantum DB &lt;br /&gt;
| Normal &lt;br /&gt;
|-&lt;br /&gt;
| Reworking some L3 capabilities as adv svc &lt;br /&gt;
| Undecided&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Neutron/ServiceInsertion&amp;diff=16134</id>
		<title>Neutron/ServiceInsertion</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Neutron/ServiceInsertion&amp;diff=16134"/>
				<updated>2013-02-16T22:24:04Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: Reverted edits by Olaph (talk) to last revision by Corvus&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= WORK IN PROGRESS =&lt;br /&gt;
We are integrating all the information related to Services Insertion in only one wiki page&lt;br /&gt;
&lt;br /&gt;
= Services Insertion Model in Quantum =&lt;br /&gt;
* '''Launchpad Entries''':&lt;br /&gt;
&lt;br /&gt;
''''' [https://blueprints.launchpad.net/quantum/+spec/quantum-service-type services-type] '''''&lt;br /&gt;
&lt;br /&gt;
''''' [https://blueprints.launchpad.net/quantum/+spec/services-insertion-wrapper services-insertion-wrapper (folsom)] '''''&lt;br /&gt;
&lt;br /&gt;
* '''Contributors''': [https://launchpad.net/~salvatore-orlando Salvatore],[https://launchpad.net/~emagana Edgar Magana], [https://launchpad.net/~enikanorov Eugene], Ram Durairaj, Mani Ramasamy and Quantum Community.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This page contains the design spec for the service insertion blueprint. Despite being quite fleshed out the spec is not finalised yet, as some details are still subject to change, especially as far as the implementation plan is concerned. Please subscribe to this page to get every update, or check it as often as necessary.  The blueprint itself can be found at this address:&lt;br /&gt;
&lt;br /&gt;
This specification does not fully respects the blueprint template set for Quantum. This is because we are giving much more space to the design discussion. We will have another wiki page using the blueprint template once the design discussion is Finalized.&lt;br /&gt;
&lt;br /&gt;
== High level description ==&lt;br /&gt;
The ''service insertion'' feature aims at defining a framework for running L4/L7 network services on Quantum Logical Topologies. This framework will be immediately leveraged by the LBaaS effort; and in the near future by other advanced services which will be plugged into Quantum (for instance, VPN, and edge firewalls).&lt;br /&gt;
&lt;br /&gt;
== Defining Service Insertion ==&lt;br /&gt;
Before going in depth into design and implementation discussion, it might be worth to define in a detailed way what an advanced service is, and how it could be inserted in the Quantum logical topology. The diagram below show Quantum's basic network topology, with a logica router interconnecting internal and external networks; ports, which are used for VIF, DHCP server, router, and floating IP attachments are also shown in the diagram.&lt;br /&gt;
&lt;br /&gt;
[[Image:basic-topology.png]]&lt;br /&gt;
&lt;br /&gt;
From previous discussions it emerged that services can be inserted in the following modes:&lt;br /&gt;
&lt;br /&gt;
* Routed mode - Where the service is attached to a logical router, which then becomes a multi-service appliance.&lt;br /&gt;
&lt;br /&gt;
[[Image:routed-si.png]]&lt;br /&gt;
&lt;br /&gt;
* Floating Mode (In-path) - Where service runs in a standalone way. Please note that the &amp;quot;Floating&amp;quot; insertion is not automatically a network level insertion, as L3 routing might still occur. This mode has also been referred as &amp;quot;in-path or bump-in-the-wire&amp;quot; insertion.&lt;br /&gt;
&lt;br /&gt;
[[Image:in-path-si.png]]&lt;br /&gt;
&lt;br /&gt;
With reference to the diagram above, is is worth noting that an advanced service, even when inserted in floating mode, should still 'plug' into networks. In the example above, the service plugs into the external network and into an internal network. This should be reflected by ports on the relevant Quantum networks ''owned'' by the advanced service itself.&lt;br /&gt;
&lt;br /&gt;
* Re-directed Mode (Out-of-path) - Where the service also runs in a standalone way but in this case the traffic is first sent to the Router entity and then redirected to the Advanced Service, finally send it back to the routed with specific configuration. In particular, this model could be reduced to the first assuming that a standalone service is regarded as a peculiar case of router capable of providing only a specific service. This mode needs specific changes at the routing entity and may not be implemented in Grizzly release.&lt;br /&gt;
&lt;br /&gt;
[[Image:out-of-path-si.png]]&lt;br /&gt;
&lt;br /&gt;
All these three modes are not mutually exclusive. The diagram below shows how they can be combined. With reference to the diagram below, it is worth noting that the services inserted in routing and floating modes could have different implementations. This means for instance, that instances on the same Quantum networks could be load balanced using two different solutions.&lt;br /&gt;
&lt;br /&gt;
[[Image:mixnmatch-si.png]]&lt;br /&gt;
&lt;br /&gt;
== The Service Type concept ==&lt;br /&gt;
Just like the Quantum plugins allow for using several technologies for implementing the basic logical topologies, advanced services will use a similar mechanism. However, for advanced services, multiple different implementations of the same kind of service might co-exist in the same deployment. There are a number of reasons for this, most importantly the ability of giving tenants a choice among solutions. The '''Service Type''' concept tries to address the need for multiple, co-existing, service providers.&lt;br /&gt;
&lt;br /&gt;
A '''Service Type''' definitions might be regarded as list of services (and their providers) which can be offered to tenants. Each advanced service, regardless of its insertion mode, should be either directly or indirectly associated with a single service type.&lt;br /&gt;
&lt;br /&gt;
The Service Type resource might be described as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ServiceType:&lt;br /&gt;
{&lt;br /&gt;
  id: uuid,&lt;br /&gt;
  name: string,&lt;br /&gt;
  service_definitions: list&amp;lt;ServiceDefinition&amp;gt;&lt;br /&gt;
  default: {True¦False} # Only one service_type could be the default one. This is the service type which should be picked if none is specified in the API (think backward compatibility)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ServiceDefinition:&lt;br /&gt;
{&lt;br /&gt;
  id: uuid,&lt;br /&gt;
  name: string,&lt;br /&gt;
  type: enum(LB, VPN, FW) # or whatever you think is right&lt;br /&gt;
  provider: string # This ultimately must map to a python class (perhaps through a configuration variable)&lt;br /&gt;
  capabilities: list of API extensions which are enabled for this specify service provider&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the ''[[ServiceDefinition]]'' object might be regarded either as a resource of its own, or as a child resource of ''[[ServiceType]]''. The association between a service and a service type can happen in two ways, according to the insertion mode of the service.&lt;br /&gt;
&lt;br /&gt;
* ''Routed'' Insertion mode: The advanced service will be associated with Quantum logical router, which in turn is associated with a service_type resource;&lt;br /&gt;
&lt;br /&gt;
In order to ensure backward compatibility a default service type must be specified. This implies that all the services which will be inserted on a router will share the same service type.&lt;br /&gt;
&lt;br /&gt;
* ''Floating'' Insertion mode: The service type should be explicitly specified on the advanced service being created; if not, the default service type will be used.&lt;br /&gt;
&lt;br /&gt;
When an advanced service is created at the API layer one of the following two should be specified:&lt;br /&gt;
&lt;br /&gt;
# service_type_id # floating or out-of-path insertion&lt;br /&gt;
# router_id # routed or in-path insertion&lt;br /&gt;
&lt;br /&gt;
It should not be allowed to specify both parameters.&lt;br /&gt;
&lt;br /&gt;
The logical model for service insertion, augmented with the service type concept, is depicted in the following diagram:&lt;br /&gt;
&lt;br /&gt;
[[Image:svc-type.png]]&lt;br /&gt;
&lt;br /&gt;
The diagram shows a set of services deployed in routed mode (light blue), and a service deployed in floating mode (purple). Light blue and purple services are associated with different service types, which then can map to distinct implementations of the same services.&lt;br /&gt;
&lt;br /&gt;
== Dispatching calls to the plugins ==&lt;br /&gt;
The concept of service type implicitly allows for different paths for an API call, as it allows multiple providers to serve the same request. Eugene Nikanorov also addresses this topic in this wiki page: http://wiki.openstack.org/Quantum/ServiceIntegration&lt;br /&gt;
&lt;br /&gt;
There are two design alternatives to be considered:&lt;br /&gt;
&lt;br /&gt;
# A single plugin, augmented with the capability of serving requests for advanced services; call will then be redirected to provider-specific drivers.&lt;br /&gt;
# Multiple, self-contained plugins. Each plugin is specific to a given service provider and might implement one or more advanced service interfaces.&lt;br /&gt;
&lt;br /&gt;
For both design alternatives, it is pretty clear that each advanced service should have a 'service plugin interface', which is the plugin-side dual of the tenant-facing APIs. The core Quantum plugin similarly, defines a plugin interface that all plugins must implement.&lt;br /&gt;
&lt;br /&gt;
=== Single Plugin Approach ===&lt;br /&gt;
The diagram below show a Quantum Plugin which implements both core and advanced services interface. The plugin is capable of interpreting the service_type attribute, and dispatching the call to the appropriate, provider-specific driver.&lt;br /&gt;
&lt;br /&gt;
[[Image:single-plugin.png]]&lt;br /&gt;
&lt;br /&gt;
For this approach it should be possible to leverage the &amp;quot;mixin&amp;quot; mechanism which proved successful when integrating DHCP and L3 services. The possibility of augmenting the Quantum plugin with the capability of handling advanced services should definitely be allowed. In this case there will still be a single Quantum plugin; Appropriate ''service drivers'' should be specified in the configuration file. For each service multiple drivers might be specified; The service driver should not be seen as a driver for a specific appliance implementing the service. It is rather a driver managing the service for a given provider.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Plugins Approach ===&lt;br /&gt;
The diagram below show how service type are mapped to multiple plugins when adopting this approach. Each plugin implements an interface which is specific for the kind of service it implements. The API layer has a dispatcher component which forwards the call to the appropriate plugin, according to the service type associated with the advanced service specified at the API layer.&lt;br /&gt;
&lt;br /&gt;
[[Image:multi-plugin.png]]&lt;br /&gt;
&lt;br /&gt;
It is a Quantum principle that plugins are required only to implement the plugin interface. Hence they are not required to adopt the mixin mechanism; hence another aspect to consider is that there could be multiplie plugins at the same type, and the intelligence of dispatching a call to one plugin or another should reside in the API layer.&lt;br /&gt;
&lt;br /&gt;
In this case several plugins might be configured at the same time. The API layer will need to figure out, for each router and/or advanced service, to which plugin the API call should be dispatched. It is also worth noting that a plugin should not be constrained to implement a single advanced services. It might well be that plugins implement a set of services; this is particularly the case of plugins which will be interfaced with integrated services appliances or application delivery controllers.&lt;br /&gt;
&lt;br /&gt;
In this case the diagram above could be generalised as follow (the reference to the configuration file is an implementation detail at this stage):&lt;br /&gt;
&lt;br /&gt;
[[Image:multi-plugin-2.png]]&lt;br /&gt;
&lt;br /&gt;
=== Evaluation of pro and cons of both Approaches ===&lt;br /&gt;
The diagrams below depicts, at a very high level, the different flows of the single versus multiple plugins approaches. The single plugin approach is reported on the right, whereas the multiple plugin approach is reported on the left.&lt;br /&gt;
&lt;br /&gt;
[[Image:single-vs-multi.png]]&lt;br /&gt;
&lt;br /&gt;
* multiple plugins will require the API to manipulate data from different sources. Even if each plugin will return data in the same format, we will still need logic to handle collecting data from multiple sources on GET requests, and dispatching commands to the appropriate destination on POST/PUT/DELETE.&lt;br /&gt;
* currently all plugins already implement the &amp;quot;mixin&amp;quot; approach for augmenting the L2 feature with L3 and DHCP features. This mechanism could be extended.&lt;br /&gt;
* compatibility between plugins (not something we need to worry from day 1, but still an interesting problem)&lt;br /&gt;
* interactions among plugins; with a single plugin, the data model has all the information it needs. With multiple plugins will have to interact with the &amp;quot;base&amp;quot; plugin (or in some cases even among them); this could be achieved throughout the plugin interfaces.&lt;br /&gt;
* the single plugin, multiple drivers, model works very well when the Quantum database holds all the required information necessary to operate. This implies that items such as device management, resource allocation, and similars, are described using a model shared by all plugins. Although this might be mitigated by either introducing driver-specific extensions, or moving such capabilities in the driver, this is clearly a case in which the multiple plugins approach is preferred.&lt;br /&gt;
&lt;br /&gt;
== A few notes on the scope of this blueprint ==&lt;br /&gt;
This blueprint which focuses on:&lt;br /&gt;
&lt;br /&gt;
* Providing the infrastructure for allowing implementations of these services to serve API requests; multiple implementations for each class of service should be allowed to coexist at the same time in a Quantum deployment.&lt;br /&gt;
* Defining a set of API calls (as well supporting logic and data model) for defining which, where, and how services might be attached on the logical topology defined by the basic Quantum topology;&lt;br /&gt;
* Allowing providers of such services to expose implementation-specific service extensions and advertising them to API users.&lt;br /&gt;
&lt;br /&gt;
Defining which services might be inserted, and how they should be presented to tenants is beyond the scope of this blueprint. Activity is already ongoing for the Load Balancing service; for more information please refer to lbaas-* blueprints in the Quantum framework.&lt;br /&gt;
&lt;br /&gt;
Most of the concepts expressed in this blueprint are not new to the Quantum community and can be found in this wiki page authored by Edgar Magana from Cisco: http://wiki.openstack.org/QuantumServicesInsertion&lt;br /&gt;
&lt;br /&gt;
''Further notes (or what this design specification is not about):''&lt;br /&gt;
&lt;br /&gt;
* There might be scenarios where service insertion happens at network level, as shown in Sasha Ratkovic's presentation. For the scope of this blueprint we will consider only router-level insertion, assuming that network-level insertion could be reduced to a case in which the service is inserted on a router connected to a single network only.&lt;br /&gt;
* There are also definitely scenarios where service insertion happens at the port level; in this case the insertion might be simply represented by attributes applied to the port itself. For an example please refer to the proposed https://review.openstack.org/#/c/14262/.&lt;br /&gt;
* The concept of port group, presented by Sasha Ratkovic at the Openstack Design Summit is also outside of the scope of this blueprint.&lt;br /&gt;
* Whether advanced services will be realized as new resource (as described in the LBaaS proposal) or as policies (as described by Sasha Ratkovic proposal), is also beyond the scope of this blueprint.&lt;br /&gt;
&lt;br /&gt;
At this stage the careful reader might be wondering whether this blueprint is actually about anything. With all due honesty by defining a (small) set of items we want to address, and a (very large) of items that we definitely do not want to address, it might be argued that this blueprint is actually pretty well scoped, leaving a very thin, blurred, area of items which might or might not be addressed by it.&lt;br /&gt;
&lt;br /&gt;
= Work Tasks =&lt;br /&gt;
== API ==&lt;br /&gt;
The service insertion API might be implemented as a Quantum extension for the Grizzly release cycle, or be part of the core if there is a total agreement on it. Service insertion support will require the following changes in the Quantum API:&lt;br /&gt;
&lt;br /&gt;
* Service Type management. CRUD operations should be available on a [[ServiceType]] object.&lt;br /&gt;
* Regular tenants typically should be allowed to read only&lt;br /&gt;
* Administrators would have right to create, modify, and delete those object. Also, the provider attribute might be hidden in response returned to regular tenants.&lt;br /&gt;
&lt;br /&gt;
''Note'': default policy settings might always be overridden as they're specified in ''etc/policy.json''&lt;br /&gt;
&lt;br /&gt;
The Router resource should therefore be extended with the following attribute:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  services:service_type_id # which refers to service_type object&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each advanced service should allow for specifying either a service type id (for floating mode insertion) or a router_id (for routed mode insertion).&lt;br /&gt;
&lt;br /&gt;
If a router supports multiple services, the tenant might be given the ability of enabling or  disabling specific services on a router, in accordance with the service_type associated with the router. This feature might be used by tenants to keep advanced service usage within quota limits.&lt;br /&gt;
&lt;br /&gt;
* Option 1: Resource action    /routers/&amp;lt;router_id&amp;gt;/enable_service&lt;br /&gt;
** /routers/&amp;lt;router_id&amp;gt;/disable_service&lt;br /&gt;
* Option 2: List Attribute&lt;br /&gt;
* Option 3: Sub-Resource       POST /routers/&amp;lt;router_id&amp;gt;/enabled_services&lt;br /&gt;
&lt;br /&gt;
Option 1 is currently the preferred one, as it is consistent with &amp;quot;the Openstack way&amp;quot; of defining APIs executing actions on resources beyond the ones that can be expressed as HTTP methods.&lt;br /&gt;
&lt;br /&gt;
== Service Configuration ==&lt;br /&gt;
The configuration file should contains references to the drivers/plugins corresponding to the various advanced services. These information will be used by the plugin manager.&lt;br /&gt;
&lt;br /&gt;
The configuration file might also contain service type definitions, which could alternatively be stored in the Quantum 'core' database (see section on Data Model Changes).&lt;br /&gt;
&lt;br /&gt;
== Plugin Manager ==&lt;br /&gt;
A mechanism for loading multiple plugins will be required for the multi-plugin approach. The [[PluginAwareExtensionManager]] does not manage plugin loading, but some work will be required on it for handling plugin-specific API extensions, as it currently assumes that there's only a single plugin.&lt;br /&gt;
&lt;br /&gt;
== Data Model Changes ==&lt;br /&gt;
[[ServiceType]] definition, if modeled into the Quantum DB will require two model classes. The [[ServiceType]] class will have a 1:n relationship with the [[ServiceDefinition]] class. This class will have an attribute for defining the type of the advanced services provider. This could either be another class in the model or extracted from the Quantum configuration file.&lt;br /&gt;
&lt;br /&gt;
[[ServiceProvider]] definition could as well be either another model class or information extracted from the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Changes to the basic plugin Interface ==&lt;br /&gt;
The service insertion feature will add a new interface which might be implemented as a new mixin to be inherited by the &amp;quot;core&amp;quot; plugin (a completely standalone class is a viable alternative, albeit less straightforward)&lt;br /&gt;
&lt;br /&gt;
== Managing API dispatching ==&lt;br /&gt;
This task is about implementing the single plugin/multiple drivers or multi-plugin approaches, as discussed earlier in this spec document.&lt;br /&gt;
&lt;br /&gt;
= Potential changes to the current implementation =&lt;br /&gt;
# Floating IPs: despite being shipped with Folsom, this feature might actually be regarded as an 'advanced service', and should probably fit in the service insertion framework.&lt;br /&gt;
# External Gateway: This might be possibly be regarded as an advanced service too. For instance, a SNAT service.&lt;br /&gt;
# DHCP:  think about how the DHCP service we implement today through the agent fits in the service insertion model. We are not exposing specifically any DHCP API, creating implicitly an instance of this service for each subnet for which ''dhcp_enable=True''. We can either leave DHCP as it is, or include it in the service insertion model.&lt;br /&gt;
&lt;br /&gt;
NOTE: For the cases listed above it is very important to preserve backward compatibility.&lt;br /&gt;
&lt;br /&gt;
= POC Proposal =&lt;br /&gt;
A POC of the service insertion model could be offered regardless of actual advanced services being implemented on top of Quantum. This POC might use 'dummy' advanced services plugins. Another options would be reworking the Floating IP and possibly also the external gateway concepts as advanced services and use them for the PoC.&lt;br /&gt;
&lt;br /&gt;
= Mapping tasks to Grizzly milestones =&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
| '''Task''' &lt;br /&gt;
| '''Importance''' &lt;br /&gt;
|-&lt;br /&gt;
| Service Type definition &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| Plugin/Driver management &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| API Call Dispatching &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| PoC with dummy plugins &lt;br /&gt;
| High &lt;br /&gt;
|-&lt;br /&gt;
| PoC with LBaaS &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| APIs for service type management &lt;br /&gt;
| Undecided &lt;br /&gt;
|-&lt;br /&gt;
| Service types in Quantum DB &lt;br /&gt;
| Normal &lt;br /&gt;
|-&lt;br /&gt;
| Reworking some L3 capabilities as adv svc &lt;br /&gt;
| Undecided&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Neutron/ServiceInsertion&amp;diff=16129</id>
		<title>Neutron/ServiceInsertion</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Neutron/ServiceInsertion&amp;diff=16129"/>
				<updated>2013-02-16T22:22:12Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= WORK IN PROGRESS =&lt;br /&gt;
We are integrating all the information related to Services Insertion in only one wiki page&lt;br /&gt;
&lt;br /&gt;
= Services Insertion Model in Quantum =&lt;br /&gt;
* '''Launchpad Entries''':&lt;br /&gt;
&lt;br /&gt;
''''' [https://blueprints.launchpad.net/quantum/+spec/quantum-service-type services-type] '''''&lt;br /&gt;
&lt;br /&gt;
''''' [https://blueprints.launchpad.net/quantum/+spec/services-insertion-wrapper services-insertion-wrapper (folsom)] '''''&lt;br /&gt;
&lt;br /&gt;
* '''Contributors''': [https://launchpad.net/~salvatore-orlando Salvatore],[https://launchpad.net/~emagana Edgar Magana], [https://launchpad.net/~enikanorov Eugene], Ram Durairaj, Mani Ramasamy and Quantum Community.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This page contains the design spec for the service insertion blueprint. Despite being quite fleshed out the spec is not finalised yet, as some details are still subject to change, especially as far as the implementation plan is concerned. Please subscribe to this page to get every update, or check it as often as necessary.  The blueprint itself can be found at this address:&lt;br /&gt;
&lt;br /&gt;
This specification does not fully respects the blueprint template set for Quantum. This is because we are giving much more space to the design discussion. We will have another wiki page using the blueprint template once the design discussion is Finalized.&lt;br /&gt;
&lt;br /&gt;
== High level description ==&lt;br /&gt;
The ''service insertion'' feature aims at defining a framework for running L4/L7 network services on Quantum Logical Topologies. This framework will be immediately leveraged by the LBaaS effort; and in the near future by other advanced services which will be plugged into Quantum (for instance, VPN, and edge firewalls).&lt;br /&gt;
&lt;br /&gt;
== Defining Service Insertion ==&lt;br /&gt;
Before going in depth into design and implementation discussion, it might be worth to define in a detailed way what an advanced service is, and how it could be inserted in the Quantum logical topology. The diagram below show Quantum's basic network topology, with a logica router interconnecting internal and external networks; ports, which are used for VIF, DHCP server, router, and floating IP attachments are also shown in the diagram.&lt;br /&gt;
&lt;br /&gt;
[[Image:basic-topology.png]]&lt;br /&gt;
&lt;br /&gt;
From previous discussions it emerged that services can be inserted in the following modes:&lt;br /&gt;
&lt;br /&gt;
* Routed mode - Where the service is attached to a logical router, which then becomes a multi-service appliance.&lt;br /&gt;
&lt;br /&gt;
[[Image:routed-si.png]]&lt;br /&gt;
&lt;br /&gt;
* Floating Mode (In-path) - Where service runs in a standalone way. Please note that the &amp;quot;Floating&amp;quot; insertion is not automatically a network level insertion, as L3 routing might still occur. This mode has also been referred as &amp;quot;in-path or bump-in-the-wire&amp;quot; insertion.&lt;br /&gt;
&lt;br /&gt;
[[Image:in-path-si.png]]&lt;br /&gt;
&lt;br /&gt;
With reference to the diagram above, is is worth noting that an advanced service, even when inserted in floating mode, should still 'plug' into networks. In the example above, the service plugs into the external network and into an internal network. This should be reflected by ports on the relevant Quantum networks ''owned'' by the advanced service itself.&lt;br /&gt;
&lt;br /&gt;
* Re-directed Mode (Out-of-path) - Where the service also runs in a standalone way but in this case the traffic is first sent to the Router entity and then redirected to the Advanced Service, finally send it back to the routed with specific configuration. In particular, this model could be reduced to the first assuming that a standalone service is regarded as a peculiar case of router capable of providing only a specific service. This mode needs specific changes at the routing entity and may not be implemented in Grizzly release.&lt;br /&gt;
&lt;br /&gt;
[[Image:out-of-path-si.png]]&lt;br /&gt;
&lt;br /&gt;
All these three modes are not mutually exclusive. The diagram below shows how they can be combined. With reference to the diagram below, it is worth noting that the services inserted in routing and floating modes could have different implementations. This means for instance, that instances on the same Quantum networks could be load balanced using two different solutions.&lt;br /&gt;
&lt;br /&gt;
[[Image:mixnmatch-si.png]]&lt;br /&gt;
&lt;br /&gt;
== The Service Type concept ==&lt;br /&gt;
Just like the Quantum plugins allow for using several technologies for implementing the basic logical topologies, advanced services will use a similar mechanism. However, for advanced services, multiple different implementations of the same kind of service might co-exist in the same deployment. There are a number of reasons for this, most importantly the ability of giving tenants a choice among solutions. The '''Service Type''' concept tries to address the need for multiple, co-existing, service providers.&lt;br /&gt;
&lt;br /&gt;
A '''Service Type''' definitions might be regarded as list of services (and their providers) which can be offered to tenants. Each advanced service, regardless of its insertion mode, should be either directly or indirectly associated with a single service type.&lt;br /&gt;
&lt;br /&gt;
The Service Type resource might be described as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
ServiceType:&lt;br /&gt;
{&lt;br /&gt;
  id: uuid,&lt;br /&gt;
  name: string,&lt;br /&gt;
  service_definitions: list&amp;lt;ServiceDefinition&amp;gt;&lt;br /&gt;
  default: {True¦False} # Only one service_type could be the default one. This is the service type which should be picked if none is specified in the API (think backward compatibility)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ServiceDefinition:&lt;br /&gt;
{&lt;br /&gt;
  id: uuid,&lt;br /&gt;
  name: string,&lt;br /&gt;
  type: enum(LB, VPN, FW) # or whatever you think is right&lt;br /&gt;
  provider: string # This ultimately must map to a python class (perhaps through a configuration variable)&lt;br /&gt;
  capabilities: list of API extensions which are enabled for this specify service provider&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that the ''[[ServiceDefinition]]'' object might be regarded either as a resource of its own, or as a child resource of ''[[ServiceType]]''. The association between a service and a service type can happen in two ways, according to the insertion mode of the service.&lt;br /&gt;
&lt;br /&gt;
* ''Routed'' Insertion mode: The advanced service will be associated with Quantum logical router, which in turn is associated with a service_type resource;&lt;br /&gt;
&lt;br /&gt;
In order to ensure backward compatibility a default service type must be specified. This implies that all the services which will be inserted on a router will share the same service type.&lt;br /&gt;
&lt;br /&gt;
* ''Floating'' Insertion mode: The service type should be explicitly specified on the advanced service being created; if not, the default service type will be used.&lt;br /&gt;
&lt;br /&gt;
When an advanced service is created at the API layer one of the following two should be specified:&lt;br /&gt;
&lt;br /&gt;
# service_type_id # floating or out-of-path insertion&lt;br /&gt;
# router_id # routed or in-path insertion&lt;br /&gt;
&lt;br /&gt;
It should not be allowed to specify both parameters.&lt;br /&gt;
&lt;br /&gt;
The logical model for service insertion, augmented with the service type concept, is depicted in the following diagram:&lt;br /&gt;
&lt;br /&gt;
[[Image:svc-type.png]]&lt;br /&gt;
&lt;br /&gt;
The diagram shows a set of services deployed in routed mode (light blue), and a service deployed in floating mode (purple). Light blue and purple services are associated with different service types, which then can map to distinct implementations of the same services.&lt;br /&gt;
&lt;br /&gt;
== Dispatching calls to the plugins ==&lt;br /&gt;
The concept of service type implicitly allows for different paths for an API call, as it allows multiple providers to serve the same request. Eugene Nikanorov also addresses this topic in this wiki page: http://wiki.openstack.org/Quantum/ServiceIntegration&lt;br /&gt;
&lt;br /&gt;
There are two design alternatives to be considered:&lt;br /&gt;
&lt;br /&gt;
# A single plugin, augmented with the capability of serving requests for advanced services; call will then be redirected to provider-specific drivers.&lt;br /&gt;
# Multiple, self-contained plugins. Each plugin is specific to a given service provider and might implement one or more advanced service interfaces.&lt;br /&gt;
&lt;br /&gt;
For both design alternatives, it is pretty clear that each advanced service should have a 'service plugin interface', which is the plugin-side dual of the tenant-facing APIs. The core Quantum plugin similarly, defines a plugin interface that all plugins must implement.&lt;br /&gt;
&lt;br /&gt;
=== Single Plugin Approach ===&lt;br /&gt;
The diagram below show a Quantum Plugin which implements both core and advanced services interface. The plugin is capable of interpreting the service_type attribute, and dispatching the call to the appropriate, provider-specific driver.&lt;br /&gt;
&lt;br /&gt;
[[Image:single-plugin.png]]&lt;br /&gt;
&lt;br /&gt;
For this approach it should be possible to leverage the &amp;quot;mixin&amp;quot; mechanism which proved successful when integrating DHCP and L3 services. The possibility of augmenting the Quantum plugin with the capability of handling advanced services should definitely be allowed. In this case there will still be a single Quantum plugin; Appropriate ''service drivers'' should be specified in the configuration file. For each service multiple drivers might be specified; The service driver should not be seen as a driver for a specific appliance implementing the service. It is rather a driver managing the service for a given provider.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Plugins Approach ===&lt;br /&gt;
The diagram below show how service type are mapped to multiple plugins when adopting this approach. Each plugin implements an interface which is specific for the kind of service it implements. The API layer has a dispatcher component which forwards the call to the appropriate plugin, according to the service type associated with the advanced service specified at the API layer.&lt;br /&gt;
&lt;br /&gt;
[[Image:multi-plugin.png]]&lt;br /&gt;
&lt;br /&gt;
It is a Quantum principle that plugins are required only to implement the plugin interface. Hence they are not required to adopt the mixin mechanism; hence another aspect to consider is that there could be multiplie plugins at the same type, and the intelligence of dispatching a call to one plugin or another should reside in the API layer.&lt;br /&gt;
&lt;br /&gt;
In this case several plugins might be configured at the same time. The API layer will need to figure out, for each router and/or advanced service, to which plugin the API call should be dispatched. It is also worth noting that a plugin should not be constrained to implement a single advanced services. It might well be that plugins implement a set of services; this is particularly the case of plugins which will be interfaced with integrated services appliances or application delivery controllers.&lt;br /&gt;
&lt;br /&gt;
In this case the diagram above could be generalised as follow (the reference to the configuration file is an implementation detail at this stage):&lt;br /&gt;
&lt;br /&gt;
[[Image:multi-plugin-2.png]]&lt;br /&gt;
&lt;br /&gt;
=== Evaluation of pro and cons of both Approaches ===&lt;br /&gt;
The diagrams below depicts, at a very high level, the different flows of the single versus multiple plugins approaches. The single plugin approach is reported on the right, whereas the multiple plugin approach is reported on the left.&lt;br /&gt;
&lt;br /&gt;
[[Image:single-vs-multi.png]]&lt;br /&gt;
&lt;br /&gt;
* multiple plugins will require the API to manipulate data from different sources. Even if each plugin will return data in the same format, we will still need logic to handle collecting data from multiple sources on GET requests, and dispatching commands to the appropriate destination on POST/PUT/DELETE.&lt;br /&gt;
* currently all plugins already implement the &amp;quot;mixin&amp;quot; approach for augmenting the L2 feature with L3 and DHCP features. This mechanism could be extended.&lt;br /&gt;
* compatibility between plugins (not something we need to worry from day 1, but still an interesting problem)&lt;br /&gt;
* interactions among plugins; with a single plugin, the data model has all the information it needs. With multiple plugins will have to interact with the &amp;quot;base&amp;quot; plugin (or in some cases even among them); this could be achieved throughout the plugin interfaces.&lt;br /&gt;
* the single plugin, multiple drivers, model works very well when the Quantum database holds all the required information necessary to operate. This implies that items such as device management, resource allocation, and similars, are described using a model shared by all plugins. Although this might be mitigated by either introducing driver-specific extensions, or moving such capabilities in the driver, this is clearly a case in which the multiple plugins approach is preferred.&lt;br /&gt;
&lt;br /&gt;
== A few notes on the scope of this blueprint ==&lt;br /&gt;
This blueprint which focuses on:&lt;br /&gt;
&lt;br /&gt;
* Providing the infrastructure for allowing implementations of these services to serve API requests; multiple implementations for each class of service should be allowed to coexist at the same time in a Quantum deployment.&lt;br /&gt;
* Defining a set of API calls (as well supporting logic and data model) for defining which, where, and how services might be attached on the logical topology defined by the basic Quantum topology;&lt;br /&gt;
* Allowing providers of such services to expose implementation-specific service extensions and advertising them to API users.&lt;br /&gt;
&lt;br /&gt;
Defining which services might be inserted, and how they should be presented to tenants is beyond the scope of this blueprint. Activity is already ongoing for the Load Balancing service; for more information please refer to lbaas-* blueprints in the Quantum framework.&lt;br /&gt;
&lt;br /&gt;
Most of the concepts expressed in this blueprint are not new to the Quantum community and can be found in this wiki page authored by Edgar Magana from Cisco: http://wiki.openstack.org/QuantumServicesInsertion&lt;br /&gt;
&lt;br /&gt;
''Further notes (or what this design specification is not about):''&lt;br /&gt;
&lt;br /&gt;
* There might be scenarios where service insertion happens at network level, as shown in Sasha Ratkovic's presentation. For the scope of this blueprint we will consider only router-level insertion, assuming that network-level insertion could be reduced to a case in which the service is inserted on a router connected to a single network only.&lt;br /&gt;
* There are also definitely scenarios where service insertion happens at the port level; in this case the insertion might be simply represented by attributes applied to the port itself. For an example please refer to the proposed https://review.openstack.org/#/c/14262/.&lt;br /&gt;
* The concept of port group, presented by Sasha Ratkovic at the Openstack Design Summit is also outside of the scope of this blueprint.&lt;br /&gt;
* Whether advanced services will be realized as new resource (as described in the LBaaS proposal) or as policies (as described by Sasha Ratkovic proposal), is also beyond the scope of this blueprint.&lt;br /&gt;
&lt;br /&gt;
At this stage the careful reader might be wondering whether this blueprint is actually about anything. With all due honesty by defining a (small) set of items we want to address, and a (very large) of items that we definitely do not want to address, it might be argued that this blueprint is actually pretty well scoped, leaving a very thin, blurred, area of items which might or might not be addressed by it.&lt;br /&gt;
&lt;br /&gt;
= Work Tasks =&lt;br /&gt;
== API ==&lt;br /&gt;
The service insertion API might be implemented as a Quantum extension for the Grizzly release cycle, or be part of the core if there is a total agreement on it. Service insertion support will require the following changes in the Quantum API:&lt;br /&gt;
&lt;br /&gt;
* Service Type management. CRUD operations should be available on a [[ServiceType]] object.&lt;br /&gt;
* Regular tenants typically should be allowed to read only&lt;br /&gt;
* Administrators would have right to create, modify, and delete those object. Also, the provider attribute might be hidden in response returned to regular tenants.&lt;br /&gt;
&lt;br /&gt;
''Note'': default policy settings might always be overridden as they're specified in ''etc/policy.json''&lt;br /&gt;
&lt;br /&gt;
The Router resource should therefore be extended with the following attribute:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  services:service_type_id # which refers to service_type object&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each advanced service should allow for specifying either a service type id (for floating mode insertion) or a router_id (for routed mode insertion).&lt;br /&gt;
&lt;br /&gt;
If a router supports multiple services, the tenant might be given the ability of enabling or  disabling specific services on a router, in accordance with the service_type associated with the router. This feature might be used by tenants to keep advanced service usage within quota limits.&lt;br /&gt;
&lt;br /&gt;
* Option 1: Resource action    /routers/&amp;lt;router_id&amp;gt;/enable_service&lt;br /&gt;
** /routers/&amp;lt;router_id&amp;gt;/disable_service&lt;br /&gt;
* Option 2: List Attribute&lt;br /&gt;
* Option 3: Sub-Resource       POST /routers/&amp;lt;router_id&amp;gt;/enabled_services&lt;br /&gt;
&lt;br /&gt;
Option 1 is currently the preferred one, as it is consistent with &amp;quot;the Openstack way&amp;quot; of defining APIs executing actions on resources beyond the ones that can be expressed as HTTP methods.&lt;br /&gt;
&lt;br /&gt;
== Service Configuration ==&lt;br /&gt;
The configuration file should contains references to the drivers/plugins corresponding to the various advanced services. These information will be used by the plugin manager.&lt;br /&gt;
&lt;br /&gt;
The configuration file might also contain service type definitions, which could alternatively be stored in the Quantum 'core' database (see section on Data Model Changes).&lt;br /&gt;
&lt;br /&gt;
== Plugin Manager ==&lt;br /&gt;
A mechanism for loading multiple plugins will be required for the multi-plugin approach. The [[PluginAwareExtensionManager]] does not manage plugin loading, but some work will be required on it for handling plugin-specific API extensions, as it currently assumes that there's only a single plugin.&lt;br /&gt;
&lt;br /&gt;
== Data Model Changes ==&lt;br /&gt;
ServiceType definition, if modeled into the Quantum DB will require two model classes. The ServiceType class will have a 1:n relationship with the ServiceDefinition class. This class will have an attribute for defining the type of the advanced services provider. This could either be another class in the model or extracted from the Quantum configuration file.&lt;br /&gt;
&lt;br /&gt;
ServiceProvider definition could as well be either another model class or information extracted from the configuration file.&lt;br /&gt;
&lt;br /&gt;
== Changes to the basic plugin Interface ==&lt;br /&gt;
The service insertion feature will add a new interface which might be implemented as a new mixin to be inherited by the &amp;quot;core&amp;quot; plugin (a completely standalone class is a viable alternative, albeit less straightforward)&lt;br /&gt;
&lt;br /&gt;
== Managing API dispatching ==&lt;br /&gt;
This task is about implementing the single plugin/multiple drivers or multi-plugin approaches, as discussed earlier in this spec document.&lt;br /&gt;
&lt;br /&gt;
= Potential changes to the current implementation =&lt;br /&gt;
# Floating IPs: despite being shipped with Folsom, this feature might actually be regarded as an 'advanced service', and should probably fit in the service insertion framework.&lt;br /&gt;
# External Gateway: This might be possibly be regarded as an advanced service too. For instance, a SNAT service.&lt;br /&gt;
# DHCP:  think about how the DHCP service we implement today through the agent fits in the service insertion model. We are not exposing specifically any DHCP API, creating implicitly an instance of this service for each subnet for which ''dhcp_enable=True''. We can either leave DHCP as it is, or include it in the service insertion model.&lt;br /&gt;
&lt;br /&gt;
NOTE: For the cases listed above it is very important to preserve backward compatibility.&lt;br /&gt;
&lt;br /&gt;
= POC Proposal =&lt;br /&gt;
A POC of the service insertion model could be offered regardless of actual advanced services being implemented on top of Quantum. This POC might use 'dummy' advanced services plugins. Another options would be reworking the Floating IP and possibly also the external gateway concepts as advanced services and use them for the PoC.&lt;br /&gt;
&lt;br /&gt;
= Mapping tasks to Grizzly milestones =&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
| '''Task''' &lt;br /&gt;
| '''Importance''' &lt;br /&gt;
|-&lt;br /&gt;
| Service Type definition &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| Plugin/Driver management &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| API Call Dispatching &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| PoC with dummy plugins &lt;br /&gt;
| High &lt;br /&gt;
|-&lt;br /&gt;
| PoC with LBaaS &lt;br /&gt;
| Essential &lt;br /&gt;
|-&lt;br /&gt;
| APIs for service type management &lt;br /&gt;
| Undecided &lt;br /&gt;
|-&lt;br /&gt;
| Service types in Quantum DB &lt;br /&gt;
| Normal &lt;br /&gt;
|-&lt;br /&gt;
| Reworking some L3 capabilities as adv svc &lt;br /&gt;
| Undecided&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Rebuildforvms&amp;diff=16092</id>
		<title>Rebuildforvms</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Rebuildforvms&amp;diff=16092"/>
				<updated>2013-02-16T22:06:51Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* '''Launchpad Entry''': [[NovaSpec]]:rebuild-for-ha&lt;br /&gt;
* '''Created''': 2011-Nov-30&lt;br /&gt;
* '''Contributors''': Jason Kim&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Support HA for vms from the failed host.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
When this is implemented, VMs will be rebuilt from failed host to the other hosts.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
If the host is failed, we can't run the current vms on the host. &lt;br /&gt;
That is to say, we can't HA for vms.&lt;br /&gt;
I solved the HA using the rebuild means.&lt;br /&gt;
&lt;br /&gt;
Below steps will be added.&lt;br /&gt;
&lt;br /&gt;
1) get the information of instances on the failed host.&lt;br /&gt;
- we can know the state of host by using monitoring system or using the service state (nova-compute, nova-network)&lt;br /&gt;
&lt;br /&gt;
2) get a list of dictionaries of network data of an instance.&lt;br /&gt;
&lt;br /&gt;
3) update the volume db and instance db. &lt;br /&gt;
&lt;br /&gt;
4) setup volumes for block device mapping&lt;br /&gt;
&lt;br /&gt;
5) spawn the instance.&lt;br /&gt;
&lt;br /&gt;
6) associate the floating ip which is used existing the instances.&lt;br /&gt;
   - set up the iptables and so on.&lt;br /&gt;
&lt;br /&gt;
7) update the instance db.&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
* User doesn't know the vm is rebuilt.&lt;br /&gt;
* Operator gets the list of failed host from monitoring system or nova network/compute state.&lt;br /&gt;
* Operator gets the lists of the instances on the failed hosts.&lt;br /&gt;
* Operator should rebuild the instances by using this operation.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
The instances were created with volumes attached.&lt;br /&gt;
&lt;br /&gt;
* [https://blueprints.launchpad.net/nova/+spec/auto-create-boot-volumes auto-create-boot-volumes]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
[[Image:rebuild_for_vm_concept.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
* Scheduler should call the compute manager to rebuild the instance.&lt;br /&gt;
* Compute Manager should get a list of dictionaries of network data of an instance.&lt;br /&gt;
* Compute Manager should update the volume db and instance db.&lt;br /&gt;
* Compute Manager should setup volumes for block device mapping by using the volume manager.&lt;br /&gt;
* Compute Manager should spawn the instance by using the virt driver.&lt;br /&gt;
* Compute Manager should associate the floating ip by using the network manager.&lt;br /&gt;
* Compute Manager should update the instance db.&lt;br /&gt;
* Compute Manager should restart the network module.&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
* /usr/bin/nova-manage&lt;br /&gt;
* /nova/compute/api.py, vm_states.py, task_state.py, manager.py&lt;br /&gt;
* /nova/api/openstack/common.py&lt;br /&gt;
* /nova/network/api.py, manager.py&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
This need not be added or completed until the specification is nearing beta.&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=FederatedAuthZwithZones&amp;diff=16090</id>
		<title>FederatedAuthZwithZones</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=FederatedAuthZwithZones&amp;diff=16090"/>
				<updated>2013-02-16T22:05:18Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* '''Launchpad Entry''': [[NovaSpec]]:nova-zones-federated-authz&lt;br /&gt;
* '''Created''': [[SandyWalsh]]&lt;br /&gt;
* '''Contributors''': &lt;br /&gt;
* '''Related''': [[ZonesOauth]] http://etherpad.openstack.org/nova-oauth&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
In the current Zones implementation, all operations to child zones are done with an admin account. While this works, it causes problems in certain important use cases. Specifically when a user wishes to see all the instances that he may manage. With the admin-account approach, all instances in child zones are returned when only a subset should be (depending in the users rights). &lt;br /&gt;
&lt;br /&gt;
This page is the culmination of discussions with eday, vish, jorge, khaled and others and attempts to summarize the problems that may arise in other use cases as well as documenting the proposals currently underway for solving them.&lt;br /&gt;
&lt;br /&gt;
== Revision History ==&lt;br /&gt;
# First draft - AuthZ servers communicated and synced. [[MyCo]] users were actively added to Resource Groups.&lt;br /&gt;
# Realized that SP AuthZ doesn't need to know about users, just Resource Groups. Introduced concept of Behalf Of. Removed AuthZ sync.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
This will be the common scenario for the bulk of these use cases. &lt;br /&gt;
&lt;br /&gt;
[[MyCo]] is a small software development shop. They have a Nova deployment made up of two Zones (parent and child). When these two zones are incapable of providing more instances, [[MyCo]] outsources to Service Provider (SP) to handle the extra work. SP is large and has many Zones geographically separated and nested many levels deep. &lt;br /&gt;
&lt;br /&gt;
There are two main users in our use cases: Alice and Bob. Alice manages her own instances, as does Bob. However, Alice and Bob are also members of a Financial Task Force which gives them the ability to manage any instances under that groups control.&lt;br /&gt;
&lt;br /&gt;
There will be one set of AuthN and AuthZ services per business. [[MyCo]] has it's own AuthN/Z service as does SP. These Auth services will need to be Highly Available.&lt;br /&gt;
&lt;br /&gt;
Whenever a user is added/removed from a security group or permissions changed they are done on the [[MyCo]] side. Only the Resource Group ID's are passed to the SP. &lt;br /&gt;
&lt;br /&gt;
After authenticating, the [[MyCo]] AuthZ will supply a set of data to SP regarding the User. This set of data includes: &lt;br /&gt;
* The Resource Group ID's that the user belongs to (and not the Resource ID's within that group, that data only lives in [[MyCo]] AuthZ)&lt;br /&gt;
* Optionally, a Resource Group ID that the user is acting on Behalf Of.&lt;br /&gt;
* A set of Permission Tuples ([Action Group, ...], [Resource Group, ...]) of the actions the User can perform on which Resource Groups.&lt;br /&gt;
&lt;br /&gt;
For child zones within the same business (ie. all the child zones in Service Provider) group ID's and resource ID's will have to be unique across Zones. &lt;br /&gt;
&lt;br /&gt;
In a multi-tenant scenario such as Service Provider, the Group identifiers passed from one AuthZ system to another will need to be prefixed/namespaced to avoid collisions.&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCaseOverview.gif]]&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
* [[MyCo]].authZ = The AuthZ service running at [[MyCo]]&lt;br /&gt;
* SP.authZ = The AuthZ service running at the Service Provider&lt;br /&gt;
* Subject = The user performing the action.&lt;br /&gt;
* Delegate = A user performing an action on behalf of another user.&lt;br /&gt;
* Subject Group = A group of users or delegates.&lt;br /&gt;
* Action = The verb being performed on the resource. Such as: boot, halt, pause, rescue, migrate, view, delete, etc.&lt;br /&gt;
* Action Group = A collection of Actions.&lt;br /&gt;
* Resource = The object the Subject is performing the Action on (aka 'Object' in our previous discussions)&lt;br /&gt;
* Resource Group = A group of Resources.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
After authenticating Alice with the Service Provider Zones, [[MyCo]].authZ will supply SP.authZ with a set if ''Permission Tuples'' that indicate which operations Alice may perform and which Resources she may perform them on (where applicable). These tuples have the mapping (Action_Groups, Resource_Groups). Note that Subject is implied here since the User had to previously authenticate with the system to gain access. &lt;br /&gt;
&lt;br /&gt;
Side note: There was a discussion of having the tuple be (Action_Group, User_Group) where User_Group was a collection of Users that owned resources. The downside with this approach is it's not fine-grained enough. For example, if Bob has permissions (can_halt, [Alice]) then he can halt ''all'' instances owned by Alice. That's too much privilege. Additionally, the difference between tracking a User_Group and a Resource_Group is nominal. Tracking a Resource_Group closer aligns with &lt;br /&gt;
&lt;br /&gt;
We don't want the tuples to be so fine grained that we are listing individual instance ID's ... it won't scale to thousands of instances. While it would be easier, we don't want permission tuples of (Action_Group, [Resources ID's]) like (can_halt, [ami-AAA, ami-BBB, ami-CCC, ...]). Instead we need to define a Group of resources at the SP.authZ layer and simply refer to it in our permission tuples. &lt;br /&gt;
&lt;br /&gt;
How? In order to do this, [[MyCo]].authZ needs to keep SP.authZ updated with a discrete set of Resource Groups.&lt;br /&gt;
&lt;br /&gt;
[[MyCo]].authZ will have many Resource Groups and much of the contents of these Resource Groups will contain resources that live in [[MyCo]] Zones. We don't need to replicate all of this information to SP.authZ ... only a subset of the group that references resources that live in SP Zones. For example, Bob's permitted groups on the [[MyCo]].authZ side may look like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
(Bob, [can_halt, can_see, can_boot, ...], [myco-Foo-group, myco-Bar-group, myco-Zoo-group, sp-Alice-group, sp-Bob-group sp-Finance-group])&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
but when passing this on to SP.authZ only the following is required:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
([can_halt, can_see, can_boot, ...], [sp-Alice-group, sp-Bob-group sp-Finance-group])&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can think of this as a formalization of the &amp;quot;override&amp;quot; capability in the authn/z branch proposed by vish &amp;amp; termie. &lt;br /&gt;
&lt;br /&gt;
[[Image:SyncAuthZ.gif]]&lt;br /&gt;
&lt;br /&gt;
=== On Behalf Of ===&lt;br /&gt;
One complexity we have is creating new Resources on the SP side. We want to make sure we assign the correct Resource Group to the Resource. There are a couple of possibilities:&lt;br /&gt;
# When the user authenticates we add a &amp;quot;On-Behalf-Of=&amp;lt;Resource Group ID&amp;gt;&amp;quot; header, which indicates how new resources should be assigned. This may be tricky to pre-determine.&lt;br /&gt;
# We always create a new Resource Group when creating new Resources and later, as needed, nest this Resource Group in other Resource Groups for granting permissions.&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Migration ===&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
http://paste.openstack.org/show/1108/&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=EfficientVolumesFromImage&amp;diff=16088</id>
		<title>EfficientVolumesFromImage</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=EfficientVolumesFromImage&amp;diff=16088"/>
				<updated>2013-02-16T22:04:27Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* '''Launchpad Entry''': [[NovaSpec]]:efficient-volumes-from-images&lt;br /&gt;
* '''Created''': 03 April 2012&lt;br /&gt;
* '''Contributors''': Josh Durgin, Tommi Virtanen&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Make volume (and instance) creation fast if Nova volumes and Glance&lt;br /&gt;
use the same storage backend, and the storage backend supports it.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
&lt;br /&gt;
Instance and volume creation can take advantage of underlying storage&lt;br /&gt;
to be more efficient in space and time.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
Storage systems offer a number of features that can save space and&lt;br /&gt;
time when storing both images and volumes:&lt;br /&gt;
&lt;br /&gt;
* features like copy-on-write can be used to make volume (and instance creation) near-instantaneous and save space&lt;br /&gt;
* deduplication can happen on images and volumes together, reducing hardware requirements&lt;br /&gt;
* administrators only have to maintain one storage system&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
&lt;br /&gt;
User creates a bunch of new instances that have no ephemeral disks,&lt;br /&gt;
but are all based on the same image. This happens very quickly due to&lt;br /&gt;
a shared underlying storage system, and requires very little extra&lt;br /&gt;
space.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
Depends on&lt;br /&gt;
[https://blueprints.launchpad.net/nova/+spec/create-volume-from-image create-volume-from-image]&lt;br /&gt;
and a way to query Glance about the backing store of an image.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
[[Image:cow_volume_from_image.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
There are two parts that are volume backend dependent:&lt;br /&gt;
&lt;br /&gt;
# determining whether a given image is stored on the same backend as volumes&lt;br /&gt;
# efficiently creating a volume based on the image&lt;br /&gt;
&lt;br /&gt;
These can both be optional volume driver methods - something like&lt;br /&gt;
`def cloneable(image_info)` and `def clone(image_info, volume_name)` - if they aren't implemented, or cloneable returns&lt;br /&gt;
false, fallback to the open/write/close api from&lt;br /&gt;
[https://blueprints.launchpad.net/nova/+spec/create-volume-from-image create-volume-from-image].&lt;br /&gt;
&lt;br /&gt;
=== Migration ===&lt;br /&gt;
&lt;br /&gt;
No database or core API changes.&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
&lt;br /&gt;
This need not be added or completed until the specification is nearing beta.&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
&lt;br /&gt;
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16087</id>
		<title>UnifiedInstrumentationMetering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16087"/>
				<updated>2013-02-16T22:03:46Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Unified Instrumentation and Metering =&lt;br /&gt;
&lt;br /&gt;
Last edit: -- [[SandyWalsh]] &lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Ceilometer&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Tach&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[StackTach]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, there are some very cool initiatives going on around instrumentation and metering/monitoring within [[OpenStack]] today. &lt;br /&gt;
&lt;br /&gt;
However, due to the incredible speed of development within [[OpenStack]] many of these efforts have been performed in isolation from each other. Now, we are reaching a level of maturity which demands we stop reinventing the wheel and agree upon some shared infrastructure. This need is necessary for a variety of reasons:&lt;br /&gt;
&lt;br /&gt;
# We want to make it easier for new projects to build on the existing [[OpenStack]] notification message bus.&lt;br /&gt;
# Less code is good. We shouldn't need three different workers for extracting notifications from [[OpenStack]].&lt;br /&gt;
# Notifications are large and there's a lot of them. We only want to process and store that data once. &lt;br /&gt;
# Archiving of data is a common problem, we shouldn't need several different ways of doing it.&lt;br /&gt;
&lt;br /&gt;
In this document we'll talk about the State-of-Art with respect to Instrumentation/Metering/Monitoring (IMM) with [[OpenStack]] today and where we might go with it.&lt;br /&gt;
&lt;br /&gt;
Required reading / viewing:&lt;br /&gt;
* http://www.openstack.org/summit/san-diego-2012/openstack-summit-sessions/presentation/what-about-billing-an-introduction-to-ceilometer&lt;br /&gt;
* http://www.sandywalsh.com/2012/10/debugging-openstack-with-stacktach-and.html&lt;br /&gt;
* https://etherpad.openstack.org/grizzly-common-instrumentation (good summary of instrumentation needs)&lt;br /&gt;
&lt;br /&gt;
= Instrumentation vs Metering/Monitoring =&lt;br /&gt;
&lt;br /&gt;
At the very base of this discussion is having a clear understanding of the difference between Instrumentation and Metering/Monitoring. &lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
Think of instrumentation as the way they test electronics in-circuit. While the device is running, probes are attached to the circuit board and measurements are taken. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation.png]]&lt;br /&gt;
&lt;br /&gt;
There are some key things to consider in this analogy:&lt;br /&gt;
* Every technician may want to place their probes in different locations. &lt;br /&gt;
* Probes might be placed for long term measuring or transient (&amp;quot;I wonder if ... &amp;quot; scenarios)&lt;br /&gt;
* The circuit does not have to change for the testing probes to be placed. No other groups or departments had to be involved for this instrumentation to occur.&lt;br /&gt;
* The same probe technology can be used on other circuit boards. Likewise, our instrumentation probe-placement technology should not just be geared towards Nova. It should also work with all other parts of [[OpenStack]].&lt;br /&gt;
* When the circuit changes our probe placement may have to change. We have to be aware of that.&lt;br /&gt;
* The probes aren't perfect. They might slip off or have a spotty connection. We're looking for trends here, identifying when things are slow or flaky.  &lt;br /&gt;
* With respect to Python, we may be interested in stack traces as well. Not just single function timings/counts.&lt;br /&gt;
&lt;br /&gt;
== Metering / Monitoring ==&lt;br /&gt;
Metering is watching usage of the system, usually for the purposes of Billing. Monitoring is watching the system for critical system changes, performance and accuracy, usually for things like SLA's.&lt;br /&gt;
&lt;br /&gt;
Think of your power meter. You can go outside and watch the dial spin and confirm your monthly bill jives with what the meter is reporting.&lt;br /&gt;
&lt;br /&gt;
[[Image:metering.png]]&lt;br /&gt;
&lt;br /&gt;
The important aspects of metering and monitoring:&lt;br /&gt;
* These events/measurements are critical. We cannot risk dropping an event.&lt;br /&gt;
* We need to ensure these events are consistent between releases. Their consistency should be considered of equal importance as [[OpenStack]] API consistency.&lt;br /&gt;
* We have no idea how people are going to want to use these events, but we can safely assume there will be a lots of other groups interested in them. We don't want these groups talking to the production [[OpenStack]] deployments directly.&lt;br /&gt;
* These events may not be nearly as frequent as the instrumentation messages, but they will be a lot larger since the entire context of the message needs to be included (''which'' instance, ''which'' image, ''which'' user, etc)&lt;br /&gt;
&lt;br /&gt;
= The State-of-the-Art =&lt;br /&gt;
&lt;br /&gt;
So, where are we?&lt;br /&gt;
&lt;br /&gt;
== Instrumentation Today ==&lt;br /&gt;
&lt;br /&gt;
There is no formal instrumentation solution for [[OpenStack]] today (other than logging). Logging is insufficient because it's:&lt;br /&gt;
* unstructured text&lt;br /&gt;
* too much effort to scan, parse and correlate across servers&lt;br /&gt;
* requires code changes to collect new information&lt;br /&gt;
&lt;br /&gt;
Rackspace has being using a cocktail of [https://github.com/ohthree/tach Tach], [https://github.com/etsy/statsd Statsd], [http://graphite.wikidot.com/ Graphite] and [http://www.nagios.org/ Nagios] to great success for close to a year. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation_arch.gif]]&lt;br /&gt;
&lt;br /&gt;
Tach is a library that collects timing/count data from anywhere in a Python program. It's not specific to [[OpenStack]], but it has pre-canned config files for the main [[OpenStack]] services. Tach hooks into a programming using monkey-patching and has a concept of Metrics and Notifiers. The Metrics are user-extensible hooks that pull data from the code. The Notifiers take the collected data and send it somewhere. Currently there are Metrics drivers for execution time and counts as well as Notifiers for Statsd, Graphite directly, print and log files. ([[SandyWalsh]] has been working on a replacement for Tach, called [https://github.com/SandyWalsh/scrutinize Scrutinize] which adds cProfile support and easier configuration. It's almost ready for prime-time.)&lt;br /&gt;
&lt;br /&gt;
Tach is launched as: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;tach tach.conf nova-compute nova.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ... so it easily integrates with existing deployments.&lt;br /&gt;
&lt;br /&gt;
The powerful features of statsd are:&lt;br /&gt;
* UDP based messaging, so production is not at risk if the collectors die.&lt;br /&gt;
* In-memory rollup/aggregate of measurements that get relayed to Graphite. This greatly enhances scalability. &lt;br /&gt;
* Written in node.js = fast, fast, fast.&lt;br /&gt;
&lt;br /&gt;
== Monitoring/Metering Today ==&lt;br /&gt;
&lt;br /&gt;
Certainly the face of Monitoring and Metering within [[OpenStack]] today is [https://launchpad.net/ceilometer Ceilometer] ... I'll just refer you to that project for more details.&lt;br /&gt;
&lt;br /&gt;
But there are others. Within Rackspace we use [https://github.com/rackspace/yagi YAGI] to consume the notifications and send them to our internal billing system. Specifically, this data is sent to [http://atomhopper.org/ AtomHopper] where it is turned into an Atom feed for other consumers (one of which is billing). YAGI used to have [https://code.google.com/p/pubsubhubbub/ PubSubHubBub] support, but that's gone dormant due to other motivators. Now, [[AtomHopper]] is the redistribution system of choice. Sadly, [[AtomHopper]] is Java-based, so it may not work well within the [[OpenStack]] ecosystem, per se. The YAGI Worker uses [https://github.com/ask/carrot/ carrot] and has been highly reliable in all of our environments, but there has been discussion of moving to [http://pypi.python.org/pypi/kombu kombu].&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is a debugging/monitoring tool based on [[OpenStack]] notifications and it too has its own Worker. It is kombu-based and is currently used in production. We've had lots of problems making the stacktach worker reliable but we think the problem has been with combining a threading model with eventlet. Our new scheme uses the multiprocessing library with per-rabbit workers. This is currently being stress tested, stay tuned. We've tried a variety of other schemes and library combinations with little success (more detail if needed). Note: this ''should'' work fine since it's the same scheme Nova uses internally.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is quickly moving into Metrics, SLA and Monitoring territory with version 2 and the inclusion of Stacky (the command line interface to [[StackTach]])&lt;br /&gt;
&lt;br /&gt;
 [[Image:notifications.gif]]&lt;br /&gt;
&lt;br /&gt;
= The Layers =&lt;br /&gt;
&lt;br /&gt;
With every architecture there are different layers of abstraction/functionality. &lt;br /&gt;
&lt;br /&gt;
IMM has:&lt;br /&gt;
* ''low-level'' components that directly interface with [[OpenStack]] via monkeypatching or notification consumption.&lt;br /&gt;
* ''mid-level'' components that collect, aggregate and redistribute this collected data to other consumers&lt;br /&gt;
* ''high-level'' components that act as the presentation layer. &lt;br /&gt;
&lt;br /&gt;
We currently have overlap on all levels.&lt;br /&gt;
&lt;br /&gt;
[[Image:layers.gif]]&lt;br /&gt;
&lt;br /&gt;
== Unifying the Low Level ==&lt;br /&gt;
&lt;br /&gt;
There is really no way to unify the instrumentation collection with the metrics collection infrastructure within [[OpenStack]]. As stated in the introduction, these are very different animals.&lt;br /&gt;
&lt;br /&gt;
With respect to Monitoring and Metering (notification consumption), the obvious candidate is the notification worker. Using a list of queues in the rabbit notifier is not a solution, it's a big load on the rabbit server. &lt;br /&gt;
&lt;br /&gt;
  ''Note: we're also using AMQP incorrectly for notifications. Events are published to an Exchange and different queues can be created for different consumers. Currently, [[OpenStack]] creates a different Exchange for each notification destination. This should simply a bug that should be fixed.''&lt;br /&gt;
&lt;br /&gt;
This is the low-hanging fruit. Creating a scalable worker that can work in a multi-rabbit (multi-cell, mult-region) deployment. It should support a pluggable scheme for handling the collected data and support failover/redundancy. The worker has to be fast/reliable enough to keep the notification queue empty since this is easily the fastest growing queue (neck and neck with the cells capacity update queue :)&lt;br /&gt;
&lt;br /&gt;
The worker should be a separate repository so others can use it standalone.&lt;br /&gt;
&lt;br /&gt;
Also, the Ceilometer worker doesn't need to use all of the nova-common code. This is very simple program and can be handled with a single file. &lt;br /&gt;
&lt;br /&gt;
== Unifying the Mid-Level ==&lt;br /&gt;
&lt;br /&gt;
 [[Image:architecture.gif]]&lt;br /&gt;
&lt;br /&gt;
=== A Common Database for Collected Data ===&lt;br /&gt;
&lt;br /&gt;
For metering and monitoring, both [[StackTach]] and Ceilometer have a database to store the notifications. [[StackTach]] uses a SQL-based database, while Ceilometer uses a key-value database (Mongo). Each notification is large and contains about ten columns that are required to have fast lookup:&lt;br /&gt;
* Deployment ID&lt;br /&gt;
* Tenant ID&lt;br /&gt;
* UUID&lt;br /&gt;
* Request ID&lt;br /&gt;
* Timestamp&lt;br /&gt;
* Instance State&lt;br /&gt;
* Instance Task&lt;br /&gt;
* Publisher&lt;br /&gt;
* Host ID&lt;br /&gt;
* Event name&lt;br /&gt;
&lt;br /&gt;
Additionally the entire JSON payload should be stored for the event for consumers that need something specific.&lt;br /&gt;
&lt;br /&gt;
I have no recommendation on which db to use, but perhaps some load testing should be performed to see how well each works. The important thing is, the entire event gets stored. &lt;br /&gt;
&lt;br /&gt;
However, as these events get collected, there are often additional tables that need to get updated which contain aggregated/summarized information from the events. While these operations could be done in a batch fashion in a separate database it's likely more efficient to provide a means for other applications to hook into the data collection and update these tables in real-time. This is what [[StackTach]] does and it greatly reduces the post-processing required. It does, however, come at a cost of additional processing when event storage is being performed (an expensive operation). Something like Ceilometer's secondary publishing step seems a good solution here, but I think it should be based on an [[AtomHopper]]/PSHB approach vs something proprietary. We should discuss what redistribution system looks like in greater detail. &lt;br /&gt;
&lt;br /&gt;
In the diagram above Ext1, Ext2, Ext3 are user-plugins for doing special aggregation work. (not for sending to the redistribution system, another plugin mechanism could handle that)&lt;br /&gt;
&lt;br /&gt;
For instrumentation, as mentioned above, the statsd in-memory database is a perfect solution here. Probably not much to improve on here.&lt;br /&gt;
&lt;br /&gt;
=== A Common Event Redistribution System ===&lt;br /&gt;
&lt;br /&gt;
As mentioned earlier, we use [[AtomHopper]] internally (and YAGI w/PSHB previously), but it would be nice to use an off-the-shelf framework, ideally something Python-based. This too should be a separate repo and, ideally, optional.&lt;br /&gt;
&lt;br /&gt;
In the [[DreamHost]] use case, The Dude should consume from the [[AtomHopper]] feed based on webhooks vs. having to poll the Ceilometer API for updates.&lt;br /&gt;
&lt;br /&gt;
=== Alerts / Set Points / Thresholds ===&lt;br /&gt;
&lt;br /&gt;
Personally, I don't think this belongs in the Middle Layer ... external components should define/monitor/control these.&lt;br /&gt;
&lt;br /&gt;
== Unifying the Top Layer ==&lt;br /&gt;
Every client is different, trying to service the needs of each user with a common user interface might be tricky. [[StackTach]] started as a debugging tool and targets that audience. A Billing tool will need a very different UI. &lt;br /&gt;
&lt;br /&gt;
There are lots of off-the-shelf products available for the presentation of instrumentation data, we shouldn't need to reinvent that wheel.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] and Stacky should both consume from the Ceilometer API.&lt;br /&gt;
&lt;br /&gt;
== Other Improvements ==&lt;br /&gt;
&lt;br /&gt;
* Remove the Compute service that Ceilometer uses and integrate the existing fanout compute notifications into the data collected by the workers. There's no need for yet-another-worker. That said, I'm sure there are specific things that certain deployments will need that aren't covered by this and the existing Ceilometer collector system will still be needed.&lt;br /&gt;
* [[StackTach]] has taken major steps in optimizing its REST interface to facilitate caching. The data in the middle layer is largely read-only and there are far more readers than writers. The Ceilometer API should consider these improvements (if it's not dealt with already and I missed it)&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16086</id>
		<title>UnifiedInstrumentationMetering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16086"/>
				<updated>2013-02-16T22:02:19Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= Unified Instrumentation and Metering =&lt;br /&gt;
&lt;br /&gt;
Last edit: -- [[SandyWalsh]] &lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Ceilometer&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Tach&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[StackTach]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, there are some very cool initiatives going on around instrumentation and metering/monitoring within [[OpenStack]] today. &lt;br /&gt;
&lt;br /&gt;
However, due to the incredible speed of development within [[OpenStack]] many of these efforts have been performed in isolation from each other. Now, we are reaching a level of maturity which demands we stop reinventing the wheel and agree upon some shared infrastructure. This need is necessary for a variety of reasons:&lt;br /&gt;
&lt;br /&gt;
# We want to make it easier for new projects to build on the existing [[OpenStack]] notification message bus.&lt;br /&gt;
# Less code is good. We shouldn't need three different workers for extracting notifications from [[OpenStack]].&lt;br /&gt;
# Notifications are large and there's a lot of them. We only want to process and store that data once. &lt;br /&gt;
# Archiving of data is a common problem, we shouldn't need several different ways of doing it.&lt;br /&gt;
&lt;br /&gt;
In this document we'll talk about the State-of-Art with respect to Instrumentation/Metering/Monitoring (IMM) with [[OpenStack]] today and where we might go with it.&lt;br /&gt;
&lt;br /&gt;
Required reading / viewing:&lt;br /&gt;
* http://www.openstack.org/summit/san-diego-2012/openstack-summit-sessions/presentation/what-about-billing-an-introduction-to-ceilometer&lt;br /&gt;
* http://www.sandywalsh.com/2012/10/debugging-openstack-with-stacktach-and.html&lt;br /&gt;
* https://etherpad.openstack.org/grizzly-common-instrumentation (good summary of instrumentation needs)&lt;br /&gt;
&lt;br /&gt;
= Instrumentation vs Metering/Monitoring =&lt;br /&gt;
&lt;br /&gt;
At the very base of this discussion is having a clear understanding of the difference between Instrumentation and Metering/Monitoring. &lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
Think of instrumentation as the way they test electronics in-circuit. While the device is running, probes are attached to the circuit board and measurements are taken. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation.png]]&lt;br /&gt;
&lt;br /&gt;
There are some key things to consider in this analogy:&lt;br /&gt;
* Every technician may want to place their probes in different locations. &lt;br /&gt;
* Probes might be placed for long term measuring or transient (&amp;quot;I wonder if ... &amp;quot; scenarios)&lt;br /&gt;
* The circuit does not have to change for the testing probes to be placed. No other groups or departments had to be involved for this instrumentation to occur.&lt;br /&gt;
* The same probe technology can be used on other circuit boards. Likewise, our instrumentation probe-placement technology should not just be geared towards Nova. It should also work with all other parts of [[OpenStack]].&lt;br /&gt;
* When the circuit changes our probe placement may have to change. We have to be aware of that.&lt;br /&gt;
* The probes aren't perfect. They might slip off or have a spotty connection. We're looking for trends here, identifying when things are slow or flaky.  &lt;br /&gt;
* With respect to Python, we may be interested in stack traces as well. Not just single function timings/counts.&lt;br /&gt;
&lt;br /&gt;
== Metering / Monitoring ==&lt;br /&gt;
Metering is watching usage of the system, usually for the purposes of Billing. Monitoring is watching the system for critical system changes, performance and accuracy, usually for things like SLA's.&lt;br /&gt;
&lt;br /&gt;
Think of your power meter. You can go outside and watch the dial spin and confirm your monthly bill jives with what the meter is reporting.&lt;br /&gt;
&lt;br /&gt;
[[Image:metering.png]]&lt;br /&gt;
&lt;br /&gt;
The important aspects of metering and monitoring:&lt;br /&gt;
* These events/measurements are critical. We cannot risk dropping an event.&lt;br /&gt;
* We need to ensure these events are consistent between releases. Their consistency should be considered of equal importance as [[OpenStack]] API consistency.&lt;br /&gt;
* We have no idea how people are going to want to use these events, but we can safely assume there will be a lots of other groups interested in them. We don't want these groups talking to the production [[OpenStack]] deployments directly.&lt;br /&gt;
* These events may not be nearly as frequent as the instrumentation messages, but they will be a lot larger since the entire context of the message needs to be included (''which'' instance, ''which'' image, ''which'' user, etc)&lt;br /&gt;
&lt;br /&gt;
= The State-of-the-Art =&lt;br /&gt;
&lt;br /&gt;
So, where are we?&lt;br /&gt;
&lt;br /&gt;
== Instrumentation Today ==&lt;br /&gt;
&lt;br /&gt;
There is no formal instrumentation solution for [[OpenStack]] today (other than logging). Logging is insufficient because it's:&lt;br /&gt;
* unstructured text&lt;br /&gt;
* too much effort to scan, parse and correlate across servers&lt;br /&gt;
* requires code changes to collect new information&lt;br /&gt;
&lt;br /&gt;
Rackspace has being using a cocktail of [https://github.com/ohthree/tach Tach], [https://github.com/etsy/statsd Statsd], [http://graphite.wikidot.com/ Graphite] and [http://www.nagios.org/ Nagios] to great success for close to a year. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation_arch.gif]]&lt;br /&gt;
&lt;br /&gt;
Tach is a library that collects timing/count data from anywhere in a Python program. It's not specific to [[OpenStack]], but it has pre-canned config files for the main [[OpenStack]] services. Tach hooks into a programming using monkey-patching and has a concept of Metrics and Notifiers. The Metrics are user-extensible hooks that pull data from the code. The Notifiers take the collected data and send it somewhere. Currently there are Metrics drivers for execution time and counts as well as Notifiers for Statsd, Graphite directly, print and log files. ([[SandyWalsh]] has been working on a replacement for Tach, called [https://github.com/SandyWalsh/scrutinize Scrutinize] which adds cProfile support and easier configuration. It's almost ready for prime-time.)&lt;br /&gt;
&lt;br /&gt;
Tach is launched as: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;tach tach.conf nova-compute nova.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ... so it easily integrates with existing deployments.&lt;br /&gt;
&lt;br /&gt;
The powerful features of statsd are:&lt;br /&gt;
* UDP based messaging, so production is not at risk if the collectors die.&lt;br /&gt;
* In-memory rollup/aggregate of measurements that get relayed to Graphite. This greatly enhances scalability. &lt;br /&gt;
* Written in node.js = fast, fast, fast.&lt;br /&gt;
&lt;br /&gt;
== Monitoring/Metering Today ==&lt;br /&gt;
&lt;br /&gt;
Certainly the face of Monitoring and Metering within [[OpenStack]] today is [https://launchpad.net/ceilometer Ceilometer] ... I'll just refer you to that project for more details.&lt;br /&gt;
&lt;br /&gt;
But there are others. Within Rackspace we use [https://github.com/rackspace/yagi YAGI] to consume the notifications and send them to our internal billing system. Specifically, this data is sent to [http://atomhopper.org/ AtomHopper] where it is turned into an Atom feed for other consumers (one of which is billing). YAGI used to have [https://code.google.com/p/pubsubhubbub/ PubSubHubBub] support, but that's gone dormant due to other motivators. Now, [[AtomHopper]] is the redistribution system of choice. Sadly, [[AtomHopper]] is Java-based, so it may not work well within the [[OpenStack]] ecosystem, per se. The YAGI Worker uses [https://github.com/ask/carrot/ carrot] and has been highly reliable in all of our environments, but there has been discussion of moving to [http://pypi.python.org/pypi/kombu kombu].&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is a debugging/monitoring tool based on [[OpenStack]] notifications and it too has its own Worker. It is kombu-based and is currently used in production. We've had lots of problems making the stacktach worker reliable but we think the problem has been with combining a threading model with eventlet. Our new scheme uses the multiprocessing library with per-rabbit workers. This is currently being stress tested, stay tuned. We've tried a variety of other schemes and library combinations with little success (more detail if needed). Note: this ''should'' work fine since it's the same scheme Nova uses internally.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is quickly moving into Metrics, SLA and Monitoring territory with version 2 and the inclusion of Stacky (the command line interface to [[StackTach]])&lt;br /&gt;
&lt;br /&gt;
 [[Image:notifications.gif]]&lt;br /&gt;
&lt;br /&gt;
= The Layers =&lt;br /&gt;
&lt;br /&gt;
With every architecture there are different layers of abstraction/functionality. &lt;br /&gt;
&lt;br /&gt;
IMM has:&lt;br /&gt;
* ''low-level'' components that directly interface with [[OpenStack]] via monkeypatching or notification consumption.&lt;br /&gt;
* ''mid-level'' components that collect, aggregate and redistribute this collected data to other consumers&lt;br /&gt;
* ''high-level'' components that act as the presentation layer. &lt;br /&gt;
&lt;br /&gt;
We currently have overlap on all levels.&lt;br /&gt;
&lt;br /&gt;
[[Image:layers.gif]]&lt;br /&gt;
&lt;br /&gt;
== Unifying the Low Level ==&lt;br /&gt;
&lt;br /&gt;
There is really no way to unify the instrumentation collection with the metrics collection infrastructure within [[OpenStack]]. As stated in the introduction, these are very different animals.&lt;br /&gt;
&lt;br /&gt;
With respect to Monitoring and Metering (notification consumption), the obvious candidate is the notification worker. Using a list of queues in the rabbit notifier is not a solution, it's a big load on the rabbit server. &lt;br /&gt;
&lt;br /&gt;
  ''Note: we're also using AMQP incorrectly for notifications. Events are published to an Exchange and different queues can be created for different consumers. Currently, [[OpenStack]] creates a different Exchange for each notification destination. This should simply a bug that should be fixed.''&lt;br /&gt;
&lt;br /&gt;
This is the low-hanging fruit. Creating a scalable worker that can work in a multi-rabbit (multi-cell, mult-region) deployment. It should support a pluggable scheme for handling the collected data and support failover/redundancy. The worker has to be fast/reliable enough to keep the notification queue empty since this is easily the fastest growing queue (neck and neck with the cells capacity update queue :)&lt;br /&gt;
&lt;br /&gt;
The worker should be a separate repository so others can use it standalone.&lt;br /&gt;
&lt;br /&gt;
Also, the Ceilometer worker doesn't need to use all of the nova-common code. This is very simple program and can be handled with a single file. &lt;br /&gt;
&lt;br /&gt;
== Unifying the Mid-Level ==&lt;br /&gt;
&lt;br /&gt;
 [[Image:architecture.gif]]&lt;br /&gt;
&lt;br /&gt;
=== A Common Database for Collected Data ===&lt;br /&gt;
&lt;br /&gt;
For metering and monitoring, both [[StackTach]] and Ceilometer have a database to store the notifications. [[StackTach]] uses a SQL-based database, while Ceilometer uses a key-value database (Mongo). Each notification is large and contains about ten columns that are required to have fast lookup:&lt;br /&gt;
* Deployment ID&lt;br /&gt;
* Tenant ID&lt;br /&gt;
* UUID&lt;br /&gt;
* Request ID&lt;br /&gt;
* Timestamp&lt;br /&gt;
* Instance State&lt;br /&gt;
* Instance Task&lt;br /&gt;
* Publisher&lt;br /&gt;
* Host ID&lt;br /&gt;
* Event name&lt;br /&gt;
&lt;br /&gt;
Additionally the entire JSON payload should be stored for the event for consumers that need something specific.&lt;br /&gt;
&lt;br /&gt;
I have no recommendation on which db to use, but perhaps some load testing should be performed to see how well each works. The important thing is, the entire event gets stored. &lt;br /&gt;
&lt;br /&gt;
However, as these events get collected, there are often additional tables that need to get updated which contain aggregated/summarized information from the events. While these operations could be done in a batch fashion in a separate database it's likely more efficient to provide a means for other applications to hook into the data collection and update these tables in real-time. This is what [[StackTach]] does and it greatly reduces the post-processing required. It does, however, come at a cost of additional processing when event storage is being performed (an expensive operation). Something like Ceilometer's secondary publishing step seems a good solution here, but I think it should be based on an [[AtomHopper]]/PSHB approach vs something proprietary. We should discuss what redistribution system looks like in greater detail. &lt;br /&gt;
&lt;br /&gt;
In the diagram above Ext1, Ext2, Ext3 are user-plugins for doing special aggregation work. (not for sending to the redistribution system, another plugin mechanism could handle that)&lt;br /&gt;
&lt;br /&gt;
For instrumentation, as mentioned above, the statsd in-memory database is a perfect solution here. Probably not much to improve on here.&lt;br /&gt;
&lt;br /&gt;
=== A Common Event Redistribution System ===&lt;br /&gt;
&lt;br /&gt;
As mentioned earlier, we use [[AtomHopper]] internally (and YAGI w/PSHB previously), but it would be nice to use an off-the-shelf framework, ideally something Python-based. This too should be a separate repo and, ideally, optional.&lt;br /&gt;
&lt;br /&gt;
In the [[DreamHost]] use case, The Dude should consume from the [[AtomHopper]] feed based on webhooks vs. having to poll the Ceilometer API for updates.&lt;br /&gt;
&lt;br /&gt;
=== Alerts / Set Points / Thresholds ===&lt;br /&gt;
&lt;br /&gt;
Personally, I don't think this belongs in the Middle Layer ... external components should define/monitor/control these.&lt;br /&gt;
&lt;br /&gt;
== Unifying the Top Layer ==&lt;br /&gt;
Every client is different, trying to service the needs of each user with a common user interface might be tricky. [[StackTach]] started as a debugging tool and targets that audience. A Billing tool will need a very different UI. &lt;br /&gt;
&lt;br /&gt;
There are lots of off-the-shelf products available for the presentation of instrumentation data, we shouldn't need to reinvent that wheel.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] and Stacky should both consume from the Ceilometer API.&lt;br /&gt;
&lt;br /&gt;
== Other Improvements ==&lt;br /&gt;
&lt;br /&gt;
* Remove the Compute service that Ceilometer uses and integrate the existing fanout compute notifications into the data collected by the workers. There's no need for yet-another-worker. That said, I'm sure there are specific things that certain deployments will need that aren't covered by this and the existing Ceilometer collector system will still be needed.&lt;br /&gt;
* [[StackTach]] has taken major steps in optimizing its REST interface to facilitate caching. The data in the middle layer is largely read-only and there are far more readers than writers. The Ceilometer API should consider these improvements (if it's not dealt with already and I missed it)&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=EfficientVolumesFromImage&amp;diff=16079</id>
		<title>EfficientVolumesFromImage</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=EfficientVolumesFromImage&amp;diff=16079"/>
				<updated>2013-02-16T21:57:43Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
* '''Launchpad Entry''': [[NovaSpec]]:efficient-volumes-from-images&lt;br /&gt;
* '''Created''': 03 April 2012&lt;br /&gt;
* '''Contributors''': Josh Durgin, Tommi Virtanen&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
Make volume (and instance) creation fast if Nova volumes and Glance&lt;br /&gt;
use the same storage backend, and the storage backend supports it.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
&lt;br /&gt;
Instance and volume creation can take advantage of underlying storage&lt;br /&gt;
to be more efficient in space and time.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
Storage systems offer a number of features that can save space and&lt;br /&gt;
time when storing both images and volumes:&lt;br /&gt;
&lt;br /&gt;
* features like copy-on-write can be used to make volume (and instance creation) near-instantaneous and save space&lt;br /&gt;
* deduplication can happen on images and volumes together, reducing hardware requirements&lt;br /&gt;
* administrators only have to maintain one storage system&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
&lt;br /&gt;
User creates a bunch of new instances that have no ephemeral disks,&lt;br /&gt;
but are all based on the same image. This happens very quickly due to&lt;br /&gt;
a shared underlying storage system, and requires very little extra&lt;br /&gt;
space.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
Depends on&lt;br /&gt;
[https://blueprints.launchpad.net/nova/+spec/create-volume-from-image create-volume-from-image]&lt;br /&gt;
and a way to query Glance about the backing store of an image.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
[[Image:cow_volume_from_image.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
There are two parts that are volume backend dependent:&lt;br /&gt;
&lt;br /&gt;
# determining whether a given image is stored on the same backend as volumes&lt;br /&gt;
# efficiently creating a volume based on the image&lt;br /&gt;
&lt;br /&gt;
These can both be optional volume driver methods - something like&lt;br /&gt;
`def cloneable(image_info)` and `def clone(image_info, volume_name)` - if they aren't implemented, or cloneable returns&lt;br /&gt;
false, fallback to the open/write/close api from&lt;br /&gt;
[https://blueprints.launchpad.net/nova/+spec/create-volume-from-image create-volume-from-image].&lt;br /&gt;
&lt;br /&gt;
=== Migration ===&lt;br /&gt;
&lt;br /&gt;
No database or core API changes.&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
&lt;br /&gt;
This need not be added or completed until the specification is nearing beta.&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
&lt;br /&gt;
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=FederatedAuthZwithZones&amp;diff=16075</id>
		<title>FederatedAuthZwithZones</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=FederatedAuthZwithZones&amp;diff=16075"/>
				<updated>2013-02-16T21:56:31Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
* '''Launchpad Entry''': [[NovaSpec]]:nova-zones-federated-authz&lt;br /&gt;
* '''Created''': [[SandyWalsh]]&lt;br /&gt;
* '''Contributors''': &lt;br /&gt;
* '''Related''': [[ZonesOauth]] http://etherpad.openstack.org/nova-oauth&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
In the current Zones implementation, all operations to child zones are done with an admin account. While this works, it causes problems in certain important use cases. Specifically when a user wishes to see all the instances that he may manage. With the admin-account approach, all instances in child zones are returned when only a subset should be (depending in the users rights). &lt;br /&gt;
&lt;br /&gt;
This page is the culmination of discussions with eday, vish, jorge, khaled and others and attempts to summarize the problems that may arise in other use cases as well as documenting the proposals currently underway for solving them.&lt;br /&gt;
&lt;br /&gt;
== Revision History ==&lt;br /&gt;
# First draft - AuthZ servers communicated and synced. [[MyCo]] users were actively added to Resource Groups.&lt;br /&gt;
# Realized that SP AuthZ doesn't need to know about users, just Resource Groups. Introduced concept of Behalf Of. Removed AuthZ sync.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
This will be the common scenario for the bulk of these use cases. &lt;br /&gt;
&lt;br /&gt;
[[MyCo]] is a small software development shop. They have a Nova deployment made up of two Zones (parent and child). When these two zones are incapable of providing more instances, [[MyCo]] outsources to Service Provider (SP) to handle the extra work. SP is large and has many Zones geographically separated and nested many levels deep. &lt;br /&gt;
&lt;br /&gt;
There are two main users in our use cases: Alice and Bob. Alice manages her own instances, as does Bob. However, Alice and Bob are also members of a Financial Task Force which gives them the ability to manage any instances under that groups control.&lt;br /&gt;
&lt;br /&gt;
There will be one set of AuthN and AuthZ services per business. [[MyCo]] has it's own AuthN/Z service as does SP. These Auth services will need to be Highly Available.&lt;br /&gt;
&lt;br /&gt;
Whenever a user is added/removed from a security group or permissions changed they are done on the [[MyCo]] side. Only the Resource Group ID's are passed to the SP. &lt;br /&gt;
&lt;br /&gt;
After authenticating, the [[MyCo]] AuthZ will supply a set of data to SP regarding the User. This set of data includes: &lt;br /&gt;
* The Resource Group ID's that the user belongs to (and not the Resource ID's within that group, that data only lives in [[MyCo]] AuthZ)&lt;br /&gt;
* Optionally, a Resource Group ID that the user is acting on Behalf Of.&lt;br /&gt;
* A set of Permission Tuples ([Action Group, ...], [Resource Group, ...]) of the actions the User can perform on which Resource Groups.&lt;br /&gt;
&lt;br /&gt;
For child zones within the same business (ie. all the child zones in Service Provider) group ID's and resource ID's will have to be unique across Zones. &lt;br /&gt;
&lt;br /&gt;
In a multi-tenant scenario such as Service Provider, the Group identifiers passed from one AuthZ system to another will need to be prefixed/namespaced to avoid collisions.&lt;br /&gt;
&lt;br /&gt;
[[Image:UseCaseOverview.gif]]&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
* [[MyCo]].authZ = The AuthZ service running at [[MyCo]]&lt;br /&gt;
* SP.authZ = The AuthZ service running at the Service Provider&lt;br /&gt;
* Subject = The user performing the action.&lt;br /&gt;
* Delegate = A user performing an action on behalf of another user.&lt;br /&gt;
* Subject Group = A group of users or delegates.&lt;br /&gt;
* Action = The verb being performed on the resource. Such as: boot, halt, pause, rescue, migrate, view, delete, etc.&lt;br /&gt;
* Action Group = A collection of Actions.&lt;br /&gt;
* Resource = The object the Subject is performing the Action on (aka 'Object' in our previous discussions)&lt;br /&gt;
* Resource Group = A group of Resources.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
&lt;br /&gt;
After authenticating Alice with the Service Provider Zones, [[MyCo]].authZ will supply SP.authZ with a set if ''Permission Tuples'' that indicate which operations Alice may perform and which Resources she may perform them on (where applicable). These tuples have the mapping (Action_Groups, Resource_Groups). Note that Subject is implied here since the User had to previously authenticate with the system to gain access. &lt;br /&gt;
&lt;br /&gt;
Side note: There was a discussion of having the tuple be (Action_Group, User_Group) where User_Group was a collection of Users that owned resources. The downside with this approach is it's not fine-grained enough. For example, if Bob has permissions (can_halt, [Alice]) then he can halt ''all'' instances owned by Alice. That's too much privilege. Additionally, the difference between tracking a User_Group and a Resource_Group is nominal. Tracking a Resource_Group closer aligns with &lt;br /&gt;
&lt;br /&gt;
We don't want the tuples to be so fine grained that we are listing individual instance ID's ... it won't scale to thousands of instances. While it would be easier, we don't want permission tuples of (Action_Group, [Resources ID's]) like (can_halt, [ami-AAA, ami-BBB, ami-CCC, ...]). Instead we need to define a Group of resources at the SP.authZ layer and simply refer to it in our permission tuples. &lt;br /&gt;
&lt;br /&gt;
How? In order to do this, [[MyCo]].authZ needs to keep SP.authZ updated with a discrete set of Resource Groups.&lt;br /&gt;
&lt;br /&gt;
[[MyCo]].authZ will have many Resource Groups and much of the contents of these Resource Groups will contain resources that live in [[MyCo]] Zones. We don't need to replicate all of this information to SP.authZ ... only a subset of the group that references resources that live in SP Zones. For example, Bob's permitted groups on the [[MyCo]].authZ side may look like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
(Bob, [can_halt, can_see, can_boot, ...], [myco-Foo-group, myco-Bar-group, myco-Zoo-group, sp-Alice-group, sp-Bob-group sp-Finance-group])&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
but when passing this on to SP.authZ only the following is required:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
([can_halt, can_see, can_boot, ...], [sp-Alice-group, sp-Bob-group sp-Finance-group])&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can think of this as a formalization of the &amp;quot;override&amp;quot; capability in the authn/z branch proposed by vish &amp;amp; termie. &lt;br /&gt;
&lt;br /&gt;
[[Image:SyncAuthZ.gif]]&lt;br /&gt;
&lt;br /&gt;
=== On Behalf Of ===&lt;br /&gt;
One complexity we have is creating new Resources on the SP side. We want to make sure we assign the correct Resource Group to the Resource. There are a couple of possibilities:&lt;br /&gt;
# When the user authenticates we add a &amp;quot;On-Behalf-Of=&amp;lt;Resource Group ID&amp;gt;&amp;quot; header, which indicates how new resources should be assigned. This may be tricky to pre-determine.&lt;br /&gt;
# We always create a new Resource Group when creating new Resources and later, as needed, nest this Resource Group in other Resource Groups for granting permissions.&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
=== Migration ===&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
http://paste.openstack.org/show/1108/&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Rebuildforvms&amp;diff=16070</id>
		<title>Rebuildforvms</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Rebuildforvms&amp;diff=16070"/>
				<updated>2013-02-16T21:51:38Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
* '''Launchpad Entry''': [[NovaSpec]]:rebuild-for-ha&lt;br /&gt;
* '''Created''': 2011-Nov-30&lt;br /&gt;
* '''Contributors''': Jason Kim&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Support HA for vms from the failed host.&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
When this is implemented, VMs will be rebuilt from failed host to the other hosts.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
If the host is failed, we can't run the current vms on the host. &lt;br /&gt;
That is to say, we can't HA for vms.&lt;br /&gt;
I solved the HA using the rebuild means.&lt;br /&gt;
&lt;br /&gt;
Below steps will be added.&lt;br /&gt;
&lt;br /&gt;
1) get the information of instances on the failed host.&lt;br /&gt;
- we can know the state of host by using monitoring system or using the service state (nova-compute, nova-network)&lt;br /&gt;
&lt;br /&gt;
2) get a list of dictionaries of network data of an instance.&lt;br /&gt;
&lt;br /&gt;
3) update the volume db and instance db. &lt;br /&gt;
&lt;br /&gt;
4) setup volumes for block device mapping&lt;br /&gt;
&lt;br /&gt;
5) spawn the instance.&lt;br /&gt;
&lt;br /&gt;
6) associate the floating ip which is used existing the instances.&lt;br /&gt;
   - set up the iptables and so on.&lt;br /&gt;
&lt;br /&gt;
7) update the instance db.&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
* User doesn't know the vm is rebuilt.&lt;br /&gt;
* Operator gets the list of failed host from monitoring system or nova network/compute state.&lt;br /&gt;
* Operator gets the lists of the instances on the failed hosts.&lt;br /&gt;
* Operator should rebuild the instances by using this operation.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
The instances were created with volumes attached.&lt;br /&gt;
&lt;br /&gt;
* [https://blueprints.launchpad.net/nova/+spec/auto-create-boot-volumes auto-create-boot-volumes]&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
[[Image:rebuild_for_vm_concept.png]]&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
* Scheduler should call the compute manager to rebuild the instance.&lt;br /&gt;
* Compute Manager should get a list of dictionaries of network data of an instance.&lt;br /&gt;
* Compute Manager should update the volume db and instance db.&lt;br /&gt;
* Compute Manager should setup volumes for block device mapping by using the volume manager.&lt;br /&gt;
* Compute Manager should spawn the instance by using the virt driver.&lt;br /&gt;
* Compute Manager should associate the floating ip by using the network manager.&lt;br /&gt;
* Compute Manager should update the instance db.&lt;br /&gt;
* Compute Manager should restart the network module.&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
* /usr/bin/nova-manage&lt;br /&gt;
* /nova/compute/api.py, vm_states.py, task_state.py, manager.py&lt;br /&gt;
* /nova/api/openstack/common.py&lt;br /&gt;
* /nova/network/api.py, manager.py&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
This need not be added or completed until the specification is nearing beta.&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
TBD&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16065</id>
		<title>UnifiedInstrumentationMetering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16065"/>
				<updated>2013-02-16T21:50:27Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= Unified Instrumentation and Metering =&lt;br /&gt;
&lt;br /&gt;
Last edit: -- [[SandyWalsh]] &amp;lt;&amp;lt;[[DateTime]](2012-11-01T19:47:57Z)&amp;gt;&amp;gt; &amp;lt;&amp;lt;[[DateTime]](2012-11-01T19:47:57Z)&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Ceilometer&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Tach&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[StackTach]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, there are some very cool initiatives going on around instrumentation and metering/monitoring within [[OpenStack]] today. &lt;br /&gt;
&lt;br /&gt;
However, due to the incredible speed of development within [[OpenStack]] many of these efforts have been performed in isolation from each other. Now, we are reaching a level of maturity which demands we stop reinventing the wheel and agree upon some shared infrastructure. This need is necessary for a variety of reasons:&lt;br /&gt;
&lt;br /&gt;
# We want to make it easier for new projects to build on the existing [[OpenStack]] notification message bus.&lt;br /&gt;
# Less code is good. We shouldn't need three different workers for extracting notifications from [[OpenStack]].&lt;br /&gt;
# Notifications are large and there's a lot of them. We only want to process and store that data once. &lt;br /&gt;
# Archiving of data is a common problem, we shouldn't need several different ways of doing it.&lt;br /&gt;
&lt;br /&gt;
In this document we'll talk about the State-of-Art with respect to Instrumentation/Metering/Monitoring (IMM) with [[OpenStack]] today and where we might go with it.&lt;br /&gt;
&lt;br /&gt;
Required reading / viewing:&lt;br /&gt;
* http://www.openstack.org/summit/san-diego-2012/openstack-summit-sessions/presentation/what-about-billing-an-introduction-to-ceilometer&lt;br /&gt;
* http://www.sandywalsh.com/2012/10/debugging-openstack-with-stacktach-and.html&lt;br /&gt;
* https://etherpad.openstack.org/grizzly-common-instrumentation (good summary of instrumentation needs)&lt;br /&gt;
&lt;br /&gt;
= Instrumentation vs Metering/Monitoring =&lt;br /&gt;
&lt;br /&gt;
At the very base of this discussion is having a clear understanding of the difference between Instrumentation and Metering/Monitoring. &lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
Think of instrumentation as the way they test electronics in-circuit. While the device is running, probes are attached to the circuit board and measurements are taken. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation.png]]&lt;br /&gt;
&lt;br /&gt;
There are some key things to consider in this analogy:&lt;br /&gt;
* Every technician may want to place their probes in different locations. &lt;br /&gt;
* Probes might be placed for long term measuring or transient (&amp;quot;I wonder if ... &amp;quot; scenarios)&lt;br /&gt;
* The circuit does not have to change for the testing probes to be placed. No other groups or departments had to be involved for this instrumentation to occur.&lt;br /&gt;
* The same probe technology can be used on other circuit boards. Likewise, our instrumentation probe-placement technology should not just be geared towards Nova. It should also work with all other parts of [[OpenStack]].&lt;br /&gt;
* When the circuit changes our probe placement may have to change. We have to be aware of that.&lt;br /&gt;
* The probes aren't perfect. They might slip off or have a spotty connection. We're looking for trends here, identifying when things are slow or flaky.  &lt;br /&gt;
* With respect to Python, we may be interested in stack traces as well. Not just single function timings/counts.&lt;br /&gt;
&lt;br /&gt;
== Metering / Monitoring ==&lt;br /&gt;
Metering is watching usage of the system, usually for the purposes of Billing. Monitoring is watching the system for critical system changes, performance and accuracy, usually for things like SLA's.&lt;br /&gt;
&lt;br /&gt;
Think of your power meter. You can go outside and watch the dial spin and confirm your monthly bill jives with what the meter is reporting.&lt;br /&gt;
&lt;br /&gt;
[[Image:metering.png]]&lt;br /&gt;
&lt;br /&gt;
The important aspects of metering and monitoring:&lt;br /&gt;
* These events/measurements are critical. We cannot risk dropping an event.&lt;br /&gt;
* We need to ensure these events are consistent between releases. Their consistency should be considered of equal importance as [[OpenStack]] API consistency.&lt;br /&gt;
* We have no idea how people are going to want to use these events, but we can safely assume there will be a lots of other groups interested in them. We don't want these groups talking to the production [[OpenStack]] deployments directly.&lt;br /&gt;
* These events may not be nearly as frequent as the instrumentation messages, but they will be a lot larger since the entire context of the message needs to be included (''which'' instance, ''which'' image, ''which'' user, etc)&lt;br /&gt;
&lt;br /&gt;
= The State-of-the-Art =&lt;br /&gt;
&lt;br /&gt;
So, where are we?&lt;br /&gt;
&lt;br /&gt;
== Instrumentation Today ==&lt;br /&gt;
&lt;br /&gt;
There is no formal instrumentation solution for [[OpenStack]] today (other than logging). Logging is insufficient because it's:&lt;br /&gt;
* unstructured text&lt;br /&gt;
* too much effort to scan, parse and correlate across servers&lt;br /&gt;
* requires code changes to collect new information&lt;br /&gt;
&lt;br /&gt;
Rackspace has being using a cocktail of [https://github.com/ohthree/tach Tach], [https://github.com/etsy/statsd Statsd], [http://graphite.wikidot.com/ Graphite] and [http://www.nagios.org/ Nagios] to great success for close to a year. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation_arch.gif]]&lt;br /&gt;
&lt;br /&gt;
Tach is a library that collects timing/count data from anywhere in a Python program. It's not specific to [[OpenStack]], but it has pre-canned config files for the main [[OpenStack]] services. Tach hooks into a programming using monkey-patching and has a concept of Metrics and Notifiers. The Metrics are user-extensible hooks that pull data from the code. The Notifiers take the collected data and send it somewhere. Currently there are Metrics drivers for execution time and counts as well as Notifiers for Statsd, Graphite directly, print and log files. ([[SandyWalsh]] has been working on a replacement for Tach, called [https://github.com/SandyWalsh/scrutinize Scrutinize] which adds cProfile support and easier configuration. It's almost ready for prime-time.)&lt;br /&gt;
&lt;br /&gt;
Tach is launched as: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;tach tach.conf nova-compute nova.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ... so it easily integrates with existing deployments.&lt;br /&gt;
&lt;br /&gt;
The powerful features of statsd are:&lt;br /&gt;
* UDP based messaging, so production is not at risk if the collectors die.&lt;br /&gt;
* In-memory rollup/aggregate of measurements that get relayed to Graphite. This greatly enhances scalability. &lt;br /&gt;
* Written in node.js = fast, fast, fast.&lt;br /&gt;
&lt;br /&gt;
== Monitoring/Metering Today ==&lt;br /&gt;
&lt;br /&gt;
Certainly the face of Monitoring and Metering within [[OpenStack]] today is [https://launchpad.net/ceilometer Ceilometer] ... I'll just refer you to that project for more details.&lt;br /&gt;
&lt;br /&gt;
But there are others. Within Rackspace we use [https://github.com/rackspace/yagi YAGI] to consume the notifications and send them to our internal billing system. Specifically, this data is sent to [http://atomhopper.org/ AtomHopper] where it is turned into an Atom feed for other consumers (one of which is billing). YAGI used to have [https://code.google.com/p/pubsubhubbub/ PubSubHubBub] support, but that's gone dormant due to other motivators. Now, [[AtomHopper]] is the redistribution system of choice. Sadly, [[AtomHopper]] is Java-based, so it may not work well within the [[OpenStack]] ecosystem, per se. The YAGI Worker uses [https://github.com/ask/carrot/ carrot] and has been highly reliable in all of our environments, but there has been discussion of moving to [http://pypi.python.org/pypi/kombu kombu].&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is a debugging/monitoring tool based on [[OpenStack]] notifications and it too has its own Worker. It is kombu-based and is currently used in production. We've had lots of problems making the stacktach worker reliable but we think the problem has been with combining a threading model with eventlet. Our new scheme uses the multiprocessing library with per-rabbit workers. This is currently being stress tested, stay tuned. We've tried a variety of other schemes and library combinations with little success (more detail if needed). Note: this ''should'' work fine since it's the same scheme Nova uses internally.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is quickly moving into Metrics, SLA and Monitoring territory with version 2 and the inclusion of Stacky (the command line interface to [[StackTach]])&lt;br /&gt;
&lt;br /&gt;
 [[Image:notifications.gif]]&lt;br /&gt;
&lt;br /&gt;
= The Layers =&lt;br /&gt;
&lt;br /&gt;
With every architecture there are different layers of abstraction/functionality. &lt;br /&gt;
&lt;br /&gt;
IMM has:&lt;br /&gt;
* ''low-level'' components that directly interface with [[OpenStack]] via monkeypatching or notification consumption.&lt;br /&gt;
* ''mid-level'' components that collect, aggregate and redistribute this collected data to other consumers&lt;br /&gt;
* ''high-level'' components that act as the presentation layer. &lt;br /&gt;
&lt;br /&gt;
We currently have overlap on all levels.&lt;br /&gt;
&lt;br /&gt;
[[Image:layers.gif]]&lt;br /&gt;
&lt;br /&gt;
== Unifying the Low Level ==&lt;br /&gt;
&lt;br /&gt;
There is really no way to unify the instrumentation collection with the metrics collection infrastructure within [[OpenStack]]. As stated in the introduction, these are very different animals.&lt;br /&gt;
&lt;br /&gt;
With respect to Monitoring and Metering (notification consumption), the obvious candidate is the notification worker. Using a list of queues in the rabbit notifier is not a solution, it's a big load on the rabbit server. &lt;br /&gt;
&lt;br /&gt;
  ''Note: we're also using AMQP incorrectly for notifications. Events are published to an Exchange and different queues can be created for different consumers. Currently, [[OpenStack]] creates a different Exchange for each notification destination. This should simply a bug that should be fixed.''&lt;br /&gt;
&lt;br /&gt;
This is the low-hanging fruit. Creating a scalable worker that can work in a multi-rabbit (multi-cell, mult-region) deployment. It should support a pluggable scheme for handling the collected data and support failover/redundancy. The worker has to be fast/reliable enough to keep the notification queue empty since this is easily the fastest growing queue (neck and neck with the cells capacity update queue :)&lt;br /&gt;
&lt;br /&gt;
The worker should be a separate repository so others can use it standalone.&lt;br /&gt;
&lt;br /&gt;
Also, the Ceilometer worker doesn't need to use all of the nova-common code. This is very simple program and can be handled with a single file. &lt;br /&gt;
&lt;br /&gt;
== Unifying the Mid-Level ==&lt;br /&gt;
&lt;br /&gt;
 [[Image:architecture.gif]]&lt;br /&gt;
&lt;br /&gt;
=== A Common Database for Collected Data ===&lt;br /&gt;
&lt;br /&gt;
For metering and monitoring, both [[StackTach]] and Ceilometer have a database to store the notifications. [[StackTach]] uses a SQL-based database, while Ceilometer uses a key-value database (Mongo). Each notification is large and contains about ten columns that are required to have fast lookup:&lt;br /&gt;
* Deployment ID&lt;br /&gt;
* Tenant ID&lt;br /&gt;
* UUID&lt;br /&gt;
* Request ID&lt;br /&gt;
* Timestamp&lt;br /&gt;
* Instance State&lt;br /&gt;
* Instance Task&lt;br /&gt;
* Publisher&lt;br /&gt;
* Host ID&lt;br /&gt;
* Event name&lt;br /&gt;
&lt;br /&gt;
Additionally the entire JSON payload should be stored for the event for consumers that need something specific.&lt;br /&gt;
&lt;br /&gt;
I have no recommendation on which db to use, but perhaps some load testing should be performed to see how well each works. The important thing is, the entire event gets stored. &lt;br /&gt;
&lt;br /&gt;
However, as these events get collected, there are often additional tables that need to get updated which contain aggregated/summarized information from the events. While these operations could be done in a batch fashion in a separate database it's likely more efficient to provide a means for other applications to hook into the data collection and update these tables in real-time. This is what [[StackTach]] does and it greatly reduces the post-processing required. It does, however, come at a cost of additional processing when event storage is being performed (an expensive operation). Something like Ceilometer's secondary publishing step seems a good solution here, but I think it should be based on an [[AtomHopper]]/PSHB approach vs something proprietary. We should discuss what redistribution system looks like in greater detail. &lt;br /&gt;
&lt;br /&gt;
In the diagram above Ext1, Ext2, Ext3 are user-plugins for doing special aggregation work. (not for sending to the redistribution system, another plugin mechanism could handle that)&lt;br /&gt;
&lt;br /&gt;
For instrumentation, as mentioned above, the statsd in-memory database is a perfect solution here. Probably not much to improve on here.&lt;br /&gt;
&lt;br /&gt;
=== A Common Event Redistribution System ===&lt;br /&gt;
&lt;br /&gt;
As mentioned earlier, we use [[AtomHopper]] internally (and YAGI w/PSHB previously), but it would be nice to use an off-the-shelf framework, ideally something Python-based. This too should be a separate repo and, ideally, optional.&lt;br /&gt;
&lt;br /&gt;
In the [[DreamHost]] use case, The Dude should consume from the [[AtomHopper]] feed based on webhooks vs. having to poll the Ceilometer API for updates.&lt;br /&gt;
&lt;br /&gt;
=== Alerts / Set Points / Thresholds ===&lt;br /&gt;
&lt;br /&gt;
Personally, I don't think this belongs in the Middle Layer ... external components should define/monitor/control these.&lt;br /&gt;
&lt;br /&gt;
== Unifying the Top Layer ==&lt;br /&gt;
Every client is different, trying to service the needs of each user with a common user interface might be tricky. [[StackTach]] started as a debugging tool and targets that audience. A Billing tool will need a very different UI. &lt;br /&gt;
&lt;br /&gt;
There are lots of off-the-shelf products available for the presentation of instrumentation data, we shouldn't need to reinvent that wheel.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] and Stacky should both consume from the Ceilometer API.&lt;br /&gt;
&lt;br /&gt;
== Other Improvements ==&lt;br /&gt;
&lt;br /&gt;
* Remove the Compute service that Ceilometer uses and integrate the existing fanout compute notifications into the data collected by the workers. There's no need for yet-another-worker. That said, I'm sure there are specific things that certain deployments will need that aren't covered by this and the existing Ceilometer collector system will still be needed.&lt;br /&gt;
* [[StackTach]] has taken major steps in optimizing its REST interface to facilitate caching. The data in the middle layer is largely read-only and there are far more readers than writers. The Ceilometer API should consider these improvements (if it's not dealt with already and I missed it)&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16059</id>
		<title>UnifiedInstrumentationMetering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16059"/>
				<updated>2013-02-16T21:47:35Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= Unified Instrumentation and Metering =&lt;br /&gt;
&lt;br /&gt;
Last edit: -- [[SandyWalsh]] &amp;lt;&amp;lt;[[DateTime]](2012-11-01T19:47:57Z)&amp;gt;&amp;gt; &amp;lt;&amp;lt;[[DateTime]](2012-11-01T19:47:57Z)&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Ceilometer&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Tach&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[StackTach]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, there are some very cool initiatives going on around instrumentation and metering/monitoring within [[OpenStack]] today. &lt;br /&gt;
&lt;br /&gt;
However, due to the incredible speed of development within [[OpenStack]] many of these efforts have been performed in isolation from each other. Now, we are reaching a level of maturity which demands we stop reinventing the wheel and agree upon some shared infrastructure. This need is necessary for a variety of reasons:&lt;br /&gt;
&lt;br /&gt;
# We want to make it easier for new projects to build on the existing [[OpenStack]] notification message bus.&lt;br /&gt;
# Less code is good. We shouldn't need three different workers for extracting notifications from [[OpenStack]].&lt;br /&gt;
# Notifications are large and there's a lot of them. We only want to process and store that data once. &lt;br /&gt;
# Archiving of data is a common problem, we shouldn't need several different ways of doing it.&lt;br /&gt;
&lt;br /&gt;
In this document we'll talk about the State-of-Art with respect to Instrumentation/Metering/Monitoring (IMM) with [[OpenStack]] today and where we might go with it.&lt;br /&gt;
&lt;br /&gt;
Required reading / viewing:&lt;br /&gt;
* http://www.openstack.org/summit/san-diego-2012/openstack-summit-sessions/presentation/what-about-billing-an-introduction-to-ceilometer&lt;br /&gt;
* http://www.sandywalsh.com/2012/10/debugging-openstack-with-stacktach-and.html&lt;br /&gt;
* https://etherpad.openstack.org/grizzly-common-instrumentation (good summary of instrumentation needs)&lt;br /&gt;
&lt;br /&gt;
= Instrumentation vs Metering/Monitoring =&lt;br /&gt;
&lt;br /&gt;
At the very base of this discussion is having a clear understanding of the difference between Instrumentation and Metering/Monitoring. &lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
Think of instrumentation as the way they test electronics in-circuit. While the device is running, probes are attached to the circuit board and measurements are taken. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation.png]]&lt;br /&gt;
&lt;br /&gt;
There are some key things to consider in this analogy:&lt;br /&gt;
* Every technician may want to place their probes in different locations. &lt;br /&gt;
* Probes might be placed for long term measuring or transient (&amp;quot;I wonder if ... &amp;quot; scenarios)&lt;br /&gt;
* The circuit does not have to change for the testing probes to be placed. No other groups or departments had to be involved for this instrumentation to occur.&lt;br /&gt;
* The same probe technology can be used on other circuit boards. Likewise, our instrumentation probe-placement technology should not just be geared towards Nova. It should also work with all other parts of [[OpenStack]].&lt;br /&gt;
* When the circuit changes our probe placement may have to change. We have to be aware of that.&lt;br /&gt;
* The probes aren't perfect. They might slip off or have a spotty connection. We're looking for trends here, identifying when things are slow or flaky.  &lt;br /&gt;
* With respect to Python, we may be interested in stack traces as well. Not just single function timings/counts.&lt;br /&gt;
&lt;br /&gt;
== Metering / Monitoring ==&lt;br /&gt;
Metering is watching usage of the system, usually for the purposes of Billing. Monitoring is watching the system for critical system changes, performance and accuracy, usually for things like SLA's.&lt;br /&gt;
&lt;br /&gt;
Think of your power meter. You can go outside and watch the dial spin and confirm your monthly bill jives with what the meter is reporting.&lt;br /&gt;
&lt;br /&gt;
[[Image:metering.png]]&lt;br /&gt;
&lt;br /&gt;
The important aspects of metering and monitoring:&lt;br /&gt;
* These events/measurements are critical. We cannot risk dropping an event.&lt;br /&gt;
* We need to ensure these events are consistent between releases. Their consistency should be considered of equal importance as [[OpenStack]] API consistency.&lt;br /&gt;
* We have no idea how people are going to want to use these events, but we can safely assume there will be a lots of other groups interested in them. We don't want these groups talking to the production [[OpenStack]] deployments directly.&lt;br /&gt;
* These events may not be nearly as frequent as the instrumentation messages, but they will be a lot larger since the entire context of the message needs to be included (''which'' instance, ''which'' image, ''which'' user, etc)&lt;br /&gt;
&lt;br /&gt;
= The State-of-the-Art =&lt;br /&gt;
&lt;br /&gt;
So, where are we?&lt;br /&gt;
&lt;br /&gt;
== Instrumentation Today ==&lt;br /&gt;
&lt;br /&gt;
There is no formal instrumentation solution for [[OpenStack]] today (other than logging). Logging is insufficient because it's:&lt;br /&gt;
* unstructured text&lt;br /&gt;
* too much effort to scan, parse and correlate across servers&lt;br /&gt;
* requires code changes to collect new information&lt;br /&gt;
&lt;br /&gt;
Rackspace has being using a cocktail of [https://github.com/ohthree/tach Tach], [https://github.com/etsy/statsd Statsd], [http://graphite.wikidot.com/ Graphite] and [http://www.nagios.org/ Nagios] to great success for close to a year. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation_arch.gif]]&lt;br /&gt;
&lt;br /&gt;
Tach is a library that collects timing/count data from anywhere in a Python program. It's not specific to [[OpenStack]], but it has pre-canned config files for the main [[OpenStack]] services. Tach hooks into a programming using monkey-patching and has a concept of Metrics and Notifiers. The Metrics are user-extensible hooks that pull data from the code. The Notifiers take the collected data and send it somewhere. Currently there are Metrics drivers for execution time and counts as well as Notifiers for Statsd, Graphite directly, print and log files. ([[SandyWalsh]] has been working on a replacement for Tach, called [https://github.com/SandyWalsh/scrutinize Scrutinize] which adds cProfile support and easier configuration. It's almost ready for prime-time.)&lt;br /&gt;
&lt;br /&gt;
Tach is launched as: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;tach tach.conf nova-compute nova.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ... so it easily integrates with existing deployments.&lt;br /&gt;
&lt;br /&gt;
The powerful features of statsd are:&lt;br /&gt;
* UDP based messaging, so production is not at risk if the collectors die.&lt;br /&gt;
* In-memory rollup/aggregate of measurements that get relayed to Graphite. This greatly enhances scalability. &lt;br /&gt;
* Written in node.js = fast, fast, fast.&lt;br /&gt;
&lt;br /&gt;
== Monitoring/Metering Today ==&lt;br /&gt;
&lt;br /&gt;
Certainly the face of Monitoring and Metering within [[OpenStack]] today is [https://launchpad.net/ceilometer Ceilometer] ... I'll just refer you to that project for more details.&lt;br /&gt;
&lt;br /&gt;
But there are others. Within Rackspace we use [https://github.com/rackspace/yagi YAGI] to consume the notifications and send them to our internal billing system. Specifically, this data is sent to [http://atomhopper.org/ AtomHopper] where it is turned into an Atom feed for other consumers (one of which is billing). YAGI used to have [https://code.google.com/p/pubsubhubbub/ PubSubHubBub] support, but that's gone dormant due to other motivators. Now, [[AtomHopper]] is the redistribution system of choice. Sadly, [[AtomHopper]] is Java-based, so it may not work well within the [[OpenStack]] ecosystem, per se. The YAGI Worker uses [https://github.com/ask/carrot/ carrot] and has been highly reliable in all of our environments, but there has been discussion of moving to [http://pypi.python.org/pypi/kombu kombu].&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is a debugging/monitoring tool based on [[OpenStack]] notifications and it too has its own Worker. It is kombu-based and is currently used in production. We've had lots of problems making the stacktach worker reliable but we think the problem has been with combining a threading model with eventlet. Our new scheme uses the multiprocessing library with per-rabbit workers. This is currently being stress tested, stay tuned. We've tried a variety of other schemes and library combinations with little success (more detail if needed). Note: this ''should'' work fine since it's the same scheme Nova uses internally.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is quickly moving into Metrics, SLA and Monitoring territory with version 2 and the inclusion of Stacky (the command line interface to [[StackTach]])&lt;br /&gt;
&lt;br /&gt;
 [[Image:notifications.gif]]&lt;br /&gt;
&lt;br /&gt;
= The Layers =&lt;br /&gt;
&lt;br /&gt;
With every architecture there are different layers of abstraction/functionality. &lt;br /&gt;
&lt;br /&gt;
IMM has:&lt;br /&gt;
* ''low-level'' components that directly interface with [[OpenStack]] via monkeypatching or notification consumption.&lt;br /&gt;
* ''mid-level'' components that collect, aggregate and redistribute this collected data to other consumers&lt;br /&gt;
* ''high-level'' components that act as the presentation layer. &lt;br /&gt;
&lt;br /&gt;
We currently have overlap on all levels.&lt;br /&gt;
&lt;br /&gt;
[[Image:layers.gif]]&lt;br /&gt;
&lt;br /&gt;
== Unifying the Low Level ==&lt;br /&gt;
&lt;br /&gt;
There is really no way to unify the instrumentation collection with the metrics collection infrastructure within [[OpenStack]]. As stated in the introduction, these are very different animals.&lt;br /&gt;
&lt;br /&gt;
With respect to Monitoring and Metering (notification consumption), the obvious candidate is the notification worker. Using a list of queues in the rabbit notifier is not a solution, it's a big load on the rabbit server. &lt;br /&gt;
&lt;br /&gt;
  ''Note: we're also using AMQP incorrectly for notifications. Events are published to an Exchange and different queues can be created for different consumers. Currently, [[OpenStack]] creates a different Exchange for each notification destination. This should simply a bug that should be fixed.''&lt;br /&gt;
&lt;br /&gt;
This is the low-hanging fruit. Creating a scalable worker that can work in a multi-rabbit (multi-cell, mult-region) deployment. It should support a pluggable scheme for handling the collected data and support failover/redundancy. The worker has to be fast/reliable enough to keep the notification queue empty since this is easily the fastest growing queue (neck and neck with the cells capacity update queue :)&lt;br /&gt;
&lt;br /&gt;
The worker should be a separate repository so others can use it standalone.&lt;br /&gt;
&lt;br /&gt;
Also, the Ceilometer worker doesn't need to use all of the nova-common code. This is very simple program and can be handled with a single file. &lt;br /&gt;
&lt;br /&gt;
== Unifying the Mid-Level ==&lt;br /&gt;
&lt;br /&gt;
 [[Image:UnifiedInstrumentationMetering$architecture.gif]]&lt;br /&gt;
&lt;br /&gt;
=== A Common Database for Collected Data ===&lt;br /&gt;
&lt;br /&gt;
For metering and monitoring, both [[StackTach]] and Ceilometer have a database to store the notifications. [[StackTach]] uses a SQL-based database, while Ceilometer uses a key-value database (Mongo). Each notification is large and contains about ten columns that are required to have fast lookup:&lt;br /&gt;
* Deployment ID&lt;br /&gt;
* Tenant ID&lt;br /&gt;
* UUID&lt;br /&gt;
* Request ID&lt;br /&gt;
* Timestamp&lt;br /&gt;
* Instance State&lt;br /&gt;
* Instance Task&lt;br /&gt;
* Publisher&lt;br /&gt;
* Host ID&lt;br /&gt;
* Event name&lt;br /&gt;
&lt;br /&gt;
Additionally the entire JSON payload should be stored for the event for consumers that need something specific.&lt;br /&gt;
&lt;br /&gt;
I have no recommendation on which db to use, but perhaps some load testing should be performed to see how well each works. The important thing is, the entire event gets stored. &lt;br /&gt;
&lt;br /&gt;
However, as these events get collected, there are often additional tables that need to get updated which contain aggregated/summarized information from the events. While these operations could be done in a batch fashion in a separate database it's likely more efficient to provide a means for other applications to hook into the data collection and update these tables in real-time. This is what [[StackTach]] does and it greatly reduces the post-processing required. It does, however, come at a cost of additional processing when event storage is being performed (an expensive operation). Something like Ceilometer's secondary publishing step seems a good solution here, but I think it should be based on an [[AtomHopper]]/PSHB approach vs something proprietary. We should discuss what redistribution system looks like in greater detail. &lt;br /&gt;
&lt;br /&gt;
In the diagram above Ext1, Ext2, Ext3 are user-plugins for doing special aggregation work. (not for sending to the redistribution system, another plugin mechanism could handle that)&lt;br /&gt;
&lt;br /&gt;
For instrumentation, as mentioned above, the statsd in-memory database is a perfect solution here. Probably not much to improve on here.&lt;br /&gt;
&lt;br /&gt;
=== A Common Event Redistribution System ===&lt;br /&gt;
&lt;br /&gt;
As mentioned earlier, we use [[AtomHopper]] internally (and YAGI w/PSHB previously), but it would be nice to use an off-the-shelf framework, ideally something Python-based. This too should be a separate repo and, ideally, optional.&lt;br /&gt;
&lt;br /&gt;
In the [[DreamHost]] use case, The Dude should consume from the [[AtomHopper]] feed based on webhooks vs. having to poll the Ceilometer API for updates.&lt;br /&gt;
&lt;br /&gt;
=== Alerts / Set Points / Thresholds ===&lt;br /&gt;
&lt;br /&gt;
Personally, I don't think this belongs in the Middle Layer ... external components should define/monitor/control these.&lt;br /&gt;
&lt;br /&gt;
== Unifying the Top Layer ==&lt;br /&gt;
Every client is different, trying to service the needs of each user with a common user interface might be tricky. [[StackTach]] started as a debugging tool and targets that audience. A Billing tool will need a very different UI. &lt;br /&gt;
&lt;br /&gt;
There are lots of off-the-shelf products available for the presentation of instrumentation data, we shouldn't need to reinvent that wheel.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] and Stacky should both consume from the Ceilometer API.&lt;br /&gt;
&lt;br /&gt;
== Other Improvements ==&lt;br /&gt;
&lt;br /&gt;
* Remove the Compute service that Ceilometer uses and integrate the existing fanout compute notifications into the data collected by the workers. There's no need for yet-another-worker. That said, I'm sure there are specific things that certain deployments will need that aren't covered by this and the existing Ceilometer collector system will still be needed.&lt;br /&gt;
* [[StackTach]] has taken major steps in optimizing its REST interface to facilitate caching. The data in the middle layer is largely read-only and there are far more readers than writers. The Ceilometer API should consider these improvements (if it's not dealt with already and I missed it)&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16057</id>
		<title>UnifiedInstrumentationMetering</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=UnifiedInstrumentationMetering&amp;diff=16057"/>
				<updated>2013-02-16T21:46:30Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
= Unified Instrumentation and Metering =&lt;br /&gt;
&lt;br /&gt;
Last edit: -- [[SandyWalsh]] &amp;lt;&amp;lt;[[DateTime]](2012-11-01T19:47:57Z)&amp;gt;&amp;gt; &amp;lt;&amp;lt;[[DateTime]](2012-11-01T19:47:57Z)&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Ceilometer&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Tach&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[StackTach]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, there are some very cool initiatives going on around instrumentation and metering/monitoring within [[OpenStack]] today. &lt;br /&gt;
&lt;br /&gt;
However, due to the incredible speed of development within [[OpenStack]] many of these efforts have been performed in isolation from each other. Now, we are reaching a level of maturity which demands we stop reinventing the wheel and agree upon some shared infrastructure. This need is necessary for a variety of reasons:&lt;br /&gt;
&lt;br /&gt;
# We want to make it easier for new projects to build on the existing [[OpenStack]] notification message bus.&lt;br /&gt;
# Less code is good. We shouldn't need three different workers for extracting notifications from [[OpenStack]].&lt;br /&gt;
# Notifications are large and there's a lot of them. We only want to process and store that data once. &lt;br /&gt;
# Archiving of data is a common problem, we shouldn't need several different ways of doing it.&lt;br /&gt;
&lt;br /&gt;
In this document we'll talk about the State-of-Art with respect to Instrumentation/Metering/Monitoring (IMM) with [[OpenStack]] today and where we might go with it.&lt;br /&gt;
&lt;br /&gt;
Required reading / viewing:&lt;br /&gt;
* http://www.openstack.org/summit/san-diego-2012/openstack-summit-sessions/presentation/what-about-billing-an-introduction-to-ceilometer&lt;br /&gt;
* http://www.sandywalsh.com/2012/10/debugging-openstack-with-stacktach-and.html&lt;br /&gt;
* https://etherpad.openstack.org/grizzly-common-instrumentation (good summary of instrumentation needs)&lt;br /&gt;
&lt;br /&gt;
= Instrumentation vs Metering/Monitoring =&lt;br /&gt;
&lt;br /&gt;
At the very base of this discussion is having a clear understanding of the difference between Instrumentation and Metering/Monitoring. &lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
Think of instrumentation as the way they test electronics in-circuit. While the device is running, probes are attached to the circuit board and measurements are taken. &lt;br /&gt;
&lt;br /&gt;
[[Image:UnifiedInstrumentationMetering$instrumentation.png]]&lt;br /&gt;
&lt;br /&gt;
There are some key things to consider in this analogy:&lt;br /&gt;
* Every technician may want to place their probes in different locations. &lt;br /&gt;
* Probes might be placed for long term measuring or transient (&amp;quot;I wonder if ... &amp;quot; scenarios)&lt;br /&gt;
* The circuit does not have to change for the testing probes to be placed. No other groups or departments had to be involved for this instrumentation to occur.&lt;br /&gt;
* The same probe technology can be used on other circuit boards. Likewise, our instrumentation probe-placement technology should not just be geared towards Nova. It should also work with all other parts of [[OpenStack]].&lt;br /&gt;
* When the circuit changes our probe placement may have to change. We have to be aware of that.&lt;br /&gt;
* The probes aren't perfect. They might slip off or have a spotty connection. We're looking for trends here, identifying when things are slow or flaky.  &lt;br /&gt;
* With respect to Python, we may be interested in stack traces as well. Not just single function timings/counts.&lt;br /&gt;
&lt;br /&gt;
== Metering / Monitoring ==&lt;br /&gt;
Metering is watching usage of the system, usually for the purposes of Billing. Monitoring is watching the system for critical system changes, performance and accuracy, usually for things like SLA's.&lt;br /&gt;
&lt;br /&gt;
Think of your power meter. You can go outside and watch the dial spin and confirm your monthly bill jives with what the meter is reporting.&lt;br /&gt;
&lt;br /&gt;
[[Image:metering.png]]&lt;br /&gt;
&lt;br /&gt;
The important aspects of metering and monitoring:&lt;br /&gt;
* These events/measurements are critical. We cannot risk dropping an event.&lt;br /&gt;
* We need to ensure these events are consistent between releases. Their consistency should be considered of equal importance as [[OpenStack]] API consistency.&lt;br /&gt;
* We have no idea how people are going to want to use these events, but we can safely assume there will be a lots of other groups interested in them. We don't want these groups talking to the production [[OpenStack]] deployments directly.&lt;br /&gt;
* These events may not be nearly as frequent as the instrumentation messages, but they will be a lot larger since the entire context of the message needs to be included (''which'' instance, ''which'' image, ''which'' user, etc)&lt;br /&gt;
&lt;br /&gt;
= The State-of-the-Art =&lt;br /&gt;
&lt;br /&gt;
So, where are we?&lt;br /&gt;
&lt;br /&gt;
== Instrumentation Today ==&lt;br /&gt;
&lt;br /&gt;
There is no formal instrumentation solution for [[OpenStack]] today (other than logging). Logging is insufficient because it's:&lt;br /&gt;
* unstructured text&lt;br /&gt;
* too much effort to scan, parse and correlate across servers&lt;br /&gt;
* requires code changes to collect new information&lt;br /&gt;
&lt;br /&gt;
Rackspace has being using a cocktail of [https://github.com/ohthree/tach Tach], [https://github.com/etsy/statsd Statsd], [http://graphite.wikidot.com/ Graphite] and [http://www.nagios.org/ Nagios] to great success for close to a year. &lt;br /&gt;
&lt;br /&gt;
[[Image:instrumentation_arch.gif]]&lt;br /&gt;
&lt;br /&gt;
Tach is a library that collects timing/count data from anywhere in a Python program. It's not specific to [[OpenStack]], but it has pre-canned config files for the main [[OpenStack]] services. Tach hooks into a programming using monkey-patching and has a concept of Metrics and Notifiers. The Metrics are user-extensible hooks that pull data from the code. The Notifiers take the collected data and send it somewhere. Currently there are Metrics drivers for execution time and counts as well as Notifiers for Statsd, Graphite directly, print and log files. ([[SandyWalsh]] has been working on a replacement for Tach, called [https://github.com/SandyWalsh/scrutinize Scrutinize] which adds cProfile support and easier configuration. It's almost ready for prime-time.)&lt;br /&gt;
&lt;br /&gt;
Tach is launched as: &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;tach tach.conf nova-compute nova.conf&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; ... so it easily integrates with existing deployments.&lt;br /&gt;
&lt;br /&gt;
The powerful features of statsd are:&lt;br /&gt;
* UDP based messaging, so production is not at risk if the collectors die.&lt;br /&gt;
* In-memory rollup/aggregate of measurements that get relayed to Graphite. This greatly enhances scalability. &lt;br /&gt;
* Written in node.js = fast, fast, fast.&lt;br /&gt;
&lt;br /&gt;
== Monitoring/Metering Today ==&lt;br /&gt;
&lt;br /&gt;
Certainly the face of Monitoring and Metering within [[OpenStack]] today is [https://launchpad.net/ceilometer Ceilometer] ... I'll just refer you to that project for more details.&lt;br /&gt;
&lt;br /&gt;
But there are others. Within Rackspace we use [https://github.com/rackspace/yagi YAGI] to consume the notifications and send them to our internal billing system. Specifically, this data is sent to [http://atomhopper.org/ AtomHopper] where it is turned into an Atom feed for other consumers (one of which is billing). YAGI used to have [https://code.google.com/p/pubsubhubbub/ PubSubHubBub] support, but that's gone dormant due to other motivators. Now, [[AtomHopper]] is the redistribution system of choice. Sadly, [[AtomHopper]] is Java-based, so it may not work well within the [[OpenStack]] ecosystem, per se. The YAGI Worker uses [https://github.com/ask/carrot/ carrot] and has been highly reliable in all of our environments, but there has been discussion of moving to [http://pypi.python.org/pypi/kombu kombu].&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is a debugging/monitoring tool based on [[OpenStack]] notifications and it too has its own Worker. It is kombu-based and is currently used in production. We've had lots of problems making the stacktach worker reliable but we think the problem has been with combining a threading model with eventlet. Our new scheme uses the multiprocessing library with per-rabbit workers. This is currently being stress tested, stay tuned. We've tried a variety of other schemes and library combinations with little success (more detail if needed). Note: this ''should'' work fine since it's the same scheme Nova uses internally.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] is quickly moving into Metrics, SLA and Monitoring territory with version 2 and the inclusion of Stacky (the command line interface to [[StackTach]])&lt;br /&gt;
&lt;br /&gt;
 [[Image:notifications.gif]]&lt;br /&gt;
&lt;br /&gt;
= The Layers =&lt;br /&gt;
&lt;br /&gt;
With every architecture there are different layers of abstraction/functionality. &lt;br /&gt;
&lt;br /&gt;
IMM has:&lt;br /&gt;
* ''low-level'' components that directly interface with [[OpenStack]] via monkeypatching or notification consumption.&lt;br /&gt;
* ''mid-level'' components that collect, aggregate and redistribute this collected data to other consumers&lt;br /&gt;
* ''high-level'' components that act as the presentation layer. &lt;br /&gt;
&lt;br /&gt;
We currently have overlap on all levels.&lt;br /&gt;
&lt;br /&gt;
[[Image:layers.gif]]&lt;br /&gt;
&lt;br /&gt;
== Unifying the Low Level ==&lt;br /&gt;
&lt;br /&gt;
There is really no way to unify the instrumentation collection with the metrics collection infrastructure within [[OpenStack]]. As stated in the introduction, these are very different animals.&lt;br /&gt;
&lt;br /&gt;
With respect to Monitoring and Metering (notification consumption), the obvious candidate is the notification worker. Using a list of queues in the rabbit notifier is not a solution, it's a big load on the rabbit server. &lt;br /&gt;
&lt;br /&gt;
  ''Note: we're also using AMQP incorrectly for notifications. Events are published to an Exchange and different queues can be created for different consumers. Currently, [[OpenStack]] creates a different Exchange for each notification destination. This should simply a bug that should be fixed.''&lt;br /&gt;
&lt;br /&gt;
This is the low-hanging fruit. Creating a scalable worker that can work in a multi-rabbit (multi-cell, mult-region) deployment. It should support a pluggable scheme for handling the collected data and support failover/redundancy. The worker has to be fast/reliable enough to keep the notification queue empty since this is easily the fastest growing queue (neck and neck with the cells capacity update queue :)&lt;br /&gt;
&lt;br /&gt;
The worker should be a separate repository so others can use it standalone.&lt;br /&gt;
&lt;br /&gt;
Also, the Ceilometer worker doesn't need to use all of the nova-common code. This is very simple program and can be handled with a single file. &lt;br /&gt;
&lt;br /&gt;
== Unifying the Mid-Level ==&lt;br /&gt;
&lt;br /&gt;
 [[Image:UnifiedInstrumentationMetering$architecture.gif]]&lt;br /&gt;
&lt;br /&gt;
=== A Common Database for Collected Data ===&lt;br /&gt;
&lt;br /&gt;
For metering and monitoring, both [[StackTach]] and Ceilometer have a database to store the notifications. [[StackTach]] uses a SQL-based database, while Ceilometer uses a key-value database (Mongo). Each notification is large and contains about ten columns that are required to have fast lookup:&lt;br /&gt;
* Deployment ID&lt;br /&gt;
* Tenant ID&lt;br /&gt;
* UUID&lt;br /&gt;
* Request ID&lt;br /&gt;
* Timestamp&lt;br /&gt;
* Instance State&lt;br /&gt;
* Instance Task&lt;br /&gt;
* Publisher&lt;br /&gt;
* Host ID&lt;br /&gt;
* Event name&lt;br /&gt;
&lt;br /&gt;
Additionally the entire JSON payload should be stored for the event for consumers that need something specific.&lt;br /&gt;
&lt;br /&gt;
I have no recommendation on which db to use, but perhaps some load testing should be performed to see how well each works. The important thing is, the entire event gets stored. &lt;br /&gt;
&lt;br /&gt;
However, as these events get collected, there are often additional tables that need to get updated which contain aggregated/summarized information from the events. While these operations could be done in a batch fashion in a separate database it's likely more efficient to provide a means for other applications to hook into the data collection and update these tables in real-time. This is what [[StackTach]] does and it greatly reduces the post-processing required. It does, however, come at a cost of additional processing when event storage is being performed (an expensive operation). Something like Ceilometer's secondary publishing step seems a good solution here, but I think it should be based on an [[AtomHopper]]/PSHB approach vs something proprietary. We should discuss what redistribution system looks like in greater detail. &lt;br /&gt;
&lt;br /&gt;
In the diagram above Ext1, Ext2, Ext3 are user-plugins for doing special aggregation work. (not for sending to the redistribution system, another plugin mechanism could handle that)&lt;br /&gt;
&lt;br /&gt;
For instrumentation, as mentioned above, the statsd in-memory database is a perfect solution here. Probably not much to improve on here.&lt;br /&gt;
&lt;br /&gt;
=== A Common Event Redistribution System ===&lt;br /&gt;
&lt;br /&gt;
As mentioned earlier, we use [[AtomHopper]] internally (and YAGI w/PSHB previously), but it would be nice to use an off-the-shelf framework, ideally something Python-based. This too should be a separate repo and, ideally, optional.&lt;br /&gt;
&lt;br /&gt;
In the [[DreamHost]] use case, The Dude should consume from the [[AtomHopper]] feed based on webhooks vs. having to poll the Ceilometer API for updates.&lt;br /&gt;
&lt;br /&gt;
=== Alerts / Set Points / Thresholds ===&lt;br /&gt;
&lt;br /&gt;
Personally, I don't think this belongs in the Middle Layer ... external components should define/monitor/control these.&lt;br /&gt;
&lt;br /&gt;
== Unifying the Top Layer ==&lt;br /&gt;
Every client is different, trying to service the needs of each user with a common user interface might be tricky. [[StackTach]] started as a debugging tool and targets that audience. A Billing tool will need a very different UI. &lt;br /&gt;
&lt;br /&gt;
There are lots of off-the-shelf products available for the presentation of instrumentation data, we shouldn't need to reinvent that wheel.&lt;br /&gt;
&lt;br /&gt;
[[StackTach]] and Stacky should both consume from the Ceilometer API.&lt;br /&gt;
&lt;br /&gt;
== Other Improvements ==&lt;br /&gt;
&lt;br /&gt;
* Remove the Compute service that Ceilometer uses and integrate the existing fanout compute notifications into the data collected by the workers. There's no need for yet-another-worker. That said, I'm sure there are specific things that certain deployments will need that aren't covered by this and the existing Ceilometer collector system will still be needed.&lt;br /&gt;
* [[StackTach]] has taken major steps in optimizing its REST interface to facilitate caching. The data in the middle layer is largely read-only and there are far more readers than writers. The Ceilometer API should consider these improvements (if it's not dealt with already and I missed it)&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Xenapi-sm-volume-driver&amp;diff=16048</id>
		<title>Xenapi-sm-volume-driver</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Xenapi-sm-volume-driver&amp;diff=16048"/>
				<updated>2013-02-16T21:42:22Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ## page was renamed from xenapi-sm-support --&amp;gt;&lt;br /&gt;
* '''Launchpad Entry''': [[NovaSpec]]:xenapi-sm-support&lt;br /&gt;
* '''Created''': 1 February 2011&lt;br /&gt;
* '''Contributors''': Renuka Apte, Armando Migliaccio&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
Design and implement a new driver for Nova-Volume, based on XenAPI Storage Manager. This will provide basic storage functionality (like volume creation, and destruction) on a number of different storage back-ends, but it will enable the capability of using more sophisticated storage back-ends for operations like cloning/snapshotting etc. To have an idea of the benefits of using XenAPI SM to provide back-end storage services, the list below shows some of the storage plugins already supported in [[XenServer]]/XCP:&lt;br /&gt;
&lt;br /&gt;
* NFS VHD: SR plugin which stores disks as VHD files on a remote NFS filesystem&lt;br /&gt;
* Local VHD on LVM: SR plugin which represents disks as VHD disks on Logical Volumes within a locally-attached Volume Group&lt;br /&gt;
* HBA LUN-per-VDI driver: SR plugin which represents LUNs as VDIs sourced by hardware HBA adapters, e.g. hardware-based iSCSI or FC support&lt;br /&gt;
* [[NetApp]]: SR driver for mapping of LUNs to VDIs on a NETAPP server, providing use of fast snapshot and clone features on the filer&lt;br /&gt;
* LVHD over FC:  SR plugin which represents disks as VHDs on Logical Volumes within a Volume Group created on an HBA LUN, e.g. hardware-based iSCSI or FC support&lt;br /&gt;
* iSCSI: Base ISCSI SR driver, provides a LUN-per-VDI. Does not support creation of VDIs but accesses existing LUNs on a target.&lt;br /&gt;
* LVHD over iSCSI: SR plugin which represents disks as Logical Volumes within a Volume Group created on an iSCSI LUN&lt;br /&gt;
* [[EqualLogic]]: SR driver for mapping of LUNs to VDIs on a EQUALLOGIC array group, providing use of fast snapshot and clone features on the array&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
* [[XenServer]]: Commercial, supported product from Citrix&lt;br /&gt;
* Xen Cloud Platform (XCP): Open-source equivalent of [[XenServer]] (and the development project for the toolstack). Everything said about [[XenServer]] below applies equally to XCP&lt;br /&gt;
* XenAPI: The management API exposed by [[XenServer]] and XCP&lt;br /&gt;
* xapi: The primary daemon on [[XenServer]] and Xen Cloud Platform; the one that exposes the XenAPI&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
No direct impact on user consuming the external HTTP API services. This blueprint enables the use of several storage back-ends by writing a single nova-volume driver, rather than several ones, as many as the specific storage back-ends required to be supported are needed. In due course, leveraging capabilities of specific back-ends, will enable operations like volume snapshotting, cloning, etc. that can be exposed via official API.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
This new driver will sit alongside drivers already developed like AoE, iSCSI and SAN (both running on commodity boxes running Linux). However, the latter is slightly different as it will still run on commodity hardware, but it access remote controllers on SAN hardware by some protocol like SSH, CLI or custom API. This is clearly undesirable because every time there is a need to support new hardware, a new driver must be designed and developed. The adoption of XenAPI SM will enable a number of storage back-end that are abstracted by a common API. Moreover, this becomes premium value to customers of service providers and may become differentiator for enterprise private clouds.&lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
The system administrator of a medium sized company deploys a private cloud based on [[OpenStack]]. He had previously bought and deployed a [[NetApp]] filer to provide back-end storage to employees' virtual machines. He now uses XenAPISM volume driver to provide block storage to VMs created using the [[OpenStack]] private cloud.&lt;br /&gt;
&lt;br /&gt;
A service provider wants to deliver premium storage to its customers. Storage back-ends like [[NetApp]] or [[EqualLogic]] can be easily supported using XenAPISM volume driver.&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
For the design and implementation of the new Nova-Volume driver, XenAPI for [[XenServer]]/XCP is going to be used.&lt;br /&gt;
&lt;br /&gt;
== Design ==&lt;br /&gt;
=== Definitions ===&lt;br /&gt;
* Backend: A term for a particular     storage backend. This could be iSCSI, NFS, Netapp etc.&lt;br /&gt;
* Backend-config: All the parameters   required to connect to a specific backend. For e.g. For NFS, this       would be the server, path, etc.&lt;br /&gt;
* Flavor: A user friendly term to specify some notion of       quality of service. For example, &amp;quot;gold&amp;quot; might mean that         the volumes will use a backend where backups are possible.&lt;br /&gt;
&lt;br /&gt;
The concept of flavor has been introduced in keeping with the LUNR work. No API changes have been introduced to allow for creating a volume of a particular flavor. This will be deferred until the LUNR code is available.&lt;br /&gt;
&lt;br /&gt;
A flavor can be associated with multiple backends. Some kind of policy will decide which backend will be used to create a volume of a particular flavor. Until we have a way of selecting flavor, we will use a simple &amp;quot;first-fit&amp;quot; policy, where the first backend that can successfully create this volume is the one that is used.&lt;br /&gt;
&lt;br /&gt;
The entity relationship diagram is given below:&lt;br /&gt;
&lt;br /&gt;
[[Image:erd-xenapi-sm.png]]&lt;br /&gt;
&lt;br /&gt;
=== Operation ===&lt;br /&gt;
Using the nova-manage command detailed in the implementation, an admin can add flavors and backends.&lt;br /&gt;
&lt;br /&gt;
One or more nova-volume service instances will be deployed per availability zone. When an instance is started, it will create storage repositories (SRs) to connect to the backends available within that zone. All nova-volume instances within a zone can see all the available backends. These instances are completely symmetric and hence should be able to service any create_volume request within the zone.&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
=== Commands ===&lt;br /&gt;
A category called “sm” has been added to nova-manage in the class '''[[StorageManagerCommands]]'''&lt;br /&gt;
&lt;br /&gt;
The following actions will be added:&lt;br /&gt;
&lt;br /&gt;
# flavor_list&lt;br /&gt;
# flavor_create&lt;br /&gt;
# flavor_delete&lt;br /&gt;
# backend_list&lt;br /&gt;
# backend_add&lt;br /&gt;
# backend_remove&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
nova-manage sm flavor_create &amp;lt;label&amp;gt; &amp;lt;description&amp;gt;&lt;br /&gt;
&lt;br /&gt;
nova-manage sm flavor_delete&amp;lt;label&amp;gt;&lt;br /&gt;
&lt;br /&gt;
nova-manage sm backend_add &amp;lt;flavor label&amp;gt; &amp;lt;SR type&amp;gt; [config connection parameters]&lt;br /&gt;
&lt;br /&gt;
Note: SR type and config connection parameters are in keeping with the Xen Command Line Interface. http://support.citrix.com/article/CTX124887&lt;br /&gt;
&lt;br /&gt;
nova-manage sm backend_delete &amp;lt;backend-id&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
nova-manage sm flavor_create gold &amp;quot;Not all that glitters&amp;quot;&lt;br /&gt;
&lt;br /&gt;
nova-manage sm flavor_delete gold&lt;br /&gt;
&lt;br /&gt;
nova-manage sm backend_add gold nfs name_label=toybox-renuka server=myserver serverpath=/local/scratch/myname&lt;br /&gt;
&lt;br /&gt;
nova-manage sm backend_remove 1&lt;br /&gt;
&lt;br /&gt;
=== API Changes ===&lt;br /&gt;
As mentioned above, the API changes required to create/delete a volume''' '''''of a particular flavor ''will be deferred till the LUNR code is available. It is therefore not possible to create a volume for a particular flavor yet, although the code/design exists.&lt;br /&gt;
&lt;br /&gt;
The existing euca-create-volume and euca-delete-volume commands should be used.&lt;br /&gt;
&lt;br /&gt;
=== New Tables ===&lt;br /&gt;
SM Flavor:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt; &amp;gt;|Field &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Type &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Null &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Key &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Default &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;72px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|created_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;72px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|updated_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;72px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|deleted_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;72px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|deleted &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|tinyint(1) &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;72px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|id &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|int(11) &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NO &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|PRI &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;72px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|label &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|varchar(255) &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;72px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|description &lt;br /&gt;
|&amp;lt;width=&amp;quot;83px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|varchar(255) &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;63px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;67px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Backend-config:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt; &amp;gt;|Field &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Type &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Null &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Key &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Default &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|created_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|updated_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|deleted_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|deleted &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|tinyint(1) &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|id &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|int(11) &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NO &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|PRI &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|flavor_id &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|int(11) &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NO &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|MUL &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|sr_uuid &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|varchar(255) &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|sr_type &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|varchar(255) &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;89px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|config_params &lt;br /&gt;
|&amp;lt;width=&amp;quot;91px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|varchar(2047) &lt;br /&gt;
|&amp;lt;width=&amp;quot;58px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;60px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;64px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
SM Volume:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt; &amp;gt;|Field &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Type &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Null &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Key &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|Default &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;79px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|created_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;79px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|updated_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;79px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|deleted_at &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|datetime &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;79px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|deleted &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|tinyint(1) &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;79px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|id &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|int(11) &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NO &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|PRI &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;79px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|backend_id &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|int(11) &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NO &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|MUL &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;width=&amp;quot;79px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|vdi_uuid &lt;br /&gt;
|&amp;lt;width=&amp;quot;102px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|varchar(255) &lt;br /&gt;
|&amp;lt;width=&amp;quot;42px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|YES &lt;br /&gt;
|&amp;lt;width=&amp;quot;69px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;| &lt;br /&gt;
|&amp;lt;width=&amp;quot;70px&amp;quot; style=&amp;quot;border-width:1px medium 1px 1px;border-style:solid none solid solid;border-color:rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0);padding:0in 0in 0in 0.08in;          &amp;quot;&amp;gt;|NULL &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
A new volume driver called XenSMDriver has been added to nova/volume. It leverages the xenapi  storage manager to control the available backends. Functions have been exposed to create/forget storage repositories and connect to them.&lt;br /&gt;
&lt;br /&gt;
A do_setup function is added to volume driver in order to perform initialization (which includes creating backend repositories) when the service is started.&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
Unit tests will be provided as code is developed.&lt;br /&gt;
&lt;br /&gt;
== Unresolved issues ==&lt;br /&gt;
None at the time of writing&lt;br /&gt;
&lt;br /&gt;
== BoF agenda and discussion ==&lt;br /&gt;
Related topics:&lt;br /&gt;
&lt;br /&gt;
* Having VM's root devices running on block storage&lt;br /&gt;
* Thin provisioning&lt;br /&gt;
* Fast cloning&lt;br /&gt;
* Advanced volume API (Volume as a Service)&lt;br /&gt;
* Fibre channel and [[StorageLink]]&lt;br /&gt;
* Dedup&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=XenServer/NetworkingFlags&amp;diff=16047</id>
		<title>XenServer/NetworkingFlags</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=XenServer/NetworkingFlags&amp;diff=16047"/>
				<updated>2013-02-16T21:41:36Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= [[XenServer]] Networking Configuration =&lt;br /&gt;
&lt;br /&gt;
Before you look at configuring [[OpenStack]] networking with [[XenServer]], you may find it useful to read up on [[XenServer]] networking:&lt;br /&gt;
* http://support.citrix.com/article/CTX117915&lt;br /&gt;
&lt;br /&gt;
Keeping in mind this diagram:&lt;br /&gt;
&lt;br /&gt;
{{http://wiki.openstack.org/XenServer/XenXCPAndXenServer?action=[[AttachFile]]&amp;amp;do=get&amp;amp;target=[[XenServer]]-dom0-domU.png}}&lt;br /&gt;
&lt;br /&gt;
== Key Points ==&lt;br /&gt;
&lt;br /&gt;
[[XenServer]] config:&lt;br /&gt;
* We are assuming the [[XenServer]] has three physical interfaces: eth0, eth1, eth2&lt;br /&gt;
* This means Dom0 has the following bridges: xenbr0, xenbr1, xenbr2&lt;br /&gt;
* The Dom0 also has the host local xenapi network, usually the [[XenServer]] has the address 169.254.0.1&lt;br /&gt;
&lt;br /&gt;
DomU config:&lt;br /&gt;
* The DomU is a PV virtual machine (has a kernel with the para-virtualization extensions)&lt;br /&gt;
* It generally has four interfaces&lt;br /&gt;
** eth0 -&amp;gt; connected to xenapi (xapi trafic)&lt;br /&gt;
** eth1 -&amp;gt; xenbr2 Tenant network traffic&lt;br /&gt;
** eth2 -&amp;gt; xenbr0 Management traffic (MySQL, RabbitMQ, Glance, etc)&lt;br /&gt;
** eth3 -&amp;gt; xenbr1 Public traffic (floating ip, api endpoints)&lt;br /&gt;
&lt;br /&gt;
== Flags you probably want to know about ==&lt;br /&gt;
&lt;br /&gt;
Each have the [[DevStack]] setting and the nova.conf entry&lt;br /&gt;
&lt;br /&gt;
=== Public Interface ===&lt;br /&gt;
&lt;br /&gt;
The interface on &amp;quot;&amp;quot;DomU&amp;quot;&amp;quot; that connects to the public network. Used by nova-network so it sends the floating ip traffic on the correct network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
PUBLIC_INTERFACE=eth3 # DevStack&lt;br /&gt;
public_interface=eth3 # nova.conf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== VLAN Interface ===&lt;br /&gt;
&lt;br /&gt;
When using VLAN networking you need to set the following flag:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
vlan_interface=eth2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the [[XenServer]] interface on which a bridge on the correct VLAN will be created, and then the VM will be attached to that bridge. So if the flag is eth2, and your guest network is on VLAN42, a new network bridge may be created on your [[XenServer]] host (unless there is an existing one) and it will be used. or an ex&lt;br /&gt;
&lt;br /&gt;
(Possible bug: it would seem this flag is also used for the DomU interface used to attach the DHCP servers and routers to listen on the appropriate VLAN networks. There used to be a separate flag for that, as required for [[XenServer]])&lt;br /&gt;
&lt;br /&gt;
=== Flat Interface ===&lt;br /&gt;
&lt;br /&gt;
Only needed if you are using FlatDHCP (TODO - or Flat?).&lt;br /&gt;
&lt;br /&gt;
This is the interface on DomU that you want the tenant/VM network traffic. This is the interface to which the DHCP and NAT will be attached by nova.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
flat_interface=eth2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: this interface should not be configured, nova will attach all the required bridges.&lt;br /&gt;
&lt;br /&gt;
=== Flat Network Bridge ===&lt;br /&gt;
&lt;br /&gt;
Only needed if you are using Flat or FlatDHCP.&lt;br /&gt;
&lt;br /&gt;
This is the [[XenServer]] bridge on which the VM instances will have their VIFs attached. This should be the same has the bridge your DomU's Guest Interface is attached to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
FLAT_NETWORK_BRIDGE=xenbr2&lt;br /&gt;
flat_network_bridge=xenbr2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above setting can also take the name label instead of the [[XenServer]] name. This is useful when you find on different hosts [[XenServer]] gives your networks different names (such as xapi1 and xapi3). So you can alternatively set it to something like:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
flat_network_bridge=my_vm_network_name_label&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note: this flag only affects the network bridge written into the database when you add a network using nova-manage, it does not dynamically affect the bridge used when attaching VIFs to your VMs. You may find the need to remove your existing networks and creating a new network to make your new value of the setting apply.&lt;br /&gt;
&lt;br /&gt;
== Networking Modes ==&lt;br /&gt;
&lt;br /&gt;
=== Flat Networking ===&lt;br /&gt;
&lt;br /&gt;
Most details are covered in the manual:&lt;br /&gt;
* http://docs.openstack.org/trunk/openstack-compute/admin/content/configuring-flat-networking.html&lt;br /&gt;
&lt;br /&gt;
This requires the Network address to be injected into the VM image. This is currently quite error prone (needs appropriate guest agent software, or injects files into an ubuntu file system)&lt;br /&gt;
&lt;br /&gt;
=== FlatDHCP Networking ===&lt;br /&gt;
&lt;br /&gt;
This used DHCP to hand out IP address to the guest VMs.&lt;br /&gt;
&lt;br /&gt;
Most details are covered in the manual:&lt;br /&gt;
* http://docs.openstack.org/trunk/openstack-compute/admin/content/configuring-flat-dhcp-networking.html&lt;br /&gt;
&lt;br /&gt;
It should look a bit like this, when you have network HA turned on:&lt;br /&gt;
&lt;br /&gt;
[[Image:flatdhcp.png]]&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* VM DHCP requests go: VM-&amp;gt;xenbr2-&amp;gt;nova-network-&amp;gt;xenbr2-&amp;gt;VM&lt;br /&gt;
* VM to VM traffic goes VM-&amp;gt;eth2-&amp;gt;switch-&amp;gt;eth2-&amp;gt;VM&lt;br /&gt;
* floating IP traffic incoming traffic does something like: public-&amp;gt;eth1-&amp;gt;xenbr1-&amp;gt;nova-network-&amp;gt;xenbr2-&amp;gt;vm&lt;br /&gt;
&lt;br /&gt;
=== VLAN Networking ===&lt;br /&gt;
&lt;br /&gt;
Most details are covered in the manual:&lt;br /&gt;
* http://docs.openstack.org/trunk/openstack-compute/admin/content/configuring-vlan-networking.html&lt;br /&gt;
&lt;br /&gt;
There are extra flags for the compute network driver, (so the VLAN network bridges are correctly created on the [[XenServer]]):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
network_driver=nova.virt.xenapi.vif.XenAPIBridgeDriver&lt;br /&gt;
or&lt;br /&gt;
network_driver=nova.virt.xenapi.vif.XenAPIOpenVswitchDriver&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It could look at bit like this, when you have Network HA turned on (Note: the bridges with dotted lines are automatically created by nova):&lt;br /&gt;
&lt;br /&gt;
[[Image:vlan.png]]&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* Very similar flow to FlatDHCP, please try to understand that one first&lt;br /&gt;
* The nova-network node creates its own bridges in the domU (not shown above). It uses eth1 on the DomU as a trunk port. It ensures appropriate DHCP server instance is correctly configured and only listening on the appropriate VLAN network.&lt;br /&gt;
&lt;br /&gt;
So when you create a VM, this is roughly what happens:&lt;br /&gt;
* A PIF identified either by (A) the vlan_interface flag or (B) the bridge_interface column in the networks db table will be used for creating a [[XenServer]] VLAN network&lt;br /&gt;
* VIF for VM instances within this network will be plugged in this VLAN network&lt;br /&gt;
* The 'Openstack domU', i.e. where nova-network is running, acts as a gateway for multiple VLAN networks, so it has to be attached on a VLAN trunk. For this reason it must have an interface on the parent bridge of the VLAN bridge where VM instances are plugged&lt;br /&gt;
&lt;br /&gt;
Some more pointers are available here:&lt;br /&gt;
* [[XenServer/VLANManager]]&lt;br /&gt;
&lt;br /&gt;
=== Network HA ===&lt;br /&gt;
&lt;br /&gt;
This works the same on [[XenServer]] as any other hypervisor: nova-network must be run on every compute host, and the following flag must be set:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
multi_host=True&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is know to work well with FlatDHCP, but should work with the over modes too (TODO - get confirmation)&lt;br /&gt;
&lt;br /&gt;
= Example Configurations =&lt;br /&gt;
&lt;br /&gt;
== Single NIC with no VLANs ==&lt;br /&gt;
&lt;br /&gt;
Run everything through eth0, make your domU have a single interface too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
public_interface=eth0&lt;br /&gt;
flat_interface=eth0&lt;br /&gt;
flat_network_bridge=xenbr0&lt;br /&gt;
# update xenapi connection URL to have IP that is available on eth0&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TODO - add a diagram to describe this&lt;br /&gt;
&lt;br /&gt;
TODO - add the [[DevStack]] config for this&lt;br /&gt;
&lt;br /&gt;
== Single NIC with VLANs ==&lt;br /&gt;
&lt;br /&gt;
[[DevStack]] keeps public, managmenet and tenant networks separate by adding extra VLAN networks on [[XenServer]].&lt;br /&gt;
&lt;br /&gt;
TODO - add some more of these&lt;br /&gt;
&lt;br /&gt;
= Example [[DevStack]] localrc configuration =&lt;br /&gt;
&lt;br /&gt;
[[DevStack]] will help create the DomU VM that runs the [[OpenStack]] code.&lt;br /&gt;
It will help you and create extra networks on your [[XenServer]] if required.&lt;br /&gt;
&lt;br /&gt;
== Default Configuration: Single NIC on [[XenServer]] with VLANs ==&lt;br /&gt;
&lt;br /&gt;
First the [https://github.com/citrix-openstack/devstack/blob/master/tools/xen/README.md DevStack readme] suggests the default configuration for your localrc file:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
MYSQL_PASSWORD=my_super_secret&lt;br /&gt;
SERVICE_TOKEN=my_super_secret&lt;br /&gt;
ADMIN_PASSWORD=my_super_secret&lt;br /&gt;
SERVICE_PASSWORD=$ADMIN_PASSWORD&lt;br /&gt;
RABBIT_PASSWORD=my_super_secret&lt;br /&gt;
# This is the password for your guest (for both stack and root users)&lt;br /&gt;
GUEST_PASSWORD=my_super_secret&lt;br /&gt;
&lt;br /&gt;
# IMPORTANT: The following must be set to your dom0 root password!&lt;br /&gt;
XENAPI_PASSWORD=my_super_secret&lt;br /&gt;
&lt;br /&gt;
# Do not download the usual images&lt;br /&gt;
IMAGE_URLS=&amp;quot;&amp;quot;&lt;br /&gt;
# Explicitly set multi-host&lt;br /&gt;
MULTI_HOST=1&lt;br /&gt;
# Give extra time for boot&lt;br /&gt;
ACTIVE_TIMEOUT=45&lt;br /&gt;
# Interface on which you would like to access services&lt;br /&gt;
HOST_IP_IFACE=eth0&lt;br /&gt;
# First time Ubuntu network install params&lt;br /&gt;
NETINSTALLIP=&amp;quot;dhcp&amp;quot;&lt;br /&gt;
NAMESERVERS=&amp;quot;&amp;quot;&lt;br /&gt;
NETMASK=&amp;quot;&amp;quot;&lt;br /&gt;
GATEWAY=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the current networking defaults (defined in the [https://github.com/citrix-openstack/devstack/blob/master/tools/xen/xenrc xenrc file]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# This is eth0 on the DomU VM is connected to xenapi local host management network and does DHCP&lt;br /&gt;
&lt;br /&gt;
# public interface running on home router, with static IP&lt;br /&gt;
# This is eth3 on the DomU VM&lt;br /&gt;
PUB_IP=192.168.1.55&lt;br /&gt;
PUB_BR=xenbr0&lt;br /&gt;
PUB_DEV=eth0&lt;br /&gt;
PUB_VLAN=-1&lt;br /&gt;
PUB_NETMASK=255.255.255.0&lt;br /&gt;
&lt;br /&gt;
# VM network on VLAN 100&lt;br /&gt;
# This is eth1 on the DomU VM&lt;br /&gt;
VM_IP=$10.255.255.255 # A host-only ip that let's the interface come up, otherwise unused&lt;br /&gt;
VM_NETMASK=255.255.255.0&lt;br /&gt;
VM_BR=&amp;quot;&amp;quot;&lt;br /&gt;
VM_VLAN=100&lt;br /&gt;
VM_DEV=eth0&lt;br /&gt;
&lt;br /&gt;
# Management traffic on VLAN 101&lt;br /&gt;
# this is eth2 on the DomU VM&lt;br /&gt;
MGT_IP=172.16.100.55&lt;br /&gt;
MGT_NETMASK=255.255.255.0&lt;br /&gt;
MGT_BR=&amp;quot;&amp;quot;&lt;br /&gt;
MGT_VLAN=101&lt;br /&gt;
MGT_DEV=eth0&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means [[DevStack]] will, if not already there, create two extra networks:&lt;br /&gt;
* eth0 and VLAN 100 (vmbr)&lt;br /&gt;
* eth0 and VLAN 101 (mgmtbr)&lt;br /&gt;
&lt;br /&gt;
== Using two NICs, with VLANs, using PXE ==&lt;br /&gt;
&lt;br /&gt;
You can [[XenServer/Install/PXE|install XenServer using PXE]]. This will tend to leave you with your management network on eth0 of your [[XenServer]], with DHCP. Then you can have the public network on eth1, and run the VM traffic on a VLAN on eth1.&lt;br /&gt;
&lt;br /&gt;
To achieve this, you probably want something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
# MGMT network params&lt;br /&gt;
MGT_IP=&amp;quot;dhcp&amp;quot; # use dhcp, as the PXE server is on this network&lt;br /&gt;
MGT_NETMASK=255.255.255.0&lt;br /&gt;
MGT_BR=xenbr0&lt;br /&gt;
MGT_VLAN=-1&lt;br /&gt;
MGT_DEV=eth0&lt;br /&gt;
&lt;br /&gt;
# Public network&lt;br /&gt;
PUB_IP=172.24.4.10 # static ip in same subnet as your floating ip ranage&lt;br /&gt;
PUB_NETMASK=255.255.255.0&lt;br /&gt;
PUB_BR=xenbr1&lt;br /&gt;
PUB_VLAN=-1&lt;br /&gt;
PUB_DEV=eth1&lt;br /&gt;
&lt;br /&gt;
# VM network params&lt;br /&gt;
VM_IP=10.255.255.255 # A host-only ip that let's the interface come up, otherwise unused&lt;br /&gt;
VM_NETMASK=255.255.255.0&lt;br /&gt;
VM_BR=&amp;quot;&amp;quot;&lt;br /&gt;
VM_VLAN=100&lt;br /&gt;
VM_DEV=eth1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16044</id>
		<title>XenServer/XenAndXenServer</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=XenServer/XenAndXenServer&amp;diff=16044"/>
				<updated>2013-02-16T21:39:38Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;!-- ## page was renamed from XenXCPAndXenServer --&amp;gt;&lt;br /&gt;
&amp;lt;&amp;lt;[[TableOfContents]]()&amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Getting Started =&lt;br /&gt;
&lt;br /&gt;
To get started, take a look at: [[XenServer/GettingStarted|Getting started with XenServer and [[OpenStack]]]]&lt;br /&gt;
&lt;br /&gt;
= Official Docs =&lt;br /&gt;
&lt;br /&gt;
You can find this information in the official docs:&lt;br /&gt;
http://docs.openstack.org/trunk/openstack-compute/admin/content/introduction-to-xen.html&lt;br /&gt;
&lt;br /&gt;
= Introduction to using Xen, XCP and [[XenServer]] with [[OpenStack]] =&lt;br /&gt;
&lt;br /&gt;
In this section we will describe Xen, XCP, and [[XenServer]], the&lt;br /&gt;
differences between them, and how to use them with [[OpenStack]].  Xen's&lt;br /&gt;
architecture is different from KVM's in important ways, and we discuss those&lt;br /&gt;
differences and when each might make sense in your [[OpenStack]] cloud.&lt;br /&gt;
&lt;br /&gt;
== Basic terminology ==&lt;br /&gt;
&lt;br /&gt;
=== Xen ===&lt;br /&gt;
Xen is a hypervisor.  It provides the&lt;br /&gt;
fundamental isolation between virtual machines.  Xen is open source (GPLv2)&lt;br /&gt;
and is managed by Xen.org, an cross-industry organization. &lt;br /&gt;
Xen is a component of many different products and projects.  The&lt;br /&gt;
hypervisor itself is very similar across all these projects, but the way that&lt;br /&gt;
it is managed can be different, which can cause confusion if you're not clear&lt;br /&gt;
which toolstack you are using.  Make sure you know what toolstack you want&lt;br /&gt;
before you get started.&lt;br /&gt;
&lt;br /&gt;
=== XCP ===&lt;br /&gt;
XCP is an open source (GPLv2) toolstack&lt;br /&gt;
for Xen.  It is designed specifically as platform for enterprise and cloud&lt;br /&gt;
computing, and is well integrated with [[OpenStack]].&lt;br /&gt;
&lt;br /&gt;
=== Citrix [[XenServer]] ===&lt;br /&gt;
&lt;br /&gt;
Citrix [[XenServer]] is a commercial&lt;br /&gt;
product.  It is based on XCP, and exposes the same toolstack and managment&lt;br /&gt;
API.  As an analogy, think of [[XenServer]] being based on XCP in the way that Red&lt;br /&gt;
Hat Enterprise Linux is based on Fedora.  [[XenServer]] has a free version (which&lt;br /&gt;
is very similar to XCP) and paid-for versions with additional features&lt;br /&gt;
enabled.&lt;br /&gt;
&lt;br /&gt;
=== xapi / XAPI / XenAPI ===&lt;br /&gt;
&lt;br /&gt;
Both [[XenServer]] and XCP include Xen, Linux, and the primary control&lt;br /&gt;
daemon known as xapi.&lt;br /&gt;
&lt;br /&gt;
The API shared between XCP and [[XenServer]] is called &amp;quot;&amp;quot;XenAPI&amp;quot;&amp;quot;.  [[OpenStack]] usually refers to XenAPI, to&lt;br /&gt;
indicate that the integration works equally well on XCP and [[XenServer]].&lt;br /&gt;
Sometimes, a careless person will refer to [[XenServer]] specifically, but you can&lt;br /&gt;
be reasonably confident that anything that works on [[XenServer]] will also work&lt;br /&gt;
on the latest version of XCP.&lt;br /&gt;
&lt;br /&gt;
== Privileged and unprivileged domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen host will run a number of virtual machines, VMs, or domains (the&lt;br /&gt;
terms are synonymous on Xen).  One of these is in charge of running the rest&lt;br /&gt;
of the system, and is known as &amp;quot;domain 0&amp;quot;, or &amp;quot;dom0&amp;quot;.  It is the first domain&lt;br /&gt;
to boot after Xen, and owns the storage and networking hardware, the device&lt;br /&gt;
drivers, and the primary control software.  Any other VM is unprivileged, and&lt;br /&gt;
are known as a &amp;quot;domU&amp;quot; or &amp;quot;guest&amp;quot;.  All customer VMs are unprivileged of&lt;br /&gt;
course, but you should note that on Xen the [[OpenStack]] control software&lt;br /&gt;
(nova-compute) also runs in a domU.  This gives a level of security isolation&lt;br /&gt;
between the privileged system software and the [[OpenStack]] sofware (much of&lt;br /&gt;
which is customer-facing).  This architecture is described in more detail&lt;br /&gt;
later.&lt;br /&gt;
&lt;br /&gt;
There is an ongoing project to split domain 0 into multiple privileged&lt;br /&gt;
domains known as &amp;quot;&amp;quot;driver domains&amp;quot;&amp;quot; and &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;stub domains&amp;quot;&amp;quot;.  This would give even better separation&lt;br /&gt;
between critical components.  This is an ongoing research project and you&lt;br /&gt;
shouldn't worry about it right now.  The current architecture just has three&lt;br /&gt;
levels of separation: dom0, the [[OpenStack]] domU, and the completely&lt;br /&gt;
unprivileged customer VMs.&lt;br /&gt;
&lt;br /&gt;
== Paravirtualized versus hardware virtualized domains ==&lt;br /&gt;
&lt;br /&gt;
A Xen virtual machine can be &amp;quot;&amp;quot;paravirtualized&lt;br /&gt;
(PV)&amp;quot;&amp;quot; or &amp;quot;&amp;quot;hardware virtualized&lt;br /&gt;
(HVM)&amp;quot;&amp;quot;.  This refers to the interaction between Xen, domain 0, and&lt;br /&gt;
the guest VM's kernel.  PV guests are aware of the fact that they are&lt;br /&gt;
virtualized and will co-operate with Xen and domain 0; this gives them better&lt;br /&gt;
performance characteristics.  HVM guests are not aware of their environment,&lt;br /&gt;
and the hardware has to pretend that they are running on an unvirtualized&lt;br /&gt;
machine.  HVM guests have the advantage that there is no need to modify the&lt;br /&gt;
guest operating system, which is essential when running Windows.&lt;br /&gt;
&lt;br /&gt;
In [[OpenStack]], customer VMs may run in either PV or HVM mode.  However,&lt;br /&gt;
the [[OpenStack]] domU (that's the one running nova-compute) &amp;lt;emphasis&lt;br /&gt;
role=&amp;quot;bold&amp;quot;&amp;gt;must&amp;quot;&amp;quot; be running in PV mode.&lt;br /&gt;
&lt;br /&gt;
= Deployment architecture =&lt;br /&gt;
&lt;br /&gt;
When you deploy [[OpenStack]] on XCP or [[XenServer]] you will get something&lt;br /&gt;
similar to this:&lt;br /&gt;
&lt;br /&gt;
[[Image:XenServer-dom0-domU.png]]&lt;br /&gt;
&lt;br /&gt;
Key things to note:&lt;br /&gt;
&lt;br /&gt;
* The hypervisor: Xen&lt;br /&gt;
* Domain 0: runs xapi and some small pieces from [[OpenStack]] (some xapi plugins and network isolation rules). The majority of this is provided by [[XenServer]] or XCP (or yourself using Kronos).&lt;br /&gt;
* [[OpenStack]] domU: The nova-compute code runs in a paravirtualized virtual machine, running on the host under management. Each host runs a local instance of nova-compute.  It will often also be running nova-network (depending on your network mode).  In this case, nova-network is managing the addresses given to the tenant VMs through DHCP.&lt;br /&gt;
* Nova uses the XenAPI Python library to talk to xapi, and it uses the Host Internal Management Network to reach from the domU to dom0 without leaving the host.&lt;br /&gt;
&lt;br /&gt;
Some notes on the networking:&lt;br /&gt;
* The above diagram assumes FlatDHCP networking (the [[DevStack]] default).&lt;br /&gt;
* There are three main [[OpenStack]] networks: Management traffic (RabbitMQ, MySQL, etc), Tenant network traffic (controlled by nova-network) and Public traffic (floating IPs, public API end points).&lt;br /&gt;
* Each network that leaves the host has been put through a separate physical network interface.  This is the simplest model, but it's not the only one possible.  You may choose to isolate this traffic using VLANs instead, for example.&lt;br /&gt;
* nova-compute generally talks to [[XenServer]] using a host local private network called either &amp;quot;Guest Installer Network&amp;quot; or &amp;quot;Host Internal Managmenet Network&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Another example of how to deploy [[OpenStack]] on a system with only two physical network interfaces is:&lt;br /&gt;
&lt;br /&gt;
[[Image:DevStackDiagram.png]]&lt;br /&gt;
&lt;br /&gt;
== [[XenServer]] pools ==&lt;br /&gt;
&lt;br /&gt;
Before [[OpenStack]] 2012.1 (&amp;quot;Essex&amp;quot;), all [[XenServer]] machines used with&lt;br /&gt;
[[OpenStack]] are standalone machines, usually only using local storage.&lt;br /&gt;
&lt;br /&gt;
However in 2012.1 and later, the host-aggregates feature allows you to&lt;br /&gt;
create pools of [[XenServer]] hosts (configuring shared storage is still an out of&lt;br /&gt;
band activity). This move will enable live migration when using shared&lt;br /&gt;
storage.&lt;br /&gt;
&lt;br /&gt;
== Xen and libvirt ==&lt;br /&gt;
&lt;br /&gt;
It may possible to manage Xen using libvirt.  This would be necessary&lt;br /&gt;
for any Xen-based system that isn't using the XCP toolstack, such as SUSE&lt;br /&gt;
Linux or Oracle Linux.  Unfortunately, this is not well tested or supported&lt;br /&gt;
today, and using the XCP or [[XenServer]] toolstacks with the [[OpenStack]] XenAPI&lt;br /&gt;
backend is the only recommended method.&lt;br /&gt;
&lt;br /&gt;
= Further reading =&lt;br /&gt;
&lt;br /&gt;
What is Xen? by Xen.org: http://xen.org/files/Marketing/WhatisXen.pdf.&lt;br /&gt;
&lt;br /&gt;
Xen Hypervisor project: http://xen.org/products/xenhyp.html.&lt;br /&gt;
&lt;br /&gt;
XCP project: http://xen.org/products/cloudxen.html.&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=XenServerMigrations&amp;diff=16038</id>
		<title>XenServerMigrations</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=XenServerMigrations&amp;diff=16038"/>
				<updated>2013-02-16T21:37:25Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
* '''Launchpad Entry'''&lt;br /&gt;
* '''Created''':&lt;br /&gt;
* '''Contributors''': &lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
== Release Note ==&lt;br /&gt;
&lt;br /&gt;
We need the ability to move [[XenServer]] instances from one host in a zone to another host within the same zone. This provides a substantial amount of useful functionality, such as the ability to replace a dying or obsolete host with newer hardware by evacuating instances from it. Migrations are also the base dependency for functional resizes.&lt;br /&gt;
&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
As above, the ability to evacuate a host for any physical reason is highly desirable. Furthermore, the ability for a customer to resize an instance (increasing the RAM and disk allotment) without snapshotting and creating a new instance is useful. &lt;br /&gt;
&lt;br /&gt;
== User stories ==&lt;br /&gt;
&lt;br /&gt;
# As operations, I want to be able to evacuate a host with failing hardware so that I can replace the box with minimal impact to customers&lt;br /&gt;
# As a user, I want to be able to migrate my instance so that I can move to faster and/or newer hardware&lt;br /&gt;
&lt;br /&gt;
== Assumptions ==&lt;br /&gt;
&lt;br /&gt;
The ability to snapshot a running [[XenServer]] instance already exists&lt;br /&gt;
&lt;br /&gt;
== Design &amp;amp; Implementation ==&lt;br /&gt;
&lt;br /&gt;
The abstracted websequence diagram is as follows:&lt;br /&gt;
&lt;br /&gt;
[[Image:index.php.png]]&lt;br /&gt;
&lt;br /&gt;
A few issues arise in this design. First, because of the current scheduler implementation, it isn't safe to assume that the scheduler will be aware of the ability to migrate. The &amp;quot;simple&amp;quot; scheduler implementation shows that this is possible, but I don't think we should depend on that ability, at least for the time being. The concession, as above, is to cast the message to the destination first, which simply identifies itself and proxies the message right over to the source. &lt;br /&gt;
&lt;br /&gt;
We can provide for the notion of a smarter scheduler by making the initial migration call context sensitive. If we are the source and a destination argument is also present, we simply begin the Rsync. Otherwise, cast to the source, appending ourself to the message arguments. It feels a little bit inconsistent, but it would be more efficient to have a migration-aware scheduler. &lt;br /&gt;
&lt;br /&gt;
First pass will be to implement it as the sequence diagram above indicates, with a second pass to add the above functionality if deemed necessary.&lt;br /&gt;
&lt;br /&gt;
=== Migration States ===&lt;br /&gt;
&lt;br /&gt;
* No state / No Migration Instance: The destination receives the cast from the API and creates a migration instance with the requisite fields. In this stage, the destination creates a migration instance populated with the current instance attributes and new ones, setting the status to '''pre-migrating''' and then casts a message to the source.&lt;br /&gt;
* '''pre-migrating:''' The source has been notified of the intent to migrate the VM, which then snaps the VM and changes the state to '''migrating'''&lt;br /&gt;
* '''migrating:''' The source is Rsync'ing the VHD to the destination host machine. Afterwards, the migration status is set to 'migrating_step2'. The source then shuts the instance down, and then starts Rsync'ing the COW to the destination host machine. Afterwards, the source sets the migration status to '''post-migrating''' and casts a message to the destination compute&lt;br /&gt;
* '''post-migrating:''' The destination creates a new instance from the Instance table and transferred VHD/COW, updates the instance record with the new hostname, and then sets the migration_status to '''verify-migration'''&lt;br /&gt;
* '''verify-migration:''' The migration will exist in this state until a subsequent API call is made. At that point, the source compute will vm-destroy the old instance and mark the migration as status '''finished'''&lt;br /&gt;
* '''finished:''' This is the state the migration is in whether it's been &amp;quot;confirmed&amp;quot; or &amp;quot;reverted&amp;quot;&lt;br /&gt;
* '''reverted:''' The destination compute will destroy the new instance, and then cast a message to the source to power back on the old instance. The old instance attributes will be restored, and then the migration status will be set to '''finished'''&lt;br /&gt;
&lt;br /&gt;
=== Disk Transfer ===&lt;br /&gt;
&lt;br /&gt;
 There are few different ways we could go about transferring the disk to the destination host&lt;br /&gt;
&lt;br /&gt;
# Create a XAPI plugin that does the rsync'ing for us&lt;br /&gt;
# SSH into dom0. I'd really prefer to avoid this route, but it may be the best option depending on how long 1 would take&lt;br /&gt;
&lt;br /&gt;
=== Optimization ===&lt;br /&gt;
* We could suspend the instance instead of shutting it down, and then migrate the RAM VHD in the process so users don't lose their uptime&lt;br /&gt;
&lt;br /&gt;
=== Code Changes ===&lt;br /&gt;
&lt;br /&gt;
The Openstack API will modify the &amp;quot;action&amp;quot; endpoint to expose &amp;quot;resize&amp;quot; functionality, which is simply a migration with a larger RAM and disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Migration ===&lt;br /&gt;
&lt;br /&gt;
Functionality already exists within the Openstack API, but returns HTTP 501 at this time. Afterwards, existing API clients should be able to successfully migrate through the &amp;quot;resize&amp;quot; functionality present in the API. Additionally, functionality will be exposed through the Admin API for migration without resizing the instance.&lt;br /&gt;
&lt;br /&gt;
== Test/Demo Plan ==&lt;br /&gt;
&lt;br /&gt;
This need not be added or completed until the specification is nearing beta.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[[Category:Spec]]&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13741</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13741"/>
				<updated>2013-02-05T19:12:12Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
@font-face {&lt;br /&gt;
  font-family: 'PT Sans';&lt;br /&gt;
  font-style: normal;&lt;br /&gt;
  font-weight: 400;&lt;br /&gt;
  src: local('PT Sans'), local('PTSans-Regular'), url(https://themes.googleusercontent.com/static/fonts/ptsans/v4/LKf8nhXsWg5ybwEGXk8UBQ.woff) format('woff');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
#p-logo a { display:none; }&lt;br /&gt;
&lt;br /&gt;
body { &lt;br /&gt;
  background-color: #FFFFFF;&lt;br /&gt;
  font-family: 'PT Sans';&lt;br /&gt;
  background-image: display:none;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13740</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13740"/>
				<updated>2013-02-05T18:47:19Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
@font-face {&lt;br /&gt;
  font-family: 'PT Sans';&lt;br /&gt;
  font-style: normal;&lt;br /&gt;
  font-weight: 400;&lt;br /&gt;
  src: local('PT Sans'), local('PTSans-Regular'), url(https://themes.googleusercontent.com/static/fonts/ptsans/v4/LKf8nhXsWg5ybwEGXk8UBQ.woff) format('woff');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
#p-logo a { display:none; }&lt;br /&gt;
&lt;br /&gt;
body { &lt;br /&gt;
  background-color: #FFFFFF;&lt;br /&gt;
  font-family: 'PT Sans';&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13739</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13739"/>
				<updated>2013-02-05T18:36:38Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
@font-face {&lt;br /&gt;
  font-family: 'PT Sans';&lt;br /&gt;
  font-style: normal;&lt;br /&gt;
  font-weight: 400;&lt;br /&gt;
  src: local('PT Sans'), local('PTSans-Regular'), url(https://themes.googleusercontent.com/static/fonts/ptsans/v4/LKf8nhXsWg5ybwEGXk8UBQ.woff) format('woff');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
#p-logo a { display:none; }&lt;br /&gt;
&lt;br /&gt;
body { &lt;br /&gt;
  background-color: #FFFFFF;&lt;br /&gt;
/*  font-family: 'PT Sans', serif; */&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13738</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13738"/>
				<updated>2013-02-05T18:35:52Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
@font-face {&lt;br /&gt;
  font-family: 'PT Sans';&lt;br /&gt;
  font-style: normal;&lt;br /&gt;
  font-weight: 400;&lt;br /&gt;
  src: local('PT Sans'), local('PTSans-Regular'), url(https://themes.googleusercontent.com/static/fonts/ptsans/v4/LKf8nhXsWg5ybwEGXk8UBQ.woff) format('woff');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
#p-logo a { display:none; }&lt;br /&gt;
&lt;br /&gt;
body { &lt;br /&gt;
  background-color: #FFFFFF;&lt;br /&gt;
  font-family: 'PT Sans', serif;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13737</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13737"/>
				<updated>2013-02-05T18:27:43Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
@font-face {&lt;br /&gt;
  font-family: 'PT Sans';&lt;br /&gt;
  font-style: normal;&lt;br /&gt;
  font-weight: 400;&lt;br /&gt;
  src: local('PT Sans'), local('PTSans-Regular'), url(https://themes.googleusercontent.com/static/fonts/ptsans/v4/LKf8nhXsWg5ybwEGXk8UBQ.woff) format('woff');&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
#p-logo a { display:none; }&lt;br /&gt;
&lt;br /&gt;
body { background-color: #FFFFFF }&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13736</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13736"/>
				<updated>2013-02-05T18:14:37Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
#p-logo a { display:none; }&lt;br /&gt;
&lt;br /&gt;
body { background-color: #FFFFFF }&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13735</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13735"/>
				<updated>2013-02-05T17:07:04Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;br /&gt;
&lt;br /&gt;
#p-logo a { display:none; }&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13734</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13734"/>
				<updated>2013-02-05T16:54:37Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;) !important; }&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13733</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13733"/>
				<updated>2013-02-05T16:47:31Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;/w/images/4/4c/OpenStack.png&amp;quot;); }&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13732</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13732"/>
				<updated>2013-02-05T16:30:41Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;br /&gt;
&lt;br /&gt;
#p-logo { background-image: url(&amp;quot;w/skins/common/images/openstack.png&amp;quot;); }&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13731</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=MediaWiki:Common.css&amp;diff=13731"/>
				<updated>2013-02-05T16:26:25Z</updated>
		
		<summary type="html">&lt;p&gt;Olaph: Created page with &amp;quot;/* CSS placed here will be applied to all skins */  body.page-Main_Page h1.firstHeading { display:none; }&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
body.page-Main_Page h1.firstHeading { display:none; }&lt;/div&gt;</summary>
		<author><name>Olaph</name></author>	</entry>

	</feed>