Bug 1371887

Summary: RHV self-hosted: engine "Could not calculate errata status, ensure host is registered and katello-agent is installed"
Product: Red Hat Quickstart Cloud Installer Reporter: Thom Carlin <tcarlin>
Component: Installation - RHEVAssignee: jkim
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: medium Docs Contact: Dan Macpherson <dmacpher>
Priority: unspecified    
Version: 1.0CC: bthurber, fabian, jkim, jmatthew, tpapaioa, tsanders
Target Milestone: ---Keywords: Triaged
Target Release: 1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-28 01:38:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Thom Carlin 2016-08-31 11:14:48 UTC
Description of problem:

After successfully deploying RHV self-hosted, managed engine host shows Warning (Orange i with circle)

Version-Release number of selected component (if applicable):

QCI-1.0-RHEL-7-201608125.t.0

How reproducible:

Believe 100%

Steps to Reproduce:
1. Install/configure QCI
2. Deploy RHV self-hosted
3. Hosts > All Hosts
4. Examine engine host

Actual results:

Host row has orange warning icon

Expected results:

Host row has green checkmark icon

Additional info:

state is Warning
Errata is Could not calculate errata status, ensure host is registered and katello-agent is installed

Checking engine system:
yum list katello-agent
Loaded plugins: search-disabled-repos, versionlock
Available Packages
katello-agent.noarch                                                               2.5.0-5.el7sat                                                               rhel-7-server-satellite-tools-6.2-rpms

Investigating workaround

Comment 1 Thom Carlin 2016-08-31 11:43:14 UTC
Workaround:
* yum install -y katello-agent 
...solves *this* problem but status goes to Red error, security errata applicable

Nested workaround:
* yum -y update
* shutdown -r now 
....Needed since kernel had changed

Comment 5 John Matthews 2016-10-10 19:09:42 UTC
Moving to MODIFIED as this hasn't been merged yet.

Comment 6 John Matthews 2016-10-10 19:54:55 UTC
Need to check if this is covered with the new ansible approach

Comment 7 Fabian von Feilitzsch 2016-10-13 18:26:33 UTC
https://github.com/fusor/ansible-ovirt/pull/5

Comment 9 Fabian von Feilitzsch 2016-11-17 20:27:25 UTC
https://github.com/fusor/ansible-ovirt/pull/13

Fixes the ansible_distribution check. Must have grabbed that distribution name from some outdated documentation. Good catch

Comment 10 John Matthews 2016-11-22 13:38:05 UTC
Expected in 11/21 ISO

Comment 11 Tasos Papaioannou 2016-11-23 22:02:14 UTC
After a successful self-hosted deployment w/ QCI-1.1-RHEL-7-20161121.t.0, I'm still seeing "Could not calculate errata status, ensure host is registered and katello-agent is installed" on the self-hosted engine's host record in the web UI.

The hypervisor has the expected yum commands in /etc/qci/cloud_init/user-data, so the ansible_distribution changes appear to be working:

# tail -n5 /etc/qci/cloud_init/user-data 
 - echo "Installing additional packages" 1>/dev/virtio-ports/org.ovirt.hosted-engine-setup.0 2>&1
 - yum -y install python-enum34 1>/dev/virtio-ports/org.ovirt.hosted-engine-setup.0 2>&1
 - yum -y install katello-agent 1>/dev/virtio-ports/org.ovirt.hosted-engine-setup.0 2>&1
 - yum -y update 1>/dev/virtio-ports/org.ovirt.hosted-engine-setup.0 2>&1
 - echo "Configuration complete"

On the engine, the vm is registered and subscribed to repos, but the katello-agent rpm isn't installed, and I don't see any yum output in the system logs or yum.log.

Comment 12 Tasos Papaioannou 2016-11-28 19:18:20 UTC
It looks like the first yum command are blocked on trying to write to stdout on /dev/virtio-ports/org.ovirt.hosted-engine-setup.0.

The engine vm shows the yum command waiting on a write syscall to fd 1, which is /dev/vport2p3:

[root@tpapaioa-12-rhv-engine ~]# ps -eF|grep yum
root     26135  2252  0 90371 26096   1 14:00 ?        00:00:00 /usr/bin/python /usr/bin/yum -y install python-enum34

[root@tpapaioa-12-rhv-engine ~]# strace -p26135
Process 26135 attached
write(1, "Loaded plugins: search-disabled-"..., 51

[root@tpapaioa-12-rhv-engine ~]# ll /proc/26135/fd
total 0
lr-x------. 1 root root 64 Nov 28 14:02 0 -> pipe:[19310]
l-wx------. 1 root root 64 Nov 28 14:02 1 -> /dev/vport2p3
l-wx------. 1 root root 64 Nov 28 14:02 2 -> /dev/vport2p3
lrwx------. 1 root root 64 Nov 28 14:02 3 -> socket:[19298]
lrwx------. 1 root root 64 Nov 28 14:02 4 -> socket:[63389]
lr-x------. 1 root root 64 Nov 28 14:02 5 -> /dev/urandom
lr-x------. 1 root root 64 Nov 28 14:02 8 -> /dev/urandom

The vm then shuts down after engine-setup completes:

Broadcast message from root.lab.eng.rdu2.redhat.com (Mon 2016-11-28 14:03:32 EST):

"System going down"
The system is going down for power-off at Mon 2016-11-28 14:04:32 EST!

None of the yum commands after the engine-setup command in user-data actually complete.

Comment 13 Fabian von Feilitzsch 2016-11-30 18:54:40 UTC
Good catch, I actually thought that went into the last PR, but I pulled the commit into the wrong branch. This PR should put everything in the correct order and actually fix this issue: https://github.com/fusor/ansible-ovirt/pull/16

Comment 14 John Matthews 2016-12-09 13:12:37 UTC
Built in ansible-ovirt release 1.1.5-1

Comment 15 Tasos Papaioannou 2016-12-14 17:05:39 UTC
Verified on QCI-1.1-RHEL-7-20161212.t.2.

Comment 18 errata-xmlrpc 2017-02-28 01:38:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:0335