<?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>Racker Hacker &#187; python</title>
	<atom:link href="http://rackerhacker.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:07:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OpenStack bleeding-edge Python packages are now available</title>
		<link>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/</link>
		<comments>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 15:05:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2890</guid>
		<description><![CDATA[I sometimes enjoy living on the edge occasionally and that sometimes means I keep up with OpenStack changes commit by commit. If you're in the same boat as I am, you may save some time by using my repository of bleeding-edge Python packages from the OpenStack projects: pypi.mhtx.net Python packages are updated moments after the [...]<p><a href="http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/">OpenStack bleeding-edge Python packages are now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I sometimes enjoy living on the edge occasionally and that sometimes means I keep up with OpenStack changes commit by commit.  If you're in the same boat as I am, you may save some time by using my repository of bleeding-edge Python packages from the OpenStack projects:</p>
<ul>
<li><a href="http://pypi.mhtx.net/">pypi.mhtx.net</a></li>
</ul>
<p>Python packages are updated moments after the commit is merged into the repositories under <a href="http://github.com/openstack">OpenStack's github account</a>.  </p>
<p>Although the packages will contain the latest code available, rest assured that the code has passed an initial code review (by humans), unit tests, and varying levels of functional or integrated testing.  There may still be a bug or two cropping up after that, so be aware of that as you utilize these packages.</p>
<p>The package versions utilize a standard format:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[package]-[version]-[git commit count]-[short commit hash]</pre></div></div>

<p>If you need to check the git log up to that particular commit, just run <code>git log</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">git log [short commit hash]</pre></div></div>

<p>Instructions for configuring <code>pip</code> or <code>easy_install</code> are provided <a href="http://pypi.mhtx.net/">within the repository</a>.</p>
<p>In addition, the repository is accessible via IPv4 and IPv6.</p>
<p><a href="http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/">OpenStack bleeding-edge Python packages are now available</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a local PyPi repository using only mod_rewrite</title>
		<link>http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/</link>
		<comments>http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 04:02:49 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2861</guid>
		<description><![CDATA[Regular users of Python's package tools like pip or easy_install are probably familiar with the PyPi repository. It's a one-stop-shop to learn more about available Python packages and get them installed on your server. However, certain folks may find the need to host a local PyPi repository for their own packages. You may need it [...]<p><a href="http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/">Create a local PyPi repository using only mod_rewrite</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Regular users of Python's package tools like <a href="http://pypi.python.org/pypi/pip">pip</a> or <a href="http://pypi.python.org/pypi/setuptools">easy_install</a> are probably familiar with the <a href="http://pypi.python.org/pypi">PyPi</a> repository.  It's a one-stop-shop to learn more about available Python packages and get them installed on your server.</p>
<p>However, certain folks may find the need to host a local PyPi repository for their own packages.  You may need it to store Python code which you don't plan to release publicly or you may need to add proprietary patches to upstream Python packages.  Regardless of the reason to have it, a local PyPi repository is relatively easy to configure.</p>
<p>You'll need to start with a base directory for your PyPi repository.  For this example, I chose <code>/var/pypi</code>.  The directory structure should look something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/var/pypi/simple/[package_name]/[package_tarball]</pre></div></div>

<p>For a package like <code>pip</code>, you'd make a structure like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/var/pypi/simple/pip/pip-1.0.2.tar.gz</pre></div></div>

<p>Once you have at least one package stored locally, it's time to configure apache.  Here's a snippet from the virtual host I configured:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">DocumentRoot /var/pypi/
ServerName pypi.example.com
&nbsp;
Options +Indexes
&nbsp;
RewriteEngine On
RewriteRule ^/robots.txt - [L]
RewriteRule ^/icons/.* - [L]
RewriteRule ^/index\..* - [L]
&nbsp;
RewriteCond /var/pypi/$1 !-f
RewriteCond /var/pypi/$1 !-d
RewriteRule ^/(.*)/?$ http://pypi.python.org/$1 [R,L]</pre></div></div>

<p>The last set of rewrite directives check to see if the request refers to an existing file or directory under your document root.  If it does, your server will reply with a directory listing or with the actual file to download.  If the directory or file doesn't exist, apache will send the client a redirection to the main PyPi site.</p>
<p>Reload your apache configuration to bring in your new changes.  Let's try to download the <code>pip</code> tarball from our local server in the example I mentioned above:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ curl -I http://pypi.example.com/simple/pip/
HTTP/1.1 200 OK
&nbsp;
$ curl -I http://pypi.example.com/simple/pip/pip-1.0.2.tar.gz
HTTP/1.1 200 OK</pre></div></div>

<p>I've obviously snipped a bit of the response above, but you can see that apache is responding with 200's since it has the directories and files that I was trying to retrieve via curl.  Let's try to get something we don't have locally, like <code>kombu</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ curl -I http://pypi.example.com/simple/kombu/
HTTP/1.1 302 Found
Location: http://pypi.python.org/simple/kombu/</pre></div></div>

<p>Our local PyPi repository doesn't have <code>kombu</code> so it will refer our Python tools over to the official PyPi repository to get the listing of available package versions for <code>kombu</code>.</p>
<p>Now we need to tell <code>pip</code> to use our local repository.  Edit <code>~/.pip/pip.conf</code> and add:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[global]
index-url = http://pypi.example.com/simple/</pre></div></div>

<p>If you'd rather use <code>easy_install</code>, edit <code>~/.pydistutils.cfg</code> and add:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[easy_install]
index_url = http://pypi.example.com/simple/</pre></div></div>

<p>Once your tools are configured, try installing a package you have locally and try to install one that you know you won't have locally.  You can add <code>-v</code> to <code>pip install</code> to watch it retrieve different URL's to get the packages it needs.  If you spot any peculiar behavior or unexpected redirections, double-check your mod_rewrite rules in your apache configuration and check the spelling of your directories under your document root.</p>
<p><a href="http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/">Create a local PyPi repository using only mod_rewrite</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracing a build through OpenStack Compute (Nova)</title>
		<link>http://rackerhacker.com/2011/11/07/tracing-a-build-through-openstack-compute-nova/</link>
		<comments>http://rackerhacker.com/2011/11/07/tracing-a-build-through-openstack-compute-nova/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 15:05:42 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[nova]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2590</guid>
		<description><![CDATA[My work at Rackspace has changed a bit in the last few weeks and I've shifted from managing a team of engineers to a full technical focus on OpenStack Nova. Although it was difficult to leave my management position, I'm happy to get back to my roots and dig into the technical stuff again. One [...]<p><a href="http://rackerhacker.com/2011/11/07/tracing-a-build-through-openstack-compute-nova/">Tracing a build through OpenStack Compute (Nova)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2011/11/openstack-justheo.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/11/openstack-justheo.png" alt="" title="openstack-justheo" width="232" height="214" class="alignright size-full wp-image-2592" /></a>My work at Rackspace has changed a bit in the last few weeks and I've shifted from managing a team of engineers to a full technical focus on <a href="http://openstack.org/projects/compute/">OpenStack Nova</a>.  Although it was difficult to leave my management position, I'm happy to get back to my roots and dig into the technical stuff again.</p>
<p>One of the first things I wanted to tackle was understanding how a build request flows through Nova to a XenServer hypervisor.  Following this process through the code is a bit tricky (I'm still learning python, so that could explain it).  Here are the basic steps:</p>
<ul>
<li>Client requests a build via the API.</li>
<li>The API runs some checks (quotas, auth, etc) and hands the build off to the scheduler.</li>
<li>The scheduler figures out where the instance should go.</li>
<li>The scheduler drops a message in queue specific to one compute node (where the instance will be built).</li>
<li>The API responds to the client and the client is now unblocked and free to do other things.</li>
<li>The compute node updates the database with the instance details and calls to the hypervisor to assemble block devices for the instance.</li>
<li>A message is dropped into the network node's queue (from the compute node) to begin assembling networks for the instance.  The compute node blocks and waits while this step completes.</li>
<li>Once the networking details come back (via the queue), the compute node does the remaining adjustments on the hypervisor and starts up the actual instance.</li>
<li>When the instance starts successfully (or fails to do so), the database is updated and a message is dropped onto another message queue as a notification that the build is complete.</li>
</ul>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/11/Tracing-an-Instance-Build-Through-Nova.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/11/Tracing-an-Instance-Build-Through-Nova-300x231.png" alt="Tracing an Instance Build Through Nova" title="Tracing an Instance Build Through Nova" width="300" height="231" class="alignright size-medium wp-image-2604" /></a>Click on the thumbnail on the right to see the flow chart I created to explain this process.</p>
<p><b>Please note:</b> This information should be accurate to the Nova code as of November 1, 2011.  There could be some refactoring of these build processes before <a href="https://launchpad.net/nova/essex">Essex</a> is released.</p>
<p><br style="clear: both;" /></p>
<p><a href="http://rackerhacker.com/2011/11/07/tracing-a-build-through-openstack-compute-nova/">Tracing a build through OpenStack Compute (Nova)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/11/07/tracing-a-build-through-openstack-compute-nova/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FUDCon 2011: Day One</title>
		<link>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/</link>
		<comments>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 07:33:38 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[boxgrinder]]></category>
		<category><![CDATA[cloudfs]]></category>
		<category><![CDATA[deltacloud]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fudcon]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rackspace]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2181</guid>
		<description><![CDATA[The first day of FUDCon 2011 in Tempe is coming to a close tonight and I'm completely exhausted. As promised, I'll try to summarize the day and cover the talks which I attended. The day started out with Jared Smith's "State of Fedora" address. The audio has already been posted on the wiki, but the [...]<p><a href="http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/">FUDCon 2011: Day One</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>The first day of FUDCon 2011 in Tempe is coming to a close tonight and I'm completely exhausted.  <a href="/2011/01/29/gearing-up-for-fudcon-2011/">As promised</a>, I'll try to summarize the day and cover the talks which I attended.</p>
<p>The day started out with <a href="http://fedoraproject.org/wiki/User:Jsmith">Jared Smith's</a> "State of Fedora" address.  The audio has already been <a href="http://fedoraproject.org/w/uploads/4/44/State_of_fedora_tempe_2011.ogg">posted on the wiki</a>, but the speech was very positive overall.  He talked about some of the struggles that have happened in the past and how they'll probably happen again in some form or another.  It was pretty inspirational and you could obviously tell that people in the room were energized by it.</p>
<p>After the address, all of the talks were pitched in <a href="http://en.wikipedia.org/wiki/BarCamp">BarCamp format</a>.  It was a very efficient and entertaining way to create a schedule for the conference.  Everyone had 15-20 seconds to present their talk and then they had to rush outside to post their topic on the wall.  We all had the opportunity to go outside and vote for the talks that sounded interesting.  Once the votes were tallied, the schedule was set and the conference was fully underway.</p>
<p>The first talk for me was about <a href="http://twitter.com/marekgoldmann">Marek Goldmann's</a> <a href="http://www.jboss.org/boxgrinder.html">BoxGrinder</a>. <em>(Note: If you Google for BoxGrinder, make sure that you enter it as a single word. You'll get some wild unrelated results if you use two words.)</em>  In short, BoxGrinder gives you the ability to have a <a href="http://fedoraproject.org/wiki/Anaconda/Kickstart">kickstart</a>-ish method for automatically building images for virtual machine environments.  It's completely <a href="http://community.jboss.org/wiki/BoxGrinderBuildPlugins">plugin-based</a>, so you can have different platform and delivery plugins depending on where your VM needs to be deployed.  For example, you could deploy a VM with BoxGrinder that is in a format for VMWare (platform) and is delivered to the target server via SFTP (delivery).  The public cloud plugins are only compatible with Amazon's products, but I'm eager to change that during one of the upcoming hackfests.</p>
<p>The <a href="http://www.osrg.net/sheepdog/">Sheepdog</a> talk started up right after lunch and although it was interesting, I think it left most people with quite a few questions when it was over.  However, I think people are generally apprehensive when anyone tries to do anything innovative with storage.  Losing data due to a bug is a big concern and many of the questions went deeper into data safety than performance and functionality.</p>
<p>Next up was <a href="http://fedoraproject.org/wiki/Python_in_Fedora_13">Dave Malcolm's</a> talk about the different implementations of python.  This was definitely an eye-opening talk for my coworker and I.  Dave covered CPython, Jython, PyPy and various other implementations and compared their advantages and disadvantages.  I'm still pretty new to Python (I'm clutching on to ruby, PHP and perl still), but this talk really had me thinking about which implementations are best for a particular environment or task.  It was quite a bit of fun to learn about some of the deep underpinnings of Python and how they differ depending on the specific implementation.</p>
<p><a href="http://pl.atyp.us/">Jeff Darcy's</a> talk about <a href="http://fedoraproject.org/wiki/Features/CloudFS">CloudFS</a> was very intriguing.  I've been a fan of <a href="http://www.gluster.org/">GlusterFS</a> recently, but I eventually moved away due to a lack of enterprise features and degrading performance.  Jeff is working to add in encryption and authentication without rewriting the filesystem itself.  There are quite a few tricky problems involved in the encryption portion due to partial writes and general security during the handshake process.  CloudFS could potentially be a network filesystem which could be shared by multiple tenants with their own individual namespaces and segregated UID's.  This could be a big win for providers as they could offer up large amounts of storage in an organized fashion without too many management headaches.</p>
<p>We wrapped up the day of talks with <a href="http://clalance.blogspot.com/">Chris Lalancette's</a> presentation about <a href="http://incubator.apache.org/deltacloud/">Deltacloud</a>.  In short, it's a bag of daemons that allow you to manage multiple public or private clouds.  Everything from image management to provisioning are included in the project.  Questions were raised about whether another application was needed since vendor-specific libraries are abundant and libcloud offers many of the same features in a simpler package.</p>
<p>Tonight's social event was FUDPub at ASU's Memoral Union building.  The food and drinks were excellent (thanks to <a href="http://rackspace.com/">Rackspace</a>!) and it was a great opportunity to relax and talk with other Fedora users and developers.  We had the opportunity to meet people from around the world while playing round after round of bowling and billiards.  The discussions were extremely valuable, but as I said before, it was quite tiring.</p>
<p>I've compiled the FUDCon photos I've taken into a <a href="http://www.flickr.com/photos/texas1emt/sets/72157625935659726/">Flickr photo set</a>.</p>
<p>That's the end of today's summary.  I'll try to keep this going tomorrow as well.  Thanks for reading!</p>
<p><a href="http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/">FUDCon 2011: Day One</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/01/30/fudcon-2011-day-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://fedoraproject.org/w/uploads/4/44/State_of_fedora_tempe_2011.ogg" length="8032960" type="audio/ogg" />
		</item>
		<item>
		<title>rpmdb: Lock table is out of available locker entries</title>
		<link>http://rackerhacker.com/2007/05/27/rpmdb-lock-table-is-out-of-available-locker-entries/</link>
		<comments>http://rackerhacker.com/2007/05/27/rpmdb-lock-table-is-out-of-available-locker-entries/#comments</comments>
		<pubDate>Sun, 27 May 2007 16:38:32 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[bdb]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[emergency]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[up2date]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/2007/05/27/rpmdb-lock-table-is-out-of-available-locker-entries/</guid>
		<description><![CDATA[If up2date throws some horrible Python errors and rpm says "rpmdb: Lock table is out of available locker entries", you can restore your system to normality with the following: The errors: rpmdb: Lock table is out of available locker entries error: db4 error(22) from db-&#62;close: Invalid argument error: cannot open Packages index using db3 - [...]<p><a href="http://rackerhacker.com/2007/05/27/rpmdb-lock-table-is-out-of-available-locker-entries/">rpmdb: Lock table is out of available locker entries</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If up2date throws some horrible Python errors and rpm says "rpmdb: Lock table is out of available locker entries", you can restore your system to normality with the following:</p>
<p>The errors:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">rpmdb: Lock table is out of available locker entries
error: db4 error(22) from db-&gt;close: Invalid argument
error: cannot open Packages index using db3 - Cannot allocate memory (12)
error: cannot open Packages database in /var/lib/rpm</pre></div></div>

<p>Make a backup of /var/lib/rpm in case you break something:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">tar cvzf rpmdb-backup.tar.gz /var/lib/rpm</pre></div></div>

<p>Remove the Berkeley databases that rpm uses:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">rm /var/lib/rpm/__db.00*</pre></div></div>

<p>Make rpm rebuild the databases from scratch (may take a short while):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">rpm --rebuilddb</pre></div></div>

<p>Now, check rpm to make sure everything is okay:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">rpm -qa | sort</pre></div></div>

<p><b>Why does this happen?</b><br />
When rpm accesses the Berkeley database files, it makes temporary locker entries within the tables while it searches for data.  If you control-c your rpm processes often, this issue will occur much sooner because the locks are never cleared.</p>
<p><a href="http://rackerhacker.com/2007/05/27/rpmdb-lock-table-is-out-of-available-locker-entries/">rpmdb: Lock table is out of available locker entries</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2007/05/27/rpmdb-lock-table-is-out-of-available-locker-entries/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
	</channel>
</rss>

