RHEL7 Provisioning

Recently I had been working on adding support for Red Hat Enterprise Linux 7 (RHEL7 / RHEL 7) baremetal provisioning into our product. There are few changes in the process from RHEL6. Unfortunately, since RHEL7 has GAed recently, there is not much information on the internet regarding a workable kickstart file. This blog describes the challenges that I faced and how I resolved them.

The Setup

Most likely you would be using virtual environment for doing your research. If you are using VMware vSphere, note the you would need ESX 5.5 for this. Because that’s the version which supports RHEL7. Also you would need to use vSphere web client (and not the desktop client) to get the RHEL7 option while VM creation.

This VM, PXE server, TFTP server and DHCP server should be in same network. Mostly you would create a private network as you do not want these servers to interfere with your usual servers (like DHCP server). This can be easily done in vSphere.

With this setup in place, I started my first RHEL7 provisioning job using the existing RHEL6 configurations and kickstart file. Kickstart file contained all the packages that were supported in RHEL6.

Network Device Error

I provided the kickstart network device (as eth0) and dynamic IP address.

First failure I got was with this warning:

dracut-initqueue[679]: Warning: Could not boot.
dracut-initqueue[679]: Warning: /dev/root does not exist

And I got the dracut prompt.

After some investigation, I found that the issue was with the eth0 that I had provided as kickstart network device. RHEL7 renames the device in different format. For ex in above screenshot you would find the name as eno16780032. Providing this name instead of eth0 solved the error.

You could also use the MAC address but somehow for me it did not work in hyphen format (-). MAC address in colon (:) format worked fine. Ex: XX:XX:XX:XX:XX:XX

Kickstart File Syntax

Next error was due to the ‘key –skip’ entry in my kickstart file. Latest Anaconda refuses to recognize this option. I just removed this entry to proceed with my investigation.

Further the setup cribbed about no matching %end for %package in kickstart file. This was allowed earlier but now the format needs you to close the %package, %pre, %post etc with matching %end tag.

Refer Troubleshooting Kickstart files in RHEL 7 for more information.

Web Server Error

When it looked like that I got the kickstart file syntax correct, the installation started giving me following error: error populating transaction after 10 retries: failure: Packages/libstdc++-4.8.2-16.e17.x86_64.rpm from anaconda: [Errno 256] No more mirrors to try.

Not much help from the error message. This one was tricky to resolve.

The hint was in ‘c++’. Why are we getting error for this particular package and not for any other package? Whats so special about c++? The special thing is two consecutive special characters.

My datastore, where the ISO content were located, was accessed through http protocol. For this I was using IIS server. I quickly tried to access above rpm from my browser and there I got the error. The error was only for this rpm and not for any other rpm. Little more investigation and found the root cause.

By default IIS does not allow double escaping of special characters. There is a setting in IIS to enable ‘Allow double escaping’. After doing this, my installation proceeded further.

New RHEL7 Packages

Lastly the setup went into interactive mode for few package groups which were no longer present in RHEL7. Since I was reusing RHEL6 kickstart, I had to make changes in the selected packages to make it run for RHEL7. Complete list of packages that had to be modified from RHEL6 to RHEL7 is as follows:

@virtualization  -  @virtualization-hypervisor
@cifs-file-server  -  @file-server
@nfs-file-server  -  @file-server
@mysql    -  @mariadb

@mysql-client  -  @mariadb-client
@server-platform  -  removed
@storage-server  -  removed
@turbogears   -  removed
@basic-desktop   -  removed
@desktop-platform  -  removed
@general-desktop  -  removed
@tex    -  @texlive

There are many other packages and there could be other changes in the packages. However we support only few selected packages and hence I had to keep my research limited to the same.

Automation of Post Install Tasks

You may be interested in executing onetime tasks after the system boots for the first time (similar to run once in Windows). We achieve this by creating a script using echo commands in %post, which is executed after reboot by adding the entry into /etc/rc.d/rc.local.

