Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1614660

Summary: [YlLoBpg5] command 'oc adm diagnostics NetworkCheck' shows error if env using docker runtime
Product: OpenShift Container Platform Reporter: Hongan Li <hongli>
Component: NetworkingAssignee: Ravi Sankar <rpenta>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, dmace
Version: 3.11.0   
Target Milestone: ---   
Target Release: 3.11.0   
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: 2018-10-11 07:24:08 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 Hongan Li 2018-08-10 07:22:32 UTC
Description of problem:
execute the command `oc adm diagnostics NetworkCheck` but get errors in the env which using docker runtime

Version-Release number of selected component (if applicable):
openshift v3.11.0-0.11.0
kubernetes v1.11.0+d4cacc0

How reproducible:
always

Steps to Reproduce:
1. launch env which using docker runtime
2. oc adm diagnostics NetworkCheck --pod-image='registry.reg-aws.openshift.com:443/openshift3/ose-control-plane:v3.11' --test-pod-image='docker.io/openshift/hello-openshift' --diaglevel=0 --logdir='/tmp/diag/aws/'

Actual results:
1. oc get node -o wide
NAME                           STATUS    ROLES     AGE       VERSION           INTERNAL-IP    EXTERNAL-IP     OS-IMAGE                                      KERNEL-VERSION              CONTAINER-RUNTIME
ip-172-18-14-0.ec2.internal    Ready     master    5h        v1.11.0+d4cacc0   172.18.14.0    x.x.x.x      Red Hat Enterprise Linux Server 7.5 (Maipo)   3.10.0-862.9.1.el7.x86_64   docker://1.13.1

2. output of 'oc adm diagnostics NetworkCheck'
ERROR: [DNet2008 from diagnostic NetworkCheck@openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics/cluster/network/run_pod.go:223]
       See the errors below in the output from the network diagnostic pod on node "ip-172-18-14-25.ec2.internal":
       [Note] Running diagnostic: CheckExternalNetwork
              Description: Check that external network is accessible within a pod

       W0810 02:30:02.598951    8428 runtime.go:130] Found both crio and docker socket files, defaulting to crio
       [Note] Running diagnostic: CheckNodeNetwork
              Description: Check that pods in the cluster can access its own node.
              
       ERROR: [DNodeNet1004 from diagnostic CheckNodeNetwork@openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics/cluster/network/in_pod/node.go:79]
              expected runtime type "cri-o" but found "docker"
              
       ERROR: [DNodeNet1004 from diagnostic CheckNodeNetwork@openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics/cluster/network/in_pod/node.go:79]
              expected runtime type "cri-o" but found "docker"


Expected results:
the command should work for both crio and docker runtime

Additional info:
no this issue in the env which using crio runtime.

Comment 1 Ravi Sankar 2018-08-15 03:10:56 UTC
Fixed by https://github.com/openshift/origin/pull/20647

Comment 2 openshift-github-bot 2018-08-15 08:37:33 UTC
Commits pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/3979595305924f322b77d0e573d83e8f7fca96e0
Bug 1614660 - Network diagnostic will auto detect runtime

Don't default to crio runtime when crio and docker binaries are installed.
Node object has the container runtime version, so now we fetch the runtime
info from there.

https://github.com/openshift/origin/commit/80abd58426ad3a2b746c5dfdf30a41bfbd05dd9f
Merge pull request #20647 from pravisankar/fix-netdiag-runtime

 Bug 1614660 - Network diagnostic will auto detect runtime

Comment 3 Ravi Sankar 2018-08-15 18:33:53 UTC
Follow up pr: https://github.com/openshift/origin/pull/20658

Comment 5 Hongan Li 2018-08-23 07:50:48 UTC
verified in atomic-openshift-3.11.0-0.20.0.git.0.d80d8ad.el7 and issue has been fixed.

Comment 7 errata-xmlrpc 2018-10-11 07:24:08 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:2652