cgred should be started before libvirt-bin

Bug #644669 reported by Philippe Clérié on 2010-09-21
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
libcgroup (Fedora)
Unknown
Unknown
libcgroup (Ubuntu)
Medium
Jon Bernard

Bug Description

This bug was reported against libvirt-bin as #577264. There was a request to file a bug against libcgroup and 577264 was closed. The bug was not filed against libcgroup so I am filing it.

The bug description in 577264 is correct. Right now for example any VM started automatically at boot time works perfectly but anything started after that will trigger the reported error. The work around proposed also works.

I am running Lucid and my systems are up to date as of today (21-Sep-2010).

Regards
Philippe

Changed in libcgroup (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in libcgroup (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
Serge Hallyn (serge-hallyn) wrote :

As suggested on the upstart-dev list by Clint, I'll add the following upstart job to cgred:

# libvirt-cgred-wait
start on starting libvirt-bin
stop on started cgred or stopped cgred

task
normal exit 2
script
  status cgred | grep -q "start/running" && exit 0
  start cgred || true
  sleep 3600
end script
# EOF

tags: added: upstart
Serge Hallyn (serge-hallyn) wrote :
Serge Hallyn (serge-hallyn) wrote :

Could you try the packages attached in comment #2 and see if they do what you need?

Serge Hallyn (serge-hallyn) wrote :

As natty feature freeze is tomorrow, it would be great to get the libvirt packages in. Has anyone had a chance to test?

On Wednesday, 23 February 2011 12:11:08 you wrote:
> As natty feature freeze is tomorrow, it would be great to get the
> libvirt packages in. Has anyone had a chance to test?

I planned to check it out but I had hoped for a patch to the lucid package.
The fix comes with a new upstream version, so I would prefer to set up another
server to do that. That's a little more complicated and I haven't gotten
around to it just yet. Sorry!

--

Philippe

------
The trouble with common sense is that it is so uncommon.
<Anonymous>

Serge Hallyn (serge-hallyn) wrote :

@Philippe,

could you try the debs from comment #6?

Philippe Clérié (pclerie) wrote :

On Thursday, 24 February 2011 11:09:03 you wrote:
> @Philippe,
>
> could you try the debs from comment #6?

Looks ok.

I made sure to purge libvirt-bin, libcgroup1 and cgroup-bin before installing
your packages. My VM now start correctly with no tweaking.

--

Philippe

------
The trouble with common sense is that it is so uncommon.
<Anonymous>

Serge Hallyn (serge-hallyn) wrote :

Quoting Philippe Clérié (<email address hidden>):
> On Thursday, 24 February 2011 11:09:03 you wrote:
> > @Philippe,
> >
> > could you try the debs from comment #6?
>
> Looks ok.
>
> I made sure to purge libvirt-bin, libcgroup1 and cgroup-bin before installing
> your packages. My VM now start correctly with no tweaking.

Thanks, Philippe - would you mind pasting the output of

 cat /proc/self/mounts

here?

Philippe Clérié (pclerie) wrote :

On Thursday, 24 February 2011 12:39:22 you wrote:
> Quoting Philippe Clérié (<email address hidden>):
> > On Thursday, 24 February 2011 11:09:03 you wrote:
> > > @Philippe,
> > >
> > > could you try the debs from comment #6?
> >
> > Looks ok.
> >
> > I made sure to purge libvirt-bin, libcgroup1 and cgroup-bin before
> > installing your packages. My VM now start correctly with no tweaking.
>
> Thanks, Philippe - would you mind pasting the output of
>
> cat /proc/self/mounts
>
> here?

Perhaps you are right to be suspicious. CGroup is not mounted.

/var/log/syslog has the following lines:

libvirt-cgred-wait main process (1096) killed by TERM signal
cgred main process (1120) terminated with status 81

and:

service libvirt-bin status

produces:

libvirt-bin start/running, process 1137

Did I miss something?

--

Philippe

------
The trouble with common sense is that it is so uncommon.
<Anonymous>

Serge Hallyn (serge-hallyn) wrote :

> Perhaps you are right to be suspicious. CGroup is not mounted.

Ah, that's only bc I'm an idiot. /sys/fs/cgroup (which is created
by the kernel) doesn't exist in lucid.

Serge Hallyn (serge-hallyn) wrote :
Serge Hallyn (serge-hallyn) wrote :

@philippe,

thanks for testing the previous version. The debs attached in comment #12 worked for me in a lucid VM. Can you confirm whether they work for you?

(The associated lp:~serge-hallyn/ubuntu/lucid/libcgroup/upstart tree is updated with the trivial fix)

Philippe Clérié (pclerie) wrote :

Sorry for the delay.

cgroups is now mounted. But you still need to add a /mnt/cgroups/devices to
cgconfig.conf to load a vm.

And while I'm at it, /mnt is really not a good place to put cgroups.
Mounting anything to /mnt is sure to cause a crash.

--

Philippe

------
The trouble with common sense is that it is so uncommon.
<Anonymous>

On Thursday 24 February 2011 22:33:21 you wrote:
> @philippe,
>
> thanks for testing the previous version. The debs attached in comment
> #12 worked for me in a lucid VM. Can you confirm whether they work for
> you?
>
> (The associated lp:~serge-hallyn/ubuntu/lucid/libcgroup/upstart tree is
> updated with the trivial fix)

Serge Hallyn (serge-hallyn) wrote :

Quoting Philippe Clérié (<email address hidden>):
> Sorry for the delay.
>
> cgroups is now mounted. But you still need to add a /mnt/cgroups/devices to
> cgconfig.conf to load a vm.

Thanks very much for the info, Philippe.

> And while I'm at it, /mnt is really not a good place to put cgroups.
> Mounting anything to /mnt is sure to cause a crash.

That's why /sys/fs/cgroup was decided upon as the "right" place. It's
just not an option in lucid.

At this point, as the upstart-related work appears to be done, I will
ask jbernard as the maintainer to take over. It'll be far better for
him to decide what to do about mount points, given the needs of older
releases.

Thanks again for testing.

Serge Hallyn (serge-hallyn) wrote :

@Jon,

if you prefer I'll re-take this bug and do merge proposals for each release. But since I'm not sure what you'll want to do about the mountpoints, assigning the bug to you seemed prudent.

thanks,
-serge

Changed in libcgroup (Ubuntu):
assignee: Serge Hallyn (serge-hallyn) → Jon Bernard (jbernard)
Jon Bernard (jbernard) wrote :

I've just pushed a branch that's been sync'd with Debian's version 0.37.1-1. This sync pulls in two security fixes that should be included in Natty if possible. I've rebased Serge Hallyn's patches on top of this branch, so they are included as well.

Branch is at lp:~jbernard/ubuntu/lucid/libcgroup/upstart

Jon Bernard (jbernard) wrote :
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libcgroup - 0.37.1-1ubuntu1

---------------
libcgroup (0.37.1-1ubuntu1) natty; urgency=low

  * Mount a tmpfs at /sys/fs/cgroup so cgred can create subdirs. Otherwise
    the whole thing fails.
  * Convert to upstart (LP: #644669)
  * add a job to make libvirt (if it is installed and starts) wait until
    cgred is running.
 -- Serge Hallyn <email address hidden> Thu, 17 Feb 2011 18:03:17 -0600

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.