Thursday, September 8, 2011

New required kickstart line in Fedora 16

Just a quick note for anyone looking at Fedora-16. From Fedora-16 forward, you need a new line in your kickstart that looks like:
part biosboot --fstype=biosboot --size=1

I'm honestly not sure what this is exactly needed for, but unattended kickstart installs will not start without it. There is a bit more information at https://fedoraproject.org/wiki/Anaconda/Kickstart

Tuesday, September 6, 2011

Services and systemd

I spent some time last week poking around systemd and trying to figure out how certain things work. I can't claim to be an expert yet, but I did uncover some things that I found to be very useful.

If you try to start a service on a machine with systemd (Fedora-15, for instance), it actually looks different then with a traditional SysV style init.

SysV:

[root@localhost ~]# service mongod start
Starting mongod: [ OK ]
[root@localhost ~]# service mongod stop
Stopping mongod: [ OK ]
[root@localhost ~]# /etc/init.d/mongod start
Starting mongod: [ OK ]
[root@localhost ~]# /etc/init.d/mongod stop
Stopping mongod: [ OK ]
[root@localhost ~]#

Systemd:

[root@localhost ~]# service mongod start
Starting mongod (via systemctl): [ OK ]
[root@localhost ~]# service mongod stop
Stopping mongod (via systemctl): [ OK ]
[root@localhost ~]# /etc/init.d/mongod start
Starting mongod (via systemctl): [ OK ]
[root@localhost ~]# /etc/init.d/mongod stop
Stopping mongod (via systemctl): [ OK ]
[root@localhost ~]#

