/var/run/eucalyptus is not being set with correct permissions on machine reboot

Bug #431114 reported by Daniel Nurmi on 2009-09-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eucalyptus (Ubuntu)
High
Dustin Kirkland 

Bug Description

the eucalyptus init scripts create the:

/var/run/eucalyptus/*

directory(ies) on start, but do not correctly change the ownership of the created directory(ies). The init scripts (for example eucalyptus-cc) call /usr/sbin/euca_conf -check cc on startup:

        if [ ! -d $EUCALYPTUS/var/run/eucalyptus ]; then
                if ! mkdir -p $EUCALYPTUS/var/run/eucalyptus ; then
                        # error should come from mkdir
                        exit 1
                fi
                if ! chown $EUCA_USER:$EUCA_GROUP $EUCALYPTUS/var/run/eucalyptus ; then
                        # error should come from chown
                        exit 1
                fi
        fi

        if [ "$CHECK" = "cc" ]; then
            if [ ! -d $EUCALYPTUS/var/run/eucalyptus/net ]; then
                if ! mkdir -p $EUCALYPTUS/var/run/eucalyptus/net ; then
                        # error should come from mkdir
                    exit 1
                fi
                if ! chown $EUCA_USER:$EUCA_GROUP $EUCALYPTUS/var/run/eucalyptus/net ; then
                        # error should come from chown
                    exit 1
                fi
            fi
        fi

it looks like, perhaps, the /var/run/eucalyptus directory has already been created (by start-stop-daemon?) before this check is run, so the chown part never gets hit. The fix has been made upstream (>= r772), but the fix is simply to move the 'chown' stuff from above outside the check for whether the directory exists.

Thierry Carrez (ttx) on 2009-09-17
tags: added: eucalyptus

Do not forget to create /var/run/eucalyptus/net/ too (per bug #365349), otherwise only SYSTEM mode will work.

Changed in eucalyptus (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Dustin Kirkland (kirkland)
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eucalyptus - 1.6~bzr808-0ubuntu1

---------------
eucalyptus (1.6~bzr808-0ubuntu1) karmic; urgency=low

  [ Dustin Kirkland ]
  * debian/eucalyptus-udeb.finish-install: eth0 should be set to
    'manual', when configured with br0 on dhcp, LP: #430820
  * tools/euca_conf.in: ensure that /var/run/eucalyptus and
    /var/run/eucalyptus/net are created at boot and have correct
    ownerships, LP: #431114, #365349

  [ Thierry Carrez ]
  * cluster/Makefile, node/Makefile: Do not patch generated stubs if you
    didn't regenerate them, to avoid spurious build interruptions.
  * tools/eucalyptus-*.in: Do not guard initscripts basic output
    messages with VERBOSE != no (LP: #431274)
  * debian/control: Have eucalyptus-cc suggest vtun for full multi-cluster
    networking capabilities (LP: #425928)

  [ Colin Watson ]
  * Align ports used for cloud startup detection in init scripts with the
    corresponding code in euca_conf (LP: #430758).

  [ Soren Hansen ]
  * New snapshot.
  * Add a build-dependency on libc3p0-java.

 -- Soren Hansen <email address hidden> Mon, 21 Sep 2009 12:14:12 +0200

Changed in eucalyptus (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers