<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Al Hoang &#187; sysadmin</title>
	<atom:link href="http://blogs.law.harvard.edu/hoanga/category/tech/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.law.harvard.edu/hoanga</link>
	<description>Just another weblog</description>
	<lastBuildDate>Wed, 09 Sep 2009 06:52:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
		<item>
		<title>Spamassassin SIGPIPE errors and the zero file mail message mystery</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/09/09/spamassassin-sigpipe-errors-and-the-zero-file-mail-message-mystery/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/09/09/spamassassin-sigpipe-errors-and-the-zero-file-mail-message-mystery/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 06:52:48 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=756</guid>
		<description><![CDATA[Awhile back I was noticing I was definitely losing emails.  As one can might imagine, this is a scary experience since this brings into doubt if the mail system under use is doing something funny to the mail.
My first place to look was in the mail logs for the SMTP server and other associated [...]]]></description>
			<content:encoded><![CDATA[<p>Awhile back I was noticing I was definitely losing emails.  As one can might imagine, this is a scary experience since this brings into doubt if the mail system under use is doing something funny to the mail.</p>
<p>My first place to look was in the mail logs for the SMTP server and other associated daemons.  However, I saw nothing in the maillogs which was not a very comforting thought.</p>
<p>After more investigation I would notice empty files like this every once in awhile&#8230;</p>
<blockquote>
<pre>
~/Maildir)  ls -la new/
total 4
drwx------   2 al  al   512 Jun  8 00:25 .
drwx------  69 al  al  2048 Jun  8 00:25 ..
-rw-------   1 al  al     0 Jun  8 00:22 1244388142.30600_.myserver.net
</pre>
</blockquote>
<p>This gave me more clues on where to look next.  So next I looked in my Procmail logs for this particular mail id and noticed the process handling this message was killed by SIGPIPE</p>
<blockquote>
<pre>
procmail: Executing "/usr/local/bin/spamassassin"
[84028] warn: spamassassin: killed by SIGPIPE
procmail: [84026] Tue Apr 14 21:45:26 2009
</pre>
</blockquote>
<p>Googling dug up the following links that explain it all:</p>
<p>&nbsp;<a href="http://www.nabble.com/Zero-exit-code-after-SIGPIPE-td21630266.html" title="http://www.nabble.com/Zero-exit-code-after-SIGPIPE-td21630266.html" target="_blank">http://www.nabble.com/Zero-exit-code-aft&#8230;</a><br />
&nbsp;<a href="https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6033" title="https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6033" target="_blank">https://issues.apache.org/SpamAssassin/s&#8230;</a></p>
<p>Verdict:<br />
Upgrade Spamassassin</p>
<p>Since I have upgraded Spamassassin, the zero byte email mystery has resolved itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/09/09/spamassassin-sigpipe-errors-and-the-zero-file-mail-message-mystery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Using a non-standard port for Capistrano SSH gateways</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/06/02/using-a-non-standard-port-for-capistrano-ssh-gateways/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/06/02/using-a-non-standard-port-for-capistrano-ssh-gateways/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:10:13 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=731</guid>
		<description><![CDATA[I have a love-hate affair with Capistrano.   It is a great tool if you are a Ruby person and need to do something NOW on a bunch of machines.  But the docs are in a constant state of suck from my point of view.
The&#160;Capify.org website helps for remembering the &#8217;simple&#8217; details on [...]]]></description>
			<content:encoded><![CDATA[<p>I have a love-hate affair with Capistrano.   It is a great tool if you are a Ruby person and need to do something NOW on a bunch of machines.  But the docs are in a constant state of suck from my point of view.</p>
<p>The&nbsp;<a href="http://Capify.org" title="http://Capify. " target="_blank">Capify.org</a> website helps for remembering the &#8217;simple&#8217; details on what Capistrano can do.  But where I waste a lot of my time is asking questions like, &#8220;How do I set the Capistano SSH gateway to a non-standard port?&#8221;.   Luckily, Capistrano is written in Ruby so it is easy enough to glance through the code and finally find out where it is but this is why good tech docs exist.  To give enough context to answer those questions.</p>
<p>To answer my own question, below is a snippet you can add to your capfile to use a non-standard port if you need to deploy through a SSH gateway that lives on a non-standard port</p>
<blockquote><p>
# Add this to your Capfile<br />
# This sets the SSH gateway to a machine called&nbsp;<a href="http://mysshgateway.com" title="http://mysshgateway. " target="_blank">mysshgateway.com</a> on port 22222<br />
set :gateway, &#8216;mysshgateway.com:22222&#8242;
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/06/02/using-a-non-standard-port-for-capistrano-ssh-gateways/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Automating Zone creation in OpenSolaris 2009.06</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/06/02/automating-zone-creation-in-opensolaris-200906/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/06/02/automating-zone-creation-in-opensolaris-200906/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:02:14 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=737</guid>
		<description><![CDATA[With the announcement of OpenSolaris 2009.06 I thought it would be appropriate to blog a little about a tool I had been writing to help myself play with Zones a bit easier.  
My overall goals were the following:

Have each zone configured with its own virtual NIC (Crossbow)
Allow easy creation of zones without having to [...]]]></description>
			<content:encoded><![CDATA[<p>With the <a href="http://www.sun.com/aboutsun/pr/2009-06/sunflash.20090601.1.xml">announcement of OpenSolaris 2009.06</a> I thought it would be appropriate to blog a little about a tool I had been writing to help myself play with Zones a bit easier.  </p>
<p>My overall goals were the following:</p>
<ul>
<li>Have each zone configured with its own virtual NIC (<a href="http://opensolaris.org/os/project/crossbow/">Crossbow</a>)</li>
<li>Allow easy creation of zones without having to type zonecfg crap over and over again</li>
<li>Make it a stepping stone to automatically creating zones</li>
<li>See how well ipkg branded Zones work</li>
<li>Allow a Zone to get its IP and DNS configuration from DHCP</li>
</ul>
<p>I had tried going through tutorials that I found on the web (See references below) for setting up Zones but sadly none of them worked to my frustration.  After a lot of experimentation I finally pieced together a way to create zones quickly and (almost) automatically for simple configurations.</p>
<h3>Howto</h3>
<ol>
<li>Create a template zone that will be used as the main clone Zone</li>
<li>Download <a href="http://gist.github.com/122220">setup-zone-exclusive.sh</a> and modify lines 34-35 to match the name of your template zone and the real interface you want the zones to bind to</li>
<li>Download the DHCP event hook script from <a href="http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV3/html/extkj.html">here</a> and name it dhcp-client-event.sh if you want DHCP configuration</li>
<li>Run setup-zone-exclusive with the zonename and the virtual nic interface that you want</li>
</ol>
<p>In more detail here are the steps below</p>
<h4>First create a template zone (I call it barebones here)</h4>
<blockquote><p>
# Create /zones as its own ZFS filesystem<br />
$ pfexec zfs create rpool/zones<br />
$ pfexec zfs set mountpoint=/zones rpool/zones<br />
$ pfexec zfs create rpool/zones/barebones<br />
$ pfexec chmod 0700 /zones/barebones<br />
$ pfexec dladm create-vnic -l $REAL_IF vnic0<br />
$ pfexec zonecfg -z barebones<br />
barebones: No such zone configured<br />
Use &#8216;create&#8217; to begin configuring a new zone.<br />
zonecfg:barebones&gt; create<br />
zonecfg:barebones&gt; set zonepath=/zones/barebones<br />
zonecfg:barebones&gt; set ip-type=exclusive<br />
zonecfg:barebones&gt; add net<br />
zonecfg:barebones:net&gt; set physical=vnic0<br />
zonecfg:barebones:net&gt; end<br />
zonecfg:barebones&gt; exit</p>
<p>$ pfexec zoneadm -z barebones install
</p></blockquote>
<h4>Get the script</h4>
<p>I would suggest you create a project directory to hold things such as <em>zonecreations</em>.</p>
<p>Download from Github gists <a href="http://gist.github.com/122220">here</a>.   Name it setup-zone-exclusive.sh. Don&#8217;t forget to chmod +x the file so you can execute it</p>
<h4>Download the DHCP event hook script</h4>
<p>You can get that <a href="http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV3/html/extkj.html">here</a>.  Make sure this script is in the same directory as wherever you saved setup-zone-exclusive.sh</p>
<h4>Create a zone</h4>
<p>You can now create zones like this:</p>
<blockquote><p>
cd zonecreations<br />
pfexec ./setup-zone-exclusive.sh mycoolnewzone  virtualnic1
</p></blockquote>
<p>Have fun!</p>
<p>Update:  Fixed an error in the example for using dladm.  It should be correct now.  Thanks!</p>
<h3> References </h3>
<h4>Downloads</h4>
<p><a href="http://gist.github.com/122220">http://gist.github.com/122220 (setup-zone-exclusive.sh)</a><br />
<a href="http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV3/html/extkj.html">A DHCP event script to make sure DNS is configured when DHCP acquires an IP</a></p>
<h4>Older docs on setting up Zones on Solaris</h4>
<p><a href="http://www.mail-archive.com/zones-discuss@opensolaris.org/msg04174.html">How to use sysidcfg file in OpenSolaris 2008.11</a><br />
<a href="http://docs.sun.com/app/docs/doc/819-2450/z.login.ov-14?a=view">Internal Zone Configuration docs</a> <br />
<a href="http://docs.sun.com/app/docs/doc/819-2450/z.login.task-31?a=view">Performing the Initial Zone configuration</a> <br />
<a href="http://docs.sun.com/app/docs/doc/819-5776/6n7r9js2j?a=view">Preconfiguring with sysidcfg file</a> <br />
<a href="http://opensolaris.org/os/community/zones/faq/#cfg_sysidcfg">OpenSolaris FAQ on sysidcfg</a> <br />
<a href="http://www.cuddletech.com/blog/pivot/entry.php?id=751">Ben Rockwood&#8217;s blogpost on Zone creation</a>  <br />
<a href="http://docs.sun.com/app/docs/doc/819-2450/gbrmi?a=view">About /etc/.UNCONFIGURED</a> </p>
<h4>Helpful for understanding Zones and Crossbow</h4>
<p><a href="http://blogs.sun.com/stw/entry/crossbow_is_delivered_traveling_vnics">Crossbow on vnics</a></p>
<h4>Finding out that there is a change in policy for setting root_password in sysidcfg files</h4>
<p><a href="http://opensolaris.org/os/community/on/flag-days/pages/2008111501/">PASSREQ is enforced</a> <br />
<a href="https://www.opensolaris.org/jive/thread.jspa?messageID=329028&amp;#329028">zlogin failure after zone setup</a> </p>
<h4>The following helped in understanding the role of IPS and ipkg inside a non-global Zone</h4>
<p><a href="http://blogs.sun.com/jerrysblog/entry/updating_zones_on_opensolaris_2008">Updating Zones in OpenSolaris 2008.x</a> <br />
<a href="http://blogs.sun.com/dp/date/20080512">A field guide to Zones in OpenSolaris 2008.05</a> <br />
<a href="https://www.opensolaris.org/jive/thread.jspa?threadID=102287&amp;tstart=15">OpenSolaris forum on sysidcfg and Zones</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/06/02/automating-zone-creation-in-opensolaris-200906/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Good Systems Administration should be boring</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/04/30/good-systems-administration-should-be-boring/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/04/30/good-systems-administration-should-be-boring/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 15:27:57 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[windoze]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=712</guid>
		<description><![CDATA[Tom has a great summary on why.
One challenge for the cowboy sys admin is on how to keep oneself engaged while making their job basically&#8230; a walk in the park.
One thing I have found helpful in creating lists is to be dogmatic about writing docs as you are doing something somewhere, anywhere and collect all [...]]]></description>
			<content:encoded><![CDATA[<p>Tom has a great summary on <a href="http://everythingsysadmin.com/2009/01/transforming-art-into-science.html">why</a>.</p>
<p>One challenge for the cowboy sys admin is on how to keep oneself engaged while making their job basically&#8230; a walk in the park.</p>
<p>One thing I have found helpful in creating lists is to be dogmatic about writing docs as you are doing something somewhere, anywhere and collect all of this later.  (You are writing documentation as you do your job, aren&#8217;t you?)</p>
<p><a href="http://everythingsysadmin.com/2009/01/transforming-art-into-science.html">Read More</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/04/30/good-systems-administration-should-be-boring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Glad I&#8217;m not the only one who prefers monit over god</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/04/25/glad-im-not-the-only-one-who-prefers-monit-over-god/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/04/25/glad-im-not-the-only-one-who-prefers-monit-over-god/#comments</comments>
		<pubDate>Unknown, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[gripe]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=720</guid>
		<description><![CDATA[Seems someone else ran into issues while trying to deploy god.
While, I don&#8217;t think god sucks I definitely don&#8217;t endorse it.  At this point I would only use it under the following conditions:

Need for a process monitor tool with more dynamic configuration setups.  This is where god really shines against monit&#8217;s simpler understanding [...]]]></description>
			<content:encoded><![CDATA[<p>Seems someone else <a href="http://blog.bradgessler.com/use-monit-with-rails-not-god">ran into issues</a> while trying to deploy god.</p>
<p>While, I don&#8217;t think god sucks I definitely don&#8217;t endorse it.  At this point I would only use it under the following conditions:</p>
<ul>
<li>Need for a process monitor tool with more dynamic configuration setups.  This is where god really shines against monit&#8217;s simpler understanding of what process management is about.</li>
<li>The host that needs monitoring can easily spare at least 16MB for a monitoring process.  See below on why.</li>
<li>I really want an all Ruby solution for all the tools in a system</li>
</ul>
<p>In general, I am into the whole &#8216;It is Open Source.  If you&#8217;re having issues, fix it&#8217; deal so I am not nearly as angry sounding as Brad is about god.  However, after having issues with god, I switched to <a href="http://mmonit.com/monit/">monit</a> for simple process monitoring and restarting.  I had far less troubles and got on with other tasks that I considered more important than perfection in a process monitoring system.</p>
<p>For those that are curious here are the issues that I ran into with god:</p>
<ul>
<li>Daemonized Ruby took at least 8MB of RAM for the monitoring process.  With RAM the way it is, this is not as big a deal.  However, if you are trying to get by on a 128MB VPS host every kilobyte counts.</li>
<li>God itself had <a href="http://rubyforge.org/tracker/index.php?func=detail&amp;aid=13474&amp;group_id=3845&amp;atid=14814">issues just randomly dying after some time</a>.   Tom promptly fixed it after it was reported and that was great.  However, it was a little disappointing that a monitoring process just died.</li>
<li>Sparse documentation compared to monit&#8217;s.   Then again this is typical from many Ruby projects and luckily Ruby code is readable enough</li>
<li>Digging up known issues for god required noodling through groups, forums, and blog posts.   Would have been nice to just have a <a href="http://mmonit.com/wiki/Monit/FAQ">friggin&#8217; FAQ</a> like <a href="http://cr.yp.to/daemontools/faq.html">other</a> sys admin-targeted software I have seen.</li>
</ul>
<p>I also DO agree as has been said in <a href="http://blog.bradgessler.com/use-monit-with-rails-not-god">the comments on  Brad&#8217;s post</a> that it is the responsibility of the deployer of software to handle the issues with whatever they deploy and just deal with it.  The reason I say this is because I fell for the hyped up description of god in the beginning and ultimately paid the price when it sucked up my time.  I dealt with it but definitely am less impressed with overhyped marketing descriptions of software these days.   Personally, I am not a fan of that type of marketing for software since it seems a little disingenuous to me.   But that is just me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/04/25/glad-im-not-the-only-one-who-prefers-monit-over-god/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>
