Planet Linux Australia

Syndicate content
Planet Linux Australia - http://planet.linux.org.au
Updated: 1 hour 29 min ago

Ben Leslie: More GoogleMaps fun.

Mon, 2014-08-25 01:26
I've updated my google maps interface again.



There is a new tool "Handy Places" which gets a bunch of different map views from a backend database and gives you easy access to them. Of course I still need allow people to add their own bookmarks here, but that should be doable soon.



Length finder has some rudimentry UI for saving stuff, but this doesn't actually work yet :). Otherwise I still think its the best length finder available for google maps at the moment.



Current Place has been updated to correctly give you an idea of the size of the earth you are currently looking at. The coolest thing is seeing how the map gets distorted as you get closer to the poles.

Trent Lloyd: Round-up of options for disabling Mac OS X Lion's feature of auto-restoring windows

Mon, 2014-08-25 01:25

As part of the "Back to the Mac" theme in OS X Lion (10.7) by Apple, they have taken what they have learnt from user interfaces and experience on iOS devices such as the iPhone and iPad, and tried to bring some of those concepts home to the full fledged Mac experience.





There are many changes in relation to this but one of those most noticeable, and sometimes annoying, features -- is that applications will now often restore the documents and windows you had open when you last closed them. Not only that, your entire desktop will re-open to every application and document you were last using.





While this is sometimes useful, it can also be very annoying. For myself, the most common application this bugs me with is Preview. I am quite used to building up a pile of documents in preview, only to quit it to clear them out so that next time I start them, the build-up is gone. This is also happening with Google Chrome and TextEdit.





Fortunately, there are some solutions at hand! There are two main options;





Close all windows in an application once-off

If you use the option key when selecting the application menu, you will note most applications gain a "and Close all windows" suffix on the quit item. This will quit the application and not remember the open windows.



Additionally you can simple use Apple-Option-Q as a single keyboard shortcut to close an application including all of it's windows.





Disable the feature entirely

You can wholesale disable the feature, so that no application will re-open windows and so that your desktop won't re-open applications. This is a fairly simple toggle.







  1. Select the Apple menu, then move halfway down to "System Preferences" and select it.


  2. Select the "Show All" button from the top menu bar


  3. Select the very first icon under the "Personal" category, "General"


  4. Look towards the bottom and select the option "Restore windows when quitting and re-opening apps"








Disable the behaviour on a per application basis.

It can be done manually with "defaults write" in many cases, however a free application RestoreMeNot has been developed and released which automates this behavior.



It's a free download and allows you to exclude specific applications from this behavior, in my case Preview was first cab off the rank.

Trent Lloyd: Watch out for hostname changes when using replication!

Mon, 2014-08-25 01:25
Cross-post from my blog at sun



For one reason or another, many times we find ourselves changing the hostname of a machine. It's been repurposed or moved - or perhaps the original installer didn't know what name it should have. To achieve this on most modern Linux distributions there are 2 key files you need to update.





  1. /etc/hostname needs to be updated with correct hostname to be set on boot, and


  2. /etc/hosts needs to be updated for DNS lookups of the local hostname. This is more important than you might think and will break many applications if not updated.






Some people also take the third step of updating the hostname on the fly with the 'hostname' tool, which if you do that means the gotcha I'm about to describe take you completely unaware in some weeks or months.



If you are using MySQL replication, there are two key options which depend on the hostname. These are the 'log-bin' and 'relay-log' for the binary log and binary log replication log paths respectively. The problem is not only do the logs themselves depend on the hostname, so does the index which tells you where to find them. So if you restart the server, it will look for a new index file and won't find it - causing errors such as:



090825 17:17:15 [ERROR] Failed to open the relay log './mellie-relay-bin.000002' (relay_log_pos 339)

090825 17:17:15 [ERROR] Could not find target log during relay log initialization



