Archives

Categories

submissions for LCA and other conferences

In this post I recommended that job seekers not publish their CV. In a comment Gunnar suggested having a special CV for conferences. I think that Gunnar’s idea is good and have started writing my conference CV at http://etbe.coker.com.au/conferences. When I complete it I will make it part of every submission for speaking at a conference.

The LCA 2008 call for presentations is now open. One of the most interesting, noteworthy, and slightly controversial items is the suggestion that people submit a video. I think that the video submission is a great idea, either a video or testimony from audience members from past presentations should be required for all submissions (NB I’m not involved with organising LCA2008 so my opinion means little in this regard). The reason is that I have attended many presentations which fell far short of their potential due to poor speaking skills. I’ve been to great presentations by people with strong accents, by people with speech impediments, by people who are incredibly shy, and by people who just don’t have a clue about public speaking. However my observation is that if a speaker has more than one of these disadvantages then the presentation is likely to fail. I have previously written at length about how to give a good presentation to a technical audience (such as is found at LCA).

Dave Hall blogs about Should I do a presentation at LCA 2008. He mentions lack of a web-cam as a disincentive, but I am happy to lend him my digital camera (which makes really high quality movies) to solve this problem. In fact I have considered recording some short Linux talks at the SGI office during lunch breaks (Dave and I both work for SGI).

Dave also mentions a nightmare scenario about a laptop not working with presentation hardware. My post about getting laptops working for presentations will hopefully help some people in this regard.

I’m not sure if I’ll make an offer for LCA this year, I haven’t been doing much cutting-edge work recently. Maybe I’ll just offer some talks for mini-confs, I could probably get several offers accepted by mini-conf organisers if I try.

costs of driving to work

Mark Greenaway expresses surprise that someone could spend $8000 per annum on petol.

I own a 1999 VW Passat 2.8L that does 12.8L/100Km (based on my average driving habits – I record the amount of petrol purchased and the distance driven). I spend an average of just over $60 a month on petrol, so I’m approaching $800 per year.

I catch the tram and train to work most days (probably drive to work less than 10% of the time) and use my car very little apart from that (most places that I drive to are close to my house).

If I was to exclusively drive to work then that alone would make my petrol expenses approach $8000 per annum. If I was to shop at locations that weren’t so convenient or do recreational driving then the petrol expenses could be significantly greater.

The $1000 a year I spend on public transport doesn’t seem so expensive!

The Sydney Morning Herald has an article about the increase in sales of hybrid cars due to fuel price increases. In that article they note that Toyota representatives claim that Prius drivers travel more than the average 15,000 KM per annum.

Recently the RACV magazine published an article based on the CNW report (the bogus report paid for by Exxon which claims that the Jeep Wrangler is better for the environment than the Toyota Prius). In response to this I reviewed all adverts for second-hand Prius and Wrangler’s on www.drive.com.au to determine how much these vehicles are driven.

I counted a 2006 model as a 1yo car for the purpose of the average. On the 29th of April when I looked at the web site there were 90 Prius and 127 Wrangler on sale for which both the model year and the distance driven were published. Of these vehicles the average distance driven per year for the Prius was 15995Km, and the average for the Wrangler was 11,658Km.

Someone who purchases a Prius instead of a V6 car (such as my VW Passat) can expect to save at least 7L per 100KM (based on the assumption of 12L/100Km for a V6 and 5L/100Km for a Prius – this is a conservative estimate, the savings could be greater). That would be a saving of at least 1120L of petrol per annum for the average Prius owner, giving a saving of >$1500 per annum with current petrol prices. Over the 20 year life of the vehicle the average Prius owner can expect to save at least $30,000 on petrol at current prices – but we do expect petrol prices to increase…

putting HTML codes and other special characters into a blog entry

I often want to write blog posts about HTML code and about source code in various languages. One problem I have is that the characters I want to use have special meanings (EG < and >), another is that I indent source code to make it readable and I don’t want the spaces trimmed from the start of lines.