"(via systemctl)" is a small but important change to how services are launched. With SysV-style scripts, the scripts are executed more-or-less directly from the bash shell they are launched from (the "service" binary does a little more in terms of cleaning up the environment, but it still ends up exec'ing the script in the end).

With systemd this all changes. One of the first things nearly all initscripts do is to source /etc/init.d/functions. On a systemd-enabled system, the very first thing that /etc/init.d/functions does is to execute systemctl and then exit (ignoring the rest of the initscript). What systemctl does is to put a message on dbus asking for the service you specified to be started. systemd itself is listening on dbus; when it sees a message like this, it picks up the message and proceeds to act on it. It first looks to see if there is a native systemd unit file for this service; if there is, it starts the service according to the native unit file and returns status to systemctl, which returns status to service. If there is no native systemd unit file, it then looks in /etc/init.d for a legacy script. If one is found, then it fork and exec's that script, and returns the status to systemctl, which returns to service.

This leads to one of the most visible issues with systemd, in that there is no output if the initscript fails. That is, if you are using a legacy style initscript and you are used to certain output being shown when something fails, it may not be shown anymore since that output was consumed by systemd itself and not returned to systemctl.

One way to deal with this is to skip the redirect from service to systemctl. There are different ways to do this depending whether you are using the "service" binary or if you are executing the script directly. If you are using the service binary, it understands a new flag to skip redirection to systemd:
service --skip-redirect foo start
If you are directly executing the initscript, you need to pass an environment variable:
SYSTEMCTL_SKIP_REDIRECT=1 /etc/init.d/foo start

Monday, August 22, 2011

Oz 0.6.0 release

I'm pleased to announce release 0.6.0 of Oz. Oz is a program for doing automated installation of guest operating systems with limited input from the user.

Release 0.6.0 is a bugfix and feature release for Oz. Some of the highlights between Oz 0.5.0 and 0.6.0 are:

  • The ability to specify the destination for the ICICLE output from oz-install
    and oz-generate-icicle

  • pydoc class documentation for all internal Oz classes

  • Automatic detection of KVM or QEMU at runtime (this allows oz to be used within virtual machines, although with a large performance hit)

  • Less scary warning messages in the debug output

  • Printing of the screenshot path when a build fails

  • Ability to run multiple Oz installs of the same OS at the same time

  • Support for OEL and ScientificLinux

  • Support for RHEL-5.7

  • Support for CentOS 6

  • Support for OpenSUSE arbitrary file injection and command execution

  • Ability to make the TDL (template) parsing enforce a root password

  • Rejection of localhost URLs for repositories (since they must be reachable from the guest operating system, localhost URLs make no sense)


Fedora-14, Fedora-15, and RHEL-6 packages are available for this release. Note that to install the RHEL-6 packages, you must be running RHEL-6.1 or later. Instructions on how to get and use Oz are available at http://aeolusproject.org/oz.html

If you have any questions or comments about Oz, please feel free to contact aeolus-devel@lists.fedorahosted.org or me (clalance@redhat.com) directly.

Thanks to everyone who contributed to this release through bug reports, patches, and suggestions for improvement.

Friday, July 29, 2011

Release of ruby-libvirt 0.4.0

I'm pleased to announce the release of ruby-libvirt 0.4.0. ruby-libvirt is a ruby wrapper around the libvirt API. Version 0.4.0 brings new APIs, more documentation, and bugfixes:

  • Updated Domain class, implementing dom.memory_parameters=,
    dom.memory_parameters, dom.updated?, dom.migrate2,
    dom.migrate_to_uri2, dom.migrate_set_max_speed,
    dom.qemu_monitor_command, dom.blkio_parameters,
    dom.blkio_parameters=, dom.state, dom.open_console, dom.screenshot,
    and dom.inject_nmi

  • Implementation of the Stream class, which covers the
    libvirt virStream APIs

  • Add the ability to build against non-system libvirt libraries

  • Updated Error object, which now includes the libvirt
    code, component and level of the error, as well as all of
    the error constants from libvirt.h

  • Updated Connect class, implementing conn.sys_info, conn.stream,
    conn.interface_change_begin, conn.interface_change_commit, and
    conn.interface_change_rollback

  • Updated StorageVol class, implementing vol.download and vol.upload

  • Various bugfixes


Version 0.4.0 is available from http://libvirt.org/ruby:

Tarball: http://libvirt.org/ruby/download/ruby-libvirt-0.4.0.tgz
Gem: http://libvirt.org/ruby/download/ruby-libvirt-0.4.0.gem

It is also available from rubygems.org; to get the latest version, run:

$ gem install ruby-libvirt

As usual, if you run into questions, problems, or bugs, please feel free to
mail me (clalance@redhat.com) and/or the libvirt mailing list.

Thursday, July 7, 2011

Oz is now in Fedora!

Thanks to the work by Pádraig Brady, Oz is now available in Fedora 14, 15, rawhide, and EPEL 6. It should be making its way out to the mirrors shortly. Problems with the Oz package in Fedora should be reported to RedHat Bugzilla.

Thursday, June 30, 2011

Oz 0.5.0 release

I'm pleased to announce release 0.5.0 of Oz. Oz is a program for doing automated installation of guest operating systems with limited input from the user.

Release 0.5.0 is a bugfix and feature release for Oz. Some of the highlights between Oz 0.4.0 and 0.5.0 are:


  • Replace icicle-nc binary with a shell script to try various methods. Besides being more portable, this also allows us to convert Oz to a noarch RPM (thanks to Padraig Brady)

  • Support for Ubuntu 6.06

  • Support for md5sum/sha1sum/sha256sum checking of ISOs after download

  • New -x flag for oz-install to write the libvirt XML file to a user-specified location (thanks to Steve Dake)

  • Support for OpenSUSE customization

  • Support for F-15 customization (thanks to Steve Dake)

  • Support for running commands at the end of package installation (thanks to Steve Dake)



Fedora 14 and RHEL-6 packages are available for this release. Note that to install the RHEL-6 packages, you must be running RHEL-6.1 or later. Instructions of how to get and use Oz are available at http://aeolusproject.org/oz.html

If you have any questions or comments about Oz, please feel free to contact
aeolus-devel@lists.fedorahosted.org or me (clalance@redhat.com) directly.

Thursday, June 23, 2011

Release of libdeltacloud 0.9

I'm pleased to announce the release of libdeltacloud 0.9. libdeltacloud is a library for accessing the Deltacloud API from C or C++ programs. There are several important changes in this release:

  • Performance optimizations

  • Support for deltacloud driver section

  • Support for deltacloud buckets and blobs

  • Support for deltacloud loadbalancers

  • Full doxygen documentation of all of the functions

  • Other minor bugfixes


The release is available from: http://people.redhat.com/clalance/libdeltacloud/0.9

The source code is pushed to the git repository, which lives here: git://git.fedorahosted.org/deltacloud/libdeltacloud.git

As always, questions, comments, problems and patches are welcome!