There are several possible solutions to this, one involves combining the old and new files (which you can find documented here - but that's a more pro-active approach. The second is to completely restart the replication process - which in my opinion, is cleaner. So I will detail that approach.



First we need to stop the slave process, just to make sure.



mysql> STOP SLAVE;



Then we can get the slave status, to see what position the master is currently. You can see what that looks like here. The important values to note are the following two:



mysql> SHOW SLAVE STATUS\G

*************************** 1. row ***************************

Master_Host: localhost

Master_User: root

Master_Port: 3306

Relay_Master_Log_File: gbichot-bin.005

Exec_Master_Log_Pos: 79





These values tell us what the current position in the master's binary logs the slave has executed up to as well as the basic master details. The reason this is important is we are going to tell the slave to completely forget about it's current replication information and fetch the data fresh.



While normally you could just change the master log file and position, since it can't open the relay log at all - the slave replication does not start and we must completely reset and specify all of the details again. The above information contains everything you need except the password for the replication user. You can find that by reading either the 'master.info' file or by prior knowledge.



ERROR 1201 (HY000): Could not initialize master info structure; more error messages can be found in the MySQL error log



To reset that, we run RESET SLAVE like so:



mysql> RESET SLAVE;



Then we run we need to construct a CHANGE MASTER statement with the above information.



In our case the statement is

mysql> RESET SLAVE;

mysql> CHANGE MASTER TO MASTER_HOST="localhost", MASTER_USER="root", MASTER_PASSWORD="test", MASTER_LOG_FILE="gbichot-bin.005", MASTER_LOG_POS=79;

... but be sure to use your own values from the SLAVE STATUS and make sure the log and position are from Relay_Master_Log_File and Exec_Master_Log_Pos - there are other values that look similar so don't confuse them. Once this is done we can start the slave, and check the status to make sure it is replicating correctly.



mysql> START SLAVE;

*wait a few moments*

mysql> SHOW SLAVE STATUS\G



When the slave status is displayed, make sure that both the IO and SQL threads are running and there are no errors.





mysql> SHOW SLAVE STATUS\G

*************************** 1. row ***************************

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

Seconds_Behind_Master: 8



Also keep an eye on the Seconds_Behind_Master value and make sure that it is reducing to 0.





That's this weeks situation. If you do change your hostname, it pays to reboot your machine to make sure everything has worked and that issues will not pop up down the track when your machine is unexpectedly rebooted by a crash or some other circumstance. You don't need unexpected changes causing problems!



This applies to any situation where you might change a configuration file, but making it's effects current are done separately. This is very common in MySQL, where you might want to change a dynamic variable and also edit the my.cnf file. If you make a syntax error, you won't know until your server reboots. So it helps to be very careful and preferably do the actual MySQL or server reboot.

Trent Lloyd: Checking ldirectord is alive

Mon, 2014-08-25 01:25
This week's blog post is not strictly to do with MySQL, but a little more to do with highly available clusters using heartbeat and ldirectord



While many people use heartbeat with MySQL, ldirectord usage is less common in these scenarios and more often using in clustered web and mail servers. It is however sometimes used with a selection of MySQL slave servers.



ldirectord is a tool that manages IPVS in the kernel. Essentially you give it a list of servers that act as a "cluster" for a service, for example, 2 web servers. It will then setup the linux load balancer IPVS to direct to these 2 machines. However, what it does is keeps monitoring the servers, and if one of them goes away, it removes them from the cluster pool.



The problem I have run into a number of times, is that ldirectord gets stuck and stops monitoring services. However when it does this, then services stop getting updated, and if a service goes down, it won't be removed from the cluster. On top of that, I have had it get stuck on START UP, after a failover, in this case not many of the services had a chance to come up yet, and you are stuck with a cluster often with 0 nodes available to service some requests - which causes downtime.



So last night, Shane Short and myself wrote a patch to ldirectord and a nagios plugin, in order to make sure that ldirectord is doing it's job and hasn't got stuck. It works by hooking into ldirectord's '_check_real' function, which is called whenever a server is checked. It will then adjust the timestamp on a 'pulse' file, which we later check with our nagios script.



Here is the patch to ldirectord: http://lathiat.net/files/ldirectord.patch



So now, in the default configuration we will end up with a file at /var/run/ldirector.ldirectord.pulse (this file is actually in the same location as your ldirectord PID file, so if you have moved that, it will be with it) which has it's timestamp updated with each service check.



Now, we make a plugin for nagios, which I have here:



http://lathiat.net/files/check_ldirectord_pulse



And you can configure this plugin into Nagios or Nagios NRPE as normal. You can test it is working by running the plugin manually, you should have a result like this;





OK: ldirectord pulse is regular (4 seconds since last beat)





The default timeout is 120 seconds (2 minutes) for a warning, and 300 seconds (5 minutes) for a critical alert.



Hope this helps some people using ldirectord! Personally this has caused downtime for ourselves a few times when ldirectord got stuck. I would love to hear any feedback or if you are successfully (or unsuccesfully) using this, you can contact me here:

http://lathiat.net/contact

Trent Lloyd: At Linux.conf.au 2009 and starting on Planet MySQL

Mon, 2014-08-25 01:25
Greetings Planet MySQL readers,



I am new to Planet MySQL.. so I thought I should introduce myself.



I am Trent Lloyd (some may know me online as 'lathiat'), based in Perth, Western Australia and presently working for Sun Microsystems as a MySQL Support Engineer providing support to Sun's MySQL customers. I have been with Sun for 12 months, and previous to that was working for MySQL AB before it was acquired for 8 months. My background before that is in the ISP industry working for HostAway in a combination System/Network administration and support role.



I have also given a number of papers, often related to either Avahi or IPv6 at a few conferences.. mainly Linux.conf.au - you can view them on my web-site www.lathiat.net.



I have an open-source/free-software community background.. I co-authored Avahi (a mDNS/DNS-SD/Link-Local IP stack for Linux and other *nixes) with Lennart Poeterring and dabbled my hand in the likes of the Ubuntu MOTU and GNOME communities.



Working in the MySQL Support Team, and having a very large customer base to source problems from, we run into many problems and gotcha's on our customer systems which people don't hit every day but are very difficult to track down when you do. I hope that by sharing some of these experiences





With that introduction out of the way, I have just landed in Hobart, Tasmania, Australia to attend linux.conf.au (which was a very last minute arrangement). I have attended this conference every year since 2003 (thats 7 of them!), it's always great and I am glad I am able to attend again.



I am sitting at the "Open Source Databases" mini-conference which has a strong MySQL presence. There are quite a few Sun folk here, which is fantastic - unfortunately a few others were unable to make it but it should be great never the less.



I will be bringing you more Linux.conf.au updates throughout the week and MySQL tips into the future!

Trent Lloyd: Linkin Park - No More Sorrow

Mon, 2014-08-25 01:25
I just noticed that as of a few days ago (22nd August) - Avahi is now 3 years old.



Heres my original release announcement:

http://lists.freedesktop.org/archives/avahi/2005-August/000227.html



That's a crazy amount of time, since then I presented at Linux.conf.au 2006 and GUADEC 2007 (Birmingham) as well as some presentations at GNOME mini-confs and the like.



Fun and games... also for anyone following this blog, I regularly twitter as lathiat

http://twitter.com/lathiat



Feel free to follow me, but it tends to be more personal stuff rather than Tech/Open-Source related

Trent Lloyd: Matchbox 20 - Push

Mon, 2014-08-25 01:25
Dear World,



Please remind me why I bought a mac?



Love,

Trent



[i was typing away the other day and *blip* my backlight stopped working, permanently, seriously, wtf.]

Trent Lloyd: Traveling to sydney...

Mon, 2014-08-25 01:25
Howdy all,



I will be traveling to Sydney on Sunday the 20th and 21st - if you're in sydney and want to catch up for a beer or something let me know.



Only timeslot will be Sunday (20th) afternoon as I fly out Monday night (21st)



- lathiat

Trent Lloyd: Pete Murray - Oppurtunity

Mon, 2014-08-25 01:25
As most of you reading this are likely aware, I work as a Support Engineer for MySQL AB - which was recently acquired by Sun Microsystems.



If you have been living under some variety of rock-like object, you can see the press release here:

http://www.mysql.com/news-and-events/sun/







As part of that, as of this month I now work for Sun Microsystems Australia.





Trent Lloyd

MySQL Support Engineer

Sun Microsystems





However I am really doing the same job I was before.. so far the acquisition seems to have gone fairly positively. I was a little concerned about some of the employment/IP restrictions that our new fangled contracts bring but in the end I was able to sort out enough to satisfy me.



I am still working from Home, and there are no plans (at least for me) to move around within Sun - I plan to continue my role as MySQL Support Engineer.



I really hope this acquisition is beneficial for MySQL in the long run.. there are potential ups and downs but so far for me the experience has been very positive and the Sun team have been very welcoming.



The MySQL Users Conference is upon us this week, which means there will likely to be some interesting announcements from various MySQL-related companies as tends to be the case around major conferences (there are already some talk of a new product from "Kickfire" that sounds interesting, albeit sketchy at this stage)



In more personal news, they sold the house I am renting so I have to move. For more amusement Aleesha is over-seas until after I have to move so I have to move before she gets back, oh well. I applied for a house today and the Property Manager seemed very enthusiastic so I guess thats a good sign.



It's a very nice 3x2 townhouse:

http://gallery.mac.com/lathiat#100525&bgcolor=black&view=grid



It's also only a couple hundred meters from the local telephone exchange, so ADSL2+ speeds should be fairly flat (24/1 M) which will be nice :)



To follow me closer, check out my twitter: twitter.com/lathiat

Trent Lloyd: Britney Spears - Piece of me

Mon, 2014-08-25 01:25
Howdy all,



I know there are some followers of my blog.. and I know I don't update it very much (sorry!)



However I update my twitter quite regularly, so check out http://twitter.com/lathiat (you can subscribe as an RSS if you want)



Trent

Trent Lloyd: Matchbox 20: The Burn

Mon, 2014-08-25 01:25
Back home in Perth from Linux.conf.au... couple surprises when I got in.



First up, I made Qantas Silver Frequent flyer. This is mainly a yay for the priority check-in - and I get 1 free Qantas club invitation.



Had I thought about it when I started travelling, and taken Qantas the whole time I probably would have been gold by now but I took 2 big european trips on emirates.. and a whole stack of Virgin Blue domestic. Oh well.



Secondly, I left my air conditioner on.. It's a crappy old wall unit and it has apparently continually frozen and unfrozen up over the week and theres a nice trail of water down the wall onto my mattress which is very damp and has several water stain marks. Obviously been through the cycle a few times. It also managed to eat a bit into the plasterboard under it. -woops-. When I got in it was frozen solid out the filter and nearly out the plastic grating.



Note to self: check this in future.



And last but not least, its too damn hot in Perth.

Trent Lloyd: Poker

Mon, 2014-08-25 01:25
While I'm in Melbourne for linux.conf.au (which finished yesterday), I thought I'd head down to the Crown Poker Room to get some action.



Unfortunately I missed the Aussie Millions by a couple of weeks, but I did run into one of the final tablist while there. He made alot of money.



I set myself a limit of $300.. so first I tackled the Sunday $100 ($85+$15) NLHE tournament. I didn't fair so well.. I got up in chips early (doubled up).. had a really unfortunate hand..



I was dealt [Kd] exposed, next card was [Ac] and my redealt card was [6s]. I elected to fold and out flopped [Kh][Kc][3d] - I was not happy! I definitely would have been in with [Kd][As] and my trips would have more than likely got me a healthy stack. D'oh.



I endeed up going out just before level 4 with my [Kh][As] vs [Jh][10s]. The flop was a blank and a [10c] came on the river sealing my fate.



From then I moved onto the $2/$3 NLHE. I bought in for $100 and about an hour later was up to $254 and cashed out when my seat in a $50 Sit'n'Go came up.



I didn't do too well in the Sit'n'Go either.. busted out in 6th place calling all-in with my [As][10s] against my offenders [Ah][Ac]. The aces held up.



Then I nearly left.. but decided to head back to the $2/$3 NLHE cash game again for $100. Only about 30 minutes in I was up to $306. At this point although I felt guilty leaving the table a couple hands after winning an $80 or so pot; but I knew it was starting to go to my head and I'd loste up and likely lose it all and probably more back. So I left, $210 up for the day.



Not a bad effort! Tournaments bad.. cash games good.. probably a bit lucky but the tables were quite soft, very often folding to reraises or calling down with bugger all.



Woo!

Trent Lloyd: MacBook even more broken than I thought... Asus EeePC is good...

Mon, 2014-08-25 01:25
So having taken my MacBook to the apple store on Tuesday, they replaced the logic board and subsequently found out that not only was the logic board toast, so is the hard drive.



How the hell did I manage that?



So anyway, being 10AM Tuesday morning, and a talk to give at 1:30PM - I cruised down to Myer (by way of a $6 taxi, didn't realise how close it was) and bought an Asus EeePC.



I then rewrote the talk in <2 hours and did it. It was a bit of a rush job but it worked OK.



I'm fairly impressed by the EeePC.. it's got 4G flash, 512MB ram, Webcam.. and comes with a pre-installed and customized Xandros-based OS. It has all the good utils.. Pidgin, Firefox, Skype, Openoffice, etc... although I hope to install Ubuntu on it later.



It did manage to compile a kernel in <hour earlier.. so its not *that* slow.. altho the kernel was a little minimalistic with the features needed for it.

Trent Lloyd: MacBook broken

Mon, 2014-08-25 01:25
I've really hit a wall with my MacBook.



it has stopped booting after a kernel panic, which was caused by unplugging a Sony Ericsson phone that was just charging.



I can't even boot a cd or into firewire target mode.



This is the 3rd trip now I have had something go wrong with it, dammit. I think life is telling me to go back to a PC and ubuntu!



I guess its

kindof poetic my MacBook running macosx broke at Linux.conf.au.



Posted from my iPod touch.

Trent Lloyd: Feel Like Home (feat. Styles Of Beyond) - Fort Minor

Mon, 2014-08-25 01:25
Well, I made it through my first day in Melbourne for linux.conf.au 2008



Due to horrible travel planning, I arrived in Melbourne at 6am but was unable to check-in to Trinity College until 1PM. Thus I had to wast a couple hours then met some of the organisers and helped shuffle boxes of conference bags out of one room, into cars to then be unpacked down at the venue.



Following that I spent some time folding up t-shirts and finally I was able to register and check in at the college.



Having taken the midnight flight over, I hadn't slept and so I carked it from 4PM to 8PM. This is going to really throw my sleeping out! But oh well..



Following on from my lazing, I located the Trinity common area, with semi-working wireless (some rogue client is handing out DHCP leases that are useless, so you have to refresh 30 times)



So far I have ran into lots of people I know from work and past LCAs.. I'll certainly miss some but they include.. Stuart Young, Stuart Smith, Colin Charles, Giuseppe Maxia, James Iseppi, Arjen Lentz, Joel Stanley, Leon Brooks, Donna Benjamin, Daniel Stone, Grant Diffey, Michael Kedzierski(sp?), Ryan Verner, Tim Ansell.. there are a few people who escape me at the moment!



As wireless is only available in the common area, my 2GB of 3G data with three is certainly proving helpful :)



Until tomorrow... (or well, today)

Trent Lloyd: Veronicas - Hook Me Up

Mon, 2014-08-25 01:25
Heading off shortly to Linux.conf.au 2008 in Melbourne, Victoria.



I've got the red-eye, so I'll be landing in at 6AM Melbourne time - for any other LCAers i'll be staying at the Trinity college.



I'm giving a talk at the MySQL Mini-conf @ 1:30PM on Tuesday - it will be about my experiences as a MySQL Support Engineer and the common sorts of problems that people run into and how to avoid them!



Should be a good week for the conference, and maybe I can lose^H^H^H^Hwin a few dollars at the Crown with my handy dandy poker skills :)