Somehow this didn’t work for RHEL7. The reason was that the /etc/rc.d/rc.local didn’t have execute permissions by default. Workaround was to add chmod command in the %post section to give it execution permissions:

chmod +x /etc/rc.d/rc.local

Additionally if you intend to execute any 32-bit binary file you would need the correct glibc installed on the system. Following commands in %post did the trick for me:

wget http://location_to_iso_extract/Packages/glibc-2.17-55.el7.i686.rpm
rpm -ivh glibc-2.17-55.el7.i686.rpm --nodeps

Sample RHEL7 Kickstart file

Finally here is the sample kickstart file that worked for me. Notes that I focus was on automating the provisioning process and not on providing the best values in the kickstart file. For ex below kickstart has ext3 as the fstype which may not be the preferred choice in real world scenario. Similarly for enablemd5.

timezone --utc Africa/Abidjan
lang en_US
keyboard us
network --bootproto dhcp --device ??NET_DEVICE?? --hostname ??HOST_NAME??
url --url http://??DATA_STORE_IP??/??DATA_STORE.VIRTUAL_DIR??/rhel-server-7.0-x86_64-dvd
firewall --disabled
clearpart --all
bootloader --location=mbr
part / --size 1 --grow --fstype ext3
rootpw --iscrypted ??ROOT_PASSWORD??
auth --useshadow --enablemd5
# You can enter commands to perform post install operations here.

How to manage emails in MS Outlook

We use Outlook in our office for all the email communication. And each day I spend considerable amount of time reading and responding to mails. I have tried many different approaches to manage emails efficiently - creating folders, applying rules and filters, setting categories, setting flags, Outlook plugins and so on. Some of them have helped. But I always lagged behind the incoming rate of mails. Sometimes I ended up spending my weekend in cleaning up my inbox. Sometimes I was late to respond and sometimes even miss out on the mail completely.

Over period of time, while continuously trying new things, I have settled down to the process which has not only increased my effectiveness (like giving timely response to mails, not missing out on any mail) but also efficiency (by taking more incoming rate of mails by subscribing to more mailing-lists and contributing to the discussions).

In this post I’ll try to describe the process that has worked for me. First I’ll talk about all the settings that I have done in my Outlook and then I’ll describe the process or flow that I follow for every mail using those settings.

1. The Settings

1.1. Keep mails unread unless you explicitly mark them read

To be in control of your mails, you should be explicitly marking the mails as read when they are really read. Letting Outlook do it for you is recipe for missing out on mails. I figured this out the hard way.

So first thing is to change the Outlook settings. To do this in Outlook 2010, go to View -> Reading Pane (in Layout) -> Options. Following window should pop up. Unselect first two check boxes.

These two check boxes, if checked, marks the mail as read automatically. This caused my mails getting marked as read even when I had no intention to do so. This resulted in missing out on important mails and action items. I had to explicitly mark a mail as unread, if I wanted to revisit it again and that was error prone and not so convenient.

Now that all mails will remain unread as long as we don’t explicitly mark them read, here’s a simple rule to follow: A mail will remain unread as long as there is an action item pending on it. An action item can be: just reading the mail again, actually performing some action and/or replying the mail, waiting for some event to happen etc.

1.2. Get rid of all the folders

‘Folders’ is more work. You have to go to every folder to check mails. And if the folder contains not-so-important-mails (mails from some forum you would like to contribute), you might just not check mails in that folder.

Also if folder already contains unread mails, its difficult to know if new mail has arrived unless you remember previous unread mails’ count or you actually go to that folder.

I had rules which would put incoming mails to folders based on various criterion. Most of the time I simply forgot to check mails in these folders. I only went to them occasionally to delete all the mails and clean them up.

I had many such folders and they were kind of hiding the mails from me.

Now all my mails either go to my Inbox folder or directly go to Deleted Items folder. That’s it - just one more location to look for mails other than the Inbox. And it is pre-created.

Note that even though a mail goes directly into Deleted Items folder, it is still unread, which means I still have an action item on it.

