On Fri, Feb 15, 2019 at 2:39 PM Francesco Romani <fromani@redhat.com> wrote:
On 2/15/19 1:40 PM, Dafna Ron wrote:

Hi,

Hi,

We are failing to deploy hosts in upgrade suites on both master and 4.2 for project ovirt-vmconsole.

it seems we are missing packages for selinux-policy.

Root cause identified by CQ as: https://gerrit.ovirt.org/#/c/97704/ - spec: clean up and reorganize

can you please take a look at this issue?

Sandro requested a bug so I opened one:


Yep, I replied https://bugzilla.redhat.com/show_bug.cgi?id=1677630#c2


more discussion follows:



Error:

019-02-14 12:11:42,063-0500 ERROR otopi.plugins.otopi.packagers.yumpackager yumpackager.error:85 Yum [u'ovirt-vmconsole-1.0.6-3.el7.noarch requires selinux-policy >= 3.13.1-229.el7_6.9', u'ovirt-vmconsole-1.0.6-3.el7.noarch requires selinux-policy-base >= 3.13.1-229.el7_6.9']
2019-02-14 12:11:42,063-0500 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/tmp/ovirt-8JzESBo7eU/pythonlib/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/tmp/ovirt-8JzESBo7eU/otopi-plugins/otopi/packagers/yumpackager.py", line 248, in _packages
    self.processTransaction()
  File "/tmp/ovirt-8JzESBo7eU/otopi-plugins/otopi/packagers/yumpackager.py", line 262, in processTransaction
    if self._miniyum.buildTransaction():
  File "/tmp/ovirt-8JzESBo7eU/pythonlib/otopi/miniyum.py", line 920, in buildTransaction
    raise yum.Errors.YumBaseError(msg)
YumBaseError: [u'ovirt-vmconsole-1.0.6-3.el7.noarch requires selinux-policy >= 3.13.1-229.el7_6.9', u'ovirt-vmconsole-1.0.6-3.el7.noarch requires selinux-policy-base >= 3.13.1-229.el7_6.9']
2019-02-14 12:11:42,064-0500 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Package installation': [u'ovirt-vmconsole-1.0.6-3.el7.noarch requires selinux-policy >= 3.13.1-229.el7_6.9', u'ovirt-vmconsole-1.0.6-3.el7.noarch requires selinux-policy-base >= 3.13.1-229.el7_6.9']
Thanks,
Dafna


It seems to me this is happening in CentOS. So:

The patch https://gerrit.ovirt.org/#/c/97704/ *wants* to use this spec file macro
%{?selinux_requires}

This macro automatically set the right dependency for the platform on which the package is being built.

From the error above, we can see that the host on which the package, built from master, is going to be installed does *not* have that right package.

However, on a test box of mine:

1005 15:07:43 root@kenji:~ $ cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
1006 15:07:49 root@kenji:~ $ rpm -qa | grep selinux-policy
selinux-policy-3.13.1-229.el7_6.9.noarch
selinux-policy-targeted-3.13.1-229.el7_6.9.noarch
selinux-policy-devel-3.13.1-229.el7_6.6.noarch

1010 15:08:50 root@kenji:~ $ rpm -q --provides selinux-policy
config(selinux-policy) = 3.13.1-229.el7_6.9
selinux-policy = 3.13.1-229.el7_6.9
1011 15:08:52 root@kenji:~ $ rpm -q --provides selinux-policy-targeted
config(selinux-policy-targeted) = 3.13.1-229.el7_6.9
selinux-policy-base = 3.13.1-229.el7_6.9
selinux-policy-targeted = 3.13.1-229.el7_6.9

so it seems that the package was built on up-to-date host, while is being installed in a host outdated.

Not sure I understand that. we are running on an isolated environment which is running 7.6 and the package we have available in the centos repo is: selinux-policy-0:3.13.1-229.el7_6.9.noarch
when i force the download of the package (i.e I tell lago to grab that package on deploy of vms) then the package is available and downloaded.
So I am not sure what you mean about the package running on an outdated host?
For this issue there is no action needed besides making sure that the installation host is up to date.


Please note, however, that ovirt-vmconsole >= 1.0.7 should be installed in CentOS/RHEL >= 7.6

If needed, I think it could work in 7.4/7.5 too, but we will need a rebuild of the package and some testing.


Last thing, question: do we need a package build on Fedora? I tested the el7 packages, they work fine in F29.


Bests,


-- 
Francesco Romani
Senior SW Eng., Virtualization R&D
Red Hat
IRC: fromani github: @fromanirh