Anyone up for a game? Unfortunately I've misplaced my small, portable and travel-friendly chipset - I really must find that.

Trent Lloyd: Anika-Robert Picardo-Extreme Bob-More Parodies, Travesties & Anomalies

Mon, 2014-08-25 01:25
Thanks to work, I spent this week in Cupertino, CA. Having never been anywhere in the USA before, it was somewhat exciting to be staying literally up the road from the Apple Campus.





Me @ 1 Infinite Loop



I was also able to goto Google in Mountain View, to attend the Silicon Valley MySQL Users Group at the Visitors Center. Unfortunately I didn't come accross any large google logos to take my photo with, but I did find building number 42







I also spotted the offices of Symantec, Trend Micro, Packeteer, Solid, Microsoft, Borland and MySQL (Surprise!) along the way. Certainly "exciting" for someone thats never been to the bay area.



I had hoped to make it up to San Francisco, and do a little site-seeing of the Golden Gate Bridge and some other stuff, but was too tired to do it this afternoon, and I am attending BarCampBlock today in Palo Alto from early until I fly out tonight - so unfortunately I am going to miss out this trip. Hopefully work will send me back this way again sometime next year.

Trent Lloyd: GUADEC 2007

Mon, 2014-08-25 01:25
So, thanks to GUADEC 2007 kindly accepting my talk & paying for my travel expenses, and I had a good time.



