Disabling Bluetooth Assistant and app relaunch in 10.7 via Puppet

>> Monday, February 25, 2013

Intermittent test failures are very annoying. The create noise that cause people to question the test results - is it real data or just noise?

Image ©misspixels, http://www.flickr.com/photos/misspixels/8480711076/in/photostream/ under Creative Commons by-nc-sa 2.0
Recently, we were hit by intermittent mochitest failures on our Lion Talos boxes.  The issues causing this were two fold:
1) Despite Bluetooth being disabled, the Bluetooth setup assistant would randomly start and take focus away from running tests.
2) Our talos boxes reboot and repuppetize after a test job has completed.  However, on 10.7, the default is to relaunch apps that were running before reboot.  Thus, if an app crashed, it would be restarted upon reboot and again interfere with tests.

If this was just a machine on your desktop, you could disable the preferences in the the UI.  However, since we manage our infrastructure via Puppet, I needed a command line way to implement this preference change and update our 80+ Lion test machines automatically.

To disable setup assistant for Bluetooth mouse and keyboard
 defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekPointingDevice -bool false
 defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekKeyboard -bool false 
To disable apps from restarting upon reboot
 defaults write /Library/Preferences/com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false

Note: the disabling the apps from restarting doesn't uncheck the preference in the UI, but it does work.

Having spent many years as a Linux sysadmin,  I find the way that Apple manages preferences within their operating systems non-intuitive and generally poorly documented.  In any case, it took me quite a bit of digging to find the correct defaults incantation, so I thought I'd blog about it in case others had the same problem :-)

Bug 843545 Intermittent OSX 10.7 mochitest failures that seem related to Bluetooth Setup Assistant crashing
Bug 743594 Stop 10.7 from restoring apps after a restart


Reminder: Releng 2013 submission deadline is February 7

>> Tuesday, February 05, 2013

Just a friendly reminder that Feb 7 is the deadline to submit talk abstracts and papers to the Releng 2013 workshop.  It will be held on May 20 in San Francisco, in conjunction with the ICSE conference.

Are you involved in release engineering, release management or continuous deployment? Have you recently migrated a code repository to Git and implemented new branching strategies? Did your team implement amazing new automation to package and sign the binaries you deliver to customers?  Are you an academic looking for new problems to research and connect with practitioners in the field? Are you a maintainer for a continuous integration system or write a new build system? Did you manage to ship on time despite the fact that one file changed on a Friday afternoon and broke everything? If so, you have a story to share at this conference :-)

We have two fantastic keynote speakers lined up - John O'Duinn, director of release engineering at Mozilla, and Alan Grosskurth, who recently started working as a release engineering consultant after several years at VMWare.

If you have any questions regarding the submission process or the conference in general, please feel free to drop me a line (I'm kmoir and I work at mozilla dot com).  See you in San Francisco!


  © Blogger template Simple n' Sweet by Ourblogtemplates.com 2009

Back to TOP