1.3. Create Rules to move mails to Deleted Items

Action to be performed by all your rules will be to move the mail to Deleted Items folder.

All mailing lists, auto-generated mails, alert/notification mails etc go directly into Deleted Items. For ex: daily build pass/fail mails, check-in mail alerts, test case failures, forums where people ask for help etc. should go to Deleted Items. Rest all go into Inbox.

Again, mail remains unread at both the locations.

1.4. Create Categories and Search Folders

You are more likely to and comfortable to mark a mail as read when you know you will be able to find it if needed in future. So its essential to organize and categorize your mails in some way.

And the best way to organize the mails is to align them to your searching thought process. Just ask yourself: “How would I search this mail, if I needed it 1/3/6 months down the line?”. Create categories based on the answer.

Think about the categories which would be most helpful when you have to a search a mail in future. Don’t be shy to create as many categories as you want.

Main advantage of Categories over Folders is that you can assign multiple categories to single mail. So the same mail would be visible under multiple categories. This simply increases the chances of finding the mail.

I prefer manually assigning categories to a mail rather than setting them through some rule. This increases the precision and in turn increases the chances of finding the mail.

Also I find it useful to create categories based on work modules instead of based on sender’s mail-id.

After categories, create Search Folders for each category. This keeps your mails grouped for you to search/refer in future. It kind of replaces the Folders. But you use it mainly for searching. Like a said, a single mail can have multiple categories and hence it can appear in multiple search folders. It’s equivalent to ‘Label’ in GMail.

1.5. Create Quick Steps

In Outlook 2010 you can define ‘Quick Steps’ which performs set of actions on a mail.

Create two Quick Steps:

  1. Permanent Delete - This permanently deletes the mail.
  2. Read & Delete - This marks the mail as Read, Deletes the mail and send it to Deleted Items folder.

You can also assign short-cut keys to perform the Quick Steps defined.

1.6. Know your Server Settings

You should know few Server Settings applied to every mail box in your organization. For example, how long does a mail remain in Deleted Items folder before it gets permanently deleted, whats the auto-archive frequency etc.

In my case, a mail remains for 2 months before it gets permanently deleted from Deleted Items. Auto-archive happens every 2 weeks. A mail remains in Inbox for 2 months after which it is archived and moved to archive Inbox.

All this happens automatically based on archive and server settings and I don’t have to worry about it.

2. The Process

With all these settings in place, we are now ready to handle the incoming mails.

Any incoming mail will either go into Inbox or Deleted Items.

In Inbox, after reading a mail, I:

2.1. Delete Permanently

When I am sure the mail is irrelevant to me and I have no action item on it today or in future and I will never need this mail again. Example: Announcement mail of some upcoming sports event you are not interested or mail threads you are unnecessarily part of. For this, I use Quick Step defined in 5.1 above. Shortcut key: Shift + Del

2.2. Mark Read and Delete

When there is no action item pending on me but I might need the mail for reference in near future. That near future has to be less than 2 months. So this action is for mails which would become irrelevant after few weeks and are no longer required for long term reference. The mail goes into Deleted Items and would be permanently (auto) deleted after 2 months. Example: Weekly status report/defect report sent by somebody. For this, I use Quick Step defined in 5.2 above. Shortcut key: Ctrl + q, Ctrl + d

2.3. Mark Read

When there is no action item pending on me but the mail contains information which I might need in future. The mail remains in Inbox. I assign category/categories to the mail so that it would be easier to find it in future. If there is some trivial action item or follow up to be done, I also assign a follow up flag with reminder. But normally I use step 4 mentioned below for followups. Example would be: Mail contains information about workaround to be used for a particular product issue. Shortcut key: Ctrl + q

2.4. Keep the mail unread and in Inbox

When there is an action item on me. I might have to perform some task, reply to the mail or followup on the mail in a day or two or simply re-read the mail/attachments. For all such situations I keep the mail unread. And once the action item is done, I again perform one of the above three actions on the mail. Example: Mail asking to update the ETAs for defects on my name. I wont permanently delete this mail unless I go and update the ETAs in our defect tracking system.

