Monthly Archives: February 2009
Troubleshooting Linux HA (High Availability)
| 25-Feb-2009 | Posted by Sonia Hamilton under High Availability |
When Linux HA (High Availability) is setup, each machine will have a physical address, and one machine should also have the virtual address. This can be checked via ip addr:
machine 1
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:09:3d:12:af:77 brd ff:ff:ff:ff:ff:ff
inet 999.99.133.12/23 brd 211.29.133.255 scope global eth0
machine 2
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:09:3d:12:ba:ef brd ff:ff:ff:ff:ff:ff
inet 999.99.133.13/23 brd 211.29.133.255 scope global eth0
inet 999.99.133.19/23 brd 211.29.133.255 scope global secondary eth0:1
If this isn’t the case, do a hb_takeover on the appropriate machine (depending on the status of the underlying application). Eg /usr/lib64/heartbeat/hb_takeover
Notes on Branch Management with Subversion
| 24-Feb-2009 | Posted by Sonia Hamilton under Subversion |
Some notes on branch management with Subversion (more for my own learning purposes than anything):
- create branch: svn cp foo foo-branch
- develop new feature in foo-branch, whilst doing any bug fixes in trunk
- merge some changes from trunk into branch – keep branch up-to-date as possible
- commit any changes first, so can easily revert if desired: cd foo-branch; svn up; svn ci -m “pre merge in trunk”
- find where branch occured (if not noted in a log message – duh): svn log –verbose –stop-on-copy foo-branch (eg 123)
- preview changes succinctly: cd foo-branch; svn merge –dry-run -r 123:HEAD
- preview changes verbosely: cd foo-branch; svn diff –notice-ancestry -r 123:HEAD …
- apply changes: cd foo-branch; svn merge -r 123:HEAD svn+ssh://myrepo.com/foo/bar
- check changes: svn st; svn diff, if problems: svn revert
- commit changes: svn ci -m “merged trunk changes into branch (flubbed the widgets) r123:129″
- keep working in foo-branch, merge in some more changes
- ditto previous
- svn merge -r 130:HEAD svn+ssh://myrepo.com/foo/bar (previously merged up to 129, so start on 130)
- merge all changes from branch into trunk – new feature finished
- ditto previous
- cd foo; svn merge -r 123:HEAD https://myrepo.com/foo-branch
- svn ci -m “merged foo-branch into trunk (feature x) r123:145″
An alternative (and often easier) approach is to branch on the server, then just switch the working copy for the subdirectory (or individual file) being worked on:
- svn cp https://myrepo.com/foo https://myrepo.com/foo-branch
- cd foo
- svn info bar | grep URL
- cd bar; svn switch https://myrepo.com/foo-branch/bar; cd ..
- svn info bar | grep URL
- merge changes as above
Tags:
- tags are just copies (usually put in the tags directory): svn cp https://myrepo.com/foo/foo https://myrepo.com/foo/tags/foo-1.0. Tags aren’t read-only, but any changes can of course be reverted.
Directory structure:
- the canonical way of structuring directories is:
- /foo/trunk (or /foo/foo so name of trunk dir corresponds to project when checked out)
- /foo/branches
- /foo/tags
- I used to ignore this and just do /foo & /foo-branch, but this gets messy quickly and it’s easy to make mistakes or have problems when doing svn moves of large directories if you want to reorganise things later. Also, when working with branches I tend to want to just switch a subdirectory rather than checkout the whole branch, and this directory structure seems to logically help with this
Notes from Version Control with Subversion.
Gnome Session Management
| 23-Feb-2009 | Posted by Sonia Hamilton under Gnome |
A nice article I came across while trying to remotely solve a gnome-session issue. In a nutshell: Gnome 2.24 now uses a new mechanism for specifying startup programs – .desktop files in $HOME/.config/autostart and /usr/share/gnome/autostart/
dpkg-reconfigure debconf
| 23-Feb-2009 | Posted by Sonia Hamilton under Apt, Ubuntu |
Note to brain (because I keep forgetting it and having to look it up) – to reconfigure level and style of questions asked by dpkg (and hence apt):
dpkg-reconfigure debconf
Web censorship scuttled?
Happy news from today’s Sydney Morning Herald:
The Government’s plan to introduce mandatory internet censorship has effectively been scuttled, following an independent senator’s (Nick Xenophon) decision to join the Greens and Opposition in blocking any legislation required to get the scheme started….