Libvirt-bin ignores libvirtd_opts from /etc/default

Bug #557054 reported by Jason Harvey on 2010-04-07
62
This bug affects 10 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Wishlist
Unassigned
Declined for Lucid by Mathias Gug

Bug Description

I have modified the libvirtd_opts line in /etc/default/libvirt-bin, and the init script appears to be ignoring the changes.

root@beast:/etc/libvirt# grep opt /etc/default/libvirt-bin
# options passed to libvirtd, add "-l" to listen on tcp
libvirtd_opts="-l -d"
root@beast:/etc/libvirt# service libvirt-bin start
libvirt-bin start/running, process 2968
root@beast:/etc/libvirt# ps aux | grep libvirtd
root 2968 0.7 0.2 217288 4528 ? Sl 00:56 0:00 /usr/sbin/libvirtd -d

As you can see, the libvirtd was not started with the "-l" flag I specified in the /etc/default file.

Running Lucid amd64 beta-1, server spin.

tags: added: lucid
Dustin Kirkland  (kirkland) wrote :

See the inline comment in /etc/init/libvirt-bin.conf.

Evidently, this is the way to do things in Upstart world...

Changed in libvirt (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged

On Wed, Apr 07, 2010 at 04:55:31PM -0000, Dustin Kirkland wrote:
> See the inline comment in /etc/init/libvirt-bin.conf.
>
> Evidently, this is the way to do things in Upstart world...
>

It may be worth adding a note to the /etc/default/libvirt-bin file. So that
users upgrading to lucid which have a locally modified default file would be
prompted and (hopefully) see the note.

OTOH the default file should be removed if upstart is used. In which case the
upgrade needs to prompt the user in another way.

--
Mathias Gug
Ubuntu Developer http://www.ubuntu.com

mdrozdziel (mdrozdziel) wrote :

This problem is still present in maverick, yet no note were added to /etc/default/libvirt-bin. :(

gdahlman (gdahlman) wrote :

Still an issue in Natty, even a comment in /etc/default/libvirt-bin would be nice.

Serge Hallyn (serge-hallyn) wrote :

/etc/init/libvirt-bin.conf should say:

# If you used to set $libvirtd_opts in /etc/default/libvirt-bin,
# change the 'exec' line here instead.
exec /usr/sbin/libvirtd $libvirtd_opts

Agreed though a comment should be added to /etc/default/libvirt-bin, the next time the package gets uploaded.

Danny Sauer (ubuntu-dannysauer) wrote :

Why, two years later, is the file in /etc/default even created if it's not used?

And yes, this is still present in 11.10

Serge Hallyn (serge-hallyn) wrote :

Quoting Danny Sauer (<email address hidden>):
> Why, two years later, is the file in /etc/default even created if it's
> not used?

It is used.

> And yes, this is still present in 11.10

And it's read by /etc/init/libvirt-bin in 11.10

If this has regressed for you, please file a new bug, using
'ubuntu-bug libvirt-bin' if possible, so we can gather the
necessary information to debug.

Thanks.

Changed in libvirt (Ubuntu):
status: Triaged → Fix Released
Jgalvatron (jamesgalvin2007) wrote :

Hi All,

Apologies if I am posting this in the wrong place its my first bug report,

I am seeing the same issues on Ubuntu 14.04

I change the "-l" flag in any of these places and restart the libvirt-bin process and i get the following in the logs:

Apr 9 14:39:26 compute1 kernel: [ 19.019176] init: libvirt-bin main process (1897) terminated with status 6
Apr 9 14:39:26 compute1 kernel: [ 19.019196] init: libvirt-bin main process ended, respawning
Apr 9 14:39:26 compute1 kernel: [ 19.063625] init: libvirt-bin main process (1918) terminated with status 6
Apr 9 14:39:26 compute1 kernel: [ 19.063645] init: libvirt-bin main process ended, respawning
Apr 9 14:39:26 compute1 kernel: [ 19.104337] init: libvirt-bin main process (1935) terminated with status 6
Apr 9 14:39:26 compute1 kernel: [ 19.104353] init: libvirt-bin main process ended, respawning
Apr 9 14:39:26 compute1 kernel: [ 19.148626] init: libvirt-bin main process (1958) terminated with status 6
Apr 9 14:39:26 compute1 kernel: [ 19.148646] init: libvirt-bin main process ended, respawning
Apr 9 14:39:26 compute1 kernel: [ 19.189453] init: libvirt-bin main process (1975) terminated with status 6
Apr 9 14:39:26 compute1 kernel: [ 19.189470] init: libvirt-bin main process ended, respawning
Apr 9 14:39:26 compute1 kernel: [ 19.229937] init: libvirt-bin main process (1992) terminated with status 6
Apr 9 14:39:26 compute1 kernel: [ 19.229955] init: libvirt-bin respawning too fast, stopped

First I changed the following in /etc/default/libvirt-bin

libvirtd_opts="-d"
to
libvirtd_opts="-d -l"

restarted process got the above in the logs

so I then tried editing

/etc/init/libvirt-bin.conf

And changed the line:
exec /usr/sbin/libvirtd $libvirtd_opts
to
exec /usr/sbin/libvirtd -d -l

restarted and no joy still wont start libvirt after the change,

Any help would be appreciated

Thanks,

James

Serge Hallyn (serge-hallyn) wrote :

Try running
sudo /usr/sbin/libvirtd -d -l

by hand and look for the error. I get

2015-04-09 15:54:30.220+0000: 15803: error : virNetTLSContextCheckCertFile:120 : Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory

Did you create a certificate?

 status: incomplete

Changed in libvirt (Ubuntu):
status: Fix Released → Incomplete
status: Incomplete → Fix Released
Jgalvatron (jamesgalvin2007) wrote :

Thanks serge was a weird one I changed the configuration the other way around on all nodes I set flags -l -d

Instead of -d -l

And it seemed to work on all nodes

Thanks

Sent from my iPhone

> On 9 Apr 2015, at 17:06, Serge Hallyn <email address hidden> wrote:
>
> Try running
> sudo /usr/sbin/libvirtd -d -l
>
> by hand and look for the error. I get
>
> 2015-04-09 15:54:30.220+0000: 15803: error :
> virNetTLSContextCheckCertFile:120 : Cannot read CA certificate
> '/etc/pki/CA/cacert.pem': No such file or directory
>
> Did you create a certificate?
>
> status: incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/557054
>
> Title:
> Libvirt-bin ignores libvirtd_opts from /etc/default
>
> Status in libvirt package in Ubuntu:
> Fix Released
>
> Bug description:
> I have modified the libvirtd_opts line in /etc/default/libvirt-bin,
> and the init script appears to be ignoring the changes.
>
>
> root@beast:/etc/libvirt# grep opt /etc/default/libvirt-bin
> # options passed to libvirtd, add "-l" to listen on tcp
> libvirtd_opts="-l -d"
> root@beast:/etc/libvirt# service libvirt-bin start
> libvirt-bin start/running, process 2968
> root@beast:/etc/libvirt# ps aux | grep libvirtd
> root 2968 0.7 0.2 217288 4528 ? Sl 00:56 0:00 /usr/sbin/libvirtd -d
>
>
> As you can see, the libvirtd was not started with the "-l" flag I specified in the /etc/default file.
>
> Running Lucid amd64 beta-1, server spin.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/557054/+subscriptions

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