{"id":36,"date":"2011-02-23T14:53:06","date_gmt":"2011-02-23T18:53:06","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/mypain\/?p=36"},"modified":"2011-06-08T15:00:22","modified_gmt":"2011-06-08T19:00:22","slug":"autofs-annoyances-with-ubuntu-lucid-10-04","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/mypain\/2011\/02\/23\/autofs-annoyances-with-ubuntu-lucid-10-04\/","title":{"rendered":"autofs annoyances with ubuntu lucid (10.04)"},"content":{"rendered":"<p>Like a lot of admins that run ubuntu, we decided to update many of our machines to ubuntu&#8217;s next LTS release, lucid lynx, aka ubuntu 10.04.\u00a0 We dont run a huge shop here, we have under 100 machines, a significant percentage of which are VMs, but repeatedly fixing bugs does still annoy me.\u00a0 One of the bugs present in lucid is particularly annoying because it affects how autofs starts at boot.\u00a0 Services have dependencies, and its complicated to sort them out &#8211; I get that &#8211; but come on ubuntu, dependencies are not a new development and sorting them out should be easy enough for a bunch of smart developers.<\/p>\n<p>The specifics are this:<\/p>\n<p>1. Lucid switched to upstart.\u00a0 To put it succinctly: &#8220;upstart is a replacement for the \/sbin\/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.&#8221;<\/p>\n<p>2. Upstart does not like autofs.<\/p>\n<p>Not to rant too much, but if you are going to replace init, please do it with something that does not require that every person installing various packages has to do the hacks I am about to point out.<\/p>\n<p>Thankfully, there are a bunch of smart, technical people that run ubuntu systems.\u00a0 On top of that, when things go wrong they complain and post <a title=\"autofs bug at ubuntu support\" href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/autofs\/+bug\/573919\" target=\"_blank\">bug reports<\/a>.\u00a0 After some quick searching I thought I had fixed the bug.\u00a0 That was until upstart was updated a couple of weeks back and the boot problems started again with autofs.<\/p>\n<p>The solution is similar to the one I originally implemented, per the suggestion of <a title=\"autofs bug at ubuntu support\" href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/autofs\/+bug\/573919\/comments\/15\" target=\"_blank\">comment #15<\/a>, but it works past the update that had broken autofs again.\u00a0 In the \/etc\/init directory edit the autofs.conf file and add the following stanza directly after the pre-start script line.<\/p>\n<p><code>statd_status=`status statd| cut -d, -f1`<br \/>\nwhile [ \"$statd_status\"\u00a0!= \"statd start\/running\" ]; do<br \/>\nsleep 5<br \/>\nstart statd<br \/>\nlet i++; statd_status=`status statd| cut -d, -f1`<br \/>\nif [ $i -gt 10 ]; then<br \/>\necho \"statd startup failed\"<br \/>\nfi<br \/>\ndone<\/code><\/p>\n<p>Once this is in you should be able to (re)start autofs.\u00a0 Next time the machine is rebooted, autofs will have been started automatically.\u00a0 Essentially this is the same hack as the one in the aforementioned comment, with the exception that the while loop causes the script to <em>wait<\/em> until it sees statd has successfully started.<\/p>\n<p>Ok, back to finding more annoying things.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Like a lot of admins that run ubuntu, we decided to update many of our machines to ubuntu&#8217;s next LTS release, lucid lynx, aka ubuntu 10.04.\u00a0 We dont run a huge shop here, we have under 100 machines, a significant percentage of which are VMs, but repeatedly fixing bugs does still annoy me.\u00a0 One of [&hellip;]<\/p>\n","protected":false},"author":758,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[19262,1855,1100,1835],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-autofs","category-configs","category-linux","category-ubuntu","post-preview"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/users\/758"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":6,"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":43,"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/posts\/36\/revisions\/43"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/mypain\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}