I think my Avahi talk went well... we had a good 15+ minute talk about future possibilities, which is what I was hoping.

Lennart's Pulseaudio talk was also very good, it has advanced quite some since his talk @ LCA so it's good to see progress.



I got to meet Sjoerd, and generally the entire Collabora team which was pretty cool - I've fixed some bugs in Avahi so they can progress with the Salut support for OLPC which is good.



I have uploaded my photo collection to flickr, so you can check them out here.



Heres some of my favourites..



I managed to crash the in-flight entertainment system, apparently it uses svgalib..





I love these power transformers that point out all sides, as much as I'm sure they are safe, it just irk's me slightly ;)





Primitive mapping technology...





Walkabout - the Australian Bar - Dude in a kangaroo suit





Me with an iFailPhone





Dress code... no football tops.... exceed england.





www.wtfisthisgame.com





All in all, it was a good trip :)

Trent Lloyd: Weird Al Yankovic - Pancreas

Mon, 2014-08-25 01:25
Just over 18 months ago, I started working at HostAway, initially starting out doing some casual 2-week phone support they needed at the time, my role became permanent and I quickly expanded into both Network & Systems Administration (while still doing a lot of day to day customer support, small organizations tend to demand wider skill ranges :)



None the less I felt, for various reasons, it was time to move on.  As such, I have just completed my first week working MySQL AB as a Support Engineer.



