<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux2Go &#187; planetopenstack</title>
	<atom:link href="http://blog.linux2go.dk/tag/planetopenstack/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.linux2go.dk</link>
	<description>The blog of Soren Hansen (not the golfer)</description>
	<lastBuildDate>Mon, 14 Jan 2013 10:45:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>If you&#8217;re trying to do asymmetric routing in Ubuntu 12.04..</title>
		<link>http://blog.linux2go.dk/2012/07/03/if-youre-trying-to-do-asymmetric-routing-in-ubuntu-12-04/</link>
		<comments>http://blog.linux2go.dk/2012/07/03/if-youre-trying-to-do-asymmetric-routing-in-ubuntu-12-04/#comments</comments>
		<pubDate>Tue, 03 Jul 2012 20:34:52 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=814</guid>
		<description><![CDATA[..you will need to disable rp_filter on the inbound interface. rp_filter has been enabled by default since Ubuntu 12.04, so even if it worked in earlier versions, you&#8217;ll need this setting. You can add an &#8220;ip_rp_filter 0&#8221; line to the relevant interface in /etc/network/interfaces, and you&#8217;re golden.]]></description>
				<content:encoded><![CDATA[<p>..you will need to disable <code>rp_filter</code> on the inbound interface. <code>rp_filter</code> has been enabled by default since Ubuntu 12.04, so even if it worked in earlier versions, you&#8217;ll need this setting.</p>
<p>You can add an &#8220;<code>ip_rp_filter 0</code>&#8221; line to the relevant interface in <code>/etc/network/interfaces</code>, and you&#8217;re golden.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2012/07/03/if-youre-trying-to-do-asymmetric-routing-in-ubuntu-12-04/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Moving on..</title>
		<link>http://blog.linux2go.dk/2011/09/02/moving-on/</link>
		<comments>http://blog.linux2go.dk/2011/09/02/moving-on/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 09:59:53 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Rackspace]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=763</guid>
		<description><![CDATA[Seeing as the election for the OpenStack Project Policy Board is going on, it seems only fair to announce that I quite soon no longer will be working for Rackspace. Instead, I will be working (still on OpenStack) for Nebula. If this is material to your vote, I apologise for not disclosing this earlier, but [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://e21a4f537c8da3af7a1c-6f89541739744a029c669b331153045d.r85.cf1.rackcdn.com/2011/09/iStock_000005542194XSmall.jpg"><img class="alignright size-full wp-image-765" title="Moving on.." src="http://e21a4f537c8da3af7a1c-6f89541739744a029c669b331153045d.r85.cf1.rackcdn.com/2011/09/iStock_000005542194XSmall.jpg" alt="" width="242" height="178" /></a>Seeing as the election for the OpenStack Project Policy Board is going on, it seems only fair to announce that I quite soon no longer will be working for Rackspace. Instead, I will be working (still on OpenStack) for <a href="http://www.nebula.com/">Nebula</a>. If this is material to your vote, I apologise for not disclosing this earlier, but it simply wasn&#8217;t finalised until a bit earlier this week.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/09/02/moving-on/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Testing of OpenStack</title>
		<link>http://blog.linux2go.dk/2011/08/18/testing-of-openstack/</link>
		<comments>http://blog.linux2go.dk/2011/08/18/testing-of-openstack/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 11:21:33 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=744</guid>
		<description><![CDATA[I&#8217;d like to take a couple of minutes of your time to talk about testing of OpenStack. Swift has always had very good test coverage, and Glance also does pretty well, so I&#8217;ll mostly be focused on Nova. (Psst&#8230; If you can&#8217;t be bothered to read the whole thing, just skip down to the how [...]]]></description>
				<content:encoded><![CDATA[<dl id="" class="wp-caption alignright" style="width: 168px;">
<dt class="wp-caption-dt"><a href="http://e21a4f537c8da3af7a1c-6f89541739744a029c669b331153045d.r85.cf1.rackcdn.com/2011/08/iStock_000010466267XSmall.jpg"><img class="size-full wp-image-742 " title="Check marks" src="http://e21a4f537c8da3af7a1c-6f89541739744a029c669b331153045d.r85.cf1.rackcdn.com/2011/08/iStock_000010466267XSmall.jpg" alt="" width="158" height="134" /></a></dt>
<dd class="wp-caption-dd"></dd>
</dl>
<p>I&#8217;d like to take a couple of minutes of your time to talk about testing of OpenStack. Swift has always had very good test coverage, and Glance also does pretty well, so I&#8217;ll mostly be focused on Nova.</p>
<p>(Psst&#8230; If you can&#8217;t be bothered to read the whole thing, just skip down to the <a href="#howyoucanhelp">how you can help</a> section.)</p>
<h2>Unit tests</h2>
<p>Unit tests are by far the easiest to run. They&#8217;re right there in the development tree, a simple <code>./run_tests.sh</code> away. You don&#8217;t need a complicated hardware setup, just a source code checkout.</p>
<p>They each exercise a small portion of the code in isolation to verify that they live up to their &#8220;contract&#8221;. More often than not, this contract is implicit. There&#8217;s no documentation of its input, output, or side effects, and maybe there doesn&#8217;t have to be. In many cases things get split up simply for readability reasons (larger routines that have grown out of control get split into smaller chunks) or to ease testing, so they&#8217;re not actually written expecting to be called from anywhere else. Documentation for all these things would be *awesome*, but a unit test should be the minimum required.</p>
<h2>Functional tests</h2>
<p>Unit tests are great. However, verifying that each piece of the puzzle does what it says on the tin is of little use if putting them all together doesn&#8217;t actually do what you set out to achieve. This is where we use functional tests. An example might be verifying that when you invoke a frontend API method that is supposed to start a virtual machine, a virtual machine actually ends up getting started in a mock hypervisor with all the correct things having been put in place along the way.</p>
<p>In my experience, almost every time an issue is caught by this type of test, it&#8217;s an indication that the unit tests are either wrong (e.g. when X goes into a particular routine, it checks that Y comes out, but for everything else to work, Z was actually supposed to come out)  or don&#8217;t test all the edge cases. So, while a failure at this level should probably involve fixing up (or adding new) unit tests, these tests are indispensable. They verify the cooperation between the various internals, which is easy to miss when staring at each tiny little part in isolation (particularly in a piece of software like Nova that is full of side effects).</p>
<p>(In Nova, functional and unit tests all live in the same test suite)</p>
<h2>Integration tests</h2>
<p>Unit and black box tests are great, but what end users see is what really matters. If someone deploys all the various OpenStack components and put them together and something ultimately doesn&#8217;t work, we&#8217;ve failed. It&#8217;s all been futile.</p>
<p>Integration tests are often the easiest to write. When dealing with internals, it&#8217;s easy to punt on a lot of things like &#8220;should this method take this or that as an argument?,&#8221; &#8220;ideally, this db call shouldn&#8217;t live here, but it&#8217;ll have to do for now,&#8221; etc., but when it comes to what the end users sees, everything must have an answer. We can&#8217;t not have firm, concrete, simple, long-lived answers to questions like: &#8220;If I want to start a virtual machine, what do I do?,&#8221; &#8220;which argument comes first for this API call?,&#8221; etc. Hence, writing tests that start a virtual machine and then later makes sure that it started properly is rather forgiving. It&#8217;s also reassuring to end-users to know that their exact use cases are verified to work.</p>
<p>Again, ideally nothing should ever be caught here. If it does, it means that something slipped through a crack left by both the unit tests and black-box tests, or maybe the real KVM doesn&#8217;t act like we expected when we wrote its mock counterpart. Everything caught here should end up in a unit test somewhere once the culprit has been found.</p>
<h2>Where do we stand today?</h2>
<h3>Unit and functional tests</h3>
<p>As mentioned, nova&#8217;s source tree includes a test suite, comprised of both unit and functional tests. We have <a href="https://jenkins.openstack.org/job/nova-coverage/">a Jenkins job that tracks how much of Nova is being exercised by the test suite</a>. At the time of this writing, we have around 74% coverage. Bear in mind that if a particular line is exercised by <strong>either</strong> a unit test <strong>or</strong> a functional test (or both, of course). At our last design summit, we agreed that we&#8217;d work on improving this coverage, but clearly there&#8217;s a long way to go (that number should be in the (very) high nineties).</p>
<h3>Integration tests</h3>
<p>As for integration tests, there are a number of separate efforts:</p>
<ul>
<li><a href="https://github.com/rackspace-titan/stacktester">Stacktester</a></li>
<li><a href="https://github.com/cloudbuilders/kong">Kong</a></li>
<li><a href="http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/files/head:/smoketests/">Nova&#8217;s own smoketests</a></li>
<li>Very likely even more.. (please let me know if you have something similar running somewhere)</li>
</ul>
<h2 id="howyoucanhelp">Where are we going? (a.k.a. how you can help)</h2>
<h3>Unit and functional tests</h3>
<p>I think this is easily where we have the most work to do. Jenkins keeps track of what is covered and what isn&#8217;t:</p>
<p>There&#8217;s clearly lots of room for improvement. I&#8217;d like to encourage anyone who cares about QA to grab a random bit of code that isn&#8217;t yet covered by tests and add a test for it. Feel free to start with anything small and seemingly insignificant. We need to get the ball rolling. Small changes also makes the review easier.</p>
<p>I&#8217;ve started going through our coverage report and <a href="https://bugs.launchpad.net/nova/+bugs?field.tag=unittests">filing bugs about missing unit tests</a>. Some are just a few simple statements that need tests, others are entire modules that are almost testless. Take a look and feel free to get in touch if you need help getting started.</p>
<h3>Integration tests</h3>
<p>Over the next month or so, we&#8217;re hoping to collect all these efforts (and any others out there, so please let me know!) into one. The goal is to have a common set of tests that we can run against an OpenStack intallation (i.e. all the various components that make up an actual deployment) to get early warning if something should break in a particular configuration. So, if you have anything set up to automatically test OpenStack, please get in touch. If there&#8217;s a particular configuration you care about, we want to make sure we don&#8217;t break it, so we need your help finding a good way to deploy bleeding edge OpenStack code onto your test installation and run a bunch of tests against it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/08/18/testing-of-openstack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PPA management tools</title>
		<link>http://blog.linux2go.dk/2011/06/17/ppa-management-tools/</link>
		<comments>http://blog.linux2go.dk/2011/06/17/ppa-management-tools/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 10:28:34 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=724</guid>
		<description><![CDATA[We use PPA&#8217;s quite heavily in OpenStack. Each of the core projects have a trunk PPA and a milestone-proposed PPA. Every commit to our bzr trunk branch results in an upload to the trunk PPA, and every commit to our milestone-proposed bzr branch results in an upload to (you guessed it) the milestone-proposed PPA. Additionally, [...]]]></description>
				<content:encoded><![CDATA[<p>We use PPA&#8217;s quite heavily in OpenStack. Each of the core projects have a trunk PPA and a milestone-proposed PPA. Every commit to our bzr trunk branch results in an upload to the trunk PPA, and every commit to our milestone-proposed bzr branch results in an upload to (you guessed it) the milestone-proposed PPA. Additionally, we have a common openstack-release PPA for each of our major releases, where we combine all the projects into one PPA, for simpler distribution.</p>
<p>This poses a number of challenges.</p>
<p>We support every Ubuntu release since Lucid, but most of them lack new enough versions of various stuff (and in some cases, the packages are missing altogether). This means we backport a bunch of things to the various trunk PPA&#8217;s, and at the right moments we need to copy all these dependencies either from the trunk PPA to the milestone-proposed PPA (when we branch off for a new milestone) or from the milestone-proposed PPA to the common release PPA (at final release time).</p>
<p>This used to involve a lot of mucking around with Launchpad&#8217;s web UI which is not only boring and tedious (checking half a bajillion boxes is even less fun than it sounds), but also error prone, since it&#8217;s all manual.</p>
<p>I decided to write a number of tools to help make this simpler. So far, these tools are:</p>
<ul>
<li>copy-ppa-pkg.py
<p>Simply copies a package from one PPA to another.</p>
</li>
<li>detect_ppa_mismatches.py
<p>This one takes a number of PPA&#8217;s as arguments, and finds packages that exist in more than one of them, but at different versions. During the development cycle, this is not much of a problem since most people only run the trunk version of a single project, but when we shove them all together in one great, big PPA, it could mean that one of the projects suddenly is being run against another version of one of its dependencies than during the dev cycle.</p>
</li>
<li>sync-ppas.py
<p>This one takes all the packages from one PPA and copies them to another and removes stuff from the destination PPA that&#8217;s been removed from the source PPA. It&#8217;s handy if have a PPA with all your stuff in it, it&#8217;s all been QA&#8217;ed together and is in good shape, and you want to sync it all over into a &#8220;stable&#8221; PPA in one fell swoop.</p>
</li>
<li>list-ppa.py
<p>Lists the contents of a PPA. Simple as that.</p>
</li>
</ul>
<p>I&#8217;ve branched <a title="Launchpad Code - Ubuntu Archive Tools" href="https://code.launchpad.net/+branch/ubuntu-archive-tools" target="_blank">lp:ubuntu-archive-tools</a> and added these tools to <a title="Launchpad Code - Openstack Release Tools" href="https://code.launchpad.net/~openstack-release/ubuntu-archive-tools/openstack" target="_blank">lp:~openstack-release/ubuntu-archive-tools/openstack</a>. I can&#8217;t really decide if I think they belong in<a title="Launchpad Code - Ubuntu Archive Tools" href="https://code.launchpad.net/+branch/ubuntu-archive-tools" target="_blank">lp:ubuntu-archive-tools</a>, but if someone else wants them I can look into getting them merged back.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/06/17/ppa-management-tools/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>New GPG key &#8211; Please help :)</title>
		<link>http://blog.linux2go.dk/2011/06/15/new-gpg-key-please-help/</link>
		<comments>http://blog.linux2go.dk/2011/06/15/new-gpg-key-please-help/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 12:21:07 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=718</guid>
		<description><![CDATA[-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 (Thanks to Colin Watson for the template for this post) I've finally gotten around to setting up a new, strong (4096 bit) RSA- based GPG-key, and will be transitioning away from my old 1024 bit DSA key. The old key will continue to be valid for some time, but [...]]]></description>
				<content:encoded><![CDATA[<pre>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

(Thanks to Colin Watson for the template for this post)

I've finally gotten around to setting up a new, strong (4096 bit) RSA-
based GPG-key, and will be transitioning away from my old 1024 bit DSA
key. The old key will continue to be valid for some time, but I prefer
all future correspondence to use the new one. I would also like to
ensure that this new key is well-integrated into the web of trust. This
message is signed by both keys to certify the transition.

The old DSA key was:

pub   1024D/E8BDA4E3 2002-02-22
      Key fingerprint = 196A 89ED 78F3 9047 2A36  F327 A278 DF5E E8BD A4E3

The new RSA key is:

pub   4096R/9EAAF9C5 2011-06-15
      Key fingerprint = E6BC C692 3553 A464 8514  28D1 EE67 E7D3 9EAA F9C5

To fetch my new key from a public key server, you can run:

  gpg --keyserver subkeys.pgp.net --recv-keys 9EAAF9C5

If you already know my old key, you can now verify that the new key is
signed by the old one:

  gpg --check-sigs 9EAAF9C5

If you don't already know my old key, or if you're extra-paranoid, you
can check the fingerprint against the one given above:

  gpg --fingerprint 9EAAF9C5

If you have previously signed my old DSA key, and if you're satisfied
that you've got the correct new RSA key, then I'd appreciate it if you
would sign my new key as well:

  caff 9EAAF9C5

The caff program is in the signing-party package in Debian and its
derivatives, including Ubuntu. Please be careful to generate signatures
that don't rely on the weakening SHA-1 hash algorithm, which requires
some careful configuration even if you've already configured gpg
correctly. See http://www.gag.com/bdale/blog/posts/Strong_Keys.html for
the gory details.

Thanks,
Soren Hansen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCgAGBQJN+KNRAAoJEO5n59OeqvnFibwP/jLC+VXFBxMbxqxcXTolr19H
5octVasjlO7Ub9oqH/7/Js168g5gnzSefraWTd0kELc3fXVVsvZuNUtfBhrSYMX5
EQnRr+P1HGi5apFECc3hd7dNQIfbypkQ4UAK3T2nYgkYLATnt04CX0LUz/wnvHJD
fnNRHcM0A8pTn9oJB6LgXpJUspz3pqTFyEoQTkY0/QPcfLbeTLqYG+slSp8+I35H
I+PXl4XrbSsbcJTjpRRllodb1d5sFYZr827ZqPksEeiozGfwpXLZ/DtaIrtE3z3T
AVPCeG/9VCFtcvgqPQnhcbsS6RrGVkE5fUFxgZzERlAxAkkPi+WhwinASmkvOtmE
0m6fkhEeMCYvqvrDoeR8mZvgODIZjP7aIvNKDpWBA9mxC7k171LHdnsluB3xN0sH
++8/w5ESy7GpFxveLk6jR5ytfTxVLUgAASoqJbsxpMqSz/5KNompdFy/Hu13PVel
afqQNfMLjV0QXrKvtmmPSbUs6bWhxwE04jsYAUQcFNBFyHMmYQdA5peikC8ad+JL
WJocQmRUeE6EVRKKSaBXJIihcRHigeTf+6qqaSdbTpeZ1iPSMyETmOW8ZzBaQ7F0
VO65BOOzFsD7Cuaxba427CFPvYo5F4Bi3Dtuwz1PtZlNKExFRuNZ4vhs6dRFenJT
kkeIQrFpJ6wF/DVrutMeiEYEAREKAAYFAk34o1EACgkQonjfXui9pOOVyACfeLci
yfBLmY3L9Abcmg6ggCVQLBAAoKDQfzhmoK5mk26dQToReFpJ80bq
=0yN5
-----END PGP SIGNATURE-----</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/06/15/new-gpg-key-please-help/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another week of Openstack stabilisation</title>
		<link>http://blog.linux2go.dk/2011/02/21/another-week-of-openstack-stabilisation/</link>
		<comments>http://blog.linux2go.dk/2011/02/21/another-week-of-openstack-stabilisation/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 13:04:33 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=655</guid>
		<description><![CDATA[I got good feedback on last week&#8217;s post about the stuff I&#8217;d achieved in Openstack, so I figured I&#8217;d do the same this week. We left the hero of our tale (that would be me (it&#8217;s my blog, I can entitle myself however I please)) last Friday somewhat bleary eyed, hacking on a mountall patch [...]]]></description>
				<content:encoded><![CDATA[<p>I got good feedback on last week&#8217;s post about the stuff I&#8217;d achieved in Openstack, so I figured I&#8217;d do the same this week.</p>
<p>We left the hero of our tale (that would be me (it&#8217;s my blog, I can entitle myself however I please)) last Friday somewhat bleary eyed, hacking on a mountall patch that would more gracefully handle SIGPIPE caused by Plymouth going the way of the SIGSEGV. I got the ever awesome Scott James Remnant to review it and he (rightfully) told me to fix it in Plymouth instead. My suggested patch was much more of a workaround than a fix, but I wasn&#8217;t really in the mood to deal with Plymouth. Somehow, I had just gotten it into my head that fixing it in Plymouth would be extremely complicated. That probably had to do with the fact that I&#8217;d forgotten about MSG_NOSIGNAL for a little bit, and I imagined fixing this problem without MSG_NOSIGNAL would probably mean rewriting a bunch of I/O routines which I certainly didn&#8217;t have the brain power for at the time. Nevertheless,  a few attempts later, <a title="Plymouth MSG_NOSIGNAL patch" href="http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/natty/plymouth/natty/view/1372/debian/patches/avoid-sigpipe.patch">I got it worked out</a>. I sent it upstream, but it seems to be stuck in the moderation queue for now.</p>
<p>I spent almost a day and a half wondering why some of our unit tests were failing &#8220;randomly&#8221;. It only happened every once in a while, and every time I tried running it under e.g. strace, it worked. It had &#8220;race condition&#8221; written all over it. After a lot of swearing, rude gestures and attempts to nail down the race condition, I finally noticed that it only failed if a randomly generated security group name in the test case sorted earlier than &#8220;default&#8221;, which it would do about 20% of the time. We had recently fixed DescribeSecurityGroups to return an ordered resultset which broke an assumption in this test case. Extremely annoying. My initial proposed fix was a <a title="meh" href="http://bazaar.launchpad.net/~hudson-openstack/nova/trunk/revision/671.2.1">mere 10 characters</a>, but it <a title="fix for the sporadically failing unit tests" href="https://code.launchpad.net/~soren/nova/fix-unittest/+merge/49788">ended up slightly larger</a>, but the resulting code was easier on the eyes.</p>
<p>Log file handling has been a bit of an eye sore in Nova since The Big Eventlet Merge﻿﻿™. Since then, the Ubuntu packages have simply piped stdout and stderr to a log file and restartet the workers when the log files needed rotating. I finally got fed up with this and <a title="logdir merge" href="https://code.launchpad.net/~soren/nova/logdir/+merge/49722">resurrected the logdir option</a> and after <a title="switch to RotatingFileHandler" href="https://code.launchpad.net/~soren/nova/logrotate/+merge/49723">one futile attempt</a>, I got the <a title="..and then switch to WatchedFiledHandler" href="https://code.launchpad.net/~soren/nova/logrotate/+merge/50292">log files to rotate without even reloading the workers</a>. Sanity restored.</p>
<p>With all this done, I could now realiably run all the instances I wanted. However, I&#8217;d noticed that they&#8217;d all be run sequentially. Our workers, while built on top of eventlet, were single-threaded. They could only handle one RPC call at a time. This meant that if the compute worker was handling a long request (e.g. one that involved downloading a large image, and postprocessing it with copy-on-write disabled), another user just wanting to look at their instance&#8217;s console output might have to wait minutes for that request to be served. This was causing my tests to take forever to run, <a title="RPC threadpool" href="https://code.launchpad.net/~soren/nova/rpc-threadpool/+merge/49896">so a&#8217;fixin&#8217; I went</a>. This means that each worker can now (theoretically) handle 1024 (or any other number you choose) requests at a time.</p>
<p>To test this, I cranked up the concurrency of my tests so that up to 6 instances could started at the same time on each host. This worked about 80% of the time. The remaining 20% instances would entirely fail to be spawned. As could have been predicted, this was a new race condition that was uncovered because we suddenly had actual concurrency in the RPC workers. This time, iptables-restore would fail when trying to run multiple instances at the exact same time. I&#8217;ve been wanting to rework our iptables handling for a looong time anyway, so this was a great reason to get to work on that. By 2 AM between Friday and Saturday, I still wasn&#8217;t quite happy with it, so you&#8217;ll have to read the next post in this series to know how it all worked out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/02/21/another-week-of-openstack-stabilisation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A week into OpenStack&#8217;s third release cycle&#8230;</title>
		<link>http://blog.linux2go.dk/2011/02/11/a-week-into-openstacks-third-release-cycle/</link>
		<comments>http://blog.linux2go.dk/2011/02/11/a-week-into-openstacks-third-release-cycle/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 22:49:25 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=649</guid>
		<description><![CDATA[With OpenStack&#8217;s second release safely out the door last week, we&#8217;re now well on our way towards the next release, due out in April. This release will be focusing on stability and deployability. To this end, I&#8217;ve set up a HudsonJenkins box that runs a bunch of tests for me. I&#8217;ve used Jenkins before, but [...]]]></description>
				<content:encoded><![CDATA[<p>With OpenStack&#8217;s second release safely out the door last week, we&#8217;re now well on our way towards the next release, due out in April. This release will be focusing on stability and deployability.</p>
<p>To this end, I&#8217;ve set up a HudsonJenkins box that runs a bunch of tests for me. I&#8217;ve used Jenkins before, but never in this (unintentional TDD) sort of way and I&#8217;d like to share how it&#8217;s been useful to me.</p>
<p>I have three physical hosts. One runs Lucid, one runs Maverick, and one runs Natty. I&#8217;ve set them up as slaves of my Hudson server (which runs separately on a cloud server at Rackspace).</p>
<p>I started out by adding a simple install job. It would blow away existing configuration and install afresh from our trunk PPA, create an admin user, download the Natty UEC image and upload it to the &#8220;cloud&#8221;. This went reasonably smoothly.</p>
<p>Then I started exercising various parts of the EC2 API (which happens to be what I&#8217;m most fluent in). I would:</p>
<ol>
<li>create a keypair (euca-create-keypair),</li>
<li>find the image id (euca-describe-images with a bit of grep),</li>
<li>run an instance (euca-run-instances),</li>
<li>wait for it to go into the &#8220;running&#8221; state (euca-describe-instances),</li>
<li>open up port 22 in the default security group (euca-authorize),</li>
<li>find the ip (euca-describe-instances),</li>
<li>connect to the guest and run a command (ssh),</li>
<li>terminate the instance (euca-terminate-instances),</li>
<li>close port 22 in the security group again (euca-revoke),</li>
<li>delete the keypair (euca-delete-keypair),</li>
</ol>
<p>I was using SQLite as the data store (the default in the packages) and it was known to have concurrency issues (it would timeout attempting to lock the DB), so I wrapped all euca-* commands in a retry loop that would try everything up to 10 times. This was good enough to get me started.</p>
<p>So, pretty soon I would see instances failing to start. However, once Jenkins was done with them, it would terminate them, and I didn&#8217;t have anything left to use for debugging. I decided to add the console log to the Jenkins output, so I just added a call to euca-get-console-output. They revealed that every so often, they&#8217;d fail to get an IP from dnsmasq. The syslog had a lot of entries from dnsmasq refusing to hand out the IP that Nova asked it to, because it already belonged to someone else. Clearly, <a href="https://launchpad.net/bugs/714577">Nova was recycling IP&#8217;s too quickly</a>. It read through the code that was supposed to handle this several times, and it looked great. I tried drawing it on my whiteboard to see where it would fall through the cracks. Nothing. Then I tried logging the SQL for that specific operation, and it looked just fine. It wasn&#8217;t until I actually copied the sql from the logs and ran it in sqlite3&#8242;s CLI that I realised it would recycle IP&#8217;s that had just been leased. It took me hours to realise that sqlite didn&#8217;t compare these as timestamps, but as strings. They were formatted slightly differently, so it would almost always match. ﻿<a title="An 11 character patch" href="https://code.launchpad.net/~soren/nova/lp714577/+merge/49127">An 11 character patch later</a>, this problem was solved. 1½ days of work. -11 characters. That&#8217;s about -1 character an hour. Rackspace is clearly getting their money&#8217;s worth having me work for them. I could do this all day!</p>
<p>That got me a bit further. Instances would now reliably come up, one at a time. I expanded out a bit, trying to run two instances at a time. This quickly  <a title="RPC concurrency problems" href="https://bugs.launchpad.net/nova/+bug/716427">blew up in my face</a>. This time I made do with a <a title="RPC connection recycle patch (part 1)." href="https://code.launchpad.net/~soren/nova/lp716427/+merge/49230">4 character patch</a>. Awesome.</p>
<p>At this point, I&#8217;d had too many problems with sqlite locking that I got fed up. I was close to just replacing it with MySQL to get it over with, but then I decided that it just didn&#8217;t make sense. Sure, it&#8217;s a single file and we&#8217;re using it from different threads and different processes, but we&#8217;re not pounding on it. They really ought to be able to take turns. It took quite a bit of Googling and wondering, but eventually I came up with a (counting effectively changed lines of code) <a title="SQLite locking fix" href="https://code.launchpad.net/~soren/nova/sqlite-locking/+merge/49234">4 line patch</a> that would tell SQLAlchemy to don&#8217;t hold connections to sqlite open. Ever. That totally solved it. I was rather surprised, to be honest. I could now remove all the retry loops, and it&#8217;s worked perfectly ever since.</p>
<p>So far, so good. Then I decided to try to go even more agressive. I would let the three boxes all target a single one, so they&#8217;d all three run as clients against the same single-box &#8220;cloud&#8221;. I realised that because I used private addressing, I had to expand my tests and use floating ip&#8217;s to be able to reach VM&#8217;s from another box. Having done so, I realised that this <a title="Local floating ip's don't work" href="https://launchpad.net/bugs/716414">didn&#8217;t work on the box itself</a>. A <a title="Fix floating IP's on network nodes." href="https://code.launchpad.net/~soren/nova/lp716414/+merge/49231">4 line patch</a> (really only 2 lines, but I had to split them for pep8 compliance) later, and I was ready to rock and roll.</p>
<p>It quickly turned out that, as I had suspected, my 4 character patch earlier wasn&#8217;t broad enough, so I expanded <a title="Always use fresh rpc connections" href="https://code.launchpad.net/~soren/nova/rpc-call-concurrency/+merge/49373">a bit on that</a> (4 lines modified).</p>
<p>Today, though, I found that surprising amount of VM&#8217;s were failing to boot, ending up with the dreaded:</p>
<blockquote>
<pre>General error mounting filesystems.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.
Give root password for maintenance
(or type Control-D to continue):</pre>
</blockquote>
<p>I tried changing the block device type (we use virtio by default, so I tried ide and scsi), I tried not using copy-on-write images, I tried disabling any code that would touch the images. Nothing worked. I blamed the kernel, I blamed qemu, everything.  I replaced everything, piece by piece, and it still failed quite often. After a long day of debugging, I ended looking at mountall. It seems Plymouth often segfaults in these settings (where the only console is a serial port), and when it does, mountall dies, killed by SIGPIPE. A  <a title="sigpipe handler in mountall" href="https://code.launchpad.net/~soren/ubuntu/natty/mountall/sigpipe-handler/+merge/49401">5 line (plus a bunch of comments) patch</a> to mountall, that is still pending review, and I can now run hundreds of VM&#8217;s in a row and (5-10-ish) in parallel with no failures at all.</p>
<p>So, in the future, Jenkins will provide me with a great way to test drive and validate my changes, making sure that I don&#8217;t break anything, but right now, I&#8217;m extending the tests, discovering bugs and fixing them as I extend the test suite, very test-driven-development-y. It&#8217;s quite nice. At this rate, I should have pretty good test coverage pretty soon and be able to stay confident that things keep working.</p>
<p>It also think it&#8217;s kind of cool how much of a difference this week has made in terms of stability of the whole stack and only 19 lines of code have been touched. <img src='http://blog.linux2go.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/02/11/a-week-into-openstacks-third-release-cycle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moving duplicity (and Deja-Dup) backups</title>
		<link>http://blog.linux2go.dk/2011/01/20/moving-duplicity-and-hence-deja-dup-backups/</link>
		<comments>http://blog.linux2go.dk/2011/01/20/moving-duplicity-and-hence-deja-dup-backups/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 12:06:51 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Rackspace]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[deja-dup]]></category>
		<category><![CDATA[duplicity]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=635</guid>
		<description><![CDATA[In my last blog post I said that I had moved my backups from an external disk to Rackspace Cloud Files and promised I&#8217;d explain how. Ok, so why bother? I had about 100 GB of data that was being backed up. I didn&#8217;t want to upload 99% of that, have my wifi go bonkers, [...]]]></description>
				<content:encoded><![CDATA[<p>In my <a href="http://blog.linux2go.dk/2011/01/14/it-only-took-me-20-years/">last blog post</a> I said that I had moved my backups from an external disk to Rackspace Cloud Files and promised I&#8217;d explain how.</p>
<p>Ok, so why bother? I had about 100 GB of data that was being backed up. I didn&#8217;t want to upload 99% of that, have my wifi go bonkers, and then have to start over (because Duplicity apparently isn&#8217;t very good at resuming). So, instead I wanted to make the initial backup to an external drive (the backup wouldn&#8217;t fit on my laptop&#8217;s hard drive) and defer copying it to Rackspace as time and connectivity permitted.</p>
<p>That was simple enough.</p>
<p>Once the first, full backup was made, I wanted incremental backups to go directly to Cloud Files, so I needed to get Deja-Dup to realise that there was already a backup on there.</p>
<p>This was the trickier bit.</p>
<p>When you ask Duplicity to interact with a particular backup location, it calculates a hash of the URI of it and looks that up in its cache to see if it knows about it already. If you&#8217;ve made a backup with deja-dup, you can go and look in $HOME/.cache/deja-dup. This is what I had:</p>
<blockquote>
<pre>soren@lenny:~$ ls -l $HOME/.cache/deja-dup/
drwxr-xr-x 2 soren soren 4096 2011-01-14 18:09 4e33cf513fa4772471272dbd07fca5be
soren@lenny:~$</pre>
</blockquote>
<p>You see a directory named after the hash of the uri of the backup location I used, namely &#8220;file:///media/backup&#8221; (the MD5 sum of which is 4e33cf513fa4772471272dbd07fca5be).</p>
<p>Inside this directory, we find:</p>
<blockquote>
<pre>soren@lenny:~$ ls -l /home/soren/.cache/deja-dup/4e33cf513fa4772471272dbd07fca5be/
-rw------- 1 soren soren 750938885 Jan 14 15:47 duplicity-full-signatures.20110113T170937Z.sigtar.gz
-rw------- 1 soren soren    653487 Jan 14 15:47 duplicity-full.20110113T170937Z.manifest
soren@lenny:~$</pre>
</blockquote>
<p>It contains a manifest and a signature file. These files in there have no record of the backup location. That information exists only in the name of the directory. Essentially, all I needed to do was to rename the directory to match the Cloud Files location. Being a bit cautious, I decided to copy it instead. The URI for a container on Cloud Files looks like &#8220;cf+http://containername&#8221;. Knowing this, it was as simple as:</p>
<blockquote>
<pre>soren@lenny:~$ echo -n 'cf+http://lenny' | md5sum
2f66137249874ed1fdc952e9349912d4 -
soren@lenny:~$ cd $HOME/.cache/deja-dup
soren@lenny:~/.cache/deja-dup$ cp -r 4e33cf513fa4772471272dbd07fca5be 2f66137249874ed1fdc952e9349912d4</pre>
</blockquote>
<p>The <tt>-n</tt> option to <tt>echo</tt> is essential. Without it, I&#8217;d have been calculating the MD5 sum of the URI with a trailing newline.</p>
<p>Before I ran deja-dup again, I made sure the two files above were copied to Cloud Files. If I hadn&#8217;t, the first time duplicity would talk to Cloud Files, it would realise that these files don&#8217;t exist on the expected backup location, hence the local cache of them must be invalid, so it would delete them. This happened to me the first time, so making a copy rather than just renaming the directory turned out to be a good idea.</p>
<p>All that was left to do now was to change my backup location in Deja-Dup. This should be simple enough, so I won&#8217;t go into detail about that.</p>
<p>The best part about this, I think, is that wasn&#8217;t until 5-6 days later, that my upload of the initial full backup finished. However, in the mean time, I was able to do incremental backups just fine, because all it needs to do that is the signature files from the previous runs.</p>
<p>Oh, and to actually upload the files, I used the &#8220;st&#8221; tool from Swift. Something like this:</p>
<blockquote><pre>
soren@lenny:~$ cd /media/backup
soren@lenny:/media/backup$ st -A https://auth.api.rackspacecloud.com/v1.0 -U soren -K 6e6f742061206368616e636521212121 upload lenny *
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/01/20/moving-duplicity-and-hence-deja-dup-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It only took me 20 years..</title>
		<link>http://blog.linux2go.dk/2011/01/14/it-only-took-me-20-years/</link>
		<comments>http://blog.linux2go.dk/2011/01/14/it-only-took-me-20-years/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 16:54:44 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Cloud computing]]></category>
		<category><![CDATA[Rackspace]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.linux2go.dk/?p=626</guid>
		<description><![CDATA[tl;dr: I now have daily backups of my laptop, powered by Rackspace Cloud Files (powered by Openstack), Deja-Dup, and Duplicity. I&#8217;ve been using computers for a long time. If memory serves, I got my first PC when I was 9, so that&#8217;s 20 years ago now. At various times, I&#8217;ve set up some sort of [...]]]></description>
				<content:encoded><![CDATA[<p>tl;dr: I now have daily backups of my laptop, powered by <a href="http://www.rackspacecloud.com/cloud_hosting_products/files/">Rackspace Cloud Files</a> (powered by <a href="http://wiki.openstack.org/">Openstack</a>), <a href="https://launchpad.net/deja-dup">Deja-Dup</a>, and <a href="http://duplicity.nongnu.org/">Duplicity</a>.</p>
<p>I&#8217;ve been using computers for a long time. If memory serves, I got my first PC when I was 9, so that&#8217;s 20 years ago now. At various times, I&#8217;ve set up some sort of backup system, but I always ended up
<ul>
<li>annoyed that I couldn&#8217;t acutally *use* the biggest drive I had, because it was reserved for backups,</li>
<li>annoyed because I had to go and connect the drive and do something active to get backups running, because having the disk always plugged into my system might mean the backup got toasted along with my active data when disaster struck,</li>
<li>and annoyed at a bunch of other things.</li>
</ul>
<p>Cloud storage solves the hardest part of this. With <a href="http://www.rackspacecloud.com/cloud_hosting_products/files/">Rackspace Cloud Files</a>, I have access to an infinite[1] amount of storage. I can just keep pushing data, Rackspace keep them safe, and I pay for exactly how much space I&#8217;m using. Awesome.</p>
<p>All I need is something that can actually make backups for me and upload them to Cloud Files. I&#8217;ve known about <a href="http://duplicity.nongnu.org/">Duplicity</a> for a long time, and I also knew that it&#8217;s been able to talk to Cloud Files for a while, but I never got into the habit of running it at regular intervals, and running it from cron was annoying, because maybe I didn&#8217;t have my laptop on when it wanted to run, and if I wasn&#8217;t logged in, by homedir would be encrypted anyway, etc. etc. Lots of chances for failure.</p>
<p>Enter <a href="https://launchpad.net/deja-dup">Deja-Dup</a>! Deja-dup is a project spearheaded by my awesome, former colleague at <a href="http://www.canonical.com/">Canonical</a>, <a href="http://mterry.name/log/">Mike Terry</a>. It uses Duplicity on the backend, and gives me a nice, <strong>really</strong> simple frontend to get it set up. It has its own timing mechanism that runs in my GNOME desktop session. This means it only runs when my laptop is on and I&#8217;m logged in. Every once in a while, it checks how long it&#8217;s been since my last backup. If it&#8217;s more than a day, an icon pops up in the notification area that offers to run a backup. I&#8217;ve only been using this for a day, so it&#8217;s only asked me once. I&#8217;m not sure if it starts on its own if I give it long enough.</p>
<p>A couple of caveats:</p>
<ul>
<li>Deja-dup needs a very fresh version of libnotify, which means you need to either be running Ubuntu Natty, use backported libraries, or patch Deja-dup to work with the version of libnotify in Maverick. I opted for the latter approach.</li>
<li>I have a lot of data. Around 100GB worth. Some of it is VM&#8217;s, some of it is code, some of it is various media files. Duplicity doesn&#8217;t support resuming a backup if it breaks halfway, and I &#8220;only&#8221; have 8 Mbit/s upstream bandwidth.. That meant I had to stay connected to the Internet for 28 hours straight (in a perfect world) and not have anything unexpected happen along the way. I wasn&#8217;t really interested in that, so I made my initial backup to an external drive and I&#8217;m now copying the contents of that to Rackspace at my own pace. I can stop and resume at will. The tricky part here was to get Deja-Dup to understand that the backup it thinks is on an external drive really is on Cloud Files. I&#8217;ll save that for a separate post.</li>
</ul>
<p>[1]: Maybe not <strong>actually</strong> infinite, but infinite enough.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2011/01/14/it-only-took-me-20-years/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Openstack Nova in Maverick</title>
		<link>http://blog.linux2go.dk/2010/10/11/openstack-nova-in-maverick/</link>
		<comments>http://blog.linux2go.dk/2010/10/11/openstack-nova-in-maverick/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 12:40:41 +0000</pubDate>
		<dc:creator>Soren</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[planetopenstack]]></category>
		<category><![CDATA[PlanetUbuntu]]></category>

		<guid isPermaLink="false">http://blog.warma.dk/?p=587</guid>
		<description><![CDATA[Ubuntu Maverick was released yesterday. Big congrats to the Ubuntu team for another release well out the door. As you may know, both Openstack storage (Swift) and compute (Nova) are available in the Ubuntu repositories. We haven&#8217;t made a proper release of Nova yet, so that&#8217;s a development snapshot, but it&#8217;s in reasonably good shape. [...]]]></description>
				<content:encoded><![CDATA[<p>Ubuntu Maverick was released yesterday. Big congrats to the Ubuntu team for another release well out the door.</p>
<p>As you may know, both Openstack storage (Swift) and compute (Nova) are available in the Ubuntu repositories. We haven&#8217;t made a proper release of Nova yet, so that&#8217;s a development snapshot, but it&#8217;s in reasonably good shape. Swift, on the other hand, should be in very good shape and be production ready. I&#8217;ve worked mostly on Nova, so that&#8217;s what I&#8217;ll focus on.</p>
<p>So, to get to play with Nova in Maverick on a single machine, here are the instructions:</p>
<pre>sudo apt-get install rabbitmq-server redis-server</pre>
<pre>sudo apt-get install nova-api nova-objectstore nova-compute \
                nova-scheduler nova-network euca2ools unzip</pre>
<p>rabbitmq-server and redis-server are not stated as dependencies of Nova in the packages, because they don&#8217;t need to live on the same host. In fact, as soon as you add the next compute node (or API node or whatever), you&#8217;ll want to use a remote rabbitmq server and a remote database, too. But, for our small experiment here, we need a rabbitmq server and a redis server (it&#8217;s very likely that the final release of Nova will not require Redis, but for now, we need it).</p>
<p>A quick explanation of the different components:</p>
<dl>
<dt>RabbitMQ</dt>
<dd>is a messaging system the implements AMQP.  Basically, it&#8217;s a server that passes messages around between the other components that make up Nova.</dd>
<dt>nova-api</dt>
<dd>is the API server (I was schocked to learn this, too!) . It implements a subset of the Amazon EC2. We&#8217;re working on adding the rest, but it takes time. It also implements a subset of the Rackspace API.</dd>
<dt>nova-objectstore</dt>
<dd>stores objects. It implements the S3 API. It&#8217;s quite crude. If you&#8217;re serious about storing objects, Swift is what you want. Really.</dd>
<dt>nova-compute</dt>
<dd>the component that runs virtual machines.</dd>
<dt>nova-network</dt>
<dd>the network worker. Depending on configuration, it may just assign IP&#8217;s or it could work as the gateway for a bunch of NAT&#8217;ed VM&#8217;s.</dd>
<dt>nova-scheduler</dt>
<dd>the scheduler (another schocker). When a user wants to run a virtual machine, they send a request to the API server. The API server asks the network worker for an IP and then passes off handling to the scheduler. The scheduler decides which host gets to run the VM.</dd>
</dl>
<p>Once it&#8217;s done installing (which should be a breeze), you can create an admin user (I name mine &#8220;soren&#8221; for obvious reasons):</p>
<pre>sudo nova-manage user admin soren</pre>
<p>and create a project (also named soren) with the above user as the project admin:</p>
<pre>sudo nova-manage project create soren soren</pre>
<p>Now, you&#8217;ll want to get a hold of your credentials:</p>
<pre>sudo nova-manage project zipfile soren soren</pre>
<p>This yields a nova.zip in the current working directory. Unzip it..</p>
<pre>unzip nova.zip</pre>
<p>and source the rc file:</p>
<pre>. novarc</pre>
<p>And now you&#8217;re ready to go!</p>
<p>Let&#8217;s just repeat all that in one go, shall we?</p>
<pre>sudo apt-get install rabbitmq-server redis-server
sudo apt-get install nova-api nova-objectstore nova-compute \
                nova-scheduler nova-network euca2ools unzip
sudo nova-manage user admin soren
sudo nova-manage project create soren soren
sudo nova-manage project zipfile soren soren
unzip nova.zip
. novarc</pre>
<p>That&#8217;s pretty much it. Now your cloud is up and running, you&#8217;ve created an admin user and retrieved the corresponding credentials and put them in your environment.<br />
This is not much fun without any VM&#8217;s to run, so you need to add some images. We have some small images we use for testing that you can download <a href="http://c2477062.cdn.cloudfiles.rackspacecloud.com/images.tgz">here</a>:</p>
<pre>wget http://c2477062.cdn.cloudfiles.rackspacecloud.com/images.tgz</pre>
<p>Extract that file:</p>
<pre>tar xvzf images.tgz</pre>
<p>This gives you a directory tree like this:</p>
<pre>images
|-- aki-lucid
|   |-- image
|   `-- info.json
|-- ami-tiny
|   |-- image
|   `-- info.json
`-- ari-lucid
    |-- image
    `-- info.json</pre>
<p>As a shortcut, you could just extract this directly in /var/lib/nova and change the permisssions appropriately, but to get the full experience, we&#8217;ll use euca-* to get these images uploaded.</p>
<pre>euca-bundle-image -i images/aki-lucid/image -p kernel --kernel true
euca-bundle-image -i images/ari-lucid/image -p ramdisk --ramdisk true
euca-upload-bundle -m /tmp/kernel.manifest.xml -b mybucket
euca-upload-bundle -m /tmp/ramdisk.manifest.xml -b mybucket
out=$(euca-register mybucket/kernel.manifest.xml)
[ $? -eq 0 ] &amp;&amp; kernel=$(echo $out | awk -- '{ print $2 }') || echo $out

out=$(euca-register mybucket/ramdisk.manifest.xml)
[ $? -eq 0 ] &amp;&amp; ramdisk=$(echo $out | awk -- '{ print $2 }') || echo $out

euca-bundle-image -i images/ami-tiny/image -p machine  --kernel $kernel --ramdisk $ramdisk
euca-upload-bundle -m /tmp/machine.manifest.xml -b mybucket
out=$(euca-register mybucket/machine.manifest.xml)
[ $? -eq 0 ] &#038;&#038; machine=$(echo $out | awk -- '{ print $2 }') || echo $out
echo kernel: $kernel, ramdisk: $ramdisk, machine: $machine
</pre>
<p>Alright, so we have images!</p>
<p>Now, we just need a keypair:</p>
<pre>
euca-add-keypair mykey > mykey.priv
chmod 600 mykey.priv
</pre>
<p>Let&#8217;s run a VM!</p>
<pre>
euca-run-instances $machine --kernel $kernel --ramdisk $ramdisk -k mykey
</pre>
<p>This should respond with some info about the VM, among other things, the IP.</p>
<p>In my case, it was 10.0.0.5:</p>
<pre>
ssh -i mykey.priv root@10.0.0.5
</pre>
<p>YAY!</p>
<p>I&#8217;ll leave it to someone else to provide similar instructions for Swift</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.linux2go.dk/2010/10/11/openstack-nova-in-maverick/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>