I initially wrote a simple Perl script to replace characters such as < with HTML codes. I then had to extend it to escaping quote characters because WordPress tries to get smart and change quotes in a way that might look nice when dealing with plain text, but is just a pain when dealing with code.

The next problem I had is that when I used the <PRE> tag around some text to preserve the white-space WordPress would double-space the text (IE insert a blank line between every two lines of code). This was annoying when reading it and in some situations would change the meaning of the code! The solution I have found to these problems is to use the below script and not use the <PRE> tag. Also I tried using the <CODE> tag, but it made no difference to the end result as far as I could see.

The below script is what I am currently using. It is working well with shell scripts, HTML, and XML so far.

Update: The way that -- is munged by WordPress to is something that I find particularly annoying. I already had this in the script but forgot to mention it in the post.
Continue reading putting HTML codes and other special characters into a blog entry

configuring a Heartbeat service

In my last post about Heartbeat I gave an example of a script to start and stop a cluster service. In that post I omitted to mention that the script goes in the directory /usr/lib/ocf/resource.d/heartbeat.

To actually use the script you need to write some XML configuration to tell Heartbeat which parameters should be passed to it via environment variables and which nodes may be candidates to run it.

In the below example the type of web means that the script /usr/lib/ocf/resource.d/heartbeat/web will be called to do the work. The id attributes are all arbitrary, but you want to decide on some sort of consistent naming scheme. I have decided to name web server instances web-X where X is the IP address used for providing the service.

The nvpair element contains a configuration option that will be passed to the script as an environment variable. The name of ip means that the environment variable will be named OCF_RESKEY_ip. Naming of such variables is arbitrary and a script may take many variables. A well written script (which incidentally does not mean my previous blog post) will have an option meta-data to give XML output describing all the variables that it accepts. An example of this can be seen by the command /usr/lib/ocf/resource.d/heartbeat/IPaddr2 meta-data.

In the XML the resources section (as specified by --obj_type resources on the cibadmin command-line) describes resources that the Heartbeat system will run. The constraints section specifies a set of rules that determine where they will run. If the symmetric-cluster attribute in the cluster_property_set is set to true then resources will be permitted to run anywhere, if it is set to false then a resource will not run anywhere unless there is a constraint specifying that it should do so – which means that there must be at least one constraint rule for every resource that is permitted to run.

In the below example I have constraint rules for the service giving node-0 and node-1 a priority of 9000 for running the service.

In a future post I will describe the cluster_property_set and how it affects calculations of where resources should run.
Continue reading configuring a Heartbeat service

Heartbeat service scripts

A service script for Heartbeat needs to support at least three operations, start, stop, and status. The operations will return 0 on success, 7 on failure (which in the case of the monitor script means that the service is not running) and any other value to indicate that something has gone wrong.

In the second half of this post (not in the feed) I have included an example service script. It is a very brief script and does not support some of the optional parameters (monitor, validate-all, and meta-data). So this script is not of a quality that would be accepted for inclusion in a Heartbeat release but is adequate to demonstrate the concepts.

The XML configuration for a service can have an arbitrary set of name-value pairs, and they are passed to the script as environment variables. For example the below script expects that the XML configuration item named ip will have the IP address used by the service, my script receives this as a variable named OCF_RESKEY_ip. My script doesn’t use the address, it merely allows it to be inherited by the IPaddr2 script (which is part of the Heartbeat distribution) and that script assigns the address to an Ethernet interface.

The script is for testing Heartbeat, it mounts a filesystem and starts Apache (which is configured to serve web pages from the filesystem in question on the IP address supplied by the ip parameter).

For test purposes the script looks for a file named /root/fail, if this file exists then the status check will always abort. An aborting status script means that Heartbeat can not be certain that the node in question has released all resources that it was using for the service. This means that Heartbeat will have to kill the node via the STONITH service. Such test scripts are the only way to test that STONITH works, and I believe that it’s a necessary part of pre-production testing of a Heartbeat cluster.

Update: Made it display error messages in all cases and also reformatted it for better cut/paste.
Continue reading Heartbeat service scripts

Another Heartbeat 2.0 STONITH example configuration

