Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add virtualization-host formula on a SLES 12 system - missing python3-libvirt-python package #114

Open
srinidhibs opened this issue Apr 28, 2021 · 0 comments
Assignees

Comments

@srinidhibs
Copy link

On my Uyuni 2021.03 server, I've added a SLES 12 SP5 system that is hosting a few VMs on KVM. When I enable the virtualization-host formula for this host, the highstate can never be installed:

----------
          ID: virthost_packages
    Function: pkg.installed
        Name: virthost_packages
      Result: false
     Comment: An error was encountered while installing package(s): Zypper command failure: Running scope as unit run-r79db77c2e2734aaa93021b5b59f9aaf3.scope.
Package 'python3-libvirt-python' not found.
     Started: 21:31:50.436522
    Duration: 722.826
         SLS: virtualization-host
     Changed: {}
----------
          ID: null
    Function: service.running
        Name: null
      Result: false
     Comment: One or more requisite failed: virtualization-host.virthost_packages
     Started: 21:31:51.160504
    Duration: 0.015
         SLS: virtualization-host
     Changed: {}
----------

On SLES 12 SP5, there is no package called python3-libvirt-python, rather it has the python-libvirt-python package. I believe, the issue is in the following line where the package name is hardcoded rather than being put in a conditional:

If I move this package to the condition at the top of the file, then I'm able to apply the highstate on the SLES 12 SP5 host machine. But I do not know if this is the right way to handle this:

# diff -u /tmp/map.jinja /usr/share/susemanager/formulas/states/virtualization-host/map.jinja
--- /tmp/map.jinja      2021-04-29 02:10:55.890300715 +0530
+++ /usr/share/susemanager/formulas/states/virtualization-host/map.jinja        2021-04-29 02:01:22.867180432 +0530
@@ -3,6 +3,7 @@
     {% set hypervisor_packages = [
         'patterns-server-%s_server'|format(pillar['hypervisor']|lower()),
         'python3-six',
+        'python3-libvirt-python',
        ]
     %}
   {% elif grains['osfullname'] == 'Leap' %}
@@ -21,7 +22,6 @@
       'qemu-tools',
       'guestfs-tools',
       'libvirt-client',
-      'python3-libvirt-python',
       'kernel-default',
     ]
   %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants