Okay, just as a recap: What we have in Questing today is:

# As root:
root@free-ray:~# echo $LIBVIRT_DEFAULT_URI
qemu:///system
root@free-ray:~# virsh uri
qemu:///system

# As user:
root@free-ray:~# su slyon
slyon@free-ray:/root$ echo $LIBVIRT_DEFAULT_URI
qemu:///system
slyon@free-ray:/root$ virsh uri
qemu:///system

This is achieved by having an <export
LIBVIRT_DEFAULT_URI="qemu:///system"> in /etc/profile.d/libvirt-uri.sh,
overriding the primary choice (env var) in a unusual place and therefore
leading to confusion.

When I remove the /etc/profile.d/libvirt-uri.sh script, it changes to
the upstream default of using qemu:///system for root and
qemu:///session for non-root accounts.

# As root
root@free-ray:~# echo $LIBVIRT_DEFAULT_URI

root@free-ray:~# virsh uri
qemu:///system

# As user
root@free-ray:~# su slyon
slyon@free-ray:/root$ echo $LIBVIRT_DEFAULT_URI

slyon@free-ray:/root$ virsh uri
qemu:///session


After uncommenting <uri_default = "qemu:///system"> in 
/etc/libvirt/libvirt.conf it's still the same system/session split as described 
above, therefore changing behavior from what we currently have in Ubuntu. This 
was discussed and closed WONTFIX in 
https://bugzilla.redhat.com/show_bug.cgi?id=996986 with the workaround to set 
the non-root default value in ~/.config/libvirt/libvirt.conf, which is working 
as expected, but cannot be pre-configured on a system level at installation 
time:

$ echo uri_default = \"qemu:///system\" >>
~/.config/libvirt/libvirt.conf


So I wonder: Why did Ubuntu start to deviate from the upstream behavior here? 
Do we want to keep this, or revert to the default behavior (i.e. just drop the 
profile.d snippet). Or shall we try to find a way to properly configure the 
default URI for system & session daemons via the "uri_default" setting 
(potentially in multiple places)?

** Bug watch added: Red Hat Bugzilla #996986
   https://bugzilla.redhat.com/show_bug.cgi?id=996986

** Tags added: server-triage-discuss

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2027838

Title:
  /etc/profile.d/libvirt-uri.sh (LIBVIRT_DEFAULT_URI setting) overrides
  configured default

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2027838/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to