In a Heartbeat cluster installation it may not be possible to have one STONITH device be used to reboot all nodes. To support this it is possible to have multiple STONITH devices configured that will each be used to reboot different nodes in the cluster. In the following code section there is an example of how to configure STONITH for two separate ssh instances. Of course this is not useful apart from as an example of how to configure STONITH. It would be quite easy to change one of those ssh configuration entries to use IPMI or some more effective method of managing machines. My previous post on this topic has an example of a simpler ssh STONITH configuration.

It is convenient that the ssh method for rebooting nodes is available both as a shared object (which is used by the following example XML) and as a shell script (type external/ssh). The shell script can be used to give the same functionality as the shared object (with reduced performance) but the benefit is as an example of how to write external plugins. For a client I have just written an IPMI module that works with machines that have two Ethernet ports. When a server has two Ethernet ports you want to send an IPMI reset command to both of them in case the failure which requires a STONITH was triggered by a broken Ethernet cable. Unfortunately I can’t release the IPMI code at this time

Continue reading Another Heartbeat 2.0 STONITH example configuration

Heartbeat version 2.0 CIB STONITH example configuration

Below is a sample script to configure the ssh STONITH agent for the Heartbeat system. STONITH will reboot nodes when things go wrong to restore the integrity of the cluster.

The STONITH test program supports the -n option to list parameters and the -l option to list nodes. The following is an example of using it with the ssh agent:
# stonith -t ssh -n
hostlist
# stonith -t ssh hostlist="node-0 node-1" -l
node-0
node-1

The hostlist tuple is the only configuration option for ssh. It is assumed that you have passwordless ssh logins allowed between root on all the nodes in the cluster so the host name list is all that’s needed.

The important thing to note about the constraint is that you are constraining the parent of the clones (which in this example has an ID of “DoFencing“) not a clone instance.

ssh is the simplest and in many ways least useful method of STONITH, but it’s good for an example as everyone knows it. Once you get ssh going it’ll be trivial to get the other methods working.

See below for the script to insert the XML in the CIB.
Continue reading Heartbeat version 2.0 CIB STONITH example configuration

paypal – are they trustworthy now?

Having read paypalsucks.com I am concerned about the safety of my money if I was to chose to do business with them. However there are many ways of making money by using them.

Does Paypal still suck? If so are there any other better options? The merchantinc.com recommended by paypalsucks.com seems to only cater for business customers.

New Blogs

After reading advice from ProBlogger I have become convinced that I should create separate blogs for some of the content that is currently on my blog. The first such blog that I will create will be about computer security. Naturally it will cover SE Linux to some degree, but the exact focus is something I have not yet determined.

Here are the options I’m considering:

  • The exact topic to be covered, computer security is a broad area, choosing which sub-topics to focus on and which users to present it to is a difficult task.
  • The length of the articles, this will to some degree depend on the posting frequency. If I am going to post 4+ times per week then most of the posts would be small. But for one or two posts per week I could make them 1000+ word posts.
  • The mix of news, educational material, and background information. I think that all of these areas are important, and to some extent the mix will depend on what news happens and what technologies I am involved in developing, testing, and using. But I will have a plan as to what to present and on days when there is little news and I have not worked on anything exciting I will find new material to write about based on the plan.
  • The use of code snippets in a blog? It’s easy to split the post and have the feed not include the source code, would that be of interest or would you rather have the complete post in the feed for offline reading?

Also if you have any other suggestions for blogs that you would read if I was to write them then plese send them in via a blog comment or email.

SE Linux shirts for sale!

Faye and I have created Cafepress stores selling shirts and other things with SE Linux logos, here are the two designs:

Play Machine

t-shirt design with SE Linux play machine root password

SE Linux MLS

t-shirt design with SE Linux MLS logo

There are shirts, coffee mugs, mouse-mats, and other things. The designs feature a graphical representation of MLS security and a variety of text about SE Linux. There are also some baby shirts etc.

If you have any ideas for other SE Linux shirts then please let me know by private mail. I’ll give a free shirt to anyone who has an idea that I implement.