Bug 1571819

Summary: [free-int] error during logging upgrade - "openshift-logging" namespace not found
Product: OpenShift Container Platform Reporter: Justin Pierce <jupierce>
Component: InstallerAssignee: ewolinet
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.10.0CC: aos-bugs, jcantril, jokerman, mmccomas, pportant, sdodson
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The default namespace for the logging stack has been changed to 'openshift-logging', but we will keep prior deployments in their namespaces if already configured. When a prior installation exists we do not create the 'openshift-logging' namespace, and part of installing logging we annotate projects including 'openshift-logging'. Consequence: Annotating the project 'openshift-logging' fails because it does not exist. Fix: We do an intersection of existing projects and projects we pre-defined as infra/ops projects when when we annotate. Result: We only annotate the ops/infra projects if they exist on the OCP cluster.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:13:48 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:
Embargoed:

Description Justin Pierce 2018-04-25 13:13:40 UTC
Description of problem:
During a an upgrade from 3.9 to v3.10.0-0.27.0, the following error was reported:

```
TASK [openshift_logging : command] *********************************************
Tuesday 24 April 2018  23:20:25 +0000 (0:00:02.089)       0:03:29.304 ********* 
fatal: [free-int-master-3c664]: FAILED! => {"changed": true, "cmd": ["oc", "--config=/etc/origin/master/admin.kubeconfig", "get", "namespaces", "-o", "jsonpath={.items[*].metadata.name}", "default", "openshift", "openshift-infra", "kube-system", "openshift-logging"], "delta": "0:00:00.192676", "end": "2018-04-24 23:20:26.272034", "msg": "non-zero return code", "rc": 1, "start": "2018-04-24 23:20:26.079358", "stderr": "Error from server (NotFound): namespaces \"openshift-logging\" not found", "stderr_lines": ["Error from server (NotFound): namespaces \"openshift-logging\" not found"], "stdout": "default openshift openshift-infra kube-system", "stdout_lines": ["default openshift openshift-infra kube-system"]}
```

Version-Release number of the following components:
v3.10.0-0.27.0

Expected results:
Logging should have been installed. 'openshift_logging_install_logging: true' appears to have been in the inventory.

Comment 5 Anping Li 2018-05-22 02:07:34 UTC
The logging redeploy works with ose-ansible/images/v3.10.0-0.47.0.0. For there are some issue with OCP upgrade. So I installed v3.9 on v3.10 during this testing.
v3.9 logging are deployed in logging namespace. After upgrade, the all resource are upgraded as expected to v3.10 in logging namespaces. No error are reported in playbooks.

Comment 7 errata-xmlrpc 2018-07-30 19:13:48 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/RHBA-2018:1816