Bug 1778723 - HCO fails to reconcile resources in a different namespace
Summary: HCO fails to reconcile resources in a different namespace
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Installation
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.2.0
Assignee: Simone Tiraboschi
QA Contact: zhe peng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-02 11:45 UTC by Simone Tiraboschi
Modified: 2020-01-30 16:27 UTC (History)
7 users (show)

Fixed In Version: hco-bundle-registry-container-v2.2.0-225
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-30 16:27:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt hyperconverged-cluster-operator pull 380 0 None None None 2019-12-18 13:41:47 UTC
Red Hat Product Errata RHEA-2020:0307 0 None None None 2020-01-30 16:27:48 UTC

Description Simone Tiraboschi 2019-12-02 11:45:06 UTC
Description of problem:
In HCO logs we see something like:

{"level":"info","ts":1574269878.4764912,"logger":"controller_hyperconverged","msg":"Reconciling HyperConverged operator","Request.Namespace":"openshift","Request.Name":"hyperconverged-cluster"}
{"level":"info","ts":1574269878.4765778,"logger":"controller_hyperconverged","msg":"No HyperConverged resource","Request.Namespace":"openshift","Request.Name":"hyperconverged-cluster"}
{"level":"info","ts":1574269878.4878688,"logger":"controller_hyperconverged","msg":"Reconciling HyperConverged operator","Request.Namespace":"openshift","Request.Name":"hyperconverged-cluster"}
{"level":"info","ts":1574269878.4879391,"logger":"controller_hyperconverged","msg":"No HyperConverged resource","Request.Namespace":"openshift","Request.Name":"hyperconverged-cluster"}

The issue is that all of our secondary watches (all the watches that aren't on the HyperConverged resource itself) are added to the queue for the owner. But the stuff that is cluster-wide or in different namespaces like 'openshift' vs 'openshift-cnv' -- the request that is added to the queue is in a different place than the HyperConverged resource.


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

How reproducible:
100%

Steps to Reproduce:
1. deploy CNV
2. check HCO logs
3.

Actual results:
{"level":"info","ts":1574269878.4765778,"logger":"controller_hyperconverged","msg":"No HyperConverged resource","Request.Namespace":"openshift","Request.Name":"hyperconverged-cluster"}

Expected results:
Successful reconciliation

Additional info:

Comment 1 Simone Tiraboschi 2019-12-02 13:30:07 UTC
Workaround:

  echo -e "spec:\n  test: 1234" > test.yaml
  oc patch -n openshift KubevirtCommonTemplatesBundle common-templates-hyperconverged-cluster --type merge --patch "$(cat patch-file.yaml)"
  oc patch -n openshift-cnv KubevirtNodeLabellerBundles node-labeller-hyperconverged-cluster --type merge --patch "$(cat patch-file.yaml)"

Comment 2 Dan Kenigsberg 2020-01-07 06:56:25 UTC
We must not release cnv-2.2 without this fix, as it can cause data loss.

Comment 3 Dan Kenigsberg 2020-01-07 07:14:13 UTC
(In reply to Dan Kenigsberg from comment #2)
> We must not release cnv-2.2 without this fix, as it can cause data loss.

Sorry, this bug is related to the data loss bug 1786475, but on its own it is not a blocker. Typically, underlying CRs are unlikely to be modified on their own volition.

Comment 4 zhe peng 2020-01-15 06:45:32 UTC
Deploy CNV2.2 on psi env.
check HCO logs

"level":"info","ts":1579044558.9341733,"logger":"controller_hyperconverged","msg":"Reconciling HyperConverged operator","Request.Namespace":"openshift-cnv","Request.Name":"hyperconverged-cluster"}
{"level":"info","ts":1579044558.9342268,"logger":"controller_hyperconverged","msg":"KubeVirt config already exists","Request.Namespace":"openshift-cnv","Request.Name":"hyperconverged-cluster","KubeVirtConfig.Namespace":"openshift-cnv","KubeVirtConfig.Name":"kubevirt-config"}

move to verified

Comment 5 zhe peng 2020-01-15 08:02:16 UTC
update verfied version
Client Version: 4.3.0-0.nightly-2020-01-14-043441
Server Version: 4.3.0-0.nightly-2020-01-14-043441
Kubernetes Version: v1.16.2

Comment 7 errata-xmlrpc 2020-01-30 16:27:33 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-2020:0307


Note You need to log in before you can comment on or make changes to this bug.