On the 5th of this month, I reached Bangalore and was all set for my rejuvenation. I saw my nephew for the first time and he was far more adorable than he seemed in the pictures of him I'd seen. Really feels nice being an uncle :). The very next day, me, Suvha, Bharadwaj and Akshay set out for a day long trip to Srirangapatnam and Mysore and it was an awesome trip all in all! I suddenly transformed into this wannabe photographer, as me and Suvha went around taking as many snaps as possible (some of them were quite creative I'd say, for my standards at least). You can go through all the pictures here and here (split across two albums). The following Saturday, me and Aditya spent a whole day aimlessly roaming around Bangalore. To give you an idea of how vetti (jobless) we were, I'll tell you this. We were watching 'Fast and the Furious 4' at Inox at 10:30 in the morning :|. The movie sucked royally, and they actually managed to turn a wonderful series centered around cars and street racing into just another police-trying-to-nab-a-druglord story with just one race in the whole movie! Lunch at Cafe Masala followed (the place where we CAs were taken to during our induction training programme) where we made short work of the buffet over a span of 2.5 hours :P. I won't tell you about the rest of the day, since I really don't want to give my readers a mega dose of virtual sleeping pills because that's how boring it was. On the 11th, I went to the Sun office to get some of my work wrapped up. It was fun working at the office; I also got to meet a lot of my fellow CAs who were doing their summer internships at the IEC itself. After lunch, I worked on HA-Cron to fix the stale value(s) bug that it had during node shutdowns along with Swathi Devulapalli, one of the cluster engineers. Although we didn't manage to fix the problem, she helped me gain a whole new insight into agent development itself. (NOTE: I fixed it three days later after I got back to Jaipur, and HA-Cron works like a charm now, it's also out there contending for the CFF prize :) ). My flight back to Jaipur was on the 13th, and a book (Digital Fortress) kept me company all throughout. If you're reading this and you're saying, "DUDE! YOU STILL HAVEN'T READ IT?", then yes, I am ashamed. I left my reading habit around seven years ago. Anyways, it's back to Electronic Design Automation for me. Adios!
Assume that you're running a two interface firewall setup using Shorewall for your institute LAN. Suppose you have an internal webserver that you want to be made visible externally as well. To achieve this, you'd normally do a port forward using DNAT. Although this method gets a FAIL when it comes to security, it's usually the easiest thing to do. The suggested alternative would obviously be to get an extra NIC and setup a DMZ but anyways I'll be talking about a two interface setup here. Now this port forwarding thing works fine but what happens when a host in the internal network tries to access this website through the URL? The request will go out of the network, come back in and the response would follow the reverse route and this will take ridiculously long! There are two workarounds for this. The recommended method would be to configure your internal DNS to respond with the internal IP when a DNS query for the webserver's URL is received. The other method would be to have your gateway masquerade as the internal webserver, which is nothing short of a quick hack and note that this is also rather poor when it comes to security. As per the shorewall website, for a transparent proxy, you'll need to add the following rules.
Example IP addresses:
Gateway's external interface (eth0): 184.108.40.206
Gateway's internal interface (eth1) : 192.168.1.1
Internal Webserver: 192.168.1.10
So here come the rules:
REDIRECT loc 3128 tcp www - !220.127.116.11
DNAT loc loc:192.168.1.10 tcp www - 18.104.22.168
eth1:192.168.1.10 eth1 192.168.1.1 tcp www
In /etc/shorewall/interfaces, make sure you have the 'routeback' option enabled for eth1.
Now here's the part that you won't find in the shoerwall documentation. In case you're migrating to a non-transparent proxy, add the following rule after the above mentioned DNAT.
DNAT $FW loc:192.168.1.10:80 tcp 80 - 22.214.171.124
I can't believe it took me so long to blog about this project of mine, considering the fact that I'm almost done with it's development and I also gave a talk on it at Sun Tech Days 2009. This was originally proposed by the Solaris Cluster team for a workout at FOSS.IN 2008 but wasn't selected, so I thought I'd take it up as my Sun Code For Freedom Contest project. This is one out of two proposals of mine for the contest, the other being HA-Zabbix which I haven't started working on. :P
Now that I've bored you with the history, I'll move on to telling you all about what HA-Cron is and it's relevance.
Those of you familiar with what high availability clustering is would have easily guessed by now as to what HA-Cron does. Anyways, one problem with an HA cluster is that when a failover happens, the failed node's cron jobs remain there itself and do not carry over to the new node. This naturally implies that the system administrator will have to manually intervene every time a failover occurs which goes against the whole idea of high availability clustering itself, where the key is to keep the recovery from a failure smooth and automated. So HA-Cron is an agent for Open HA Cluster which keeps Cron highly available.
Developed over the GDS template, HA-Cron accomplishes it's task by a set of simple procedures which are as follows:
1) Upon turning an RG (resource group) online on a node, a backup is made of the original root crontab. Next, the cron jobs for that particular RG which are specified by the user in a file are added to the root crontab entry, and a test job is added to ensure that Cron itself is working properly.
2) Upon stopping an RG on a node, the cron jobs that belong to that RG are removed from the root crontab.
You can check out the project's homepage here. Please feel free to pool in your suggestions. :)
The title gives you a prelude as to what I've been putting a sincere effort into; to just forget all the let downs I've come across throughout this month. From my failure to get selected for the Google Summer of Code, to missing out on a trip to San Francisco, topped off with the end of a one and a half year long shit festival and a lot lot more, April 2009 is something I'd really like to put behind me. Anyways, I barely scraped through four exams, and I still have two left but all I can think of right now is about making my retreat to Bangalore on the 2nd of May, where I know I can take my well deserved vacation. I'm looking forward to meeting my family and the newest addition to it (my baby nephew Advaith), a trip to Mysore with a few friends of mine and a visit to the Sun IEC so as to catch up with some of the Sun engineers and folks from the CA community.
Once I get back to Jaipur, I'll be focusing entirely on a single project for the first time in my life as a geek. As of now, I remain entirely drowned in a sea of disappointments when it comes to my capabilities but that's only made me a little more curious as to where my 100% lies.
So once this mental hibernation of mine ends, I'll be bringing out my reborn self, Lalith-2.0-r0 (release date 13/05/2009). Let's see if I can pull this off for real. :)
Here's the complete recipe for a mental breakdown, refined by me over the semester and having culminated into a masterpiece at the end of three and a half months.
1. Projects which you'll never complete. : At least 4 nos
2. OpenGL assignments which you hate for obvious reasons: 1 nos
3. OS assignments that you like, but don't have time for: 1 nos
4. Miscellaneous assignments, presentations etc. : 2 nos
5. Sun Campus Ambassador job in a place like MNIT : 1 nos
6. College System Administrator job: 1 nos
7. Burden of applying for the Google Summer of Code: 1 nos
8. Examinations per month: 6 nos
9. Attendance shortage in subjects: 3 nos
10. A social life which involves a lot of maggots : Extra, for taste
How to prepare your killer Mental Breakdown Delight:
Begin the semester with a clear mindset of what you're going to do, what projects you'll take up and what activities you'd like to involve yourself in. Now make sure you have too many areas of interests, otherwise, it's a little hard to get the flavour just right. Now pick one project each for every area of interest that you've got, and make sure that none of them have overlapping fields. One such combination that gives you good results is parallel computing, HA Clustering, electronic design automation and game development. Keep it to boil in a normal sized dish and stir until your mental gravy starts to bubble.
Make sure you have a job like the Sun campus ambassador job wherein you have to conduct workshops on FOSS during your institute's technical fests that are organized by very capable beings. Note that the gravy won't thicken if you have a very good FOSS culture in your institute and there are a lot of dedicated students all set to make it a grand success. There should only be a selected few students running after everything. The lesser the count (apart from you), the better.
Now in between your projects and your workshops, make sure you try and explore other worlds as well. You could try taking a one week vacation off to attend a conference like Sun Tech Days, have a lot of fun and return only to be shocked at how many classes you missed. Now begins the attendance shortage component of our recipe. Make sure you've missed enough classes so that you don't feel like attending any more. For best results, bunk those classes wherein tests are conducted frequently, so that you avoid attending them as long as you don't know anything.
The mid terms will be around just to test how spicy your dish is. If you're well prepared with your subjects, the mid terms won't add any extra zing to your mental breakdown dish.
After this point, you can set the flame to a slightly higher level if the bubbles aren't forming fast enough. Add two weeks of the Google Summer of Code application period wherein you have to make a proposal and submit a patch for the project's code as part of the application process. In order to give the gravy that burning feeling, make sure you have to attend to system administrators from NRCFOSS during this application process and work with them on hardening some of the institute servers. It's recommended that they prefer to work with a distribution of Linux that you're not comfortable with, like Deepofix. Chances are, you'll suck at balancing your time here and hence, it'll improve the dish in every possible way.
In the meantime, chop a few more pending assignments on a separate plate and keep adding to it while you're preparing the rest of the meal in parallel. This is done, so that by the end of the semester, you'll have way to many assignments left to do and that upon adding the contents of this place to the gravy, your dish will explode in a super nova of burnt out brain cells.
For those who're extra ambitious as far as tinkering with their own sanity is concerned, you might want to try having a social life wherein everyone (at least most people) around you are complete maggots. You can have them range across all levels from class 1 to class 4, and for best results, you might even want to know a couple of super maggots who're so sly, that you'll be in the dark until the throw phase of the use and throw routine that maggots are known to follow.
By the end of the semester, your mental breakdown delight should be more than complete. Serve and enjoy!