The job is home based, and I am currently working the hours of 5AM-1PM local time.  Now you may think "wow, you're crazy" for working those hours, but I have discovered that so far I am actually quite enjoying it, I feel I am getting a lot more out of my day at the moment because I seem more awake longer, getting up earlier in the day (Usually about 4:30AM).



I do have the option to start working at 7AM on most days, and given I have no travel time this doesn't put me very far behind a "normal" job as far as messing up the daily schedule.



Being a free software 'person', working for a company with heavy involvement in the free software world is pretty exciting for me.  I guess time will tell how it goes, but if this week is anything to go by I think I should be happy in the long term.



In other news, I have discovered that listening to Weird Al Yankovic continually is horrible for your sanity, mostly because he picks alot of very catchy songs to parody, which proceed to persistently circle around inside my head for the next week...

Trent Lloyd: The bird that really likes my carport..

Mon, 2014-08-25 01:25
So yesterday I came home to this bird, in my carport







From some googling I *think* it is a pigeon, maybe a dove, but I didnt' check very hard, so I'm far from even moderately sure :)  The tag on it's foot says "AUST 2006" and some other stuff I couldn't make out.



It was there all yesterday afternoon, I managed to get quite close to take the above photo, but it did flinch when I tried to get any closer.



This morning, it was still there, and this afternoon when I go thome, it was still there although now its finding its way around the floor.



I do wonder why it likes my carport so much, It doesn't *seem* hurt, and it managed to get up here





So I assume that it can fly somewhat, I guess I'll wait and see if it's there tomorrow... If anyone knows anything feel free to leave a comment :)



I turned on the sprinklers and it was right at the very edge of the big double door out to the world drinking the water splashing in, so it's not stuck in or anything.



Weird!