Bug 1572179

Summary: 'oc adm diagnostics unitstatu' gave some incorrect errors when the ovs setup as daemonset
Product: OpenShift Container Platform Reporter: zhaozhanqi <zzhao>
Component: NetworkingAssignee: Ravi Sankar <rpenta>
Status: CLOSED ERRATA QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, bbennett
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: All   
OS: All   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: openvswitch is no longer installed on the nodes instead it is deployed as daemonsets Consequence: 'oc adm diagnostics unitstatus' fails Fix: Remove openvswitch systemd unit dependency from the unitstatus diagnostic. Result: 'oc adm diagnostics unitstatus' works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:14:14 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 zhaozhanqi 2018-04-26 10:45:35 UTC
Description of problem:
When set up the cluster using bootstrapping mode, the ovs service will be setup as daemonset. it will not use systemd to manage the ovs service. so prompt from `oc adm diagnostics unitstatu` are also wrong

Version-Release number of selected component (if applicable):
oc v3.10.0-0.29.0

How reproducible:

Steps to Reproduce:
1. set up the env using bootstrapping mode
2. run `oc adm diagnostics unitstatu`

Actual results:
# oc adm diagnostics unitstatus 
[Note] Performing systemd discovery

[Note] Running diagnostic: UnitStatus
       Description: Check status for related systemd units
ERROR: [DS3002 from diagnostic UnitStatus@openshift/origin/pkg/oc/admin/diagnostics/diagnostics/systemd/unit_status.go:61]
       systemd unit atomic-openshift-node depends on unit openvswitch, which is not loaded.
       systemd unit atomic-openshift-node is running but openvswitch is not.
       Normally atomic-openshift-node starts openvswitch once initialized.
       It is likely that openvswitch has crashed or been stopped.
       The software-defined network (SDN) enables networking between
       containers on different nodes. Containers will not be able to
       connect to each other without the openvswitch service carrying
       this traffic.
       An administrator can start openvswitch with:
         # systemctl start openvswitch
       To ensure it is not repeatedly failing to run, check the status and logs with:
         # systemctl status openvswitch
         # journalctl -ru openvswitch 
       An administrator probably needs to install the openvswitch unit with:
         # yum install openvswitch
       If it is already installed, you may to reload the definition with:
         # systemctl reload openvswitch
[Note] Summary of diagnostics execution (version v3.10.0-0.29.0):
[Note] Errors seen: 1

Expected results:

should not have these error

Additional info:

Comment 1 Ravi Sankar 2018-04-30 22:45:51 UTC
Fixed by https://github.com/openshift/origin/pull/19572

Comment 2 openshift-github-bot 2018-05-04 02:02:52 UTC
Commits pushed to master at https://github.com/openshift/origin

Bug 1572179 - Remove openvswitch check from UnitStatus diagnostic

- For openshift version >= 3.10, openvswitch on the node will be run as a daemonset
so it won't appear on node systemd units.

Merge pull request #19572 from pravisankar/fix-diag-unitstatus

Bug 1572179 - Remove openvswitch check from UnitStatus diagnostic

Comment 4 zhaozhanqi 2018-05-16 08:47:09 UTC
Verified this bug on 3.10.0-0.46.0

# oc adm diagnostics unitstatus
[Note] Performing systemd discovery

[Note] Running diagnostic: UnitStatus
       Description: Check status for related systemd units
[Note] Summary of diagnostics execution (version v3.10.0-0.46.0):
[Note] Completed with no errors or warnings seen.

Comment 6 errata-xmlrpc 2018-07-30 19:14:14 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.