Monday, April 2, 2012

Configuring Network Interfaces on Linux

Most of the Linux distros are derivative from one of these mainstream distributions
  1. RedHat e.g. ScientificLinux, CentOS, Rocks, Fedora
  2. Debian e.g. Ubuntu, Linux Mint
 Despite their common root (Linux) the way how they configure devices and services varies dramatically.
On RedHat systems, the main configuration files are /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-ethN. Here you can find data and syntax of these files.
On Debian, the main file is /etc/network/interfaces. How to populate that file can be found here.
When modifications have been done, the way how the changes are taken is as follows
  1. On RedHat run sudo /etc/init.d/network restart
  2. On Debian-based run sudo /etc/init.d/networking restart
 When major changes are performed additional steps could be required, for instance, when a new network interface is "inserted".

Monday, March 26, 2012

Undergrad project proposal

This will be a periodic blog entry where different proposals for grad and undergrad projects will be post.

Last week, I attended the Open Science Grid All-hands meeting held on Lincoln, Nebraska. There, I had the opportunity to talk with José Caballero and he later sent me an e-mail where a couple of projects were described. I won't share the e-mail's content but a summary of my better understanding of the problems to be need addressed.

But what is grid computing? Well, grid computing is a large scale computational platform where resources are scattered geographically and shared by institutions around the globe following secure standardize mechanisms. Storage and processing are the resources more frequently shared by grid users. Links:,

Take care that I bolded three words: secure, institutions and processing. Lets see a detailed view of them

  • Institutions. Computational resources are deployed or installed in different centers or buildings. People with proper rights could access these resources according to policies established by owners of those resources.
  • Secure. Information and physical resources are shared in a secure way. Following well-known authentication mechanisms, users and resources are identified in such a way that secure interactions can be performed between them.
  • Processing. Any resource which is attached to a computational device is a good candidate for being shared in a grid platform. In particular, some institutions have hundreds or even thousands of cores which are underutilized most of the time. Grid computing has defined and implemented protocolos to leverage the sharing of processing units amongst users belonging to digital communities, a.k.a. Virtual Organizations, VO. Check this picture.

What is the problem with job submission in a grid environment? It's not an easy task for end users
  • A user should get grid certificates, X.509
  • He/she needs to learn about basic basic command for interoperating with condor-based clusters.
  • Mechanisms for prioritizing the jobs execution and resource brokering are many time hard-coded in the grid meta-schedulers.

A software solution to tackle all these problems is barely found. Some solutions partly solved this problem, e.g. glideinWMS (1st bullet) and PanDA (2nd and 3rd bullets). The main problem with PanDA is that it is highly attached to ATLAS. ATLAS is a USA computational infrastructure where different research projects are run. Different VOs need badly a software tool able to support all these features.

The main goal of this project is create a web application highly customizable where different features can be changed "on the fly", for instance:
  • Scheduling algorithms
  • Priority policies

The web application should employ any SQL database as back-end. That database stores the representation of a job. For instance, PanDA stores the following information to represent a job
  • Binary filename. This filename is the actual program that should be remotely executed. This filename could be a full path directory or a URL.
  • Argument list.
  • Hash list. Some samples for keys in nodes in this hash list can be
  • siteid, a name to represent a queue where this job can be queued
  • queue, a compute element's name
The web application should support the monitoring of the jobs: job owner, job state, etc.

Additional notes:
  • The web application can run in a machine different from the machine where the job runs.
  • cURL is the tool to provide secure interaction amongst the web application and the execution machine.

Monday, January 2, 2012

Focus follows mouse for Unity

Something that I love from X window systems is the possibility to activate a window with no click on it. However, Unity and Gnome 3 by default do not make accessible this feature. I googled how to activate the "focus follows mouse" feature and I found this link. I typed these commands and now the feature is back ;-)

gconftool-2 --type string --set /apps/metacity/general/focus_mode mouse
gconftool-2 --type boolean --set /apps/metacity/general/auto_raise false

Tuesday, December 13, 2011

"apt-get upgrade" "packages have been kept back"

I have deactivated the automatic upgrade process in my Ubuntu box then every one or two week I execute the following steps,

sudo apt-get update
sudo apt-get upgrade

However, today during the upgrade process I got this message:

Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages have been kept back:
  linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

I didn't understand why this happened so I googled and I found this link where it explains that "the packages that have newer versions available, and install any new dependencies which are required to do that." Then for fixing this, just run the "apt-get dist-upgrade" command.

Monday, November 21, 2011

How to find the window id in xorg

Execute "xwininfo", that's it.

Preseeding files for automatic installation of Linux systems

Days ago, I found an interesting link which explains how to install Linux systems answering no questions. This procedure doesn't require any particular CD, you can use your regular installation CD along with a text file where answers to the usual questions for installing a Linux system are responded.

The original link can be found here and additional information about content of preseeding files can be obtained from here and here.

This procedure is a blessing when you frequently install Linux systems.

This procedure was initially implemented for RedHat systems but it was later extended to Ubuntu systems. The preseeding file and variables defined in it are release dependent, for instance a preseeding file for lucid may not work oneiric.

Finally, if you wan additional info, this kind of procedure is also referred as "preconfiguration file", "preseeding file" and "installcdcustomization".

Wednesday, October 19, 2011

Error in API call to delete - Vagrant

These days, I'm heavily working with Vagrant and Chef. During my working sessions, I created several scripts then run "vagrant up", scripts fail then "vagrant destroy" then do some modifications, run "vagrant up" again and this loop occurs for many times. Suddenly, "vagrant up" doesn't run but arises this message:

[node1] Destroying VM and associated drives...
/var/lib/gems/1.8/gems/virtualbox-0.9.1/lib/virtualbox/com/implementer/ffi.rb:106:in `call_and_check': Error in API call to delete: 2147944126 (VirtualBox::Exceptions::COMException)
    from /var/lib/gems/1.8/gems/virtualbox-0.9.1/lib/virtualbox/com/implementer/ffi.rb:80:in `call_vtbl_function'

Looking into log files (${HOME}/.VirtualBox), I found that for an unknown reason "vagrant destroy" can not delete the directory which contains the disk attached to the virtual machine.  Solution: erase that directory by hand. Problem solved!