<p>Hi Armando!</p>
<p>Using the code of live migration is an idea I should have thought of sooner ;).</p>
<p>Do you have any idea where I can find the live_migration class/function?</p>
<p>Regards,</p>
<p>Gerrit</p>
<p>On Mon, 6 Feb 2012 12:01:23 +0000, Armando Migliaccio <Armando.Migliaccio@eu.citrix.com> wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored --><!-- /* Font Definitions */ @font-face {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} @font-face {font-family:Consolas; panose-1:2 11 6 9 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p {mso-style-priority:99; mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; font-size:12.0pt; font-family:"Times New Roman","serif";} pre {mso-style-priority:99; mso-style-link:"HTML Preformatted Char"; margin:0cm; margin-bottom:.0001pt; font-size:10.0pt; font-family:"Courier New";} span.HTMLPreformattedChar {mso-style-name:"HTML Preformatted Char"; mso-style-priority:99; mso-style-link:"HTML Preformatted"; font-family:Consolas;} span.EmailStyle21 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt;} div.WordSection1 {page:WordSection1;} -->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;">Hi Gerrit,<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;">This is an interesting approach and certainly worth pursuing in the most general case, and in the kvm in particular. As for the xenapi case (or esx one for that matter), I was more inclined to leverage HA capabilities that the hypervisor layer provides you with…clearly with some cloud drizzle on top </span><span style="font-size: 11.0pt; font-family: Wingdings; color: #1f497d;">J</span><span style="font-size: 11.0pt; color: #1f497d;"><!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;">As for rebuilding the networking config for the instance, have you thought about leveraging the code path for live migration? Only in this case the migration will assume a shutdown instance.<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;">Thanks!<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;">Armando<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; color: #1f497d;"><!-- o ignored --> </span></p>
<div style="border: none; border-left: solid blue 1.5pt; padding: 0cm 0cm 0cm 4.0pt;">
<div>
<div style="border: none; border-top: solid #B5C4DF 1.0pt; padding: 3.0pt 0cm 0cm 0cm;">
<p class="MsoNormal"><strong><span style="font-size: 10.0pt;">From:</span></strong><span style="font-size: 10.0pt;"> Gerrit Tamboer [mailto:gerrit@gerr1t.nl] <br /><strong>Sent:</strong> 31 January 2012 09:27<br /><strong>To:</strong> Armando Migliaccio<br /><strong>Cc:</strong> openstack-operators@lists.openstack.org<br /><strong>Subject:</strong> RE: [Openstack-operators] A couple of questions regarding Nova<!-- o ignored --></span></p>
</div>
</div>
<p class="MsoNormal"><!-- o ignored --> </p>
<p>Hi Armando,<!-- o ignored --></p>
<p>We are working on a custom implementation for nova-ha. It is going to be a PHP daemon which decides whether a compute-node is down by ping results of a combination of the node itself and the instances running on it.<!-- o ignored --></p>
<p>The algorithm which decides the appriopriate actions is done, now we are working on how to start an instance on another node.<!-- o ignored --></p>
<p>This (in my view) can be done with the following steps;<!-- o ignored --></p>
<p>1. Start the instance in virsh<br /> * Add the NWfilter by the XML file<br /> * Add the instance information by the (qemu) XML file <br /> * Start the instance<br />2. Update IPtables<br /> * Add the standard instance firewall rules<br /> * Add the extra firewall rules provided by the instance's security group<br />3. Add floating IP's<br /> * Add the instance's floating IP's with 'ip addr add'<br /> * Add the IPtables rules to forward the IP to the instance<br /> * Arping the floating IP's (?)<br />4. Update the nova database<br /> * Make sure the controller knows that the instance is running on a different compute node by updating the instances table<!-- o ignored --></p>
<p>These steps should be enough to bring an instance up on another node, or am I missing something?<!-- o ignored --></p>
<p>The first step is actually quite easy if your running shared storage, the only thing we need to make sure is that the libvirt xml files are also on the shared storage space to make sure other nodes can add the XML files.<!-- o ignored --></p>
<p>Step 2 and 3 is scriptable, allthough it would be nice if there is any way to trigger the nova-api to rebuild the nova-networking for an instance. I have tried rebooting an instance but that does not trigger it. <br />Anyone has any idea if this is possible?<!-- o ignored --></p>
<p>Thanks!<!-- o ignored --></p>
<p>ps. Armando, when we are done and successfully implemented our patch, I will leave a note on the blueprint with our findings.<!-- o ignored --></p>
<div>
<pre>---<!-- o ignored --></pre>
<pre>Met vriendelijke groet,<!-- o ignored --></pre>
<pre>Gerrit Tamboer<!-- o ignored --></pre>
</div>
<p>On Mon, 30 Jan 2012 15:12:01 +0000, Armando Migliaccio wrote:<!-- o ignored --></p>
<blockquote style="border: none; border-left: solid #1010FF 1.5pt; padding: 0cm 0cm 0cm 4.0pt; margin-left: 3.75pt; margin-top: 5.0pt; margin-bottom: 5.0pt;">
<div>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 11.0pt; color: #1f497d;">As for issue 1, have you thought of implementing the stop functionality as a combination of Snapshot+Terminate?</span><!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 11.0pt; color: #1f497d;"> </span><!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 11.0pt; color: #1f497d;">As for issue 2, there is a <a href="https://blueprints.launchpad.net/nova/+spec/guest-ha">blueprint</a> to deal with these sorts of scenarios. Unfortunately that’s not going to help you in the immediate term because the effort hasn’t started yet (for lack of time more than anything else).</span><!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 11.0pt; color: #1f497d;"> </span><!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 11.0pt; color: #1f497d;">Hope this help!</span><!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 11.0pt; color: #1f497d;">Armando</span><!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 11.0pt; color: #1f497d;"> </span><!-- o ignored --></p>
<div style="border: none; border-left: solid blue 1.5pt; padding: 0cm 0cm 0cm 4.0pt;">
<div>
<div style="border: none; border-top: solid #B5C4DF 1.0pt; padding: 3.0pt 0cm 0cm 0cm;">
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><strong><span style="font-size: 10.0pt;">From:</span></strong><span style="font-size: 10.0pt;"> openstack-operators-bounces@lists.openstack.org [mailto:openstack-operators-bounces@lists.openstack.org] <strong>On Behalf Of </strong>Gerrit Tamboer<br /><strong>Sent:</strong> 29 January 2012 09:38<br /><strong>To:</strong> openstack-operators@lists.openstack.org<br /><strong>Subject:</strong> Re: [Openstack-operators] A couple of questions regarding Nova</span><!-- o ignored --></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p>Hi!<!-- o ignored --></p>
<p>Unfortunately, no reply yet.<br />Does anyone have an idea how to solve these issues?<!-- o ignored --></p>
<p>Especially the second question is a pain :)<!-- o ignored --></p>
<p>Regards,<!-- o ignored --></p>
<p>Gerrit<!-- o ignored --></p>
<p>On Fri, 27 Jan 2012 09:25:41 +0100, Gerrit Tamboer wrote:<!-- o ignored --></p>
<blockquote style="border: none; border-left: solid #1010FF 1.5pt; padding: 0cm 0cm 0cm 4.0pt; margin-left: 3.75pt; margin-top: 5.0pt; margin-bottom: 5.0pt;">
<p>Hi!<!-- o ignored --></p>
<p>We are currently testing the Openstack Nova product, but we have 2 problems/questions which we haven't find a decent solution for yet.<!-- o ignored --></p>
<p>1. In The Nova-api v1.1 there is no option to Stop and Start an instance, only Reboot and Terminate. I know that these options are available in v2.0 which is in Beta right now.<br />Because we would like to work with the stable version of the Nova-Api we are not planning to move to v2.0 for now. <br />We are wondering if anyone has managed to find a solution for this issue? Is there a 'clean' way to implement and use a Stop and Start function in the API? We can of course make an exception by using custom shell scripts for the stop and start function (using virsh destroy/start) but this is kinda nasty ;).. <!-- o ignored --></p>
<p>2. On our Nova-Compute machines we have shared storage using an iSCSI target which gives us the ability to use Live Migration. This is working perfectly! The only problem we are facing at this moment is that we want to be able to start an instance on a different Compute Node when the original Compute Node goes down. Is there an easy way or (even better) an API call which can be used for this? The Live Migration function does not work when the original Nova Compute node is down. We are currently planning to implement our own patch which detects a compute node going down and automatically starts the instances on different compute nodes using various algorithms. Only the last part (starting an instance on a different node) is something we need to figure out, hopefully you guys can help! :)<!-- o ignored --></p>
<p>Regards,<!-- o ignored --></p>
<p>Gerrit <!-- o ignored --></p>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>