In Deleted Items, after reading a mail, I:

  1. Delete Permanently - Reason same as 1 above. Shortcut key: Ctrl + d
  2. Mark Read - Reason same as 2 above. Shortcut key: Ctrl + q
  3. Move to Inbox - very rarely when the mail contains information or has action item on me. Once mail is moved to Inbox, follow the steps mention in above section. If you are frequently moving mails from Deleted Items to Inbox, its time to revisit your Outlook rules.

After replying to a mail, I:

  1. Mark Unread in Inbox - Reasons same as point 4 mentioned above i.e. there is still action item pending on me. Shortcut key: Ctrl + u.
  2. Mark Unread in Sent Items - when I am expecting a reply from someone else on the mail I just sent and until then there is no action item on me. Shortcut key: Ctrl + u. If you don’t want one more folder to track, just mark the mail as unread in Inbox.

Finally, change the view of your Inbox and Delete Items folders to view only unread mails:

This will keep your focus on the mails which has some action items pending on you. You would occasionally change this view, to search for some mails or view the mails marked read. But for most of the time you would only see the unread mails present in your Inbox and Deleted Items.

Some Parting Tips

  1. The process may sound complicated but once it fits in your brain, you would perform the actions in split second.
  2. Don’t be afraid to delete mails. Rarely, if you need a mail that you have permanently deleted, you can always request the sender or your teammate to resend it to you.
  3. When in doubt - mark the mail as read. Doubt should signify that there is no action item on you. If you can’t quickly decide whether the mail will be required in future or not, just mark it read. It will come up in search, if it is required.
  4. Familiarize yourself to the keyboard shortcuts and use them as far as possible.
  5. Never delete any mail that you sent. That goes without saying, but still.

I hope someone finds this useful. I would love to know if you have any better way to manage mails or have any suggestions to improve above process.

Book Review: Prakashvata

Rating: 9/10

Summary: Autobiography of Magsaysay Award winner Dr. Prakash Amte (son of Baba Amte) who has devoted his entire life on the ‘Lokbiradari Prakalp’ project, working in the forest of Hemalkasa, district Gadhchiroli in Maharashtra, India.

This 150 odd pages gem can simply change your perspective towards life, make you rethink on your definition of successful life and achievements. It will make you pause for a moment and introspect your life.

To simply put he got his doctors degree, got married to another doctor, both went to the forest where no one would ever go, had no resources whats so ever, built a hut for self, learnt the language of the local Madiya Gond tribe and started giving the much needed medical help to them for free. Then he started free school for the children, zoo for the animals and did whatever it took to help those people. He just gave away his life for this purpose. Made every sacrifice for it.

There is no ego, no bragging about these things in his writing. He has simply written the facts, gave credit to people who helped in the process. There are no opinions, no grudges, no dramatization of the hardships they faced. The book is as glamour-less as the life he has lived. Its crude and pure. And hence its condensed into 150 pages.

I can’t praise the book enough or can’t even describe the hardships that the tribe there faced. There are many incidences described in the book that touches your heart. Here’s one such incidence from the book, I have tried to translate it in English:

या कॉलेराच्या साथीतील एक प्रसंग मनाच्या तळात असा जाऊन बसलाय की तो हटतच नाही. एक बाई एका लहान मुलाला घेऊन आली होती. उपचार केल्यावर, सलाइन दिल्यावर ते मुल जरा सुधारलं. त्याबरोबर तिने त्या मुलाला आमच्याकडे सोपवलं आणि ती लगेच जायला लागली. आमचा एक कार्यकर्ता तिला म्हणाला, “अशी कशी या मुलाला सोडून जातेस? त्याच्याजवळ थांब. त्याला पूर्ण बरं वाटलं की जा.” त्यावर त्या बाईनं सांगितलं, “कॉलेराच्या साथीने काल माझा नवरा मेला. दोन्ही मुलांना लागण झाली म्हणून त्यांना घेऊन इकडे निघाले, तर एक मूल वाटेतच गेलं. त्याला तसंच झाडाखाली ठेवून याला घेऊन आले. आता याला जरा बरं आहे तोवर जाऊन त्याला पुरून येते.” इतका करून प्रसंग होता हा! आम्ही सगळेच सुन्न झालो. कोण कोणासाठी रडणार? डोळ्यांतलं पाणीच आटून जावं अशी ही परिस्थिती.

