Thursday, May 29, 2008

Use Puppet to Set the Ethernet Speed

The way our network is configured, the workstations perform much better if their nic speed is set, rather than using auto negotiation.

It's easy enough to go out to each of the machines to do this, but it is much easier to let Puppet do the grunt work.

This is a class that will do just that for Red Hat based workstations (the class resides in its own file /etc/puppet/manifests/classes/nic_speed.pp):
class nic_speed {
   case $hostname {
"host01",
"host02",
"host07",
"host08",
"host10": {
# Set the nics to 100 half
append_if_no_such_line{ eth0:
file => "/etc/sysconfig/network-scripts/ifcfg-eth0",
line => 'ETHTOOL_OPTS="speed 100 duplex half autoneg off"'}
}
default: { }
}
}

The hosts listed in the case statement will have the ETHTOOL_OPTS line appended to their ifcfg-eth0 file, all others will use the default, which is to do nothing.

append_if_no_such_line is not native functionality of Puppet and is part of a custom class called cfengine.pp that adds a few commonly used features of CFengine:
# /etc/puppet/manifests/classes/cfengine.pp

define append_if_no_such_line($file, $line, $refreshonly = 'false') {
exec { "/bin/echo '$line' >> '$file'":
unless => "/bin/grep -Fxqe '$line' '$file'",
path => "/bin",
refreshonly => $refreshonly,
}
}

define delete_lines($file, $pattern) {
exec { "sed -i -r -e '/$pattern/d' $file":
path => "/bin",
onlyif => "/bin/grep -E '$pattern' '$file'",
}
}

Wednesday, May 28, 2008

nVidia Release Driver With Preliminary X.org 1.5 Support

Fedora 9 users rejoice, nVidia has released a driver for Linux that claims "preliminary support" for X.org 1.5.

Here are the release notes of interest for the Dell XPS notebook
  • Added preliminary support for X.Org server 1.5
  • Improved hotkey switching and power management support on some GeForce 8 notebooks
  • Resolved a problem resulting in X startup to fail on some GeForce 8 and 9 systems without swap space
  • Restored compatibility with recent Linux 2.6 kernels
The driver hasn't yet made it into the Livna release repo, it should make it into the livna-testing repo soon.

The driver can be installed without using the repo by downloading NVIDIA-Linux-x86-173.14.05.pkg1.run and running it from a terminal after switching to runlevel 3.

If you encounter driver related bugs, please email them to linux-bugs@nvidia.com so that nVidia can continue to improve the Linux driver.

The official nVidia driver release page can be found here.

Wednesday, May 21, 2008

VMware Roll for Rocks 5 Clusters

Rocks 5 (www.rocksclusters.org) released April 30, 2008 using Red Hat EL5 (CentOS5) as the underlying operating system and support for Xen virtual machines.

Adding virtual machines to a computing cluster is a terrific idea. Think about the possibilities from an admin stand point. Say that user jsmith needs his compute nodes configured with Red Hat 7 because his application is old and won't work in current releases. With the virtual machine approach, it's very easy to satisfy this request without having to carve out physical compute nodes for reinstallation.

Not to be out done, Takahiro Hirofuchi of AIST announced that they are working on a VMware Roll for Rocks 5 (they also have plans for a Rock 4.2 version).

I'm a VMware guy and haven't done a whole lot with Xen, so this roll is very appealing.

They list the features as:
The project page is hosted on Code Google (http://code.google.com/p/grivon/wiki/VMwareRollRocks5).

Wednesday, May 14, 2008

Initial Fedora 9 Thoughts

Update, the resolution to the sound not working through the built in speakers, launch the Volume Control application, under preferences add Surround Sound to the control and unmute it.

I've installed Fedora 9 i386 on my Dell XPS M1330 laptop a couple times now and have some thoughts to share:

  • Boo: nVidia drivers are not available due to the fact that F9 released with a pre release version of X server 1.5 (1.4.99.901 to be precise). This should be remedied soon since 1.5 is supposed to officially release soon. Then we just wait for nVidia to roll out a driver.
  • Boo: Sound does not work through my laptops built in speakers nor through headphone jack 1 (see bug report # 446689. Sound does work for devices plugged into headphone jack 2. Sound worked out of the box in Fedora 8. I haven't trouble shot this issue yet, but lspci shows the sound card as:
    00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
  • Nice: Wireless and and wired networking comes up much cleaner in F9 than earlier. NetworkManager starts automatically, and eth0 doesn't sit hold up the boot process looking for an address in the absence of a network cable.
  • Nice: I am not asked to enter my keyring passphrase every time NetworkManager authenticates with a WAP, I found this to be annoying in F8, the workaround was to install gnome-keyring-pam, which appears to be installed by default on F9
  • Boo: The new software updater, PackageKit, gui doesn't reveal enough information. When updating, the gui shows progress bars and package names, but doesn't tell you what version it is updating too / from. It'd be nice if they provided a "More Info" or equiv button
  • Boo: After connecting to my WAP, I get a pop up from the power monitor app "Sleep warning: Your laptop will not sleep if you shut the lid as a running program has prevented this...", Ok that's a start, but as a user I want more information, the dialogue doesn't provide any clues to the offending application, how it's preventing sleep nor does it provide a link to research the message
  • Boo: Shutdown very quickly closes X (nice), but then you are taken to VT1 where all you see is a login prompt, meanwhile all of the shutdown action is going on on VT7. The first time I shut down, I thought maybe X had crashed, I was about to log in to the shell when the machine powered off. I like to see something that indicates progress.
  • Nice: F9 install of OpenOffice 2.4 doesn't nerf Calc's ability to do more intelligent autofills. In F8, the following would not continue the sequence: In cell A1 and A2 enter "compute-0-1" "compute-0-2", select both and drag down to include A3,A4,A5. The sequence should continue, "compute-0-3", "compute-0-4", "compute-0-5". In F8, it wouldn't do this, however removing it and installing 2.3.1 from the OO site worked.
  • Boo: The Synaptics touch pad no longer allows 'taps' to activate left mouse clicks. According to this bug report # 439386 this is not so much a bug, as an issue with the synaptics package being compiled with tapping disabled. I like tapping, just not while I'm typing

Fedora 9 (Sulphur) Is Out

Fedora 9 has officially released, I plan to post a Dell XPS M1330 install (upgrade possibly) guide shortly.

http://fedoraproject.org/

Some highlights in this release:

  • PackageKit replaces pirut as the package management frontend to yum. PackageKit's goal is to provide a standardized interface for installing and updating packages, abstracting the user from the actual (yum, apt, etc...) software used by the system
  • NetworkManager improvements (it's also configured to start by default, which wasn't the case in F8) such as Ad-Hoc networks (form a wireless network with other nearby wireless clients) and support for PolicyKit
  • Gnome 2.22, which uses the new Gnome Display Manager, rather than gdm
  • KDE Desktop 4.03 with the promise that version 4.1 will be available via the normal update repo later this year when it is release upstream
  • Firefox 3 (well, it's really Firefox 3 beta5)
  • OpenJDK6 as the default Java
  • Improved speeds for startup and shutdown of X (the project claims approx 1 second for each)
  • Drive encryption and ext4 file system support