<?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>btm.geek</title>
	<atom:link href="http://blog.loftninjas.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.loftninjas.org</link>
	<description></description>
	<lastBuildDate>Sat, 14 Aug 2010 04:09:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Joining Opscode</title>
		<link>http://blog.loftninjas.org/2010/08/13/joining-opscode/</link>
		<comments>http://blog.loftninjas.org/2010/08/13/joining-opscode/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 04:09:00 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=495</guid>
		<description><![CDATA[After a brief respite over the next few weeks, I&#8217;ll be joining Opscode in September. Not only am I excited about working with such a great group of people, but also for the incredible opportunity of getting to work on problems whose solutions are already beginning to permanently change how we build systems.
After all, we [...]]]></description>
			<content:encoded><![CDATA[<p>After a brief respite over the next few weeks, I&#8217;ll be joining Opscode in September. Not only am I excited about working with such a <a href="http://opscode.com/team">great group of people</a>, but also for the incredible opportunity of getting to work on problems whose solutions are already beginning to permanently change how we build systems.</p>
<p>After all, we should be solving life&#8217;s more difficult problems, not passing our days as a cog in a machine of repetitious activity. When skilled and respected humans become mere automatons of deployment tasks; we&#8217;ve slipped into a dismal place. There is boundless room out there for innovation, but we need a dependable platform on which to build.</p>
<p>I&#8217;m joining Opscode to help craft this reality. I want to help you find meaning in these tools; how they will make your life easier. Don&#8217;t confuse this end as simply being able to work faster, it&#8217;s about working better.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/08/13/joining-opscode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dependant Paradigms</title>
		<link>http://blog.loftninjas.org/2010/07/21/dependant-paradigms/</link>
		<comments>http://blog.loftninjas.org/2010/07/21/dependant-paradigms/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 06:33:10 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=489</guid>
		<description><![CDATA[The Systems Administrator is likely the closet technological trade to skilled manual labor. They troubleshoot complex systems that others take for granted, until they fail, with a deceptive ease. Explaining to another how they had a hunch to look at a certain part of the system is either a retrospective tale of why it made [...]]]></description>
			<content:encoded><![CDATA[<p>The Systems Administrator is likely the closet technological trade to skilled manual labor. They troubleshoot complex systems that others take for granted, until they fail, with a deceptive ease. Explaining to another how they had a hunch to look at a certain part of the system is either a retrospective tale of why it made sense, or a sarcastic nod to magic. This tale attempts to work out how one could have deduced the solution, but even if someone assembled a collection of symptoms and solutions into a step-by-step guide, they would not be able to replace the role of a Systems Administrator. Like an automotive mechanic can detect a blown head gasket from the smell of the oil, a Systems Administrator can sense infrastructure issues from how systems are behaving. And like a fondness for a make of automobile, we grow attached to Linux distributions that have treated us well and editors whose dark secrets we can manipulate skillfully.</p>
<p>I once had a student who didn&#8217;t understand why we couldn&#8217;t repair board-level hardware issues ourselves as easily as replacing a stick of memory, as their uncle was capable of repairing any engine problems by opening up the hood and quite literally &#8220;jiggling some wires.&#8221; A mystic knowledge exists in both worlds that is challenging to articulate to the layman. It can be difficult enough to explain a single component, but when a part of a system falls over and causes cascading failures in other parts of a system, outsiders are tempted to believe that they&#8217;ve just learned a truth about the solution. That is, that when certain symptoms occur, it is always caused by the failure of a particular part and that this part should be restarted to &#8217;solve&#8217; the problem. Yet, the experienced know that this only resolves the symptoms and the still problem lurks, now with fewer hints as to its origin.</p>
<blockquote><p>The future is already here &#8211; it is just unevenly distributed. &#8212; William Gibson</p></blockquote>
<p>The trouble with paradigm shifts is that they aren&#8217;t necessarily direct improvements on existing technology with a clear lineage. Critics ask why the new ways are better than that which they replace, and we struggle to draw the path that led us to this new place of understanding. The struggle is because instead of making a choice at a clear intersection of a path, we stepped through the bushes to another path not as obviously traveled. This alternate path may lead us to the same end, but its course has an entirely different shape. </p>
<p>To further exacerbate the problem, new innovations stand on the shoulders of giants. Some people have been convinced of the merits of leveraging cloud computing on a strictly financial basis, and have missed the tenants of Undifferentiated Heavy Lifting (UHL), where running servers and building networks may not be ones core business and ultimately a distraction. Some have yet to grasp the concept of treating systems, even built on internal hardware, as disposable, still accustomed to legacy processes of maintaining a system for the lifetime of the hardware.</p>
<p>It is essential to realize that these new technologies are not minor improvements to business as usual. Like the birth of globalization changing business around the world, nursed by the multi-modal shipping container&#8217;s head fake as just another way of moving cargo, todays innovations will surely reshape the face of operations permanently, in substantial and non-incremental ways.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/07/21/dependant-paradigms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Amazon ELB requires CRLF for HTTP Requests</title>
		<link>http://blog.loftninjas.org/2010/04/09/amazon-elb-requires-crlf-for-http-requests/</link>
		<comments>http://blog.loftninjas.org/2010/04/09/amazon-elb-requires-crlf-for-http-requests/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 20:13:48 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=486</guid>
		<description><![CDATA[Here&#8217;s an interesting bit I stumbled upon while playing with Amazon Web Services (AWS) Elastic Load Balancing (ELB): HTTP requests must have their lines terminated with CRLF and not just a line feed. When using netcat to test a web server by speaking HTTP, it only sends LFs by default (\n). While RFC 2616 specifies:
&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an interesting bit I stumbled upon while playing with Amazon Web Services (AWS) Elastic Load Balancing (ELB): HTTP requests must have their lines terminated with CRLF and not just a line feed. When using netcat to test a web server by speaking HTTP, it only sends LFs by default (\n). While <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a> specifies:</p>
<blockquote><p>&#8230; a bare CR or LF MUST NOT be substituted for CRLF within any of the HTTP control structures &#8230;</p></blockquote>
<p>Using netcat to connect to a web server typically works just fine. I&#8217;m inputting the HTTP requests by hand and [ENTER] is where I hit the enter key.</p>
<pre>
$ nc www.google.com 80
GET / HTTP/1.0[ENTER]
[ENTER]
HTTP/1.0 200 OK
Date: Fri, 09 Apr 2010 20:07:25 GMT
Expires: -1
[snip]
</pre>
<p>This works against Apache. However when connecting to an Apache server through ELB, one must run netcat with the -C option to send a CRLF instead of a lone LF upon return.</p>
<pre>
$ nc -C elb.example.org 80
GET / HTTP/1.0[ENTER]
[ENTER]
HTTP/1.1 302 Found
Content-Type: text/html; charset=iso-8859-1
Date: Fri, 09 Apr 2010 20:09:39 GMT
Location: http://elb.example.org/404/
Server: Apache
Vary: Accept-Encoding
Content-Length: 290
Connection: Close
</pre>
<p>Sans the -C option, the connection simply hangs. Which asks the question, what is Amazon doing with your HTTP traffic in between?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/04/09/amazon-elb-requires-crlf-for-http-requests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>an evening with Munin graph aggregation</title>
		<link>http://blog.loftninjas.org/2010/04/08/an-evening-with-munin-graph-aggregation/</link>
		<comments>http://blog.loftninjas.org/2010/04/08/an-evening-with-munin-graph-aggregation/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 02:44:01 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=466</guid>
		<description><![CDATA[Trending?
I&#8217;m often a bit surprised by the lack of substance about trending that leaks out on the Internet. I mean, everybody is doing it. Right? Munin is a great introduction to trending due to its simplicity in getting started and the wealth of plugins.
I&#8217;m a believer of collecting as much data as possible and sorting [...]]]></description>
			<content:encoded><![CDATA[<h3>Trending?</h3>
<p>I&#8217;m often a bit surprised by the lack of substance about trending that leaks out on the Internet. I mean, everybody is doing it. <em>Right? </em><a href="http://munin-monitoring.org/">Munin</a> is a great introduction to trending due to its simplicity in getting started and the wealth of <a href="http://muninexchange.projects.linpro.no/">plugins</a>.</p>
<p>I&#8217;m a believer of <a href="http://lethargy.org/~jesus/writes/reconnoiter-and-another-platform">collecting as much data as possible and sorting it out later</a>. Without data, you can only speculate wildly at what it might have said. <a href="http://mettadore.com/ruby/ruby-cant-scale/">So will others</a>, so it&#8217;s nice having a response; often they won&#8217;t. I don&#8217;t need to be looking at the disk latency or available entropy for dozens of servers every day, but the time saved by being able to look at these graphs when something occurs and make correlations between trends is revolutionary to how you will spend your day. When having too much data can feel overwhelming, it&#8217;s time to post-process it into something more bite-size.</p>
<p>Still, I run operations for a web product and there is data I do want to see every day, both to monitor the health of the product and <a href="http://www.amazon.com/Art-Capacity-Planning-Scaling-Resources/dp/0596518579">plan capacity</a> for upcoming growth. Aggregating data for multiple systems and creating a sort of executive trending console helps accomplish this.</p>
<h3>Getting Started</h3>
<p>The best way to get familiar with munin is to install it on a debian or ubuntu workstation. Installing the &#8216;munin&#8217; (server) and &#8216;munin-node&#8217; (client) packages will be enough to generate some graphs about your local machine. Go ahead and run:</p>
<p><code>sudo su munin -s /bin/bash -c 'time /usr/bin/munin-cron'</code></p>
<p>Then point your browser at file:///var/cache/munin/www/index.html.</p>
<h3>Aggregates</h3>
<p>Aggregate graphs are created by munin-graph from existing data in the <a href="http://oss.oetiker.ch/rrdtool/">RRDs</a> collected by munin-update. There are two types of aggregates: <a href="http://munin-monitoring.org/wiki/faq#Q:HowdoIusefieldname.sum">sum</a> and <a href="http://munin-monitoring.org/wiki/faq#Q:HowdoIusefieldname.stack">stack</a>. Sum will show you the total of multiple data sets. The Munin wiki uses the aggregate current between two UPS&#8217;s as <a href="http://munin-monitoring.org/wiki/aggregate_examples">an example</a>. Sum is most useful when the data sets are relatively meaningless individually. For instance if you wanted to know the total current CPU usage in a 50-node cluster, each node is not particularly interesting alone, but the sum would be. Stack provides the data sets visually stacked on a single graph. The Munin wiki uses the total entropy between two systems as <a href="http://munin-monitoring.org/wiki/stack_examples">their example</a>, which isn&#8217;t particularly interesting. I&#8217;ll use some similarly uninteresting examples, but later I&#8217;ll show one that produces a stack comparing data in multiple datacenters.</p>
<p>Lets look at a simple example /etc/munin/munin.conf file with an aggregate graph similar to what is in the munin.conf man page:</p>
<pre class="syntax-highlight:php">
[localhost.localdomain]
address 127.0.0.1
use_node_name yes

[localdomain;Totals]
update no

load.graph_title 2xload
load.double.stack one=localhost.localdomain:load.load two=localhost.localdomain:load.load
</pre>
<p>This will create a graph that shows the local systems load twice in a graph by stacking the same value.</p>
<p>Munin separates hosts by domain in more ways than just the html index that munin-html puts out. By default hosts are put into a &#8220;group&#8221; by their domain name. If an aggregate graph attempts to reference data values from a host in another group, munin may not find it and fail to clearly notify as to why. You can manually place a node in a group as we do above where we put the virtual host &#8220;Totals&#8221; in the &#8220;localdomain&#8221; group by entitling the section &#8220;[localdomain;Totals]&#8221; on line 5. Your groups can be called anything, they don&#8217;t have to be a domain name.</p>
<p>The &#8220;update no&#8221; directive on line 6 tells munin-update to skip this section, or hos since these graphs are created entirely from data collected from other hosts. Please note that you typically still need to run munin-update <strong>before</strong> munin-graph to get configuration changes to aggregate graphs to appear in the graph. Munin appears to bailout on drawing a graph if it sees no new data for that graph pretty early in the process.</p>
<p>Typically failures in this area of configuration result in a new graph not being created but munin-graph appearing to run successfully otherwise. Note that <a href="http://munin-monitoring.org/wiki/graph_title">graph_title</a> is <strong>required</strong>. If you see an error that looks like:</p>
<p><code>2010/04/08 18:43:46 [RRD ERROR] Unable to graph /var/cache/munin/www/localdomain/Totals/load-year.png : opening '': No such file or directory</code></p>
<p>This is because munin was unable to find a data set, or specifically the RRD file, based on the value you specified. Both of the following lines cause this error and the graph to not be drawn:</p>
<pre>load.double.stack one=localhost.localdomain:load.load two=localhost.localdomainX:load.load
load.double.stack one=localhost.localdomain:load.load two=localhost.localdomain:load.loadX</pre>
<p>This syntax evaluates to:<br />
graph.value.stack line=host.domain:plugin.value</p>
<p>Line, also called alias, ends up being the label for that line. Often dashes are inconsistently converted to underscores in Munin. I have a working plugin called &#8216;foo_js-3_0&#8242;, which I have to specify as &#8216;foo_js_3_0&#8242; in the above syntax.</p>
<pre class="syntax-highlight:php">
[localhost.localdomain]
    address 127.0.0.1
    use_node_name yes

[localdomain;Totals]
  update no

  load.graph_title 2xload
  load.double.sum localhost.localdomain:load.load localhost.localdomain:load.load
  load.double.label Double the load
</pre>
<p>Here is the same example but displayed as a sum. Note that we&#8217;ve added &#8216;load.double.label&#8217;, and this is <strong>required</strong>. This replaces the &#8216;alias&#8217; or &#8216;line&#8217; value we were just discussing in stacked graphs, which you will notice is no longer in the configuration line for &#8216;fieldname.sum&#8217; on line 9.</p>
<h3>Making it useful</h3>
<p>Here is a proof of concept configuration that I made that counts some javascript calls in different datacenters</p>
<pre class="syntax-highlight:php">
# Aggregrates
[example.org;OTS]
  update no
  contacts no

  js-3_0.update no
  js-3_0.graph_category example
  js-3_0.graph_title CAPI3 OTS Calls
  js-3_0.graph_total Total calls per minute
  js-3_0.graph_scale no
  js-3_0.graph_period minute
  js-3_0.graph_args --base 1000 -l 0
  js-3_0.graph_order iad irl las
  js-3_0.total.graph no
    js-3_0.iad.label IAD calls per minute
    js-3_0.iad.sum \
      iadots02.example.org:example_js_3_0.calls \
      iadots01.example.org:example_js_3_0.calls   

    js-3_0.irl.label IRL calls per minute
    js-3_0.irl.sum \
      irlots02.example.org:example_js_3_0.calls \
      irlots01.example.org:example_js_3_0.calls   

    js-3_0.las.label LAS calls per minute
    js-3_0.las.sum \
      lasots02.example.org:example_js_3_0.calls \
      lasots03.example.org:example_js_3_0.calls \
      lasots06.example.org:example_js_3_0.calls \
      lasots04.example.org:example_js_3_0.calls \
      lasots05.example.org:example_js_3_0.calls \
      lasots01.example.org:example_js_3_0.calls
</pre>
<p>This creates the below graph. The jagged lines at the left edge are from missing data values while I was working out some of the issues I describe in this post. There are a couple new directives in this configuration. The &#8216;contacts&#8217; directive on line 4 specifies that if we had munin configured for monitoring (as opposed to trending) we don&#8217;t want it to provide any notification based on the graph values for this virtual host. This is the job of <a href="http://munin-monitoring.org/wiki/munin-limits">munin-limits</a>. The &#8216;graph_category&#8217; directive allows us to put this graph in a category that we specify, otherwise Munin puts it in &#8216;other&#8217;. This is particularly useful if you have different types of aggregate graphs data such as CPU and Apache related data on the same virtual host. The &#8216;graph_total&#8217; directive on line 9 isn&#8217;t that well documented but provides a simple way to add the black total line you see in the graph and is therefore quite useful. Lines 10-12 control <a href="http://munin-monitoring.org/wiki/plugin-bcp#Graphscaling">how the graph is drawn</a> and are outside the scope of this post. The &#8216;<a href="http://munin-monitoring.org/wiki/graph_order">graph_order</a>&#8216; directive seems to give us the ability to control the order in which the fields are drawn on the graph, but is documented as a method to control the order in which the graphs are drawn to specify complex data dependencies.<br />
<img src="http://blog.loftninjas.org/wp-content/uploads/2010/04/js-3_0-day.png" alt="JS3 Calls Per Day" title="JS3 Calls Per Day" width="481" height="311" /></p>
<h3>Configuration Management!</h3>
<p>For fun, here is the <a href="http://wiki.opscode.com/display/chef/Home">Chef</a> template that created this, which allows additional nodes be added automatically, but is still ultimately incomplete.</p>
<pre class="syntax-highlight:php">
[example.org;OTS]
  update no
  contacts no

  &lt;% wop_datacenters = [ &quot;iad&quot;, &quot;irl&quot;, &quot;las&quot; ] -%&gt;

  js-3_0.update no
  js-3_0.graph_category example
  js-3_0.graph_title CAPI3 OTS Calls
  js-3_0.graph_total Total calls per minute
  js-3_0.graph_scale no
  js-3_0.graph_period minute
  js-3_0.graph_args --base 1000 -l 0
  js-3_0.graph_order &lt;%= wop_datacenters.join(&quot; &quot;) %&gt;
  js-3_0.total.graph no
  &lt;% wop_datacenters.each do |dc| -%&gt;
    js-3_0.&lt;%= dc %&gt;.label &lt;%= dc.upcase %&gt; calls per minute
    js-3_0.&lt;%= dc %&gt;.sum \
    &lt;% dc_servers = @ots_servers.select { |host| host[&#039;hostname&#039;] =~ Regexp.new(dc) }.select { |host| host[&#039;hostname&#039;] !~ /pp/ } -%&gt;
    &lt;% dc_servers.each_with_index do |host, index| -%&gt;
      &lt;%= host[&#039;fqdn&#039;] %&gt;:example_js_3_0.calls &lt;%= &#039;\\&#039; unless dc_servers.length - 1 == index %&gt;
    &lt;% end -%&gt;

  &lt;% end -%&gt;
</pre>
<h3>When it does not work</h3>
<p>Debugging munin can be really tough. I keep stopping myself from breaking into explanation of munin&#8217;s process, but something as innocent as as an omitted &#8216;graph_title&#8217; can cause munin to all but silently fail at producing a graph for you. Normally munin runs every give minutes via cron, usually via the &#8216;munin-cron&#8217; wrapper, but you can run the parts individually to look for issues. These tools create a lockfile when they run so they won&#8217;t interfere with the regular process if it is started by cron.</p>
<p><code>user@localhost:~$ </code><code>sudo su - munin -s /bin/bash<br />
</code><code>munin@localhost:~$ </code><code>/usr/share/munin/munin-update --debug --nofork<br />
</code><code>munin@localhost:~$ </code><code>/usr/share/munin/munin-graph --debug --nofork --nolazy<br />
</code><code>munin@localhost:~$ </code><code>/usr/share/munin/munin-html --debug</code></p>
<p>In larger infrastructures, you can limit munin-update and munin-graph to specific host and service combinations while testing.  Be wary that these sometimes will appear more successful than they are:</p>
<p><code>munin@localhost:~$ /usr/share/munin/munin-update --debug --nofork --host nonexistent --service nonexistent<br />
2010/04/08 17:13:23 [DEBUG] Creating new lock file /tmp/munin-update.lock<br />
2010/04/08 17:13:23 [DEBUG] Creating lock : /tmp/munin-update.lock succeeded<br />
2010/04/08 17:13:23 [INFO]: Starting munin-update<br />
2010/04/08 17:13:23 [DEBUG] Creating new lock file /tmp/munin-datafile.lock<br />
2010/04/08 17:13:23 [DEBUG] Creating lock : /tmp/munin-datafile.lock succeeded<br />
2010/04/08 17:13:23 [INFO]: Munin-update finished (0.00 sec)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/04/08/an-evening-with-munin-graph-aggregation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting a permanent Windows Hostname on EC2</title>
		<link>http://blog.loftninjas.org/2010/02/12/setting-a-permanent-windows-hostname-on-ec2/</link>
		<comments>http://blog.loftninjas.org/2010/02/12/setting-a-permanent-windows-hostname-on-ec2/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 07:56:36 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=464</guid>
		<description><![CDATA[In less than obvious fashion, Amazon EC2 Windows Server AMIs reset their hostname on startup due to the Ec2ConfigService. To disable this feature, select &#8216;EC2ConfigService Settings&#8217; from the start menu, and uncheck the first checkbox under &#8216;Set Computer Name&#8217;
]]></description>
			<content:encoded><![CDATA[<p>In less than obvious fashion, Amazon EC2 Windows Server AMIs reset their hostname on startup due to the Ec2ConfigService. To disable this feature, select &#8216;EC2ConfigService Settings&#8217; from the start menu, and uncheck the first checkbox under &#8216;Set Computer Name&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/02/12/setting-a-permanent-windows-hostname-on-ec2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Configuration Management vs Meatcloud: 5 reasons CM wins</title>
		<link>http://blog.loftninjas.org/2010/01/22/configuration-management-vs-meatcloud-5-reasons-cm-wins/</link>
		<comments>http://blog.loftninjas.org/2010/01/22/configuration-management-vs-meatcloud-5-reasons-cm-wins/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 22:21:45 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[configuration management]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=462</guid>
		<description><![CDATA[First, a bit of social commentary.
Sometimes we refer to the way something ought to be accomplished as the RightWay[tm], sarcastically noting that every best practice contains a certain degree of opinion. As we dedicate more time to doing something our way, we become invested in it being the RightWay, and risk becoming defensive about our [...]]]></description>
			<content:encoded><![CDATA[<p>First, a bit of social commentary.</p>
<p>Sometimes we refer to the way something ought to be accomplished as the RightWay<a href="http://en.wikipedia.org/wiki/Trademark">[tm]</a>, sarcastically noting that every best practice contains a certain degree of opinion. As we dedicate more time to doing something our way, we become invested in it being the RightWay, and risk becoming defensive about our choices. Adam Jacob calls this &#8220;survivorship-bias,&#8221; and I&#8217;ve spent some time listening to him think about what he feels the risks are, and considering them myself. When we make significant personal investment in a choice, it becomes a personal challenge to remain impartial about the merits of that choice over time.</p>
<p>I&#8217;ve <a href="http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/">previously</a> said that Configuration Management is the act of programatically configuring your systems. Cloud computing says that building servers is undifferentiated heavy lifting; unless your service is building servers, you should really let someone else do it and focus on the product or service you&#8217;re actually trying to sell. Configuration Management is the first step in bringing this same ideology to configuring systems. We are not in the business of selling configured servers any more than we are in the business of providing coffee to our employees, we happen to do both.  We build our systems to enable our business to conduct business. In my case, operations is enabling our customers to use the web product that we develop.</p>
<p>We are all members of the Configuration Management community, because we believe it is ultimately a better process for building systems. We naturally have different ideas about <a href="http://stochasticresonance.wordpress.com/2010/01/20/puppet-chef-dependencies-and-worldviews/">how that process should execute</a>, which among other differentiating factors is often that &#8220;<a href="http://sysdyn.clexchange.org/sdep/Roadmaps/RM1/D-4468-2.pdf">goals are different but are left unstated</a>&#8221; in the community. The level of preference here and resulting fragmentation is not any different than holding an opinion over what open source operating system one should use for a specific task. The merits of our choices are worth discussing, but the implication that tools and libraries should all come to the same conclusions about design is like implying that the world only needs one type of <a href="http://en.wikipedia.org/wiki/Hammer">hammer</a>.</p>
<p>So, defining the <a href="http://stochasticresonance.wordpress.com/2008/04/27/shared-metaphor-gnome-cloud-meat-pastries-20/">meatcloud</a> as the established notion that having your internet presence grow forms a direct relationship with hiring more people to rack servers, <a href="http://stochasticresonance.wordpress.com/2009/04/01/meatcloud-manifesto/">install software</a>, and update configuration files; I asked around a little, why do we think Configuration Management is better?</p>
<ul>
<li><strong>Abstractation</strong></li>
<p>You don&#8217;t need to be a mechanic to drive a car, should you need to be a subject matter expert on Apache to run a webserver? <a href="http://stochasticresonance.wordpress.com/2009/07/12/infrastructure-renaissance/">Infrastructure as code</a> shows us how and <a href="http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/">the resulting communities</a> are starting to implement this. When we spend less time getting the parts working, we can spend more time innovating better solutions with the parts.</p>
<li><strong>Self-documenting</strong></li>
<p>Ever rebuild a server that someone built long ago and is no longer with the organization, and find many small parts necessary to make it work that nobody bothered to write down? Placing those small changes and required files in configuration management ensures that even if the code doesn&#8217;t run flawlessly on an upgraded operating system, you know everything that went in to making it work. Since you&#8217;re configuring the system through configuration management, a lot less falls through the cracks because documentation is often an afterthought to getting the system working.</p>
<li><strong>Consistency and Repeatability</strong></li>
<p>What is on that system? Everything you told CM to put there. &#8216;<a href="http://madstop.com/2009/02/04/golden-image-or-foil-ball/">Golden image</a>&#8216; disk images often leave you in the aforementioned situation where you don&#8217;t know how to recreate them, but often you don&#8217;t know what else ended up there. Configuration Management allows you to build many copies of the same system easily, from scratch every time.</p>
<li><strong>Agility</strong></li>
<p>Did sales tell you they had fifty customers and it turned out to be five hundred? How long will it take you to build the extra servers by hand? How many extra people do you have to put into the meatcloud to get that done in time? Business requirements always change, and slow moving businesses are at a disadvantage to dealing with this. The inability to build and deploy servers fast enough should never be a reason your business fails.</p>
<li><strong>Flexibility, or Don&#8217;t Repeat Yourself</strong></li>
<p>Three applications on one server? Or one application on three servers? Apache doing different jobs on multiple servers? Moving applications between servers and leveraging existing infrastructure code for new projects is easy. We automate tasks that are repeatable, but often scripts are written to accomplish one repeatable task. Here we say, how can we treat configuration as sets of modular tasks that we can mix and match?</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/01/22/configuration-management-vs-meatcloud-5-reasons-cm-wins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moar unofficial chef 0.7.16.2</title>
		<link>http://blog.loftninjas.org/2010/01/07/moar-unofficial-chef-07162/</link>
		<comments>http://blog.loftninjas.org/2010/01/07/moar-unofficial-chef-07162/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 01:16:30 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=457</guid>
		<description><![CDATA[Well a couple people used the 0.7.16wt1 release, including Thom May who had issues with that version number. Consequently I took out the &#8216;wt&#8217; from the version, but this is still an unofficial, unsupported release.
I pulled in the changes on Thom&#8217;s internal branch and grabbed some more low hanging fruit. Don&#8217;t ask what methodology I [...]]]></description>
			<content:encoded><![CDATA[<p>Well a couple people used the <a href="http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/">0.7.16wt1 release</a>, including Thom May who had <a href="http://github.com/thommay/chef/commit/dcf8f4e723aff57fe63a3a05f2a6c662ec924893">issues</a> with that version number. Consequently I took out the &#8216;wt&#8217; from the version, but this is still <strong>an unofficial, unsupported release</strong>.</p>
<p>I pulled in the changes on Thom&#8217;s internal branch and grabbed some more low hanging fruit. Don&#8217;t ask what methodology I used. It&#8217;s magic.</p>
<p>Grab the<a href="http://github.com/btm/chef/tree/0.7.16.2"> github branch</a>, or the debs in <a href="https://launchpad.net/~btm/+archive/ppa">my launchpad ppa</a>. I&#8217;ve only tested this on Ubuntu Karmic, as it goes.</p>
<p>** Bug<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-454">CHEF-454</a>] &#8211; Centos4 yum provider failure<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-616">CHEF-616</a>] &#8211; rake install in chef-repo breaks if there is no git origin<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-637">CHEF-637</a>] &#8211; duplicate copies of FileEdit: file_edit.rb &amp; fileedit.rb<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-639">CHEF-639</a>] &#8211; git resource fails on subsequent checkouts of the same repostiry<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-642">CHEF-642</a>] &#8211; Services will always issue a WARN when status is not present<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-684">CHEF-684</a>] &#8211; Should be possible for roles to be created without anything in the run_list<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-704">CHEF-704</a>] &#8211; Ruby block device does not have a default action<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-722">CHEF-722</a>] &#8211; Link provider doesn&#8217;t understand paths requiring expansion<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-843">CHEF-843</a>] &#8211; FileEdit permission issues</p>
<p>** Improvement<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-598">CHEF-598</a>] &#8211; Upstart service provider<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-617">CHEF-617</a>] &#8211; Install to chef repository on a remote machine<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-709">CHEF-709</a>] &#8211; Support for backup up files in another directory than the original file<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-752">CHEF-752</a>] &#8211; No way to pass parameters to useradd provider</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/01/07/moar-unofficial-chef-07162/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Got recursion not available and Cisco SSL VPN</title>
		<link>http://blog.loftninjas.org/2010/01/06/got-recursion-not-available-and-cisco-ssl-vpn/</link>
		<comments>http://blog.loftninjas.org/2010/01/06/got-recursion-not-available-and-cisco-ssl-vpn/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 21:37:12 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=455</guid>
		<description><![CDATA[I&#8217;ve periodically been having DNS lookup issues with internal domains and isolated them to remote SSL VPN clients connecting to a Cisco ASA 5520 using the Anyconnect SSL VPN client. I eventually got frustrated and troubleshooted the issue by using the command line &#8216;vpn&#8217; client to initiate a connection on a remote Ubuntu Linux machine [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve periodically been having DNS lookup issues with internal domains and isolated them to remote SSL VPN clients connecting to a Cisco ASA 5520 using the Anyconnect SSL VPN client. I eventually got frustrated and troubleshooted the issue by using the command line &#8216;vpn&#8217; client to initiate a connection on a remote Ubuntu Linux machine while here in the office. nslookup would produce the error &#8220;Got recursion not available from x.x.x.x, trying next server&#8221; and dig would respond with &#8220;status: REFUSED&#8221; and &#8220;;; WARNING: recursion requested but not available&#8221;. I noticed traffic was not making it to the Windows Server 2008 DNS server by watching wireshark and enabling DNS debugging.</p>
<p>Having been acquired six months ago our list of internal domains increased quite a bit. I found the &#8217;split-dns&#8217; setting in the default group access policy set to the old list of internal domains and set this to &#8217;split-dns none&#8217;. This resolved the issue. Apparently the client was comparing the query to its list of split-dns domains, and the match was failing so it was sending the resolver (operating system) an error message so it would go through the list of DNS servers until it tried the local server. Rather than trying to make a list of all the possible domain names in the company, I&#8217;m going to leave this off since the internal DNS servers have recursion enabled and can handle DNS lookups just fine for the remote clients.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2010/01/06/got-recursion-not-available-and-cisco-ssl-vpn/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Chef 0.7.16wt1 fork and more 0.8 alpha notes</title>
		<link>http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/</link>
		<comments>http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 02:43:02 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=452</guid>
		<description><![CDATA[I sent an email out to the chef list today about releasing an unofficial Chef 0.7.16 fork to tide some of us over until 0.8 ships as Opscode does not plan any more 0.7.x releases. I use this internally at $job and pushed it out to github by request. I have no plans to push [...]]]></description>
			<content:encoded><![CDATA[<p>I sent an <a href="http://lists.opscode.com/sympa/arc/chef/2009-12/msg00061.html">email</a> out to the chef list today about releasing an unofficial Chef 0.7.16 fork to tide some of us over until 0.8 ships as Opscode <a href="http://www.opscode.com/blog/2009/10/26/chef-0-7-14-ohai-0-3-6-releases/">does not plan</a> any more 0.7.x releases. I use this internally at $job and pushed it out to github by request. I have no plans to push another release but will if there is demand internally or externally. This includes the security patches in 0.7.16 and a couple bug fixes:</p>
<p>* [<a href="http://tickets.opscode.com/browse/CHEF-706">CHEF-706</a>] - mount provider fails to mount samba/cifs devices (Device does not exist)<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-634">CHEF-634</a>] - UI fails silently when unable to save node<br />
* [<a href="http://tickets.opscode.com/browse/CHEF-659">CHEF-659</a>] - UI expands some escaped characters from JSON, then fails to encode them again</p>
<p>You can grab this tree from <a href="http://github.com/btm/chef/tree/0.7.16wt1">github</a>, or use the debs built in <a href="https://launchpad.net/~btm/+archive/ppa">my launchpad PPA</a>.</p>
<p>Rather than making additional blog posts as the build for Chef 0.8 alpha has progressed, I&#8217;ve been updating <a href="http://gist.github.com/242523">this gist</a> each time I test another build cycle. My original instructions are <a href=" http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/">here</a>. There is another blog posts <a href="http://likens.us/articles/2009/11/05/down-the-pipe-we-go/">here</a> and some instructions for <a href="http://likens.us/articles/2009/12/14/chef-8-down-and-dirty-in-screen/">running under screen</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/29/chef-0716wt1-fork-and-more-08-alpha-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>knife, or, my tool is actually a library</title>
		<link>http://blog.loftninjas.org/2009/12/24/knife-or-my-tool-is-actually-a-library/</link>
		<comments>http://blog.loftninjas.org/2009/12/24/knife-or-my-tool-is-actually-a-library/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 21:26:15 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chef]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=447</guid>
		<description><![CDATA[The Chef site starts out with, &#8220;Chef is a systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.&#8221; There is an important point hidden in that description; Chef is not a CM tool. Of course it can be used as one, and many do, but from its beginning it [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://wiki.opscode.com/display/chef/Home">Chef site</a> starts out with, &#8220;Chef is a systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.&#8221; There is an important point hidden in that description; Chef is not a CM tool. Of course it can be used as one, and many do, but from its beginning it has been leveraged by <a href="http://www.opscode.com/adoption">others</a> such as Engine Yard inside of their own infrastructure. You can safely bet it will be an integral part of the <a href="http://www.opscode.com/blog/2009/10/07/preview-chef-0-8-and-the-opscode-platform/">Opscode platform</a> when released as well.</p>
<p>While I was off dealing with my startup&#8217;s acquisition this fall, a chef user <a href="http://gist.github.com/100837">wrote</a> <a href="http://wiki.opscode.com/display/chef/Knife">knife</a>. It was a command line client for interacting with a chef server. An impressively simple prototype, made possible and powered by the chef libraries and API. This has happened before with chef; for instance a while ago in the 0.6 era, an OS X GUI client called <a href="http://github.com/fotonauts/casserole">Casserole</a> was written by another chef user with an itch to scratch. However, something has happened with knife that is interesting enough I&#8217;d like to specifically point out; it got <a href="http://github.com/opscode/chef/blob/master/chef/lib/chef/knife.rb">mainlined</a> and heavily expanded.</p>
<p>This happened for a handful of reasons. For one, it was simply a great idea. The kind of user who would be attracted to chef as a tool is very likely to be a power user who would rather not spend their time clicking around a graphical interface. It&#8217;s much easier to script a command line tool where needed, passing data in and out for quick hacks to your infrastructure. The folks at Opscode saw this, agreed, and set out to add full functionality to it for the upcoming 0.8 release.</p>
<p>What I think is most important is the planning a full API from the start. From hearing <a href="http://twitter.com/adamhjk">Adam</a> talk about other tools being &#8220;first-class citizens&#8221; in chef-land, and knowing his experience writing <a href="http://github.com/adamhjk/iclassify/">iClassify</a> as an early open source <a href="http://reductivelabs.com/trac/puppet/wiki/ExternalNodes">external node</a> tool for <a href="http://reductivelabs.com/products/puppet/">puppet</a>, I know this design was intentional. Using iClassify to tell puppet about your nodes was great, but puppet assumed that you only wanted this tool to classify nodes in the way puppet thought about nodes. Consequentially, when you wanted to to use data in iClassify about your nodes to make decisions about your infrastructure on the fly, you were forced to do it in templates. This created the expected repetition of loading the iClassify library and accessing iClassify in many templates, but also required you at times to do some fancy footwork to get data between templates when you really wanted puppet to know about the data itself.</p>
<p>Reductive Labs recently <a href="http://reductivelabs.com/2009/12/14/a-tour-of-puppet-dashboard-0-1-0/">announced a dashboard for puppet</a>. I was hoping this meant those barriers had been removed. It certainly creates <a href="http://reductivelabs.com/wp-content/uploads/2009/12/Puppet-Dashboard.png">really nice graphs</a> from your <a href="http://reductivelabs.com/trac/puppet/wiki/ReportsAndReporting">puppet report data</a>. However from the <a href="http://github.com/reductivelabs/puppet-dashboard/blob/master/README.markdown">README</a> it looks like you&#8217;re still pushing limited data into puppet using the external node interface. Reductive is going to have to expand this interface greatly if dashboard is to have any meaningful node integration benefits that we didn&#8217;t already have two years ago with iClassify.</p>
<p>Just as you can see some concepts from other configuration management tools in chef, you can <a href="http://wiki.github.com/adamhjk/iclassify/screen-shots">see parts of iClassify</a>. It was a great start and it was disappointing that the puppet community didn&#8217;t engage it further. Perhaps it was simply before its time, but I believe it was that there were too few doors into puppet-land to let you really take advantage of and grow external tools.</p>
<p>I think this was the lesson that Opscode learned, and consequently chef was born with an API. With it we can accomplish nearly anything we dream up. What is most exciting about this is that we can <strong>do whatever everyone else dreams up</strong>. I can&#8217;t wait to see what that is.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/24/knife-or-my-tool-is-actually-a-library/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Error 80070005 accessing SSIS/DTS on SQL 2008 and Server 2008</title>
		<link>http://blog.loftninjas.org/2009/12/16/error-80070005-accessing-ssisdts-on-sql-2008-and-server-2008/</link>
		<comments>http://blog.loftninjas.org/2009/12/16/error-80070005-accessing-ssisdts-on-sql-2008-and-server-2008/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 16:43:37 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=445</guid>
		<description><![CDATA[Retrieving the COM class factory for component with CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A} failed due to the following error: 80070005. (Microsoft.SqlServer.ManagedDTS)
Trying to access SSIS (DTS) on Microsoft SQL 2008 with SSMS (SQL Server Management Studio) on Microsoft Windows Server 2008 gave the above error. Trying to create a maintenance plan provided the same error, since it uses SSIS. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Retrieving the COM class factory for component with CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A} failed due to the following error: 80070005. (Microsoft.SqlServer.ManagedDTS)</p></blockquote>
<p>Trying to access SSIS (DTS) on Microsoft SQL 2008 with SSMS (SQL Server Management Studio) on Microsoft Windows Server 2008 gave the above error. Trying to create a maintenance plan provided the same error, since it uses SSIS. There were indications online that I should try running SSMS with elevated permissions using the &#8216;Run as administrator&#8217; option on the context (right-click) menu, however that provided a &#8220;The parameter is incorrect&#8221; error on startup. Eventually I discovered that the disk that the SQL tools were installed on did not have default (R+X) permissions to the local users group. Once I added this group, I was able to connect to SSIS and create a maintenance plan without issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/16/error-80070005-accessing-ssisdts-on-sql-2008-and-server-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scripting the root password on Ubuntu 9.10 (karmic)</title>
		<link>http://blog.loftninjas.org/2009/12/07/scripting-the-root-password-on-ubuntu-910-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/12/07/scripting-the-root-password-on-ubuntu-910-karmic/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 21:17:18 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=442</guid>
		<description><![CDATA[On Ubuntu 9.04 (jaunty) I had been generating and setting the root password in a bootstrapping script using:
# Generated MD5 encrypted password
/usr/bin/openssl passwd -1
# Set the password
/bin/echo 'root:ENCRYPTED_PASSWORD' &#124; /usr/sbin/chpasswd -e
With shadow 4.1.4, chpasswd now uses PAM, and has dropped the -e option used above, as well as the -c option that I&#8217;d used to [...]]]></description>
			<content:encoded><![CDATA[<p>On Ubuntu 9.04 (jaunty) I had been generating and setting the root password in a bootstrapping script using:</p>
<p><code># Generated MD5 encrypted password<br />
/usr/bin/openssl passwd -1<br />
# Set the password<br />
/bin/echo 'root:ENCRYPTED_PASSWORD' | /usr/sbin/chpasswd -e</code></p>
<p>With shadow 4.1.4, chpasswd now uses PAM, and has dropped the -e option used above, as well as the -c option that I&#8217;d used to <a href="http://blog.loftninjas.org/2009/03/11/generating-sha512-passwords/">generate sha512 encrypted passwords</a>. You&#8217;ll want to use mkpasswd from the whois package (yeah, weird) for that now, such as:</p>
<p><code>mkpasswd -m sha-512 -s</code></p>
<p>The password can be presented to useradd / usermod in encrypted format, such as:</p>
<p><code>/usr/sbin/useradd -m -p 'ENCRYPTED_PASSWORD' -G admin -s /bin/bash toor</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/12/07/scripting-the-root-password-on-ubuntu-910-karmic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Chef 0.8 alpha on Ubuntu Karmic</title>
		<link>http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 10:42:03 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chef]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=435</guid>
		<description><![CDATA[Theres push to get Chef 0.8 out the door because we&#8217;re all anxious for its awesome list of features and fixes, so we&#8217;re all hunkering down on fixing bugs. Scott Likens has similar notes and theres some more to be found in Dan Deleo&#8217;s 08boot bootstrap recipe. This should help get you going.
On a fresh [...]]]></description>
			<content:encoded><![CDATA[<p>Theres push to get Chef 0.8 out the door because we&#8217;re all anxious for its awesome list of <a href="http://tickets.opscode.com/browse/CHEF/fixforversion/10013">features and fixes</a>, so we&#8217;re all hunkering down on fixing bugs. Scott Likens has <a href="http://likens.us/articles/2009/11/05/down-the-pipe-we-go/">similar notes</a> and theres some more to be found in Dan Deleo&#8217;s <a href="http://github.com/danielsdeleo/cookbooks/blob/08boot/bootstrap/recipes/server.rb">08boot bootstrap recipe</a>. This should help get you going.</p>
<p><strong>On a fresh Ubuntu Karmic install (a VM makes this easy of course):</strong><br />
# Add the Canonical Ubuntu &#8216;multiverse&#8217; repository for Java.<br />
sudo vi /etc/apt/sources.list # add multiverse to your &#8216;deb&#8217; lines if it is not there<br />
sudo apt-get update</p>
<p># Start <a href="http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation">Chef Gem bootstrap</a> with some notes<br />
# note that I don&#8217;t like to install rubygems from source and use the packages instead. this adds a step or two.<br />
sudo apt-get install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert rubygems git-core -y<br />
sudo gem sources -a http://gems.opscode.com<br />
sudo gem sources -a http://gemcutter.org # for nanite<br />
sudo gem install ohai chef json &#8211;no-ri &#8211;no-rdoc</p>
<p><strong>We now have enough chef to bootstrap ourselves</strong><br />
# Create ~/chef.json:</p>
<pre>{
  "bootstrap": {
    "chef": {
      "url_type": "http",
      "init_style": "runit",
      "path": "/srv/chef",
      "serve_path": "/srv/chef",
      "server_fqdn": "localhost"
    }
  },
  "recipes": "bootstrap::server"
}
# End of file
</pre>
<p># Create ~/solo.rb:</p>
<pre>file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
# End of file
</pre>
<p>mkdir /tmp/chef-solo<br />
cd /tmp/chef-solo<br />
# Get kallistec&#8217;s 08boot bootstrap cookbook<br />
git clone git://github.com/danielsdeleo/cookbooks.git<br />
cd cookbooks<br />
git checkout 08boot<br />
# Bootstrap chef<br />
sudo /var/lib/gems/1.8/bin/chef-solo -j ~/chef.json -c ~/solo.rb<br />
# If the bootstrap hangs for more than a minute after &#8220;Installing package[couchdb] version 0.10.0-0ubuntu3&#8243; then hit ctrl+c and run again</p>
<p><strong>Now prepare to install the development versions</strong><br />
# install some development tools<br />
sudo apt-get install rake librspec-ruby -y<br />
sudo gem install cucumber merb-core nanite jeweler uuidtools<br />
# install missing dependencies<br />
sudo apt-get install libxml-ruby thin -y<br />
# get chef from the repository<br />
mkdir ~/src<br />
cd ~/src<br />
git clone git://github.com/opscode/chef.git<br />
cd chef<br />
rake install<br />
# remove the old version of chef<br />
sudo gem uninstall chef -v0.7.14<br />
# patch up some runit paths<br />
sudo sed -i s_chef-_/var/lib/gems/1.8/gems/chef-solr-0.8.0/bin/chef-_ /etc/sv/chef-solr*/run<br />
# allow access to futon for development purposes (http://IPADDRESS:5984/_utils)<br />
sudo sed -i &#8217;s/;bind_address = 127.0.0.1/bind_address = 0.0.0.0/&#8217; /etc/couchdb/local.ini<br />
sudo apt-get install psmisc # for killall<br />
sudo /etc/init.d/couchdb stop<br />
sudo killall -15 couchdb # stubborn<br />
sudo killall -15 beam.smp # yup<br />
# shut it all down<br />
sudo /etc/init.d/chef-solr stop<br />
sudo /etc/init.d/chef-solr-indexer stop<br />
sudo /etc/init.d/chef-solr-client stop<br />
sudo /etc/init.d/chef-client stop<br />
sudo /etc/init.d/chef-server stop<br />
sudo killall -15 chef-server</p>
<p><strong>Build some data and start up Chef</strong><br />
# start up the integration environment<br />
cd ~/src/chef<br />
sudo rake dev:features<br />
# this will create a database<br />
# now hit ctrl+c<br />
sudo mv /var/lib/couchdb/0.10.0/chef_integration.couch /var/lib/couchdb/0.10.0/chef.couch<br />
sudo chown couchdb:couchdb /var/lib/couchdb/0.10.0/chef.couch<br />
# start it all up<br />
sudo /etc/init.d/couchdb start<br />
sudo /etc/init.d/rabbitmq-server start<br />
sudo /etc/init.d/chef-solr start<br />
sudo /etc/init.d/chef-solr-indexer start<br />
sudo /etc/init.d/chef-server start</p>
<p><strong>Start the web server</strong><br />
# the web server is now a separate application and uses the API to reach the server<br />
sudo cp /tmp/chef_integration/webui.pem /etc/chef<br />
cd ~/src/chef/chef-server-webui<br />
sudo /var/lib/gems/1.8/bin/slice -p 4002</p>
<p><strong>Using knife</strong><br />
From the user interface you can create a client keypair to use knife from the web interface. I recommend using &#8216;view source&#8217; to copy the private key, and remember to save it without any leading whitespace and run knife like so:</p>
<p>OPSCODE_USER=&#8217;btm&#8217; OPSCODE_KEY=&#8217;/home/btm/btm.key&#8217; /var/lib/gems/1.8/bin/knife</p>
<p>If you can&#8217;t get it to work, you can always use the webui&#8217;s key:</p>
<p>sudo OPSCODE_USER=&#8217;chef-webui&#8217; OPSCODE_KEY=&#8217;/etc/chef/webui.pem&#8217; /var/lib/gems/1.8/bin/knife</p>
<p>Hopefully that is enough to get you going. Jump on #chef on irc.freenode.net or join the <a href="http://lists.opscode.com/sympa/info/chef">chef list</a> if you have any problems. <a href="http://tickets.opscode.com">Tickets/bugs/features</a> are tracked in JIRA, and all sorts of other useful information is in <a href="http://wiki.opscode.com/display/chef/Home">the wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/24/installing-chef-08-alpha-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP SMH On Ubuntu Karmic</title>
		<link>http://blog.loftninjas.org/2009/11/23/hp-smh-on-ubuntu-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/11/23/hp-smh-on-ubuntu-karmic/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:29:02 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=431</guid>
		<description><![CDATA[I recently had to install HP&#8217;s System Management Homepage (SMH) on Ubuntu Karmic (9.10) on hardware I had never touched for Hosted Operations to monitor. The hardware wasn&#8217;t my choice, but I&#8217;m indifferent to it. The operating system is my choice. Apparently they support Debian Lenny (5.0) and Ubuntu Jaunty (9.04), but ours was too [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to install HP&#8217;s System Management Homepage (SMH) on Ubuntu Karmic (9.10) on hardware I had never touched for Hosted Operations to monitor. The hardware wasn&#8217;t my choice, but I&#8217;m indifferent to it. The operating system is my choice. Apparently they support Debian Lenny (5.0) and Ubuntu Jaunty (9.04), but ours was too new. However, while I commend them for building debs, they&#8217;re a little sketchy and broken. Granted, I wasn&#8217;t deploying to a supported release, but nonetheless. Here&#8217;s a link to download options for the <a href="http://h20000.www2.hp.com/bizsupport/TechSupport/DriverDownload.jsp?prodNameId=3884320&amp;lang=en&amp;cc=us&amp;taskId=135&amp;prodClassId=-1&amp;prodTypeId=15351&amp;prodSeriesId=3884319">DL360 G6</a>, that may never work because the HP site isn&#8217;t meant to be linked to.</p>
<p>Downloading the provided Ubuntu Jaunty iso and mounting it produced a standard debian repository tree for both lenny and jaunty.<br />
<code>sudo mount -o loop HP_ProLiant_Value_Add_Software-8.25-19-12.iso /mnt</code></p>
<p>I added these packages to our local respository, but you can copy them to every server and install them by hand using &#8216;dpkg -i DEB&#8217; instead of &#8216;apt-get install PACKAGE&#8217;. You&#8217;ll end up installing all of them really. The HP SMH package is mostly an apache fork and a ton of included/vendored libraries.</p>
<p>You&#8217;ll log in to HP SMH on port 2381 over HTTPS. As usual, if you get a data stream, you are likely connecting over HTTP by accident. By default a user must be in the &#8216;root&#8217; group. You can use &#8216;vigr&#8217; to add another user to the root group as you usually don&#8217;t have a root user on Ubuntu. You can edit &#8216;/opt/hp/hpsmh/conf/smhpd.xml&#8217; and put another group in the &#8216;admin-group&#8217; element. I put &#8216;domain-admins&#8217; there because we use likewise to authenticate against a windows domain. I couldn&#8217;t figure out how to have groups added via the web interface to save, but that really was a hoop anyway since I wanted to push the configuration files out via configuration management.</p>
<p>I don&#8217;t know if HP SMH reads snmpd.conf to figure out how to connect back to snmp locally, but I had to initially run &#8216;/sbin/hpsnmpconfig&#8217; to generate a few wizardy lines in /etc/snmp/snmpd.conf&#8217;. I later pushed this out via configuration management, but if you check that script it does create an &#8220;answer file&#8221; which looked like a bunch of variables you could export before you run the script non-interactively.</p>
<p>HP SMH gets its information from the HP SNMP agents, so if you log in and don&#8217;t see any data, it can not contact the SNMP source. You should see a page <a href="http://www.flickr.com/photos/btmspox/4128313405/">like this</a>. Because so many libraries are shipped in the debs rather than being required, libraries are the most common source of <a href="http://debian.catsanddogs.com/component/option,com_smf/Itemid,41/topic,15.0/">issues</a>. I had to restart &#8216;hp-snmp-agents&#8217; after installation, getting this error on the initial startup in &#8216;/var/log/hp-snmp-agents/cma.log&#8217;:</p>
<blockquote><p>libcmacommon.so.1: cannot open shared object file: No such file or directory</p></blockquote>
<p>Another way to say all of this is via my chef recipe:</p>
<pre class="syntax-highlight:ruby">
#
# Cookbook Name:: hpsmh
# Recipe:: default
#
# Copyright 2009, Webtrends
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Restart hp-snmp-agents later. it is buggy and has issues with its own libraries when started on package installation
service &quot;hp-snmp-agents&quot; do
  action :nothing
end

package &quot;hp-health&quot;
package &quot;hpacucli&quot;
package &quot;cpqacuxe&quot;
package &quot;hp-snmp-agents&quot; do
  notifies :restart, resources(:service =&gt; &quot;hp-snmp-agents&quot;)
end
package &quot;hp-smh-templates&quot;
package &quot;hpsmh&quot;

service &quot;hpsmhd&quot; do
  action [ :start, :enable ]
end

service &quot;snmpd&quot; do
  action [ :start, :enable ]
end

remote_file &quot;/opt/hp/hpsmh/conf/smhpd.xml&quot; do
  source &quot;smhpd.xml&quot;
  owner &quot;root&quot;
  group &quot;root&quot;
  mode 0644
  notifies :restart, resources(:service =&gt; &quot;hpsmhd&quot;)
end

remote_file &quot;/etc/snmp/snmpd.conf&quot; do
  source &quot;snmpd.conf&quot;
  owner &quot;root&quot;
  group &quot;root&quot;
  mode 0644
  notifies :restart, resources(:service =&gt; &quot;snmpd&quot;)
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/23/hp-smh-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Talent is Human</title>
		<link>http://blog.loftninjas.org/2009/11/19/talent-is-human/</link>
		<comments>http://blog.loftninjas.org/2009/11/19/talent-is-human/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 04:05:15 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=427</guid>
		<description><![CDATA[As I look back at growing up in a small town, there was a surprising lack of everyone wanting to move to the city as soon as they could. Perhaps that was because there is not a recognizible city anywhere near coastal eastern Maine. Despite, there still was a lingering belief that people were different [...]]]></description>
			<content:encoded><![CDATA[<p>As I look back at growing up in a small town, there was a surprising lack of everyone wanting to move to the city as soon as they could. Perhaps that was because there is not a recognizible city anywhere near coastal eastern Maine. Despite, there still was a lingering belief that people were different elsewhere. Granted, they&#8217;re different, but in the same ways.</p>
<p>The majority of those I consider my colleagues have not worked for the same companies that I have. While our projects are of importance to our companies, it is usually our passion and not our employment that drive them. Some days I feel certain this is commonly understood, but it only takes a personal blog policy or a social media marketing drive to remind me that I&#8217;m actually isolated on an island of like-minded individuals hiding under the radar like stowaways. You can&#8217;t escape culture, but you can find different ones.</p>
<p>In Paul Graham&#8217;s recent essay about <a href="http://paulgraham.com/apple.html">Apple</a>, he markedly warns of mistreating the developers of your platform, lest they form a distaste for your brand altogether. Before I read the essay I was feeling quite sure that it was commonly understood today that developers are your greatest asset. Perhaps more valuable than even your big idea. Likely due to being mentioned by name in the essay, I was reminded of the great Google interview algorithm; commonly known for streamlining their processes at the cost of the interviewee. This seems to only alienate the prospect, unless they happen to enjoy passing tests over creating value. As the strengths of mass-collaboration become more accepted, it strikes me odd that on the whole we&#8217;re still missing that it is made up of individual human talent.</p>
<p>The product of our creativity is no longer hidden behind towering walls of corporations. We are global citizens innovating for the sake of it. You won&#8217;t see this on a college transcript, in ones knowledge of <a href="http://www.google.com">inodes</a>, or in a six month <a href="http://www.paulgraham.com/startuplessons.html">product road map</a> of release stability. The pieces are <a href="http://www.ohloh.net/">not exactly hidden</a> either. I&#8217;m tempted to point out how slowly we&#8217;re changing by example with the United States&#8217; difficulty transitioning from educating factory workers to innovators now that globalization has helped much of the the rest of the world catch up as industrial nations. However I can&#8217;t help but remember that we&#8217;ve gotten this far  on our own.</p>
<p>Despite reminding us that we are living in a small town, the murmuring you&#8217;ve heard from pundits and rabble-rousers but could not make out sounds perfectly clear here. We are not going to wait for you to get it. The catch is that we no longer need to move to the city, because we&#8217;re building it every day. Coming?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/19/talent-is-human/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>libvirt + kvm TLS authentication on Ubuntu karmic</title>
		<link>http://blog.loftninjas.org/2009/11/17/libvirt-kvm-tls-authentication-on-ubuntu-karmic/</link>
		<comments>http://blog.loftninjas.org/2009/11/17/libvirt-kvm-tls-authentication-on-ubuntu-karmic/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 06:38:04 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=423</guid>
		<description><![CDATA[I have a number of Windows Server 2008 hosts running under KVM in a remote datacenter and using virt-manager to access libvirt+kvm over SSH for a remote console was disappointly slow, so I set out to try libvirt+kvm over SSL/TLS for comparison. In the process of which I had to upgrade virt-manager to 0.8.0 on [...]]]></description>
			<content:encoded><![CDATA[<p>I have a number of Windows Server 2008 hosts running under KVM in a remote datacenter and using virt-manager to access libvirt+kvm over SSH for a remote console was disappointly slow, so I set out to try libvirt+kvm over SSL/TLS for comparison. In the process of which I had to upgrade virt-manager to 0.8.0 on my workstation to remove a VNC lag issue in the viewer built into virt-manager on karmic. In the end, I&#8217;m quite happy with the end result.</p>
<h2>Creating Certificates</h2>
<p>The available documentation for configuring TLS authentication for libvirt is a little daunting. My chosen references were these documents for <a href="http://libvirt.org/remote.html">libvirtd</a> and <a href="http://virt-manager.org/page/RemoteTLS">virt-manager</a>.</p>
<p>First create two certificates, one with the hostname for your server (SERVER.EXAMPLE.ORG below) and one for your workstation (CLIENT.EXAMPLE.ORG below), setting the fully qualified domain name (FQDN, the hostname including the domain name) as the Common Name, or CN, when prompted.<br />
<code>openssl genrsa -des3 -out host.example.org.tmp<br />
openssl rsa -in host.example.org.tmp -out host.example.org.key<br />
rm host.example.org.tmp<br />
openssl req -new -key host.example.org.key -out host.example.org.csr</code></p>
<p>Providing the CSR to your local CA should present you with a signed certificate (host.example.com.cer). Be sure it is in Base64 format (text) and not DER (binary) if interacting with a Microsoft CA. If you are unfamiliar with this process, you&#8217;ll want to go and <a href="http://www.openssl.org/docs/HOWTO/certificates.txt">read up</a> a bit first, it&#8217;s a useful hoop to learn to jump through.</p>
<h2>Installing Certificates</h2>
<p><code># Libvirt Server<br />
mkdir -p /etc/pki/CA<br />
mkdir -p /etc/pki/libvirt/private<br />
mkdir -p /etc/pki/libvirt-vnc<br />
cp CA.EXAMPLE.ORG /etc/pki/CA/cacert.pem<br />
cp CA.EXAMPLE.ORG /etc/pki/libvirt-vnc/ca-cert.pem<br />
cp SERVER.EXAMPLE.ORG.key /etc/pki/libvirt/private/serverkey.pem<br />
cp SERVER.EXAMPLE.ORG.key /etc/pki/libvirt-vnc/server-key.pem<br />
cp SERVER.EXAMPLE.ORG.cer /etc/pki/libvirt/servercert.pem<br />
cp SERVER.EXAMPLE.ORG.cer /etc/pki/libvirt-vnc/server-cert.pem</code></p>
<p><code> </code></p>
<p><code># Virt-manager client<br />
# notice the lack of dashes in clientcert.pem<br />
mkdir -p /etc/pki/CA<br />
mkdir -p /etc/pki/libvirt/private<br />
mkdir -p /etc/pki/libvirt-vnc<br />
cp CA.EXAMPLE.ORG /etc/pki/CA/cacert.pem<br />
cp CA.EXAMPLE.ORG /etc/pki/libvirt-vnc/ca-cert.pem<br />
cp CLIENT.EXAMPLE.ORG.key /etc/pki/libvirt/private/clientkey.pem<br />
cp CLIENT.EXAMPLE.ORG.key /etc/pki/libvirt-vnc/clientkey.pem<br />
cp CLIENT.EXAMPLE.ORG.cer /etc/pki/libvirt/clientcert.pem<br />
cp CLIENT.EXAMPLE.ORG.cer /etc/pki/libvirt-vnc/clientcert.pem</code></p>
<h2>Apparmor Fixes</h2>
<p>If libvirtd fails to start (which it likely will without these fixes) you&#8217;ll see errors in &#8216;/var/log/user.log&#8217; such as:</p>
<blockquote><p>Nov 17 17:08:09 lasvirt01 kernel: [69476.008895] type=1503 audit(1258506489.178:77): operation=&#8221;open&#8221; pid=17104 parent=1 profile=&#8221;libvirt-600d5dae-6373-107e-5f1b-5010aff3ffed&#8221; requested_mask=&#8221;r::&#8221; denied_mask=&#8221;r::&#8221; fsuid=0 ouid=0 name=&#8221;/etc/pki/libvirt-vnc/ca-cert.pem&#8221;</p></blockquote>
<p>You&#8217;ll need to patch up the apparmor definitions a little:</p>
<ul>
<li>Due to <a href="https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/462000">Bug# 462000</a>, upgrade to libvirt-bin=0.7.0-1ubuntu13.1 from karmic-proposed (unless it has made it to karmic-updates when you read this)</li>
<li>Due to <a href="https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/484562">Bug #484562</a>, Add &#8220;/etc/pki/libvirt-vnc/** r,&#8221; to &#8220;/etc/apparmor.d/abstractions/libvirt-qemu&#8221;</li>
<li>run /etc/init.d/apparmor reload</li>
</ul>
<h2>Server Configuration</h2>
<p>By default libvirt and VNC don&#8217;t allow remote connections and rely on unix sockets for connections. You&#8217;ll need to enable</p>
<ul>
<li>Add &#8220;&#8211;listen&#8221; to &#8220;libvirtd_opts&#8221; in /etc/default/libvirt-bin</li>
<li>Uncomment &#8220;vnc_tls = 1&#8243; and &#8220;vnc_tls_x509_verify = 1&#8243; in &#8220;/etc/libvirt/qemu.conf&#8221;</li>
<li>Edit your guests (virsh edit GUEST) and add &#8220;listen=&#8217;0.0.0.0&#8242;&#8221; to the <a href="http://libvirt.org/formatdomain.html#elementsGraphics">graphics element</a></li>
<li>run /etc/init.d/libvirt-bin restart</li>
<li>cold boot any running guests (full stop, not a restart, to pick up guest xml definition changes)</li>
</ul>
<h2>Virt-manager Configuration</h2>
<p>Add a new connection, choosing &#8216;QEMU/KVM&#8217; as the Hypervisor and &#8216;Remote SSL/TLS with x509 certificate&#8217; as the Connection, with the full hostname of the remote server and choose Connect. Otherwise operate like you used to.</p>
<h2>VNC Lag Caveat</h2>
<p>I had an issue where the display was lagging every view seconds on the VNC session via virt-manager, but when I connected directly using virt-viewer (virt-viewer &#8211;connect qemu://HOST.EXAMPLE.ORG/system GUEST_DOMAIN) there was no lag. Interestingly, when you kept both open at the same and ran a command like &#8216;ls -lR /&#8217; you could easily see the difference. To correct this, I had to backport virt-manager=0.8.0-2 from debian sid, including &#8216;virtinst&#8217; and &#8216;libvirt&#8217;, the latter requiring a change of &#8216;libxen3-dev&#8217; to &#8216;libxen-dev&#8217; in the Build-Depends. This is a somewhat complicated task for those unfamiliar with debian packaging.</p>
<h2>Troubleshooting</h2>
<p>I found most of my apparmor related errors by running &#8216;tail -f /var/log/user.log&#8217;. A lot of documentation recommended uncommenting &#8216;vnc_listen&#8217; in &#8216;/etc/libvirt/qemu.conf&#8217; but I found that the aforementioned listen xml attribute in the guest configuration overrode that by looking at the &#8216;-vnc&#8217; options passed to kvm by libvirt by running &#8216;ps ax&#8217;. I&#8217;ve had libvirtd on the host segfault a couple times when connecting, perusing the Changelog in the version of libvirt I backported on my desktop noted some fixes that may be relevant to that.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/11/17/libvirt-kvm-tls-authentication-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opscode Cookbooks community announced</title>
		<link>http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/</link>
		<comments>http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 17:37:29 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[configuration management]]></category>
		<category><![CDATA[opscode]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=412</guid>
		<description><![CDATA[It&#8217;s no secret that I think configuration management is epic. I spent yesterday hopping around the office in excitement due to Opscode&#8217;s alpha announcement of their new Cookbooks site. This is exactly the next step needed in the CM community. Shortly thereafter, while talking with another developer about how awesome Cookbooks is, he quipped about [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s no secret that I think <a href="http://blog.loftninjas.org/2009/06/20/the-configuration-management-revolution/">configuration management is epic</a>. I spent yesterday hopping around the office in excitement due to <a href="http://www.opscode.com/blog/2009/10/29/the-new-opscode-cookbook-site-/">Opscode&#8217;s alpha announcement</a> of their new <a href="http://cookbooks.opscode.com">Cookbooks</a> site. This is exactly <a href="http://blog.loftninjas.org/2009/06/22/infrastructure-as-a-code-sample/">the next step</a> needed in the CM community. Shortly thereafter, while talking with another developer about how awesome Cookbooks is, he quipped about it being second in awesome to chef itself. I argue that chef exists for cookbooks, not the other way around. It was later said <a href="http://twitter.com/jtimberman/statuses/5266897334">&#8220;</a><a href="http://twitter.com/jtimberman/statuses/5266897334">Chef is the tool, cookbooks are the art&#8221;</a>. Cookbooks is all about community.</p>
<p>Chef is a tool, and an open-source one, so it does have a community. A vibrant one at that; a recent <a href="http://www.ohloh.net/p/opscode-chef">ohloh</a> <a href="http://www.ohloh.net/api/reference/factoid">factoid</a> claims &#8220;This is one of the largest open-source teams in the world, and is in the top 2% of all project teams on Ohloh.&#8221; <a href="http://cookbooks.opscode.com/">Cookbooks</a> is the other way around, it is a community first and at tool second. Cookbooks has already been <a href="http://twitter.com/thesethings/status/5266293567">compared</a> to github and launchpad (with PPAs), because like these sites it brings people with a common task together around a tool like git or ubuntu. It has been noted that every configuration management project <a href="http://twitter.com/mhalligan/statuses/5272816525">needs something like Cookbooks</a>, and <a href="http://getsatisfaction.com/opscode/topics/add_support_for_other_configuration_management_systems">I agree</a>.</p>
<p>The community that builds around Cookbooks will be a vanguard of agile system administrators looking to reduce their <a href="http://www.hyperic.com/blog/undifferentiated-heavy-lifting/">undifferentiated heavy lifting</a>. These include the people who recognized that it is their product that they are selling and no longer their infrastructure, and took up cloud computing as a result. They will soon find that the configuration management community will help them continue to spend less time reinventing the operations wheel, and more time innovating it. Cookbooks will make it easier to share infrastructure-code with like-minded individuals and is the next step beyond <a href="http://wiki.opscode.com/display/chef/Cookbooks#Cookbooks-WherecanIfindsomepremadeCookbooks%3F">github</a> and <a href="http://reductivelabs.com/trac/puppet/tags/puppet,recipe">wikis</a> for this material. These models still required concerted effort to share back with the community when you finished up your recipe, but the Cookbooks site  and it&#8217;s <a href="http://www.opscode.com/community/api">open API</a> stands to change that. We are now poised to leverage the open source model to increase the rise of infrastructure as code.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/10/30/opscode-cookbooks-community-announced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wireshark + Winpcap beta on Windows Server 2008 R2</title>
		<link>http://blog.loftninjas.org/2009/10/14/wireshark-winpcap-beta-on-windows-server-2008-r2/</link>
		<comments>http://blog.loftninjas.org/2009/10/14/wireshark-winpcap-beta-on-windows-server-2008-r2/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 22:37:16 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=410</guid>
		<description><![CDATA[Windows Server 2008 R2 currently requires the beta version of winpcap, and you need to run the installer in compatibility mode to install it.

Download wireshark
Down the winpcap 4.1 beta
Right click the winpcap installer, properties, compatibility mode, set to server 2008
Install wincap
Install wireshark
Open an administrative command prompt (right click, run as administrator)
&#8220;sc start npf&#8221;
Run wireshark

]]></description>
			<content:encoded><![CDATA[<p>Windows Server 2008 R2 currently requires the beta version of winpcap, and you need to run the installer in compatibility mode to install it.</p>
<ol>
<li>Download <a href="http://www.wireshark.org/download.html">wireshark</a></li>
<li>Down the <a href="http://www.winpcap.org/install/default.htm">winpcap 4.1 beta</a></li>
<li>Right click the winpcap installer, properties, compatibility mode, set to server 2008</li>
<li>Install wincap</li>
<li>Install wireshark</li>
<li>Open an administrative command prompt (right click, run as administrator)</li>
<li>&#8220;sc start npf&#8221;</li>
<li>Run wireshark</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/10/14/wireshark-winpcap-beta-on-windows-server-2008-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PXE booting Ubuntu KVM Guests off WDS</title>
		<link>http://blog.loftninjas.org/2009/09/25/pxe-booting-ubuntu-kvm-guests-off-wds/</link>
		<comments>http://blog.loftninjas.org/2009/09/25/pxe-booting-ubuntu-kvm-guests-off-wds/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 00:09:12 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=395</guid>
		<description><![CDATA[Best I can tell, there is some functionality missing from traditional etherboot images that you can install on Ubuntu via the &#8216;kvm-pxe&#8217; package that prevents a KVM guest from booting off of a Windows Deployment Services (WDS) server. Perhaps UNDI or such, it isn&#8217;t clear. The guest will accept an DHCP offer, but go no [...]]]></description>
			<content:encoded><![CDATA[<p>Best I can tell, there is some functionality missing from traditional etherboot images that you can install on Ubuntu via the &#8216;kvm-pxe&#8217; package that prevents a KVM guest from booting off of a Windows Deployment Services (<a href="http://en.wikipedia.org/wiki/Windows_Deployment_Services">WDS</a>) server. Perhaps <a href="http://www.nilo.org/docs/pxeundi.html">UNDI</a> or such, it isn&#8217;t clear. The guest will accept an DHCP offer, but go no further. Occasionally looking for more offers, it obviously isn&#8217;t getting the traditional DHCP options it is looking for and I&#8217;m willing to bet that WDS doesn&#8217;t recognize it as a PXE client enough to speak up for itself.</p>
<p>Fortunately the <a href="http://etherboot.org/wiki/index.php">etherboot project</a> is alive and well under a massive rewrite coined gPXE, and there is much exciting development going on there, like iSCSI boot support. I tried creating different gPXE ROMs from <a href="http://rom-o-matic.net/">rom-o-matic</a> for the different NICs that KVM supports and replacing the roms placed in /usr/share/kvm by the kvm-pxe package, but didn&#8217;t get very far. I wasn&#8217;t sure if I had to match up the PCI id&#8217;s that KVM produced with the options on rom-o-matic or not. The e1000 ROM hit the &#8220;<a href="https://bugzilla.redhat.com/show_bug.cgi?id=473137">Too many option ROMS</a>&#8221; error, apparently common when your PXE ROM exceeds about 60k. You can toggle different KVM NIC models via libvirt by using &#8216;virsh edit guestName&#8217; and then adding a &#8220;&lt;model type=&#8217;e1000&#8242;/&gt;&#8221; line in the interface section of the guest definition. change e1000 to virtio, pcnet, whatever. There&#8217;s a list on the <a href="https://help.ubuntu.com/community/KVM/Networking">Ubuntu wiki KVM page</a> that may provide you with further help choosing a functional gPXE ROM.</p>
<p>I ended up using the <a href="http://rom-o-matic.net/gpxe/gpxe-0.9.6/contrib/rom-o-matic/build.php?version=0.9.6&amp;F=&amp;arch=i386&amp;nic=gpxe%3Aall-drivers&amp;ofmt=ISO+bootable+image+(.iso)&amp;A=Configure">gPXE ISO</a> (gPXE:all-drivers from the first pulldown) and booting off that by placing it in /var/lib/libvirt/images and adding it as an IDE CDROM storage device to the guest. Initially it gave up far two quickly when left to its own devices but I found that accessing the command prompt and running the &#8216;autoboot&#8217; commant worked for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/09/25/pxe-booting-ubuntu-kvm-guests-off-wds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Increasing a Win7 disk/partition under KVM</title>
		<link>http://blog.loftninjas.org/2009/09/08/increasing-a-win7-diskpartition-under-kvm/</link>
		<comments>http://blog.loftninjas.org/2009/09/08/increasing-a-win7-diskpartition-under-kvm/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 00:46:03 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=393</guid>
		<description><![CDATA[ kvm-img convert small.img small.raw # this is your old image
kvm-img create large.raw 15G # or whatever size
losetup /dev/loop0 small.raw
losetup /dev/loop1 large.raw
dd if=/dev/loop0 of=/dev/loop1
losetup -d /dev/loop0
losetup -d /dev/loop1
kvm-img convert large.raw large.qcow2

Start KVM up again with the new large image. Go to the &#8216;Computer Management&#8217; mmc applet under &#8216;Administrative Tools&#8217;. Choose &#8216;Disk Management&#8217; under &#8216;Storage&#8217;. Right [...]]]></description>
			<content:encoded><![CDATA[<p><code> kvm-img convert small.img small.raw # this is your old image<br />
kvm-img create large.raw 15G # or whatever size<br />
losetup /dev/loop0 small.raw<br />
losetup /dev/loop1 large.raw<br />
dd if=/dev/loop0 of=/dev/loop1<br />
losetup -d /dev/loop0<br />
losetup -d /dev/loop1<br />
kvm-img convert large.raw large.qcow2<br />
</code></p>
<p>Start KVM up again with the new large image. Go to the &#8216;Computer Management&#8217; mmc applet under &#8216;Administrative Tools&#8217;. Choose &#8216;Disk Management&#8217; under &#8216;Storage&#8217;. Right click your existing volume and choose extend. Step through the wizard. I got a message that made it appear it didn&#8217;t work, but I guess I didn&#8217;t read the fine print right and it did work fine enough. There&#8217;s always the old small image file if you run into problems. Speaking of which, be careful to not be dyslexic when inputting dd options.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/09/08/increasing-a-win7-diskpartition-under-kvm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting password never expires&#8217; programmatically in AD</title>
		<link>http://blog.loftninjas.org/2009/09/04/setting-password-never-expires-programmatically-in-ad/</link>
		<comments>http://blog.loftninjas.org/2009/09/04/setting-password-never-expires-programmatically-in-ad/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 02:13:47 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=389</guid>
		<description><![CDATA[Needing to set &#8216;Password Never Expires&#8217; across an entire OU in Active Directory, I managed to write a powershell script to accomplish as much. Sure is nice having scripting languages on Windows machines beyond BASIC.

# Finds all user objects in the searchroot and forces the password never expires value in user account control to set
# [...]]]></description>
			<content:encoded><![CDATA[<p>Needing to set &#8216;Password Never Expires&#8217; across an entire OU in Active Directory, I managed to write a powershell script to accomplish as much. Sure is nice having scripting languages on Windows machines beyond BASIC.</p>
<pre class="syntax-highlight:php">
# Finds all user objects in the searchroot and forces the password never expires value in user account control to set
# 2009-09-04 -- Bryan McLellan &lt;btm@loftninjas.org&gt;

$Never_Expire=0x10000

$objou = New-Object System.DirectoryServices.DirectoryEntry(&quot;LDAP://ou=test,dc=example,dc=com&quot;)
$objSearcher = New-Object System.DirectoryServices.directorySearcher
$objsearcher.searchroot = $objou
$objsearcher.filter = &#039;(&amp;(objectCategory=User)(Objectclass=user)(!isCriticalSystemObject=*))&#039;
$objsearcher.searchscope = &quot;subtree&quot;

$results = $objsearcher.findall()

foreach ($result in $results) {
  $user = [adsi]$result.path
  $value = $user.useraccountcontrol.item(0)
  $value = $value -bor $Never_Expire
  $user.useraccountcontrol = $value
  $user.name
  $user.setinfo()
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/09/04/setting-password-never-expires-programmatically-in-ad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using openid-ldap as an OpenID provider</title>
		<link>http://blog.loftninjas.org/2009/08/10/using-openid-ldap-as-an-openid-provider/</link>
		<comments>http://blog.loftninjas.org/2009/08/10/using-openid-ldap-as-an-openid-provider/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 02:17:31 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=377</guid>
		<description><![CDATA[The openid-ldap project provides a simple OpenID to LDAP gateway that supports Active Directory so you can leverage your existing SSO database hosted in LDAP to provide OpenID logins.
All the documentation lives in docs/README. Configuration is mostly a matter of unpacking the source into an apache hosted directory, editing ldap.php as described to contain the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.openid-ldap.org/">openid-ldap</a> project provides a simple OpenID to LDAP gateway that supports Active Directory so you can leverage your existing SSO database hosted in LDAP to provide OpenID logins.</p>
<p>All the documentation lives in docs/README. Configuration is mostly a matter of unpacking the source into an apache hosted directory, editing ldap.php as described to contain the correct ldap URIs, and configuring apache. The LDAP configuration is relatively straight-forward if you&#8217;re familiar with setting up LDAP authentication elsewhere. The apache part took some tinkering for my setup.</p>
<p>I ran into three problems, the first was needing to modify the filter to remove &#8216;(mail=*)&#8217; since these weren&#8217;t mail enabled accounts. I used ldapsearch (example in the README) based on my settings in ldap.php to see that no accounts were getting returned and realized these accounts weren&#8217;t mail enabled.</p>
<p>The next problem was because my production webservers are behind a load balancer and the configuration wants to use mod_proxy to connect back to itself, which would try to go back out the backside of the load balancer and cause all sorts of confusion. I used an internal hostname to pass the proxied requests directly back to the server. You&#8217;ll see this in the attached apache configuration below</p>
<p>The third was because of the load balancer and I discovered this by turning debug to true in index.php and dumping a log file in /tmp. Part of the authentication request was going to different servers. Only having a single server in this particular pool resolved that.</p>
<p>The test page on openid-ldap.org didn&#8217;t work for me and failed with &#8220;Authentication error; not a valid OpenID&#8221;, but logging into <a href="http://www.livejournal.com/openid/">livejournal</a> worked okay.</p>
<pre class="syntax-highlight:bash">
&lt;VirtualHost *:80&gt;
	ServerAdmin webmaster@example.org
	ServerName openid.example.org

  RewriteEngine On

  RewriteRule ^/(.*) https://openid.example.org/$1 [R,L]
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
  ServerName openid

  RewriteEngine On

  RewriteCond %{HTTPS} !=on

  RewriteRule ^/(.*) https://openid.example.org/$1 [R,L]
&lt;/VirtualHost&gt;

&lt;VirtualHost *:443&gt;
	ServerAdmin webmaster@example.org
	ServerName openid.example.org
  ServerAlias openid

	DocumentRoot /var/www/example.org/openid

	&lt;Directory /&gt;
		Options FollowSymLinks
		AllowOverride None
	&lt;/Directory&gt;
	&lt;Directory /var/www/example.org/openid&gt;
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	&lt;/Directory&gt;

	ErrorLog /var/log/apache2/openid.example.org-error.log
	LogLevel warn

	CustomLog /var/log/apache2/openid.example.org-access.log combined

  &lt;Proxy https://openid-internal.example.org/*&gt;
    Order allow,deny
    Allow from all
  &lt;/Proxy&gt;

  ServerSignature On
  RewriteEngine On

  RewriteCond %{REQUEST_URI}      !^/(.+)\.php(.*)$
  RewriteCond %{THE_REQUEST}      ^[A-Z]{3,9}\ /([A-Za-z0-9]+)\?(.*)\ HTTP/
  RewriteRule ^/(.*)$         https://openid-internal.example.org/index.php?user=%1&amp;%2 [P]

  RewriteCond %{REQUEST_URI}         !^/(.+)\.php(.*)$
  RewriteRule ^/([A-Za-z0-9]+)$  https://openid-internal.example.org/index.php?user=$1 [P]

&lt;/VirtualHost&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/08/10/using-openid-ldap-as-an-openid-provider/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Monitoring which mysql databases are being accessed</title>
		<link>http://blog.loftninjas.org/2009/07/13/monitoring-which-mysql-databases-are-being-accessed/</link>
		<comments>http://blog.loftninjas.org/2009/07/13/monitoring-which-mysql-databases-are-being-accessed/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 18:35:37 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=373</guid>
		<description><![CDATA[I&#8217;m migrating a number of internal web application databases off of a mysql server and I wanted a way to see which databases are being accessed and by which hosts.
# tshark -R "mysql.opcode == 2" -e ip.src -e mysql.schema -T fields port mysql
When run on the mysql server this produces a tab separated list of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m migrating a number of internal web application databases off of a mysql server and I wanted a way to see which databases are being accessed and by which hosts.</p>
<p><code># tshark -R "mysql.opcode == 2" -e ip.src -e mysql.schema -T fields port mysql</code></p>
<p>When run on the mysql server this produces a tab separated list of values compromised of the client ip address and the database name when a mysql client specifies a database. See the man page for tshark for more information.</p>
<p><strong>Update:</strong></p>
<p>This catches the circumstance where database is set on login as well:<br />
<code># tshark -R "mysql.schema" -e ip.src -e mysql.schema -T fields port mysql</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/07/13/monitoring-which-mysql-databases-are-being-accessed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making sense of MySQL HA options</title>
		<link>http://blog.loftninjas.org/2009/07/10/making-sense-of-mysql-ha-options/</link>
		<comments>http://blog.loftninjas.org/2009/07/10/making-sense-of-mysql-ha-options/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 23:39:45 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=369</guid>
		<description><![CDATA[I&#8217;ve amassed enough mysql databases that it&#8217;s time there should be some high availability. Note that this isn&#8217;t a single huge database, it&#8217;s a pile of wordpress, request-tracker, mediawiki, etc databases. Performance isn&#8217;t the goal here, it is automatic failover in case of impending doom.
I happen to have an iSCSI san, but in the efforts [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve amassed enough mysql databases that it&#8217;s time there should be some high availability. Note that this isn&#8217;t a single huge database, it&#8217;s a pile of wordpress, request-tracker, mediawiki, etc databases. Performance isn&#8217;t the goal here, it is automatic failover in case of impending doom.</p>
<p>I happen to have an iSCSI san, but in the efforts of simplicity I&#8217;m looking at Heartbeat+DRBD or Heartbeat+Replication.</p>
<p>Most <a href="http://dev.mysql.com/doc/mysql-ha-scalability/en/ha-drbd.html">tutorials</a>, and <a href="http://twitter.com/btmspox/status/2540387152">comments from colleagues</a> lean towards using Heartbeat+DRBD. There is <a href="http://www.mysqlperformanceblog.com/2008/04/28/mysql-replication-vs-drbd-battles/">good discussion of the two</a>, and more recent followup regarding <a href="http://www.mysqlperformanceblog.com/2009/07/07/is-drbd-the-right-choice-for-me/">when to use DRBD</a>. There&#8217;s a <a href="http://dev.mysql.com/doc/refman/5.0/en/ha-overview.html">nice little table at the bottom of this page</a>. If you dig deeper, there are respectable comments about using what&#8217;s appropriate to the situation, the exercise of which is left up to the reader.</p>
<p><a href="http://forums.mysql.com/read.php?144,189704,194214#msg-194214">The problem</a> is that mysql defaults to using MyISAM as the storage engine, which lacks a transactional journal. When your primary host crashes and your secondary host comes up, unless there&#8217;s a journal to replay you&#8217;re just assuming everything isn&#8217;t corrupt without some kind of through consistency check. Which sounds time consuming. So switch all your tables to a transactional storage engine like InnoDB?</p>
<p>Replication has both a slave IO and a SQL process running, which I believe avoids this, since the replication slave isn&#8217;t going to run an incomplete SQL statement if the master dies while sending it to the slave it is dropped. Which leaves you possibly behind the master, but consistent.</p>
<p>So I&#8217;m going to try to configure heartbeat with mysql running replication between two guests. The best information I&#8217;ve found so far is <a href="http://www.workboy.com/charles/mysql-heartbeat/">from Charles Bennington</a>. I&#8217;ll post a followup when I&#8217;m done with that project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/07/10/making-sense-of-mysql-ha-options/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>a couple notes on drbd on ubuntu</title>
		<link>http://blog.loftninjas.org/2009/07/10/a-couple-notes-on-drbd-on-ubuntu/</link>
		<comments>http://blog.loftninjas.org/2009/07/10/a-couple-notes-on-drbd-on-ubuntu/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 19:00:26 +0000</pubDate>
		<dc:creator>btm</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.loftninjas.org/?p=370</guid>
		<description><![CDATA[Playing with drbd8 on Ubuntu, loosely following these instructions, and I ran into a couple problems.
First, you need to use a kernel that has the drbd module as there is no drbd8-module-source, -server definitely has the drbd module, -virtual did not. Instructions about building the drbd module are old.
My secondary was also stuck in a [...]]]></description>
			<content:encoded><![CDATA[<p>Playing with drbd8 on Ubuntu, loosely <a href="http://dev.mysql.com/doc/refman/5.1/en/ha-drbd-install.html">following these instructions</a>, and I ran into a couple problems.</p>
<p>First, you need to use a kernel that has the drbd module as there is no drbd8-module-source, -server definitely has the drbd module, -virtual did not. Instructions about building the drbd module are old.</p>
<p>My secondary was also stuck in a connection state of &#8220;WFBitMapT&#8221;. I noticed the secondary was Ubuntu jaunty while the primary was Ubuntu intrepid. Upgrading the primary to jaunty resolved this.</p>
<p>I saw the error &#8220;local disk flush failed with status -95&#8243; in the logs and wasn&#8217;t entirely sure about it but eventually found an <a href="http://www.ultraviolet.org/mail-archives/drbd.2008/msg02461.html">explanation that made some sense</a> and made me not worry about it.</p>
<p>drbd (/etc/init.d/drbd) doesn&#8217;t start on startup on it&#8217;s own. Most of the debugging information you&#8217;re looking for is in /proc/drbd or in your syslog output in /var/log. The only trouble is deciphering what is good and what is bad.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.loftninjas.org/2009/07/10/a-couple-notes-on-drbd-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