Can’t forget one of the incidence happened during the cholera epidemic. A women came to us with her child. After treating him, giving him Saline the child’s condition improved. Keeping the child with us, she immediately started to leave. One of our volunteer asked her, “How can you leave this child in such a condition? Stay with him, let him recover completely and then leave.” On that she told, “Due to cholera out break my husband died yesterday. Both the kids got infected so I started to come here, but on the way one kid died. I kept him under the tree and came with this kid. Now while this kid is ok, I’ll go and bury that kid.” It was very depressing! We all were speechless. Who will cry for whom? Eyes had all dried up to cry.

The book ends with how next generation has started contributing to the work and how things are done by them. They now have website called lokbiradariprakalp.org. Someday I would visit this place. Would like to see if I can be of any help.

Test Automation

Here are the presentation slides that I used for my talk on Test Automation. Last slide lists the reference material I used while preparing for this presentation. Also check out my post on making of this presentation where I talk about how I prepared for this presentation.

Making of a Presentation

Yesterday I gave a presentation on Test Automation in an event arranged by a college. My first participation as a presenter in some special event.

While preparing for the presentation, I took notes on things that I did. I wanted to make a standard procedure and have a check list ready to refer next time I prepare for any presentation. This post is about my observations while I was making the presentation.

  1. First of all I wasted a lot of time in searching for a good power point template. I knew its the content that matters and not the cosmetic things but still I wanted a good, professional template. I didn’t find many. The one that I liked was paid and too costly. Finally I settled on to one decent, free template. I liked its color scheme and it looked pretty professional. Later I realized its the same template that Steve Huffman had used in his presentation. Great minds think alike, you know ;) I should have 2-3 more templates ready with me so that I don’t waste time on selecting the template next time. Its the look and feel, color scheme and ability to draw diagrams in the same color scheme that I look for in the template.
  2. Once I decided the topic for my presentation, many ideas immediately started rushing in my head. I could cover this, I could cover that, I could give this as an example and so on. They came all at once to me. One good thing I did was I opened my notepad and started typing whatever came to my mind. It pretty much set the agenda for my presentation. I should do this next time I finalize on the topic for the presentation.
  3. Next, I spent lots of time searching for good material on the topic. It was not based on my experiences as such so I had to refer lots of material to include in the slides. And I searched on few non-common sites for the material. It surprised me because I would not have normally thought of visiting those sites. Here’s the full list:
    1. google.com
    2. flazx.com
    3. tenderleaves.com
    4. news.ycombinator.com
    5. youtube.com
    6. torrents
  4. Preparation:
    1. Unless you are the pioneer of the topic, you would read lot of material on the topic. Your initial objective of reading is to judge the quality of the material and discard stuff that is not useful. In the process you note down which material could help you in preparing which part of the presentation. Like while talking about Agile and Automation I referred a completely different white paper found on some other website.
    2. Once you have finalized on the material that you would be referring for the presentation, start reading it. Thorough reading should be done. In the process you start selecting the topics, summaries that you think could be used for the presentation and start creating slides with headings on them.
    3. Start filling the slides, while re-reading the material and note down the sentences you want to cover in your talk.
    4. Spend good time on drawing the diagrams from the material in the color scheme of your slides. Do not copy paste the images from any material. It spoils the theme of the slides.
    5. Iterate over the process still you feel comfortable with the content of your presentation and amount of research.
    6. Note down the source of all the material referred and ensure they are listed on one of the slides.
    7. Finally, take printout of the slides and start writing on them points that you are going to say. Don’t write sentences, just few words telling you what you are going to say. These are the notes that you will keep with you during the presentation.
    8. The whole objective of the preparation should be to go away from the reference material and put things in your own words. You should not have to memorize any sentence. That’s a sign of danger. Everything said should be from your understanding of the topic. If possible try to make it sound like a story or some kind of a flow.
  5. One week before:
    1. Select the dress you would be wearing. Do whatever is required for making it ready for the presentation.
    2. Get your shoes ready for the presentation.
    3. Get a hair cut if required.
    4. Know the place where you would be giving the presentation. Know the route, how you would be reaching there and how much time you would need to reach there on the day of the presentation.
    5. If possible visit the place where you would be giving the presentation. I have always found it useful to know where I would be standing, where I will keep my notes, where the mouse, key-board would be.
    6. If its possible to visit the place, know where the rest room is, find a temporary place where you could sit and relax once you arrive for the presentation, where you could keep you bag and other stuff not required during the presentation.
    7. As described earlier take printouts of the slides and make notes on them.
  6. One day before:
    1. Be ready with your opening line without any confusion. Whatever it is, try not to change it. I use “Hello everyone, thanks for having me here. I’ll be talking about..”. Prefer “Hello everyone” over “Good morning/afternoon/evening” simply because it does not involve effort to know what time of the day it is. Your presentation may get delayed from morning to afternoon. You don’t want to get that wrong so avoid it altogether.
    2. Practice Session 1 - Practice giving the presentation out loud in your words. You should be able to explain the topics in your words without referring to the material. Note down the mistakes that you do, words/topics that you didn’t want to say. Correct the errors in the slides etc.
    3. Practice Session 2 - A quick practice session deliberately avoiding the mistakes made earlier. Remember the complete flow of the presentation in your head, with sequence of slides and sequence of points to be covered in each slide.
    4. Shave. You don’t want to do it in hurry so don’t do it on the morning of the presentation day.
    5. Clean your spectacles.
    6. Change the desktop wallpaper of the laptop you will be using for the presentation. You don’t want to distract your audience just before you start the presentation.
    7. Backup you presentation slides on Pen Drive, Laptop and Cloud.
    8. Keep a nice working pen with you.
    9. Watch a video presentation/talk of somebody that inspires you or even of whom you would like to imitate. Notice how they started their presentation, how they ended it, how they moved from one topic to other, from one slide to other, how they took Q&As etc. I watched Steve Huffman’s presentation couple of hours before my presentation and that’s when I noticed he too was using the same template that I had selected for my slides.
    10. Put spare laptop charger in your bag.
    11. Keep small water bottle with you that you could carry during the presentation.
  7. During the presentation
    1. One of the problem that I faced in my last tech talk was that my throat went completely dry just before I started talking. It was so bad that I was thinking of giving up the presentation. This time I solved the problem. I carried a small water bottle with me during the presentation and it helped. Its just that I couldn’t find proper timing to pause for drinking the water. It always felt awkward to drink water in middle of all the talking you were doing. I think I should have my pause timings planted in the presentation. For ex I could pause when a new slide with some diagram is displayed. I can ask the audience to take a look at the diagram while I take a quick drink break. Or I could ask them some question/quick poll, or ask them if they have any question and drink water while waiting for any answer.
    2. Keep your opening line ready.
  8. After the presentation:
    1. Don’t forget any stuff that you received at the event especially any memento etc. I forgot the one given to me! It feels rude to the organizers.
    2. Immediately after the presentation, you know precisely how it went and more precisely what mistakes you did. Write them down before you forget. Write a blog post about it.
    3. Complete any communication that you are expected to close. Like mailing the slides/pdf, sending thank you note etc.

That’s all I have for now. I am sure I’ll come up with new suggestions next time I prepare for a presentation. May be I’ll update this post then. Or may be I’ll write a new post.

Hope future me finds these suggestions useful.