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

<channel>
	<title>Racker Hacker &#187; Blog Posts</title>
	<atom:link href="http://rackerhacker.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://rackerhacker.com</link>
	<description>Words of wisdom from a server administrator</description>
	<lastBuildDate>Fri, 03 Feb 2012 04:29:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Kerberos for haters</title>
		<link>http://rackerhacker.com/2012/02/02/kerberos-for-haters/</link>
		<comments>http://rackerhacker.com/2012/02/02/kerberos-for-haters/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 04:29:32 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kerberos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rhca]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2906</guid>
		<description><![CDATA[I'll be the first one to admit that Kerberos drives me a little insane. It's a requirement for two of the exams in Red Hat's RHCA certification track and I've been forced to learn it. It provides some pretty nice security features for large server environments. You get central single sign ons, encrypted authentication, and [...]<p><a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/">Kerberos for haters</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I'll be the first one to admit that Kerberos drives me a little insane.  It's a requirement for two of the exams in <a href="http://www.redhat.com/training/certifications/rhca/">Red Hat's RHCA certification track</a> and I've been forced to learn it.  It provides some pretty nice security features for large server environments.  You get central single sign ons, encrypted authentication, and bidirectional validation.  However, getting it configured can be a real pain due to some rather archaic commands and shells.</p>
<p>Here's Kerberos in a nutshell within a two-server environment:  One server is a Kerberos key distribution center (KDC) and the other is a Kerberos client.  The KDC has the list of users and their passwords.  Consider a situation where a user tries to ssh into the Kerberos client:</p>
<ul>
<li>sshd calls to pam to authenticate the user</li>
<li>pam calls to the KDC for a ticket granting ticket (TGT) to see if the user can authenticate</li>
<li>the KDC replies to the client with a TGT encrypted with the user's password</li>
<li>pam (on the client) tries to decrypt the TGT with the password that the user provided via ssh</li>
<li>if pam can decrypt the TGT, it knows the user is providing the right password</li>
</ul>
<p>Now that the client has a a TGT for that user, it can ask for tickets to access other network services.  What if the user who just logged in wants to access another Kerberized service in the environment?</p>
<ul>
<li>client calls the KDC and asks for a ticket to grant access to the other service</li>
<li>KDC replies with two copies of the ticket:
<ul>
<li>one copy is encrypted with the user's current TGT</li>
<li>a second copy is encrypted with the password of the network service the user wants to access</li>
</ul>
</li>
<li>the client can decrypt the ticket which was encrypted with the current TGT since it has the TGT already</li>
<li>client makes an authenticator by taking the decrypted ticket and encrypting it with a timestamp</li>
<li>client passes the authenticator and the second copy of the ticket it received from the KDC</li>
<li>the other network service decrypts the second copy of the ticket and verifies the password</li>
<li>the other network service uses the decrypted ticket to decrypt the authenticator it received from the client</li>
<li>if the timestamp looks good, the other network service allows the user access</li>
</ul>
<p>Okay, that's confusing.  Let's take it one step further.  Enabling pre-authentication requires that clients send a request containing a timestamp encrypted with the user's password prior to asking for a TGT.  Without this requirement, an attacker can ask for a TGT one time and then brute force the TGT offline.  Pre-authentication forces the client to send a timestamped request encrypted with the user's password back to the KDC before they can ask for a KDC.  This means the attacker is forced to try different passwords when encrypting the timestamp in the hopes that they'll get a TGT to work with eventually.  One would hope that you have something configured on the KDC to set off an alarm for multiple failed pre-authentication attempts.</p>
<p>Oh, but we can totally kick it up another notch.  What if an attacker is able to give a bad password to a client but they're also able to impersonate the KDC?  They could reply to the TGT request (as the KDC) with a TGT encrypted with whichever password they choose and get access to the client system.  Enabling mutual authentication stops this attack since it forces the client to ask the KDC for the client's own host principal password (this password is set when the client is configured to talk to the KDC).  The attacker shouldn't have any clue what that password is and the attack will be thwarted.</p>
<p>By this point, you're either saying "Oh man, I don't ever want to do this." or "How do I set up Kerberos?".  Stay tuned if you're in the second group.  I'll have a dead simple (or as close to dead simple as one can get with Kerberos) how-to on the blog shortly.</p>
<p>In the meantime, here are a few links for extra Kerberos bedtime reading:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Kerberos_(protocol)">Kerberos on Wikipedia</a></li>
<li><a href="http://www.kerberos.org/software/whykerberos.pdf">MIT's "Why Kerberos"</a> [PDF]</li>
<li><a href="http://learn-networking.com/network-security/how-kerberos-authentication-works">How Kerberos Authentication Works</a></li>
</ul>
<p><a href="http://rackerhacker.com/2012/02/02/kerberos-for-haters/">Kerberos for haters</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/02/02/kerberos-for-haters/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>OpenStack bleeding-edge Python packages are now available</title>
		<link>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/</link>
		<comments>http://rackerhacker.com/2012/02/01/openstack-bleeding-edge-python-packages-are-now-available/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 15:05:16 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

<p>Once your tools are configured, try installing a package you have locally and try to install one that you know you won't have locally.  You can add <code>-v</code> to <code>pip install</code> to watch it retrieve different URL's to get the packages it needs.  If you spot any peculiar behavior or unexpected redirections, double-check your mod_rewrite rules in your apache configuration and check the spelling of your directories under your document root.</p>
<p><a href="http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/">Create a local PyPi repository using only mod_rewrite</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/31/create-a-local-pypi-repository-using-only-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with SELinux</title>
		<link>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/</link>
		<comments>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 04:28:41 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[seliux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2838</guid>
		<description><![CDATA[I used to be one of those folks who would install Fedora, CentOS, Scientific Linux, or Red Hat and disable SELinux during the installation. It always seemed like SELinux would get in my way and keep me from getting work done. Later on, I found that one of my servers (which I'd previously secured quite [...]<p><a href="http://rackerhacker.com/2012/01/25/getting-started-with-selinux/">Getting started with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I used to be one of those folks who would install Fedora, CentOS, Scientific Linux, or Red Hat and disable SELinux during the installation.  It always seemed like SELinux would get in my way and keep me from getting work done.  </p>
<p>Later on, I found that one of my servers (which I'd previously secured quite thoroughly) had some rogue processes running that were spawned through httpd.  Had I actually been using SELinux in enforcing mode, those processes would have probably never even started.</p>
<p>If you're trying to get started with SELinux but you're not sure how to do it without completely disrupting your server's workflow, these tips should help:</p>
<p><b>Get some good reporting and monitoring</b><br />
Two of the most handy SELinux tools are <a href="https://fedorahosted.org/setroubleshoot/">setroubleshoot and setroubleshoot-server</a>.  If you're running a server without X, you can use <a href="/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/">my guide for configuring setroubleshoot-server</a>.  You will receive email alerts within seconds of an AVC denial and the emails should contain tips on how to resolve the denial if the original action should be allowed.  If the AVC denial caught something you didn't expect, you'll know about the potential security breach almost immediately.</p>
<p><b>Start out with SELinux in permissive mode</b><br />
If you're overly concerned about SELinux getting in your way, or if you're enabling SELinux on a server that has been running without SELinux since it was installed, start out with SELinux in permissive mode.  To make the change effective immediately, just run:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setenforce 0
# getenforce
Permissive</pre></div></div>

<p>Edit <code>/etc/sysconfig/selinux</code> to make it persistent across reboots:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=permissive</pre></div></div>

<p><b>Adjust booleans before adding your own custom modules</b><br />
There are a lot of booleans you can toggle to get the functionality you need without adding your own custom SELinux modules with <code>audit2allow</code>.  If you wanted to see all of the applicable booleans for <code>httpd</code>, just use <code>getsebool</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># getsebool -a | grep httpd
httpd_builtin_scripting --&gt; on
httpd_can_check_spam --&gt; off
httpd_can_network_connect --&gt; on
httpd_can_network_connect_cobbler --&gt; off
httpd_can_network_connect_db --&gt; off
httpd_can_network_memcache --&gt; off
httpd_can_network_relay --&gt; on
httpd_can_sendmail --&gt; on
... and so on ...</pre></div></div>

<p>Toggling booleans is easy with <code>togglesebool</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># togglesebool httpd_can_network_memcache
httpd_can_network_memcache: active</pre></div></div>

<p>Now <code>httpd</code> can talk to <code>memcache</code>.  You can also use <code>setsebool</code> if you want to be specific about your setting (this is good for scripts):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setsebool httpd_can_network_memcache on</pre></div></div>

<p><b>Tracking your history of AVC denials</b><br />
All of your AVC denals are logged by <code>auditd</code> in <code>/var/log/audit/audit.log</code> but it's not the easiest file to read and parse.  That's where <code>aureport</code> comes in:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># aureport --avc | tail -n 5
45. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 4 fifo_file getattr system_u:object_r:postfix_public_t:s0 denied 1061
46. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 2 fifo_file write system_u:object_r:postfix_public_t:s0 denied 1062
47. 01/24/2012 04:23:29 postdrop unconfined_u:system_r:httpd_t:s0 2 fifo_file open system_u:object_r:postfix_public_t:s0 denied 1062
48. 01/24/2012 14:01:58 sendmail unconfined_u:system_r:httpd_t:s0 160 process setrlimit unconfined_u:system_r:httpd_t:s0 denied 1123
49. 01/24/2012 14:01:58 postdrop unconfined_u:system_r:httpd_t:s0 4 dir search system_u:object_r:postfix_public_t:s0 denied 1124</pre></div></div>

<p><b>Summary</b><br />
There's no need to be scared of or be annoyed by SELinux in your server environment.  While it takes some getting used to (and what new software doesn't?), you'll have an extra layer of security and access restrictions which should let you sleep a little better at night.</p>
<p><a href="http://rackerhacker.com/2012/01/25/getting-started-with-selinux/">Getting started with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/25/getting-started-with-selinux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XenServer 6: Storage repository on software RAID</title>
		<link>http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/</link>
		<comments>http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 15:00:21 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[mdadm]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2777</guid>
		<description><![CDATA[Although Citrix recommends against using software RAID with XenServer due to performance issues, I've had some pretty awful experiences with hardware RAID cards over the last few years. In addition, the price of software RAID makes it a very desirable solution. Before you get started, go through the steps to disable GPT. That post also [...]<p><a href="http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/">XenServer 6: Storage repository on software RAID</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Although Citrix recommends against using software RAID with XenServer due to performance issues, I've had some pretty awful experiences with hardware RAID cards over the last few years.  In addition, the price of software RAID makes it a very desirable solution.</p>
<p><strong>Before you get started,</strong> <a href="http://rackerhacker.com/2012/01/13/xenserver-6-di…root-partition/">go through the steps to disable GPT</a>.  That post also explains an optional adjustment to get a larger root partition (which I would recommend).  <em>You cannot complete the steps in this post if your XenServer installation uses GPT.</em></p>
<p>You should have three partitions on your first disk after the installation:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># fdisk -l /dev/sda
-- SNIP --
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2611    20971520   83  Linux
/dev/sda2            2611        5222    20971520   83  Linux
/dev/sda3            5222       19457   114345281   8e  Linux LVM</pre></div></div>

<p>Here's a quick explanation of your partitions:</p>
<ul>
<li><b>/dev/sda1:</b> the XenServer root partition</li>
<li><b>/dev/sda2:</b> XenServer uses this partition for temporary space during upgrades</li>
<li><b>/dev/sda3:</b> your storage repository should be in this logical volume</li>
</ul>
<p>We need to replicate the same partition structure across each of your drives and the software RAID volume will span the across the third partition on each disk.  Copying the partition structure from disk to disk is done easily with <code>sfdisk</code>:</p>
<p><span style="color: #D42020;"><b>WHOA THERE! NO TURNING BACK!</b> This step is destructive! If your other disks have any data on them, this step will make it (relatively) impossible to retrieve data on those disks again.  Back up any data on the other disks in your XenServer machine before running these next commands.</span></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sfdisk -d /dev/sda | sfdisk --force /dev/sdb
sfdisk -d /dev/sda | sfdisk --force /dev/sdc
sfdisk -d /dev/sda | sfdisk --force /dev/sdd</pre></div></div>

<p>If you have only two disks, stop with <code>/dev/sdb</code> and you'll be making a RAID 1 array.  My machine has four disks and I'll be making a RAID 10 array.</p>
<p>We need to destroy the main storage repository, but we need to unplug the physical block device first.  Get the storage repository uuid first, then use it to find the corresponding physical block device.  Once the physical block device is unplugged, the storage repository can be destroyed:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># xe sr-list name-label=Local\ storage | head -1
uuid ( RO)                : 75264965-f981-749e-0f9a-e32856c46361
# xe pbd-list sr-uuid=75264965-f981-749e-0f9a-e32856c46361 | head -1
uuid ( RO)                  : ff7e9656-c27c-1889-7a6d-687a561f0ad0
# xe pbd-unplug uuid=ff7e9656-c27c-1889-7a6d-687a561f0ad0 
# xe sr-destroy uuid=75264965-f981-749e-0f9a-e32856c46361</pre></div></div>

<p>All of the LVM data from <code>/dev/sda3</code> should now be gone:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># lvdisplay &amp;&amp; vgdisplay &amp;&amp; pvdisplay
#</pre></div></div>

<p>Change the third partition on each physical disk to be a software RAID partition type:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sda
echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sdb
echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sdc
echo -e &quot;t\n3\nfd\nw\n&quot; | fdisk /dev/sdd</pre></div></div>

<p>Stop here and reboot your XenServer box to pick up the new partition changes.  Once the server comes back from the reboot, start up a software RAID volume with <code>mdadm</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">// RAID 1 for two drives
mdadm --create /dev/md0 -l 1 -n 2 /dev/sda3 /dev/sdb3
// RAID 10 for four drives
mdadm --create /dev/md0 -l 10 -n 4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3</pre></div></div>

<p>Check to see that your RAID array is building:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># cat /proc/mdstat 
Personalities : [raid10] 
md0 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0]
      228690432 blocks 64K chunks 2 near-copies [4/4] [UUUU]
      [&gt;....................]  resync =  0.3% (694272/228690432) finish=16.4min speed=231424K/sec</pre></div></div>

<p>Although you don't have to wait for the resync to complete, just be aware that XenServer doesn't do well with a lot of disk I/O within dom0.  You may notice unusually slow performance in dom0 until it finishes.  Save the array's configuration for reboots:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">mdadm --detail --scan &gt; /etc/mdadm.conf</pre></div></div>

<p>Edit the <code>/etc/mdadm.conf</code> file and append <code>auto=yes</code> to the end of the line (but leave everything on one line):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ARRAY /dev/md0 level=raid10 num-devices=4 metadata=0.90 \
  UUID=2876748c:5117eed5:ce4d62d3:9592bd84 auto=yes</pre></div></div>

<p>Create a new storage repository on the RAID volume with thin provisioning (thanks to <a href="http://www.scriptkiddie.org/blog/2010/06/20/xenserver-5-6-thin-provisioning-with-ext3/">Spherical Chicken</a> for the command):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">xe sr-create content-type=user type=ext device-config:device=/dev/md0 shared=false name-label=&quot;Local storage&quot;</pre></div></div>

<p>This command takes some time to complete since it makes logical volumes and then makes an ext3 filesystem for the new storage repository.  Bigger RAID arrays will take more time and it's guaranteed to take longer than you'd expect if your RAID array is still building.  As soon as it completes, you'll be given the uuid of your new storage repository and it should appear within the XenCenter interface.</p>
<p>TIP: If you run into any problems during reboots, open <code>/boot/extlinux.conf</code> and remove <code>splash</code> and <code>quiet</code> from the <code>label xe</code> boot section.  This removes the framebuffer during boot-up and it causes a lot more output to be printed to the console.  It won't affect the display once your XenServer box has fully booted.</p>
<p><a href="http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/">XenServer 6: Storage repository on software RAID</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/16/xenserver-6-storage-repository-on-software-raid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XenServer 6: Disable GPT and get a larger root partition</title>
		<link>http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/</link>
		<comments>http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 15:00:10 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2741</guid>
		<description><![CDATA[XenServer 6 is a solid virtualization platform, but the installer doesn't give you many options for customized configurations. By default, it installs with a 4GB root partition and uses GUID Partition Tables (GPT). GPT is new in XenServer 6. I'd rather use MBR partition tables and get a larger root partition. If you want to [...]<p><a href="http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/">XenServer 6: Disable GPT and get a larger root partition</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.citrix.com/English/ps2/products/product.asp?contentID=683148&#038;ntref=prod_top">XenServer 6</a> is a solid virtualization platform, but the installer doesn't give you many options for customized configurations.  By default, it installs with a 4GB root partition and uses <a href="http://en.wikipedia.org/wiki/GUID_Partition_Table">GUID Partition Tables (GPT)</a>.  GPT is new in XenServer 6.</p>
<p>I'd rather use <a href="http://en.wikipedia.org/wiki/Master_boot_record">MBR partition tables</a> and get a larger root partition.  If you want to make these adjustments in your XenServer 6 installation, follow these steps after booting into the <a href="http://www.citrix.com/lang/English/lp/lp_1688615.asp">XenServer 6 install disc</a>:</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/01.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/01-300x220.jpg" alt="xenserver_install_01" title="xenserver_install_01" width="300" height="220" class="alignleft size-medium wp-image-2744" /></a><br />
When the installer initially boots, press F2 to access the advanced installation options.<br />
<br style="clear: both;" /> </p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/02.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/02-300x220.jpg" alt="xenserver_install_02" title="xenserver_install_02" width="300" height="220" class="alignleft size-medium wp-image-2747" /></a><br />
Type <code>shell</code> and press enter.  The installer should begin booting into a pre-installation shell where you can make your adjustments.<br />
<br style="clear: both;" /></p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/04.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/04-300x164.jpg" alt="" title="xenserver_install_04" width="300" height="164" class="alignleft size-medium wp-image-2761" /></a><br />
Once you've booted into the pre-installation shell, type <code>vi /opt/xensource/installer/constants.py</code> and press enter.<br />
<br style="clear: both;" /></p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/05.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/05-300x164.jpg" alt="xenserver_install_05" title="xenserver_install_05" width="300" height="164" class="alignleft size-medium wp-image-2765" /></a><br />
Change <code>GPT_SUPPORT = True</code> to <code>GPT_SUPPORT = False</code> to disable GPT and use MBR partition tables.  Adjust the value of <code>root_size</code> from 4096 (the default) to a larger number to get a bigger root partition.  The size is specified in MB, so 4096 is 4GB.  Save the file and exit <code>vim</code>.<br />
<br style="clear: both;" /></p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/06.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/06-300x164.jpg" alt="" title="xenserver_install_06" width="300" height="164" class="alignleft size-medium wp-image-2768" /></a><br />
Type <code>exit</code> and the installer should start.<br />
<br style="clear: both;" /></p>
<p>Once the installation is complete, you should have a bigger root partition on a MBT partition table:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># df -h /
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              20G  1.8G   17G  10% /
# fdisk -l /dev/sda
&nbsp;
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
&nbsp;
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2611    20971520   83  Linux
/dev/sda2            2611        5222    20971520   83  Linux
/dev/sda3            5222       19457   114345281   8e  Linux LVM</pre></div></div>

<p><a href="http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/">XenServer 6: Disable GPT and get a larger root partition</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/13/xenserver-6-disable-gpt-and-get-a-larger-root-partition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fight SOPA &amp; PIPA</title>
		<link>http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/</link>
		<comments>http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 13:36:38 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[sopa]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2816</guid>
		<description><![CDATA[Get informed about what the US government is trying to accomplish with SOPA and PIPA. Get involved and do what you can to prevent it from moving any further. WordPress > Help Stop SOPA/PIPA Reddit - SOPA Stop American Censorship Wikipedia - Stop Online Piracy Act EFF - Take Action Why Rackspace opposes the Stop [...]<p><a href="http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/">Fight SOPA &#038; PIPA</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2012/01/sopacantspelldns.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2012/01/sopacantspelldns.jpg" alt="SOPA - M. Chairman, with all due respect, you can&#039;t even spell DNS." title="SOPA - M. Chairman, with all due respect, you can&#039;t even spell DNS." width="625" height="374" class="alignnone size-full wp-image-2817" /></a></p>
<p>Get informed about what the US government is trying to accomplish with SOPA and PIPA.  Get involved and do what you can to prevent it from moving any further.</p>
<ul>
<li><a href="http://wordpress.org/news/2012/01/help-stop-sopa-pipa/">WordPress > Help Stop SOPA/PIPA</a></li>
<li><a href="http://reddit.com/r/sopa">Reddit - SOPA</a></li>
<li><a href="http://americancensorship.org/">Stop American Censorship</a></li>
<li><a href="http://en.wikipedia.org/wiki/Stop_Online_Piracy_Act">Wikipedia - Stop Online Piracy Act</a></li>
<li><a href="https://action.eff.org/o/9042/p/dia/action/public/?action_KEY=8173">EFF - Take Action</a></li>
<li><a href="http://www.rackspace.com/cloud/blog/2011/12/24/why-rackspace-opposes-the-%E2%80%9Cstop-online-piracy-act%E2%80%9D/">Why Rackspace opposes the Stop Online Piracy Act</a></li>
<li><a href="http://www.mozilla.org/sopa/">Mozilla - Protect The Internet</a></li>
</ul>
<p>You may need a little humor after all of that reading.  Head on over to <a href="http://knowyourmeme.com/memes/events/protect-ip-act-stop-online-piracy-act">Know Your Meme</a> (warning: NSFW language in certain areas) for a laugh.</p>
<p><a href="http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/">Fight SOPA &#038; PIPA</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/12/fight-sopa-and-pipa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Native IPv6 connectivity in Mikrotik&#039;s RouterOS</title>
		<link>http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/</link>
		<comments>http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 13:30:07 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2720</guid>
		<description><![CDATA[It's no secret that I'm a big fan of the Routerboard devices and the RouterOS software from Mikrotik that runs on them. The hardware is solid, the software is stable and feature-rich, and I found a great vendor that ships quickly. I recently added a RB493G (~ $230 USD) to sit in front of a [...]<p><a href="http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/">Native IPv6 connectivity in Mikrotik's RouterOS</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>It's no secret that I'm a big fan of the <a href="http://routerboard.com/">Routerboard</a> devices and the <a href="http://www.mikrotik.com/software.html">RouterOS software from Mikrotik</a> that runs on them.  The hardware is solid, the software is stable and feature-rich, and I found a <a href="http://www.roc-noc.com/">great vendor</a> that ships quickly.</p>
<p>I recently added a <a href="http://routerboard.com/RB493G">RB493G</a> (<a href="http://www.roc-noc.com/mikrotik/routerboard/rb493g-complete.html">~ $230 USD</a>) to sit in front of a pair of colocated servers.  The majority of the setup routine was the same as with my previous devices except for the IPv6 configuration.</p>
<p>In the past, I've set up IPv6 tunnels with <a href="http://ipv6.he.net/">Hurricane Electric</a> and it's been mostly a cut-and-paste operation from the sample configuration in their IPv6 tunnel portal.  Setting up native IPv6 involved a little more legwork.</p>
<p>If your provider will give you two /64's or an entire /48, getting IPv6 connectivity for your WAN/LAN interfaces is simple.  However, if you can only get one /64, you'll have to see if your provider can route it to you via your Mikrotik's <a href="http://en.wikipedia.org/wiki/Link-local_address#IPv6">link local</a> interface (I wouldn't recommend this for many reasons).</p>
<p>I split my Mikrotik into two interfaces: wan and lanbridge.  The lanbridge bridge joins all of the LAN ethernet ports (ether2-9 on the RB493G) and the wan interface connects to the upstream switch.</p>
<p>My configuration:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 address
add address=2001:DB8:0:1::2/64 advertise=yes disabled=no eui-64=no interface=wan
add address=2001:DB8:0:2::1/64 advertise=yes disabled=no eui-64=no interface=lanbridge
/ipv6 route
add disabled=no distance=1 dst-address=::/0 gateway=2001:DB8:0:1::1 scope=30 \
  target-scope=10
/ipv6 nd
add advertise-dns=no advertise-mac-address=yes disabled=no hop-limit=64 \ 
  interface=all managed-address-configuration=no mtu=unspecified \
  other-configuration=no ra-delay=3s ra-interval=3m20s-10m ra-lifetime=30m \ 
  reachable-time=unspecified retransmit-interval=unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d</pre></div></div>

<p>Explanation:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 address
add address=2001:DB8:0:1::2/64 advertise=yes disabled=no eui-64=no interface=wan
add address=2001:DB8:0:2::1/64 advertise=yes disabled=no eui-64=no interface=lanbridge</pre></div></div>

<p>These two lines configure the IPv6 addresses for the firewall's interfaces.  My provider's router holds the 2001:DB8:0:1::1/64 address and routes the remainder of that /64 to me via 2001:DB8:0:1::2/64.  The second /64 is on the lanbridge interface and my LAN devices take their IP addresses from that block.  My provider routes that second /64 to me via the 2001:DB8:0:1::2/64 IP on my wan interface.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 route
add disabled=no distance=1 dst-address=::/0 gateway=2001:DB8:0:1::1 scope=30 \
  target-scope=10</pre></div></div>

<p>I've set a <a href="http://tldp.org/HOWTO/html_single/Linux+IPv6-HOWTO/#AEN1083">gateway</a> for IPv6 traffic so that the Mikrotik knows where to send internet-bound IPv6 traffic (in this case, to my ISP's core router).</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/ipv6 nd
add advertise-dns=no advertise-mac-address=yes disabled=no hop-limit=64 \ 
  interface=lanbridge managed-address-configuration=no mtu=unspecified \
  other-configuration=no ra-delay=3s ra-interval=3m20s-10m ra-lifetime=30m \ 
  reachable-time=unspecified retransmit-interval=unspecified
/ipv6 nd prefix default
set autonomous=yes preferred-lifetime=1w valid-lifetime=4w2d</pre></div></div>

<p>These last two lines configure the <a href="http://en.wikipedia.org/wiki/Neighbor_Discovery_Protocol">neighbor discovery</a> on my lanbridge interface.  This allows my LAN devices to do <a href="http://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_.28SLAAC.29">stateless autoconfiguration</a> (which gives them an IPv6 address as well as the gateway).</p>
<p>Want to read up on IPv6?</p>
<ul>
<li><a href="http://tldp.org/HOWTO/html_single/Linux+IPv6-HOWTO/">Linux IPv6 HOWTO</a></li>
<li><a href="http://en.wikipedia.org/wiki/IPv6">IPv6 on Wikipedia</a></li>
<li><a href="http://www.roesen.org/files/ipv6_cheat_sheet.pdf">IPv6 Cheat Sheet</a> [PDF]</li>
<li><a href="http://www.ripe.net/lir-services/resource-management/number-resources/ipv6/ipv6-subnetting-card">IPv6 Subnetting Card</a></li>
</ul>
<p><a href="http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/">Native IPv6 connectivity in Mikrotik's RouterOS</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/11/native-ipv6-connectivity-in-mikrotiks-routeros/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELinux and .forward files</title>
		<link>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/</link>
		<comments>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 22:44:43 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2680</guid>
		<description><![CDATA[If you want to forward e-mail from root to another user, you can usually place a .forward file in root's home directory and your mail server will take care of the rest: echo &#34;user@example.com&#34; &#62; /root/.forward With SELinux, you'll end up getting an AVC denial each time your mail server tries to read the contents [...]<p><a href="http://rackerhacker.com/2012/01/02/selinux-and-forward-files/">SELinux and .forward files</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you want to forward e-mail from root to another user, you can usually place a <code>.forward</code> file in root's home directory and your mail server will take care of the rest:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo &quot;user@example.com&quot; &gt; /root/.forward</pre></div></div>

<p>With SELinux, you'll end up getting an AVC denial each time your mail server tries to read the contents of the <code>.forward</code> file:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">type=AVC msg=audit(1325543823.787:7416): avc:  denied  { open } for  pid=9850 
  comm=&quot;local&quot; name=&quot;.forward&quot; dev=md0 ino=17694734 
  scontext=system_u:system_r:postfix_local_t:s0 
  tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file</pre></div></div>

<p>The reason is that your <code>.forward</code> file doesn't have the right SELinux contexts.  You can set the correct contest quickly with <code>restorecon</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># ls -Z /root/.forward 
-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 /root/.forward
# restorecon -v /root/.forward
restorecon reset /root/.forward context unconfined_u:object_r:admin_home_t:s0-&gt;system_u:object_r:mail_forward_t:s0
# ls -Z /root/.forward 
-rw-r--r--. root root system_u:object_r:mail_home_t:s0 /root/.forward</pre></div></div>

<p>Try to send another e-mail to root and you should see the mail server forward the e-mail properly without any additional AVC denials.</p>
<p><a href="http://rackerhacker.com/2012/01/02/selinux-and-forward-files/">SELinux and .forward files</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2012/01/02/selinux-and-forward-files/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Getting online with a CradlePoint PHS-300 and an AT&amp;T USBConnect Mercury</title>
		<link>http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/</link>
		<comments>http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 07:07:08 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2682</guid>
		<description><![CDATA[Anyone who has used a 3G ExpressCard or USB stick knows how handy they can be when you need internet access away from home (and away from Wi-Fi). I've run into some situations recently where I needed to share my 3G connection with more than one device without using internet sharing on my MacBook Pro. [...]<p><a href="http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/">Getting online with a CradlePoint PHS-300 and an AT&#038;T USBConnect Mercury</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Anyone who has used a 3G ExpressCard or USB stick knows how handy they can be when you need internet access away from home (and away from Wi-Fi).  I've run into some situations recently where I needed to share my 3G connection with more than one device without using internet sharing on my MacBook Pro.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/12/phs300.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2011/12/phs300-300x300.jpg" alt="" title="phs300" width="300" height="300" class="alignright size-medium wp-image-2691" /></a>That led me to pick up a CradlePoint PHS-300 (discontinued by the manufacturer, but available from <a href="http://www.amazon.com/CradlePoint-PHS300-Personal-Hotspot-Wireless/dp/B001212ELY">Amazon</a> for about $35).  It's compatible with my AT&#038;T USBConnect Mercury (a.k.a. Sierra Wireless Compass 885/885U) USB stick.</p>
<p>Configuring the PHS-300 was extremely easy since I could just associate with the wireless network and enter the password printed on the bottom of the unit.  However, getting the 3G stick to work was an immense pain.  If you're trying to pair up these products, these steps should help:</p>
<ul>
<li>Access the PHS-300's web interface</li>
<li>Click the <b>Modem</b> tab</li>
<li>Click <b>Settings</b> on the left</li>
<li>Click <b>Always on</b> under <b>Reconnect Mode</b></li>
<li>Uncheck <b>Aggressive Modem Reset</b></li>
<li>Put the following into the <b>AT Dial Script</b> text box:

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ATE0V1&amp;F&amp;D2&amp;C1S0=0
ATDT*99***1#</pre></div></div>

</li>
<li>Add <code>ISP.CINGULAR</code> to the <b>Access Point Name (APN)</b> box</li>
<li>Flip the <b>Connect Mode</b> under <b>Dual WiMAX/3G Settings</b> to <b>3G Only</b></li>
<li>Scroll up and push <b>Save Settings</b> and then <b>Reboot Now</b></li>
</ul>
<p>Once the PHS-300 reboots, the USB stick may light up, then turn off, and the display on the PHS-300 might show a red light for the 3G card.  Wait about 10-15 seconds for the light to turn green.  The lights on the 3G stick should be glowing and blinking as well.</p>
<p><strong>So how did I figure this out?</strong></p>
<p>After scouring Google search results, Sierra Wireless FAQ's, CradlePoint's support pages, and trolling through minicom (yes, minicom), I thought I'd try connecting with my MacBook Pro using the 3G Watcher application provided by Sierra Wireless.  Before connecting, I opened up Console.app and watched the <code>ppp.log</code> file.  Sure enough, two lines popped up that were quite relevant to my interests:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Fri Dec 16 00:37:51 2011 : Initializing phone: ATE0V1&amp;F&amp;D2&amp;C1S0=0
Fri Dec 16 00:37:51 2011 : Dialing: ATDT*99***1#</pre></div></div>

<p>I didn't have the exact initialization string in the PHS-300 and that was the cause of the failure the entire time.</p>
<p>If you'd like to talk to your USBConnect Mercury stick with minicom, just install minicom from macports (<code>sudo port -v install minicom</code>) and start it up like so:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sudo minicom -D /dev/cu.sierra04</pre></div></div>

<p>For other Sierra Wireless cards and adapters, there's a <a href="http://mycusthelp.net/SIERRAWIRELESS/_cs/AnswerDetail.aspx?aid=7">helpful page</a> on Sierra Wireless' site for Eee PC users.</p>
<p><a href="http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/">Getting online with a CradlePoint PHS-300 and an AT&#038;T USBConnect Mercury</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/12/16/getting-online-with-a-cradlepoint-phs-300-and-an-att-usbconnect-mercury/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically upgrading to new point releases of Scientific Linux</title>
		<link>http://rackerhacker.com/2011/11/23/automatically-upgrading-to-new-point-releases-of-scientific-linux/</link>
		<comments>http://rackerhacker.com/2011/11/23/automatically-upgrading-to-new-point-releases-of-scientific-linux/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 13:20:12 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[scientific linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2672</guid>
		<description><![CDATA[When you install Scientific Linux, it will keep you on the same point release that you installed. For example, if you install it from a 6.0 DVD, you'll stay on 6.0 and get security releases for that point release only. Getting it to behave like Red Hat Enterprise Linux and CentOS is a painless process. [...]<p><a href="http://rackerhacker.com/2011/11/23/automatically-upgrading-to-new-point-releases-of-scientific-linux/">Automatically upgrading to new point releases of Scientific Linux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>When you install Scientific Linux, it will keep you on the same point release that you installed.  For example, if you install it from a 6.0 DVD, you'll stay on 6.0 and get security releases for that point release only.</p>
<p>Getting it to behave like Red Hat Enterprise Linux and CentOS is a painless process.  Just install the <em>sl6x</em> repository with <code>yum</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum install yum-conf-sl6x</pre></div></div>

<p>Check to ensure that you're getting updates from the new repository:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># yum repolist
repo id            repo name                                              status
sl                 Scientific Linux 6.1 - x86_64                          6,251
sl-security        Scientific Linux 6.1 - x86_64 - security updates         548
sl6x               Scientific Linux 6x - x86_64                           6,251
sl6x-security      Scientific Linux 6x - x86_64 - security updates          548
repolist: 13,598</pre></div></div>

<p><a href="http://rackerhacker.com/2011/11/23/automatically-upgrading-to-new-point-releases-of-scientific-linux/">Automatically upgrading to new point releases of Scientific Linux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/11/23/automatically-upgrading-to-new-point-releases-of-scientific-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DisplayLink USB to DVI issues in OS X Lion</title>
		<link>http://rackerhacker.com/2011/11/17/displaylink-usb-to-dvi-issues-in-os-x-lion/</link>
		<comments>http://rackerhacker.com/2011/11/17/displaylink-usb-to-dvi-issues-in-os-x-lion/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 13:38:48 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2664</guid>
		<description><![CDATA[I added a DisplayLink USB to DVI adapter to my MacBook Pro a while back and it occasionally has some issues where it won't start the display after connecting the USB cable. My logs in Console.app usually contain something like this: The IOUSBFamily is having trouble enumerating a USB device that has been plugged in. [...]<p><a href="http://rackerhacker.com/2011/11/17/displaylink-usb-to-dvi-issues-in-os-x-lion/">DisplayLink USB to DVI issues in OS X Lion</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I added a <a href="http://www.displaylink.com/">DisplayLink USB to DVI adapter</a> to my MacBook Pro a while back and it occasionally has some issues where it won't start the display after connecting the USB cable.  My logs in Console.app usually contain something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 4 of Hub at 0xfa100000)
The IOUSBFamily was not able to enumerate a device.
The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 4 of Hub at 0xfa100000)
The IOUSBFamily was not able to enumerate a device.
The IOUSBFamily is having trouble enumerating a USB device that has been plugged in.  It will keep retrying.  (Port 4 of Hub at 0xfa100000)
The IOUSBFamily gave up enumerating a USB device after 10 retries.  (Port 4 of Hub at 0xfa100000)
The IOUSBFamily was not able to enumerate a device.</pre></div></div>

<p>The solution is a bit goofy, but here's what you can do:</p>
<ol>
<li>Unplug the adapter from the USB port.</li>
<li>Disconnect the DVI cable from the DisplayLink adapter.</li>
<li>Power off the display you normally use with the adapter.</li>
<li>Connect the USB cable between your computer and the DisplayLink adapter.</li>
<li>Wait for your displays to flash (as if a new display was connected).</li>
<li>The light on your DisplayLink adapter should be on now.</li>
<li>Connect the DVI cable to the DisplayLink adapter.</li>
<li>Wait a few seconds and then power on the display connected to the adapter.</li>
</ol>
<p>If this process doesn't work, try a reboot and repeat the process once Finder finishes starting up.</p>
<p><a href="http://rackerhacker.com/2011/11/17/displaylink-usb-to-dvi-issues-in-os-x-lion/">DisplayLink USB to DVI issues in OS X Lion</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/11/17/displaylink-usb-to-dvi-issues-in-os-x-lion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Live upgrade Fedora 15 to Fedora 16 using yum</title>
		<link>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/</link>
		<comments>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 04:37:39 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[preupgrade]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[scientific linux]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2623</guid>
		<description><![CDATA[Before we get started, I really ought to drop this here: Upgrading Fedora via yum is not the recommended method. Your first choice for upgrading Fedora should be to use preupgrade. Seriously. This begs the question: When should you use another method to upgrade Fedora? What other methods are there? You have a few other [...]<p><a href="http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/">Live upgrade Fedora 15 to Fedora 16 using yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Before we get started, I really ought to drop this here:</p>
<blockquote style="color: red; font-weight: bold;"><p>Upgrading Fedora via yum is <u>not</u> the recommended method.  Your first choice for upgrading Fedora should be to use <code>preupgrade</code>.  Seriously.</p></blockquote>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/11/Logo_fedoralogo.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/11/Logo_fedoralogo-300x91.png" alt="" title="Logo_fedoralogo" width="300" height="91" class="alignright size-medium wp-image-2662" /></a>This begs the question: <em>When should you use another method to upgrade Fedora? What other methods are there?</em></p>
<p>You have a few other methods to get the upgrade done:</p>
<ul>
<li><strong>Toss in a CD or DVD:</strong> You can upgrade via the anaconda installer provided on the CD, DVD or netinstall media.  My experiences with this method for Fedora (as well as CentOS, Scientific Linux, and Red Hat) haven't been too positive, but your results may vary.</li>
<li><strong>Download the newer release's fedora-release RPM, install it with <code>rpm</code>, and <code>yum upgrade</code>:</strong> This is the really old way of doing things.  Don't try this (read the next bullet).</li>
<li><strong>Use <code>yum</code>'s distro-sync functionality:</strong> If you can't go the <code>preupgrade</code> route, I'd recommend giving this a try.  However, leave plenty of time to fix small glitches after it's done (and after your first reboot).</li>
</ul>
<p><strong>Personal anecdote time</strong> <em>(Keep scrolling for the meat and potatoes)</em><br />
I have a dedicated server at <a href="http://joesdatacenter.com/">Joe's Datacenter</a> (love those folks) with IPMI and KVM-over-LAN access.  The <code>preupgrade</code> method won't work for me because my <code>/boot</code> partition is on a software RAID volume.  There's a <a href="https://bugzilla.redhat.com/show_bug.cgi?id=504826">rat's nest of a Bugzilla ticket</a> over on Red Hat's site about this problem.  I'm really only left with a live upgrade using <code>yum</code>.</p>
<p><strong>Live <code>yum</code> upgrade process</strong><br />
Before even beginning the upgrade, I double-checked that I'd applied all of the available updates for my server.  Once that was done, I realized I was one kernel revision behind and I rebooted to ensure I was in the latest Fedora 15 kernel.</p>
<p>A good practice here is to run <code>package-cleanup --orphans</code> (it's in the <code>yum-utils</code> package) to find any packages which don't exist on any Fedora mirrors.  In my case, I had two old kernels and a JungleDisk package.  I removed the two old kernels (probably wasn't necessary) and left JungleDisk alone (it worked fine after the upgrade).  If you have any external repositories, such as Livna or RPMForge, you may want to disable those until the upgrade is done.  Should the initial upgrade checks bomb out, try adding as few repositories back in as possible to see if it clears up the problem.</p>
<p>Once you make it this far, just follow the instructions available in Fedora's documentation: <a href="http://fedoraproject.org/wiki/Upgrading_Fedora_using_yum#Fedora_15_-.3E_Fedora_16">Upgrading Fedora using yum</a>.  I set SELinux to permissive mode during the upgrade just in case it caused problems.</p>
<p>I'd recommend skipping the <code>grub2-install</code> portion since your original grub installation will still be present after the upgrade.  If your server has EFI (not BIOS), <b>don't use</b> <code>grub2</code> yet.  Keep an eye on the previously mentioned documentation page to see if the problems get ironed out between <code>grub2</code> and EFI.</p>
<p><b>Before you reboot,</b> be sure to get a list of your active processes and daemons.  After your reboot, some old SysVinit scripts will be converted into Systemd service scripts.  They might not start automatically and you might need to enable and/or start some services.</p>
<p>New to Systemd? This will be an extremely handy resource: <a href="http://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet">SysVinit to Systemd Cheatsheet</a>.</p>
<p>I haven't seen too many issues after cleaning up some daemons that didn't start properly.  There is a problem between <code>asterisk</code> and SELinux that I haven't nailed down yet but it's not a showstopper.</p>
<p>Good luck during your upgrades.  Keep in mind that Fedora 15 could be EOL'd as early as May or June 20102 when Fedora 17 is released.</p>
<p><a href="http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/">Live upgrade Fedora 15 to Fedora 16 using yum</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/11/14/live-upgrading-fedora-15-to-fedora-16-using-yum/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tracing a build through OpenStack Compute (Nova)</title>
		<link>http://rackerhacker.com/2011/11/07/tracing-a-build-through-openstack-compute-nova/</link>
		<comments>http://rackerhacker.com/2011/11/07/tracing-a-build-through-openstack-compute-nova/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 15:05:42 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[nova]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[python]]></category>

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

		<guid isPermaLink="false">http://rackerhacker.com/?p=2576</guid>
		<description><![CDATA[I've floated back and forth between graphical IRC clients and terminal-based clients for a long time. However, I was sad to see that irssi wouldn't build via MacPorts on OS X Lion. During the build, I saw quite a few errors from the compiler: -E, -S, -save-temps and -M options are not allowed with multiple [...]<p><a href="http://rackerhacker.com/2011/09/30/installing-irssi-via-macports-on-os-x-lion-10-7-1/">Installing irssi via MacPorts on OS X Lion 10.7.1</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>I've floated back and forth between graphical IRC clients and terminal-based clients for a long time.  However, I was sad to see that irssi wouldn't build via MacPorts on OS X Lion.  During the build, I saw quite a few errors from the compiler:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">-E, -S, -save-temps and -M options are not allowed with multiple -arch flags</pre></div></div>

<p>Sure enough, when I looked at the lines in the output, both x86_64 and i386 were passed to the compiler:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">... -pipe -O2 -arch x86_64 -arch i386 -fno-common ...</pre></div></div>

<p>I <a href="http://trac.macports.org/ticket/31467">opened a ticket in trac</a> and began looking for a workaround.  <a href="http://trac.macports.org/ticket/13004#comment:4">Another trac ticket</a> (from four years ago) on the MacPorts site gave some pointers on how to work around the bug for a previous version.</p>
<p>I changed up the instructions a bit since we're not dealing with the ppc architecture any longer:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">sudo port -v clean irssi +perl
sudo port -v configure irssi +perl
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_irc_irssi/irssi/work/
sudo find . -type f -exec sed -i &quot;&quot; -e &quot;s/-arch i386//g&quot; {} \;
cd
sudo port -v install irssi +perl</pre></div></div>

<p>The build worked!</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">$ irssi -v
irssi 0.8.15 (20100403 1617)</pre></div></div>

<p><a href="http://rackerhacker.com/2011/09/30/installing-irssi-via-macports-on-os-x-lion-10-7-1/">Installing irssi via MacPorts on OS X Lion 10.7.1</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/30/installing-irssi-via-macports-on-os-x-lion-10-7-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting back to using eth0 in Fedora 15</title>
		<link>http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/</link>
		<comments>http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 22:08:20 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2568</guid>
		<description><![CDATA[Fedora 15 was released with some updates to allow for consistent network device names. Once it's installed, you'll end up with network devices that are named something other than eth0, eth1, and so on. For example, all onboard ethernet adapters are labeled as emX (em1, em2...) and all PCI ethernet adapters are labeled as pXpX [...]<p><a href="http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/">Getting back to using eth0 in Fedora 15</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Fedora 15 was released with some updates to allow for <a href="http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming">consistent network device names</a>.  Once it's installed, you'll end up with network devices that are named something other than eth0, eth1, and so on.</p>
<p>For example, all onboard ethernet adapters are labeled as emX (em1, em2...) and all PCI ethernet adapters are labeled as pXpX (p[slot]p[port], like p7p1 for port 1 on slot 7).  Ethernet devices within Xen virtual machines aren't adjusted.</p>
<p>This may make sense to people who swap out the chassis on servers regularly and they don't want to mess with hard-coding MAC addresses in network configuration files.  Also, it should give users predictable names even if a running system's drives are inserted into a newer hardware revision of the same server.</p>
<p>However, I don't like this on my personal dedicated servers and I prefer to revert back to the old way of doing things.  Getting back to eth0 is pretty simple and it only requires a few configuration files to be edited followed by a reboot.</p>
<p>First, add <code>biosdevname=0</code> to your <code>grub.conf</code> on the kernel line:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">title Fedora (2.6.40.4-5.fc15.x86_64)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.40.4-5.fc15.x86_64 ro root=/dev/md0 SYSFONT=latarcyrheb-sun16 KEYTABLE=us biosdevname=0 quiet LANG=en_US.UTF-8
	initrd /boot/initramfs-2.6.40.4-5.fc15.x86_64.img</pre></div></div>

<p>Open <code>/etc/udev/rules.d/70-persistent-net.rules</code> in your favorite text editor (create it if it doesn't exist) and add in the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># Be sure to put your MAC addresses in the fields below
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:11:22:33:44:10&quot;, ATTR{dev_id}==&quot;0x0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;
SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR{address}==&quot;00:11:22:33:44:11&quot;, ATTR{dev_id}==&quot;0x0&quot;, ATTR{type}==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;</pre></div></div>

<p>Be sure to rename your <code>ifcfg-*</code> files in <code>/etc/sysconfig/network-scripts/</code> to match the device names you've assigned.  Just for good measure, I add in the MAC address in <code>/etc/sysconfig/network-scripts/ifcfg-ethX</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">...
HWADDR=00:11:22:33:44:10
...</pre></div></div>

<p>Reboot the server and you should be back to eth0 and eth1 after a reboot.</p>
<p><a href="http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/">Getting back to using eth0 in Fedora 15</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/25/getting-back-to-using-eth0-in-fedora-15/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Receive e-mail reports for SELinux AVC denials</title>
		<link>http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/</link>
		<comments>http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/#comments</comments>
		<pubDate>Fri, 16 Sep 2011 04:17:04 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[messagebus]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[systemd]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2537</guid>
		<description><![CDATA[SELinux isn't a technology that's easy to tackle for newcomers. However, there's been a lot of work to smooth out the rough edges while still keeping a tight grip on what applications and users are allowed to do on a Linux system. One of the biggest efforts has been around setroubleshoot. The purpose behind setroubleshoot [...]<p><a href="http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/">Receive e-mail reports for SELinux AVC denials</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>SELinux isn't a technology that's easy to tackle for newcomers.  However, there's been a lot of work to smooth out the rough edges while still keeping a tight grip on what applications and users are allowed to do on a Linux system.  One of the biggest efforts has been around <a href="https://fedorahosted.org/setroubleshoot/wiki/SETroubleShoot%20Overview">setroubleshoot</a>.</p>
<p>The purpose behind setroubleshoot is to let users know when access has been denied, help them resolve it if necessary, and to reduce overall frustration while working through tight security restrictions in the default SELinux policies.  The GUI frontend for setroubleshoot is great for users who run Linux desktops or those who run servers with a display attached.  Don't worry, you can configure setroubleshoot on remote servers to send alerts elsewhere when a GUI alert isn't an option.</p>
<p>Install a few packages to get started:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum install setroubleshoot{-server,-plugins,-doc}</pre></div></div>

<p>Open <code>/etc/setroubleshoot/setroubleshoot.conf</code> in your favorite text editor and adjust the <code>[email]</code> section to fit your server:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">recipients_filepath = /var/lib/setroubleshoot/email_alert_recipients
smtp_port = 25
smtp_host = localhost
from_address = selinux@myserver.com
subject = [MyServer] SELinux AVC Alert</pre></div></div>

<p>You could probably see it coming, but you need to put the e-mail addresses for your recipients into <code>/var/lib/setroubleshoot/email_alert_recipients</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">echo &quot;selinux@mycompany.com&quot; &gt;&gt; /var/lib/setroubleshoot/email_alert_recipients</pre></div></div>

<p>You'll notice that setroubleshoot doesn't have an init script and it doesn't exist in systemd in Fedora 15.  It runs through the <a href="http://en.wikipedia.org/wiki/D-Bus">dbus-daemon</a> and a quick bounce of the messagebus via its init script brings in the necessary components to run setroubleshoot:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">service messagebus restart</pre></div></div>

<p>A really easy (and safe) test is to ask sshd to bind to a non-standard port.  Simply define an additional port on in your <code>/etc/ssh/sshd_config</code> like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Port 22
Port 222</pre></div></div>

<p>When you restart sshd, it will bind to port 22 with success, but it won't be allowed to bind to port 222 (since that's blocked by SELinux as a non-standard port for the <code>ssh_port_t</code> port type).  <strong>DON'T WORRY!</strong> Your sshd server will still be listening on port 22.  If you wait a moment, you'll get an e-mail (perhaps two) that not only notify you of the denial, but they make suggestions for how to fix it:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">SELinux is preventing /usr/sbin/sshd from name_bind access on the tcp_socket port 222.
&nbsp;
*****  Plugin bind_ports (99.5 confidence) suggests  *************************
&nbsp;
If you want to allow /usr/sbin/sshd to bind to network port 222
Then you need to modify the port type.
Do
# semanage port -a -t PORT_TYPE -p tcp 222
   where PORT_TYPE is one of the following: ...</pre></div></div>

<p>For this particular example, the quick fix would be to run:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">semanage port -a -t ssh_port_t -p tcp 222</pre></div></div>

<hr />
<em><br />
Much of this post's information was gathered from the detailed documentation on <a href="http://fedoraproject.org/wiki/Docs/Drafts/SELinux/SETroubleShoot/UserFAQ">Fedora's setroubleshoot User's FAQ</a> as well as <a href="http://danwalsh.livejournal.com/20931.html">Dan Walsh's setroubleshoot blog post</a>.<br />
</em></p>
<p><a href="http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/">Receive e-mail reports for SELinux AVC denials</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/15/receive-e-mail-reports-for-selinux-avc-denials/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Getting apache, PHP, and memcached working with SELinux</title>
		<link>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/</link>
		<comments>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 03:55:00 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2516</guid>
		<description><![CDATA[I'm using SELinux more often now on my Fedora 15 installations and I came up against a peculiar issue today on a new server. My PHP installation is configured to store its sessions in memcached and I brought over some working configurations from another server. However, each time I accessed a page which tried to [...]<p><a href="http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/">Getting apache, PHP, and memcached working with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2011/09/selinux-penguin-125.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/09/selinux-penguin-125.png" alt="SELinux Penguin" title="SELinux Penguin" width="125" height="113" class="alignright size-full wp-image-2532" /></a>I'm using SELinux more often now on my Fedora 15 installations and I came up against a peculiar issue today on a new server.  My PHP installation is configured to store its sessions in memcached and I brought over some working configurations from another server.  However, each time I accessed a page which tried to initiate a session, the page load would hang for about a minute and I'd find this in my apache error logs:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[Thu Sep 08 03:23:40 2011] [error] [client 11.22.33.44] PHP Warning:  
Unknown: Failed to write session data (memcached). Please verify that 
the current setting of session.save_path is correct (127.0.0.1:11211) 
in Unknown on line 0</pre></div></div>

<p>I ran through my usual list of checks:</p>
<ul>
<li>netstat showed memcached bound to the correct ports/interfaces</li>
<li>memcached was running and I could reach it via telnet</li>
<li>memcached-tool could connect and pull stats from memcached</li>
<li>double-checked my php.ini</li>
<li>tested memcached connectivity via a PHP and ruby script -- they worked</li>
</ul>
<p>Even after all that, I still couldn't figure out what was wrong.  I ran strace on memcached while I ran a curl against the page which creates a session and I found something significant -- memcached wasn't seeing any connections whatsoever at that time.  A quick check of the lo interface with tcpdump showed the same result.  Just before I threw a chair, I remembered one thing:</p>
<p><em>SELinux.</em></p>
<p>A quick check for AVC denials showed the problem:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># aureport --avc | tail -n 1
4021. 09/08/2011 03:23:38 httpd system_u:system_r:httpd_t:s0 42 tcp_socket name_connect system_u:object_r:memcache_port_t:s0 denied 31536</pre></div></div>

<p>I'm far from being a guru on SELinux, so I leaned on audit2allow for help:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># grep memcache /var/log/audit/audit.log | audit2allow
&nbsp;
#============= httpd_t ==============
#!!!! This avc can be allowed using one of the these booleans:
#     httpd_can_network_relay, httpd_can_network_memcache, httpd_can_network_connect
&nbsp;
allow httpd_t memcache_port_t:tcp_socket name_connect;</pre></div></div>

<p>The boolean we're looking for is <code>httpd_can_network_memcache</code>. Flipping the boolean can be done in a snap:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># setsebool -P httpd_can_network_memcache 1
# getsebool httpd_can_network_memcache
httpd_can_network_memcache --&gt; on</pre></div></div>

<p>After adjusting the boolean, apache was able to make connections to memcached without a hitch.  My page which created sessions loaded quickly and I could see data being stored in memcached.  If you want to check the status of all of the apache-related SELinux booleans, just use getsebool:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># getsebool -a | grep httpd | grep off$
allow_httpd_anon_write --&gt; off
allow_httpd_mod_auth_ntlm_winbind --&gt; off
allow_httpd_mod_auth_pam --&gt; off
allow_httpd_sys_script_anon_write --&gt; off
httpd_can_check_spam --&gt; off
httpd_can_network_connect_cobbler --&gt; off
httpd_can_network_connect_db --&gt; off
httpd_can_network_relay --&gt; off
httpd_can_sendmail --&gt; off
httpd_dbus_avahi --&gt; off
httpd_enable_ftp_server --&gt; off
httpd_enable_homedirs --&gt; off
httpd_execmem --&gt; off
httpd_read_user_content --&gt; off
httpd_setrlimit --&gt; off
httpd_ssi_exec --&gt; off
httpd_tmp_exec --&gt; off
httpd_unified --&gt; off
httpd_use_cifs --&gt; off
httpd_use_gpg --&gt; off
httpd_use_nfs --&gt; off</pre></div></div>

<p>If you're interested in SELinux, a good way to get your feet wet is to head over to the CentOS Wiki and review their <a href="http://wiki.centos.org/HowTos/SELinux">SELinux Howtos</a></p>
<p><a href="http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/">Getting apache, PHP, and memcached working with SELinux</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/07/getting-apache-php-and-memcached-working-with-selinux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>You might see me on CNN Money soon</title>
		<link>http://rackerhacker.com/2011/09/02/you-might-see-me-on-cnn-money-soon/</link>
		<comments>http://rackerhacker.com/2011/09/02/you-might-see-me-on-cnn-money-soon/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 15:40:42 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[rackspace]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2503</guid>
		<description><![CDATA[A videographer from CNN Money stopped by the office today to ask about what makes Rackspace a unique place to work. As soon as we got started, everyone started to make as many distractions as they could to crack me up. Very few succeeded. Thanks to @pinojo for snapping the photo. You might see me [...]<p><a href="http://rackerhacker.com/2011/09/02/you-might-see-me-on-cnn-money-soon/">You might see me on CNN Money soon</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2011/09/cnnmoneyinterview.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2011/09/cnnmoneyinterview-300x224.jpg" alt="" title="cnnmoneyinterview" width="300" height="224" class="alignleft size-medium wp-image-2504" /></a>A videographer from CNN Money stopped by the office today to ask about what makes Rackspace a unique place to work.  As soon as we got started, everyone started to make as many distractions as they could to crack me up.  Very few succeeded. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Thanks to <a href="http://twitter.com/pinojo">@pinojo</a> for snapping the photo.<br />
<br style="clear:both;" /></p>
<p><a href="http://rackerhacker.com/2011/09/02/you-might-see-me-on-cnn-money-soon/">You might see me on CNN Money soon</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/09/02/you-might-see-me-on-cnn-money-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to write e-mails to nerds (that they will actually read)</title>
		<link>http://rackerhacker.com/2011/08/26/how-to-write-e-mails-to-nerds-that-they-will-actually-read/</link>
		<comments>http://rackerhacker.com/2011/08/26/how-to-write-e-mails-to-nerds-that-they-will-actually-read/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 13:00:06 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2469</guid>
		<description><![CDATA[Standard e-mail etiquette is pretty obvious to most of us and if you're good at it, you'll get your point across more often without stepping on toes or causing unneeded confusion. Simple things like identifying yourself well, avoiding sarcasm and adding context to statements are all extremely beneficial. However, writing e-mails to highly technical developers, [...]<p><a href="http://rackerhacker.com/2011/08/26/how-to-write-e-mails-to-nerds-that-they-will-actually-read/">How to write e-mails to nerds (that they will actually read)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Standard e-mail etiquette is pretty obvious to most of us and if you're good at it, you'll get your point across more often without stepping on toes or causing unneeded confusion.  Simple things like identifying yourself well, avoiding sarcasm and adding context to statements are all extremely beneficial.  However, writing e-mails to highly technical developers, system administrators, and engineers is a little trickier.  These types of e-mail recipients don't really enjoy handling e-mail (inbound or outbound) and most find that e-mail is just a speed bump which interrupts their productivity.</p>
<p>If you're not technical, you might be asking yourself: <em>"I need to e-mail technical people and they need to take what I say seriously?  How do I do it?"</em>  It's not impossible, but the rest of this blog post should help.</p>
<h3>Brevity is key</h3>
<p>There are some people who thrive on receiving e-mail, sending e-mail, and talking about e-mail that they've sent or received.  Most nerds don't feel this way.</p>
<p>You need to get your point across concisely and succinctly so that your e-mail is seen as less of a distraction.  Avoid adding a lot of context where it isn't needed and try to summarize business needs and processes unless details are absolutely critical.  If you need to send your e-mail to multiple recipients and some of those recipients need additional details, provide an abstract at the beginning of the e-mail.</p>
<h3>Learn the ways of TL;DR</h3>
<p>I've heard quite a few conversations like these around the office:</p>
<blockquote><p>
Nerd 1: "Did you get that e-mail from [name here]?"<br />
Nerd 2: "The six page one with four PDF files attached?"<br />
Nerd 1: "Yeah. That one."<br />
Nerd 2: "TL;DR dude, seriously. Did you read it?"<br />
Nerd 1: "Nah. I might read it later."
</p></blockquote>
<p>If someone's ever mentioned "TL;DR" (too long; didn't read) when your e-mail was mentioned, don't fret.  It's a quick fix.  Just add a quick summary to the top of your e-mail prefaced with "TL;DR".  Provide a really brief summary (bulleted lists are a plus) of your e-mail in the section and then start your e-mail right afterwards.  Here's an example:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">TL;DR
  * next software release deploys Monday
  * two bugs remaining to fix
  * we will get started at 8AM Saturday, yeaaaaah</pre></div></div>

<p><em>Missed the joke? <a href="http://en.wikipedia.org/wiki/Bill_Lumbergh">Head over to Wikipedia</a>.</em></p>
<p>If one of the summary points interests a recipient, they'll scan your e-mail for the pertinent sections.  Some recipients may only need to see what's in the summary and they won't bother reading the remainder.  Either way, the effectiveness of your e-mail increases by leaps and bounds.</p>
<h3>Plain text</h3>
<p><div id="attachment_2483" class="wp-caption alignright" style="width: 310px"><a href="http://rackerhacker.com/wp-content/uploads/2011/08/mutt-screenshots_001.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/mutt-screenshots_001-300x195.jpg" alt="" title="mutt-screenshots_001" width="300" height="195" class="size-medium wp-image-2483" /></a><p class="wp-caption-text">Users of mutt prefer plain text e-mails</p></div>If you only take away one thing from this entire post, let it be this section.  Writing e-mails in plain text is *highly recommended* if you want a technical person to take your e-mail seriously.  Many system administrators I know use <a href="http://www.mutt.org/">mutt</a>, a text-based console-only e-mail reader.  Click the thumbnail at the right and imagine what your e-mails would look like if they're full of images, stylesheets and background images.  Better yet, imagine if your entire e-mail was in an image and the e-mail itself had no text.</p>
<p>Here are a few more tips under this category:</p>
<ul>
<li>Don't use Outlook stationery.</li>
<li>Never send e-mails with an image as the e-mail itself.</li>
<li><strong>No Comic Sans at any time. Period.</strong></li>
<li>Avoid graphical e-mail signatures (more on that in a moment).</li>
</ul>
<h3>E-mail signatures</h3>
<p>Brevity can definitely be applied to e-mail signatures, too.  How many times have you seen e-mails that end like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Frank Frankelton MCSE, RHCSA, RHCE, CCNA, RHCA, LPIC-3, Ph.D., M.D., Esq., CMDBA
Systems Adminstrator Extraordinaire, Database Administrator, All-around great guy
Office: 210-555-1212
Mobile: 210-555-1213
Other Mobile: 210-555-1214
Fax: 210-555-1215
VOIP: 210-555-1216
AIM: frankeltonia
Twitter: @frankyfrank
Jabber: frankfurter@frankeltonisinthehouse.com
Big Company, Inc</pre></div></div>

<p>You might think that nobody would ever send out e-mails with a signature like the one above, but I've seen some that are actually worse.  Keep the signature short and only put in the information that people really need to know.  Generally, your name and title or department is sufficient for e-mail signatures (unless your local/federal laws require otherwise).  Always preface it with a double dash "--" on a line by itself to signify that the remainder of the e-mail is the signature.</p>
<h3>Summary</h3>
<p>Keep it simple, keep it brief, and keep it relevant.  While the suggestions above might not apply to every business or every person, following the suggestions will increase the effectiveness of your e-mails and ensure that your voice is heard on the other end.</p>
<p>I'm really interested to hear your comments.  Are there some suggestions you have that I missed in the post?  Did I make some suggestions which didn't make sense or don't apply to you?  Let me know!</p>
<p><a href="http://rackerhacker.com/2011/08/26/how-to-write-e-mails-to-nerds-that-they-will-actually-read/">How to write e-mails to nerds (that they will actually read)</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/08/26/how-to-write-e-mails-to-nerds-that-they-will-actually-read/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Contest winners from the &quot;Inspire a sysadmin&quot; contest</title>
		<link>http://rackerhacker.com/2011/08/22/contest-winners-from-the-inspire-a-sysadmin-contest/</link>
		<comments>http://rackerhacker.com/2011/08/22/contest-winners-from-the-inspire-a-sysadmin-contest/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 12:43:53 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[general advice]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2442</guid>
		<description><![CDATA[Before I get started, I'd like to give a big thanks to all of the visitors who dropped by and participated in the contest last week. Also, thanks to ThinkGeek for offering to pay for (and double) one of the prizes! Here are the list of winners: Grand Prize ($50 at ThinkGeek): Dan Udey Runners-Up [...]<p><a href="http://rackerhacker.com/2011/08/22/contest-winners-from-the-inspire-a-sysadmin-contest/">Contest winners from the "Inspire a sysadmin" contest</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>Before I get started, I'd like to give a big thanks to all of the visitors who dropped by and <a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/">participated in the contest</a> last week.  Also, thanks to <a href="http://thinkgeek.com/">ThinkGeek</a> for offering to pay for (and double) one of the prizes!</p>
<p>Here are the list of winners:</p>
<ul>
<li>Grand Prize ($50 at ThinkGeek): <strong>Dan Udey</strong></li>
<li>Runners-Up ($25 at ThinkGeek): <strong>Joe Wright, Susan Price, and Giovanni Tirloni</strong></li>
</ul>
<p><a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/#comment-23915">Dan's comment rang true</a> with me since much of a sysadmin's job involves responding to crises regardless of how much planning you put forth:</p>
<blockquote><p>Keep a cool head. Focus. Work methodically. Figure out what to do and get it done, and people will remember you as the person who performs under pressure. Once you can do that, you're a sysadmin.</p></blockquote>
<p><a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/#comment-23911">Joe touched on a critical point</a> about system administration:</p>
<blockquote><p>Tell the truth. If you break something, 'fess up and fix it. If you don't know how to do something, admit it and learn how to do the task. Create your own culture of honesty on the job; others will respect and follow your example.</p></blockquote>
<p><a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/#comment-23921">Susan offered some inspiration</a> for system administrators stuck in frustrating situations:</p>
<blockquote><p>I know, I know - dumb users, RTFM. Believe me, I've been there. In fact - one of your strategies should be to establish a trusted community where you can VENT about these issues, and get support for yourself. Ask for answers when you don't know them. Restock on the compassion and patience.</p></blockquote>
<p><a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/#comment-23907">Giovanni talked about the basics</a> and what every system administrator should know to get started in a career.  We probably take this for granted, but this is critical to keep in mind:</p>
<blockquote><p>If you are starting in the system administration area, don't praise yourself only because you (blindly?) fixed an issue or helped that friend with his/her server. Ask yourself: Why what I did fixed the issue? Why that was happening in the first place? And more importantly, how to avoid it for all eternity? You won't but it doesn't hurt to aim high.</p></blockquote>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/08/giftcert-preview.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/giftcert-preview.png" alt="ThinkGeek Gift Certificate" title="ThinkGeek Gift Certificate" width="186" height="120" class="alignleft size-full wp-image-2430" /></a>Even though it isn't a runner-up, <a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/#comment-23919">Paul's comment</a> certainly deserves an honorable mention.  His comment is actually a true story (with a slight amount of embellishment, of course) and it serves as a reminder that system administrators and developers must stand up for their beliefs even if it goes against the beliefs of their superiors.  If your managers don't value the feedback, it might be a sign that a career change is in order.</p>
<p>Once again, <strong>a big thanks</strong> goes out to everyone who submitted a comment.  I'll reach out to the winners today and get the gift certificates sent out to them.</p>
<p><a href="http://rackerhacker.com/2011/08/22/contest-winners-from-the-inspire-a-sysadmin-contest/">Contest winners from the "Inspire a sysadmin" contest</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/08/22/contest-winners-from-the-inspire-a-sysadmin-contest/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inspire a sysadmin, get a ThinkGeek gift certificate</title>
		<link>http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/</link>
		<comments>http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 12:36:52 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2418</guid>
		<description><![CDATA[UPDATE: THE STAKES ARE RAISED! Check the end of this post for details. Today is my birthday and I'm doing things in reverse -- you are getting gifts today. I'm giving away four $25 gift certificates to ThinkGeek today (yep, that's $100 out of my pocket) but you'll have to do something to earn them. [...]<p><a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/">Inspire a sysadmin, get a ThinkGeek gift certificate</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><strong style="color: red">UPDATE: THE STAKES ARE RAISED!</strong> Check the end of this post for details.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/08/giftcert-preview.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/giftcert-preview.png" alt="ThinkGeek Gift Certificate" title="ThinkGeek Gift Certificate" width="186" height="120" class="alignright size-full wp-image-2430" /></a>Today is my birthday and I'm doing things in reverse -- you are getting gifts today.  I'm giving away four $25 gift certificates to <a href="http://www.thinkgeek.com/">ThinkGeek</a> today (yep, that's $100 out of my pocket) but you'll have to do something to earn them.</p>
<p>I'm looking for words of wisdom and guidance from the readers of my blog for system administrators who are just getting started.  I talk to brand new sysadmins and college graduates regularly and they're all hungry for what the seasoned folks in the industry know.  They're not specifically on the hunt for hard facts and how-to's; they're looking for guidance on how to gain experience, reduce errors and learn efficiently.</p>
<p>Let's get to the important stuff: <strong>How does this contest work?</strong></p>
<ul>
<li><strong>Write a comment.</strong>  Put an inspirational story, anecdote, or random words of wisdom for system administrators who are new to the industry in a comment on this post.  Although it doesn't have to be extraordinarily lengthy, try to write more than just a sentence or two.</li>
<li><strong>Give me a way to contact you.</strong>  Add something to your comment so I can contact you if you're the winner.</li>
<li><strong>Do it soon.</strong>  The contest ends at <a href="http://www.timeanddate.com/worldclock/fixedtime.html?iso=20110817T2359&#038;p1=400">11:59PM CDT tonight</a>.</li>
</ul>
<p>I'll be the judge of the comments and I'm going to choose the winners based on the content of the comment.  The more <a href="http://dictionary.reference.com/browse/inspiration">inspirational</a> and <a href="http://dictionary.reference.com/browse/profound">profound</a> your comment is, the better chance you have of winning.  Any comment written in <a href="http://cache.ohinternet.com/images/f/fa/HAPPYCAT_I_CAN_HAS_CHEEZBURGER.JPG">LOLCats caption style</a> will lose points immediately. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><em>One last thing: This contest isn't affiliated with my employer or ThinkGeek.  I'm doing this on my own.  However, I'm a big fan of both my employer and ThinkGeek, but that's irrelevant right now.</em></p>
<hr />
<strong>UPDATE:</strong> The folks at ThinkGeek decided to not only pay for one of the gift certificates, but they're going to <em>double</em> it.  There's now a $50 certificate for the best entry and three more $25 certificates for second, third and fourth best entries.  Thanks again to ThinkGeek for offering this up!</p>
<hr />
<strong>UPDATE:</strong> <a href="/2011/08/22/contest-winners-from-the-inspire-a-sysadmin-contest/">The winners have been announced!</a></p>
<p><a href="http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/">Inspire a sysadmin, get a ThinkGeek gift certificate</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/08/17/inspire-a-sysadmin-get-a-thinkgeek-gift-certificate/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Highlight IP addresses with a double click in Firefox</title>
		<link>http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/</link>
		<comments>http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 12:46:07 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2409</guid>
		<description><![CDATA[My daily work involves working with a large number of servers and one of my frustrations with Firefox is that it's not possible to select an entire IP address with a double click with the default settings. Although it works right out of the box with Safari, you have to make a configuration adjustment in [...]<p><a href="http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/">Highlight IP addresses with a double click in Firefox</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>My daily work involves working with a large number of servers and one of my frustrations with Firefox is that it's not possible to select an entire IP address with a double click with the default settings.  Although it works right out of the box with Safari, you have to make a configuration adjustment in Firefox to get the same behavior.</p>
<p>To change the setting in Firefox, open up a new Firefox tab and go to <code>about:config</code> in the browser.  Paste <code>word_select.stop</code> in the search bar that appears below your tab bar and double click the <code>layout.word_select.stop_at_punctuation</code> line.  It should become bold and the value on the end will flip from true to false.</p>
<p>Go back to another tab and <a href="http://icanhazip.com/">open a web page which displays an IP address</a>.  Double click on any portion of the IP address and Firefox should highlight the entire address.</p>
<p><a href="http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/">Highlight IP addresses with a double click in Firefox</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/08/16/highlight-ip-addresses-with-a-double-click-in-firefox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Xen Summit 2011: My Takeways</title>
		<link>http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/</link>
		<comments>http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 12:58:54 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[glusterfs]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2391</guid>
		<description><![CDATA[Quite a few people who couldn't make it to Xen Summit 2011 this year asked me to write a post summarizing my takeaways from the event. I'm not generally one to back down from peer pressure, so read on if you're interested about the discussions at this year's Summit. The feeling I had at last [...]<p><a href="http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/">Xen Summit 2011: My Takeways</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://rackerhacker.com/wp-content/uploads/2011/08/xensummit_na11_small.png"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/xensummit_na11_small-300x81.png" alt="Xen Summit 2011 Logo" title="Xen Summit 2011 Logo" width="300" height="81" class="alignright size-medium wp-image-2396" /></a>Quite a few people who couldn't make it to <a href="http://xen.org/community/xensummit.html">Xen Summit 2011</a> this year asked me to write a post summarizing my takeaways from the event.  I'm not generally one to back down from peer pressure, so read on if you're interested about the discussions at this year's Summit.</p>
<p>The feeling I had at last year's summit is that Xen was on the verge of losing traction in the market.  Very few distributions still had Xen support going forward and much of the discussion was around the lack of dom0 support in upstream Linux kernels.  Distribution vendors were hesitant to drag patches forward into modern kernels and this made it much more difficult to get Xen working for many people.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/08/Photo-Aug-01-5-54-05-PM.jpeg"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/Photo-Aug-01-5-54-05-PM-224x300.jpg" alt="Major at the Golden Gate Bridge" title="Major at the Golden Gate Bridge" width="224" height="300" class="alignleft size-medium wp-image-2404" /></a>This year was quite different.  The number of attendees was up, the <a href="http://www.citrix.com/tv/#videos/4386">venue was much better</a>, and there was an obvious buzz of energy in the room.  As many of the presenters noted, this excitement stemmed from the <a href="http://blog.xen.org/index.php/2011/06/14/linux-3-0-how-did-we-get-initial-domain-dom0-support-there/">upstream dom0 support in Linux 3.0</a>.  This inclusion is a huge win and it helps to drive Xen forward since the developers don't have to worry about dragging patches forward.  They can focus on improving performance, adding features, and tightening security.</p>
<p>Many of the discussions this year focused on security and performance.  Ian Pratt discussed Xen's ability to view memory pages of virtual machines via an API to detect malware running inside the instance.  Memory pages could be identified and marked as not executable or applications could be triggered when a VM attempts to touch a particular memory page.  Also, the whole VM could be frozen if needed.</p>
<p>There's also a big push to bring code out of the dom0 and push it into utility VM's.  Driver domains could manage the network or I/O infrastructure and this would further reduce the amount of privileged code actively running in dom0.  There is already very little code required for the Xen hypervisor itself (much much less than the Linux kernel -- I'm looking at you, <a href="http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine">KVM</a>) and this reduces the attack surface for potential compromises of the hypervisor.  Some projects even aim to restart driver domains multiple times per minute to ensure that any malicious code injected into those virtual machines can't exist for long periods.</p>
<p>Pradeep Vincent from <a href="http://aws.amazon.com/">Amazon</a> talked about how Amazon uses Xen and the pain points they have with its current architecture.  Much of his discussion was around scaling problems (and we see many of the same issues at <a href="http://www.rackspace.com">Rackspace</a>).  Higher performance could easily be gained by multi-threaded operations in dom0 when attaching block devices and creating virtual network interfaces.  He also saw some areas for performance gains in the pvops I/O code.</p>
<p>Quite a few of the talks centered on the ARM architecture and what Xen is able to do on those systems after <a href="http://www.xen.org/products/xen_arm.html">Samsung published their port in 2008</a>.  HVM is on the way for ARM and it might even show up in Xen 4.2.  Some demos of Xen on mobile phones from Samsung were amazing.  They showed how an attacker could compromise the web browser on the phone with a keylogger, but that application was running in a VM.  Once the user switched back to the phone's main menu, the keylogger couldn't access the keystrokes any longer.  After that, a simple close of the browser killed the VM and destroyed the malicious code.</p>
<p>Xen 4.2 should be available in early 2012 and the feature list is staggering.  Improvements to libxenlight, pvops performance (even in HVM), and guest memory sharing should be available with the new release.  Nested virtualization (run a hypervisor inside a hypervisor) is also coming in Xen 4.2 and I'm sure Xzibit will be a huge fan.  This should streamline hypervisor testing, allow for embedded hypervisor options and extend the capabilities of client hypervisors.  Remus should be available in 4.2 as well, but it might be marked as experimental.  OVMF will be added as a BIOS option for UEFI (along with the standard SeaBIOS) and this should allow for Mac OS X guests.  UEFI allows Windows to boot faster since it switches to PV mode sooner and it allows for simpler platform certification for software vendors.</p>
<p><a href="http://rackerhacker.com/wp-content/uploads/2011/08/OpenStackLogo_270x279.jpg"><img src="http://rackerhacker.com/wp-content/uploads/2011/08/OpenStackLogo_270x279.jpg" alt="" title="OpenStackLogo_270x279" width="180" height="195" class="alignright size-full wp-image-2399" /></a>Mike McClurg's presentation on <a href="http://www.xen.org/products/cloudxen.html">XCP</a> was pretty important to me since Rackspace is a big consumer of <a href="http://www.citrix.com/English/ps2/products/product.asp?contentID=683148">XenServer</a>.  If you're not familiar with XCP, it's basically open-source XenServer which runs on bleeding edge (and sometimes unstable) components.  XCP 1.5 and XenServer 6 should be available in November with Xen 4.1 and Linux 2.6.32.  GPU passthrough, up to 1TB RAM, and disaster recovery will be available.  Another goal for the XCP team is to work closely with OpenStack via Project Olympus.  Mike's vision is to have XCP become the configuration of choice for open source clouds.  <a href="http://blog.xen.org/index.php/2011/07/22/project-kronos/">Project Kronos</a> was also extremely interesting.  It's essentially XCP's XenAPI stack running on Debian and Ubuntu.  You'd be able to install either OS on a physical server and run XCP's services on it for a fully OSS hypervisor.</p>
<p>Konrad Wilk gave an update on Linux pvops and it appears there is a shift to get Xen working well on a desktop.  This includes 3D graphics support, S3/hibernate capabilities and various bug fixes.  There's also a push to get PV functionality into HVM and get HVM functionality into PV.  Driver/device domains were discussed again in Patrick Kolp's talk and he had plenty of graphs showing performance changes when regularly restarting device domains.  The performance dips were almost negligible with 10 second restarts and the security gains were significant.</p>
<p>There were several other great presentations on other topics like <a href="http://www.gluster.org/">GlusterFS</a>, <a href="http://nova.openstack.org/">OpenStack Nova</a>, and <a href="http://cgit.freedesktop.org/~ewalsh/linpicker/">Linpicker</a> (from the NSA!).  If these types of things interests you, keep your eyes peeled for Xen Summit 2012 next year.  The <a href="http://weatherspark.com/#!dashboard;q=santa+clara,+ca">weather in the bay area</a> is well worth the trip. <img src='http://rackerhacker.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/">Xen Summit 2011: My Takeways</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/08/08/xen-summit-2011-my-takeways/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Xen 4.1 on Fedora 15 with Linux 3.0</title>
		<link>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/</link>
		<comments>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 04:34:06 +0000</pubDate>
		<dc:creator>Major Hayden</dc:creator>
				<category><![CDATA[Blog Posts]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://rackerhacker.com/?p=2367</guid>
		<description><![CDATA[If you haven't noticed already, full Xen dom0 support was added in the Linux 3.0 kernel. This means there's no longer a need to drag patches forward from old kernels and work from special branches and git repositories when building a kernel for dom0. Something else you might not have noticed is that the Fedora [...]<p><a href="http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/">Xen 4.1 on Fedora 15 with Linux 3.0</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></description>
			<content:encoded><![CDATA[<p>If you haven't noticed already, <a href="http://blog.xen.org/index.php/2011/06/02/xen-celebrates-full-dom0-and-domu-support-in-linux-3-0/">full Xen dom0 support</a> was added in the <a href="http://kernelnewbies.org/Linux_3.0">Linux 3.0 kernel</a>.  This means there's no longer a need to drag patches forward from old kernels and work from special branches and git repositories when building a kernel for <a href="http://wiki.xensource.com/xenwiki/Dom0">dom0</a>.</p>
<p>Something else you might not have noticed is that the Fedora kernel team has <a href="https://admin.fedoraproject.org/updates/kernel-2.6.40-4.fc15">quietly slipped Linux 3.0</a> into Fedora 15's update channels in disguise.  Click that link, scroll down, and you'll see <em>"Rebase to 3.0. Version reports as 2.6.40 for compatibility with older userspace."</em>  Although I'm not a fan of calling something what it isn't (2.6.40 doesn't exist on kernel.org), I can understand some of the reasoning behind the choice.</p>
<p>This change makes the Xen installation on Fedora 15 pretty trivial.  To get started, update your kernel to the latest if you're not already on Fedora's 2.6.40 kernels:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y upgrade kernel</pre></div></div>

<p>We need three more packages (quite a few dependencies will roll in with them):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">yum -y install xen libvirt python-virtinst</pre></div></div>

<p>The xen package reels in the hypervisor itself along with libraries and command line tools (like xl and xm).  Libvirt gives us easy access to VM management with the <code>virsh</code> command and python-virtinst gives us the handy <code>virt-install</code> command to make OS installations easy.</p>
<p>Once those packages are installed, we need to make some adjustments in your grub configuration.  Open <code>/boot/grub/menu.lst</code> in your text editor of choice and add something like this at the bottom:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">title Fedora + Xen (2.6.40-4.fc15.x86_64)
        root (hd0,1)
	kernel /boot/xen.gz
        module /boot/vmlinuz-2.6.40-4.fc15.x86_64 ro root=/dev/sda1
        module /boot/initramfs-2.6.40-4.fc15.x86_64.img</pre></div></div>

<p>Ensure that the <code>root (hd0,1)</code> is applicable to your system (adjust it if it isn't).  Also, check the kernel version to ensure it matches your installed kernel and adjust the <code>root=</code> portion to match your root volume.  Flip the <code>default</code> line to a value which will boot your new grub entry and ensure the timeout is set to a reasonable number if you need to temporarily switch back to your original grub entry at boot time.  (Hey, we all make mistakes.)</p>
<p>I take one extra precaution and change the <code>UPDATEDEFAULT=yes</code> line to <code>no</code> in <code>/etc/sysconfig/kernel</code>.  This ensures that future kernel updates don't trample the entry you've just made.  Keep in mind that you'll need to manually update your grub configuration when you do kernel upgrades later.</p>
<p>Cross your fingers and reboot.  If your system doesn't reboot properly, reboot it again and choose your old kernel from the grub menu.  Double-check your configuration for fat-fingering and give it another try.  If your system boots and pings but you have no output via a monitor, don't fret.  There's a <a href="http://marc.info/?l=linux-kernel&#038;m=131169794026271&#038;w=2">patch</a> for the problem which <a href="http://marc.info/?l=linux-kernel&#038;m=131169794026271&#038;w=2">should appear soon</a> in Linux 3.0.  The impatient can snag a kernel source RPM, add the patch file, and <a href="http://fedoraproject.org/wiki/Building_a_custom_kernel">build a local kernel</a> (or you can <a href="http://majorhayden.com/RPMS/kernel-3.0.0-1.mhayden.fc16/">download my local build</a> from when I did it).</p>
<p>Log in and verify that you booted into the dom0:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">[root@xenbox ~]# xm dmesg | head -n 5
 __  __            _  _    _   _   ____     __      _ ____  
 \ \/ /___ _ __   | || |  / | / | |___ \   / _| ___/ | ___| 
  \  // _ \ '_ \  | || |_ | | | |__ __) | | |_ / __| |___ \ 
  /  \  __/ | | | |__   _|| |_| |__/ __/ _|  _| (__| |___) |
 /_/\_\___|_| |_|    |_|(_)_(_)_| |_____(_)_|  \___|_|____/</pre></div></div>

<p>Once you're done with that, make sure libvirtd is running:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">/etc/init.d/libvirtd start; chkconfig libvirtd on</pre></div></div>

<p>Try installing a VM:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">virt-install \
  --paravirt \
  --name=testvm \
  --ram=512 \
  --vcpus=4 \
  --file /dev/vmstorage/testvm \
  --graphics vnc,port=5905 --noautoconsole \
  --autostart --noreboot \
  --location=http://mirrors.kernel.org/debian/dists/squeeze/main/installer-amd64/</pre></div></div>

<p>You should have a VM installation underway pretty quickly and it will be visible via port 5905 on the local host.  Enjoy the power and freedom of your brand new <a href="http://en.wikipedia.org/wiki/Hypervisor#Classification">type 1 hypervisor</a>.</p>
<p><a href="http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/">Xen 4.1 on Fedora 15 with Linux 3.0</a> is a post from: Major Hayden's <a href="http://rackerhacker.com">Racker Hacker</a> blog. 
<p>Thanks for following the blog via the RSS feed. Please don't copy my posts or quote portions of them without attribution.</p></p>
]]></content:encoded>
			<wfw:commentRss>http://rackerhacker.com/2011/08/05/xen-4-1-on-fedora-15-with-linux-3-0/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

