The package `opennebula-node-kvm` is not being upgraded as expected to 6.4.0

Please, describe the problem here and provide additional information below (if applicable) …


Versions of the related components and OS (frontend, hypervisors, VMs):

  • Ubuntu 20.04
  • Frontend (orchestrator): v6.2.0 → v6.4.0
  • KVM Hypervisor: v6.2.0 → v6.4.0

Steps to reproduce:

  • On the orchestrator

All packages were successfully upgraded for the OpenNebula orchestration

ii  opennebula                     6.4.0-1 amd64 OpenNebula Server and Scheduler (Community Edition)
ii  opennebula-common              6.4.0-1 all   Common OpenNebula package shared by various components (Community Edition)
ii  opennebula-common-onecfg       6.4.0-1 all   Helpers for OpenNebula onecfg (Community Edition)
ii  opennebula-fireedge            6.4.0-1 amd64 OpenNebula web interface FireEdge (Community Edition)
ii  opennebula-flow                6.4.0-1 all   OpenNebula Flow server (Community Edition)
ii  opennebula-gate                6.4.0-1 all   OpenNebula Gate server (Community Edition)
ii  opennebula-guacd               6.4.0-1 amd64 Provides Guacamole server for Fireedge to be used in Sunstone (Community Edition)
ii  opennebula-libs                6.4.0-1 all   OpenNebula libraries (Community Edition)
ii  opennebula-migration-community 6.4.0-1 all   Migration tools for OpenNebula Community Edition
ii  opennebula-provision           6.4.0-1 all   OpenNebula infrastructure provisioning (Community Edition)
ii  opennebula-provision-data      6.4.0-1 all   OpenNebula infrastructure provisioning data (Community Edition)
ii  opennebula-rubygems            6.4.0-1 amd64 Ruby dependencies for OpenNebula (Community Edition)
ii  opennebula-sunstone            6.4.0-1 all   OpenNebula web interface Sunstone (Community Edition)
ii  opennebula-tools               6.4.0-1 all   OpenNebula command line tools (Community Edition)

#=====================================================

NOTE:

About dpkg -l you must know the following arguments:

  • “first letter”: Desired state.
  • “second letter”: Package status.

Some examples:

  • ii: The package was marked for installation && The package is successfully installed in the system.
  • rc: The package was marked for removal && The configuration files are currently present in the system.
  • iF: The package was marked for installation && Half configured.

What to do with packages with these two letters codes?

  • If package has code ii, then everything is OK.
  • If package has code rc, then execute the following command:
dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
  • If package has code iF, then execute the following command:
dpkg --configure -a

#=====================================================

All packages for opennebula in the orchestrator were successfully installed (code ii).

  • On the hypervisor

After ran the following command:

VER=6.4.0
echo "deb https://downloads.opennebula.io/repo/$VER/Ubuntu/20.04 stable opennebula" > /etc/apt/sources.list.d/opennebula.list && \
apt update && \
apt install --only-upgrade opennebula-node-kvm -y

During the upgrade, it was throw the following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
opennebula-node-kvm is already the newest version (6.4.0-1).
0 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up opennebula-node-kvm (6.4.0-1) ...
The user `oneadmin' is already a member of `libvirt'.
The user `oneadmin' is already a member of `kvm'.
dpkg: error processing package opennebula-node-kvm (--configure):
 installed opennebula-node-kvm package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 opennebula-node-kvm
E: Sub-process /usr/bin/dpkg returned an error code (1)

Verifying the new opennebula installed packages on the hypervisors:

ii  opennebula-common    6.4.0-1 all Common OpenNebula package shared by various components (Community Edition)
ii  opennebula-common-on 6.4.0-1 all Helpers for OpenNebula onecfg (Community Edition)
iF  opennebula-node-kvm  6.4.0-1 all Services for OpenNebula KVM node (Community Edition)

As you can see, the opennebula-node-kvm package was installed, but not completely configured. Reccommended actions to fix this, running the follow:

dpkg --configure -a

Returned same error the apt threw before:

Setting up opennebula-node-kvm (6.4.0-1) ...
The user `oneadmin' is already a member of `libvirt'.
The user `oneadmin' is already a member of `kvm'.
dpkg: error processing package opennebula-node-kvm (--configure):
 installed opennebula-node-kvm package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 opennebula-node-kvm

The cluster it was upgraded enterly with this issue, and for now is working fine. The following output from the orchestrator indicate that KVM hypervisors are online.

  ID NAME                                             CLUSTER    TVM      ALLOCATED_CPU      ALLOCATED_MEM STAT
   2 ON-C1-N3-kvm                                     KVM          9  1000 / 1600 (62%)    25G / 31G (80%) on
   1 ON-C1-N2-kvm                                     KVM          6   600 / 1600 (37%)  22.8G / 31G (73%) on
   0 ON-C1-N1-kvm                                     KVM          4   400 / 1600 (25%)    16G / 31G (51%) on

The cluster has VMs running inside these KVM hypervisors.

So…is this error some kind of false positive?
Should I be worried about it?
It can be fixed?

Current results:
The package opennebula-node-kvm was installed but is half configured.

Expected results:
All packages upgraded with new version 6.4.0 and with dpkg -l code ii

Anyone? Come on…this must happened to another one…it happened to me following official documentation… :frowning:

Thank you for reporting this issue.

In the package post-install script, the membership was wrongly detected, however, it seems to be harmless in terms of functionality.

Fix will be delivered in the upcoming releases

1 Like

Thanks for your reply. I will wait for a fix for this…After the upgradet and due to this error, apt is becoming anoying complaining about this error…

@jorel Jan, I have the same error during installing opennebula-node-kvm_6.6.0 . Was it not fixed?

I have same error during installation 6.6.0-1 release

Can you fix this manually aswell?

E.g. go tamper in the install files?

iF  opennebula-node-kvm                  6.6.1.1-1                      all          Services for OpenNebula KVM node (Community Edition)
apt install --fix-broken 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up opennebula-node-kvm (6.6.1.1-1) ...
dpkg: error processing package opennebula-node-kvm (--configure):
 installed opennebula-node-kvm package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 opennebula-node-kvm
E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT:

It is somewhere in here: /var/lib/dpkg/info


-rw-r--r-- 1 root root  136 Oct 19 12:59 opennebula-node-kvm.conffiles
-rw-r--r-- 1 root root  706 Jan  8 12:00 opennebula-node-kvm.list
-rw-r--r-- 1 root root  606 Oct 19 12:59 opennebula-node-kvm.md5sums
-rwxr-xr-x 1 root root 2.1K Oct 19 12:59 opennebula-node-kvm.postinst
-rwxr-xr-x 1 root root  821 Oct 19 12:59 opennebula-node-kvm.postrm

EDIT 2:

After searching through:

https://downloads.opennebula.io/repo/6.6.0/
https://downloads.opennebula.io/repo/6.6/
https://downloads.opennebula.io/repo/6.8/

The postinst files are the same. But I am getting the same error.

EDIT 3:

Adding #!/bin/sh -x to /var/lib/dpkg/info/opennebula-node-kvm.postinst helped find the faulty line.

This is still happening in 6.10.
we have upgraded 4 servers from 6.8 to 6.10 and only 1 of them had this issue.
Is this still harmless?