Bug 2006379

Summary: During a reboot, crictl info always returns "NetworkReady" == "true"
Product: OpenShift Container Platform Reporter: Jim Ramsay <jramsay>
Component: NodeAssignee: Peter Hunt <pehunt>
Node sub component: CRI-O QA Contact: Sunil Choudhary <schoudha>
Status: CLOSED NOTABUG Docs Contact:
Severity: unspecified    
Priority: unspecified CC: aos-bugs, sgrunert
Version: 4.9   
Target Milestone: ---   
Target Release: ---   
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: 2021-10-07 09:40:47 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 Jim Ramsay 2021-09-21 15:35:27 UTC
Description of problem:

As a system (SNO in this case) is comping up after reboot, I am querying `crictl info` to ascertain when CNI is ready.

How reproducible:

100% of the time

Steps to Reproduce:
1. Login to an OpenShift node via SSH just after it reboots, but before the system is fully up.
2. Run 'crictl info' and 'crictl ps' as the system comes up.
2. Expect the 'info' to return that the "NetworkReady" state is false until at least after 'crictl ps' shows that the SDN or OVN pods are up.

Actual results:

Even when 0 pods are running, 'crictl info' shows:

> {
>   "status": {
>     "conditions": [
>       {
>         "type": "RuntimeReady",
>         "status": true,
>         "reason": "",
>         "message": ""
>       },
>       {
>         "type": "NetworkReady",
>         "status": true,
>         "reason": "",
>         "message": ""
>       }
>     ]
>   }
> }

Expected results:

> {
>   "status": {
>     "conditions": [
>       {
>         "type": "RuntimeReady",
>         "status": true,
>         "reason": "",
>         "message": ""
>       },
>       {
>         "type": "NetworkReady",
>         "status": false,
>         "reason": "",
>         "message": ""
>       }
>     ]
>   }
> }

Until after the OVN or SDN pods are running and ready, then the "NetworkReady" status flag should switch back to 'true'

Comment 2 Sascha Grunert 2021-10-07 09:40:47 UTC
(In reply to Jim Ramsay from comment #0)
> Until after the OVN or SDN pods are running and ready, then the
> "NetworkReady" status flag should switch back to 'true'

Hey Jim, let me elaborate a few things from the Container Runtime Interface (CRI) specification: NetworkReady means the runtime network is up and ready to accept containers which require container network. This means, we require it to be "true" to be able to run Pods. In CRI-O, we set it to "ready" if a default network is configured. This does not invoke any tests if the network actually works or not, which is something we can only find out when a Pod is being specified to run.

I hope this makes the overall process more clear and I assume now that having `NetworkReady: true` is the desired initial state for the runtime.

Closing this now, feel free to reopen if I did not address the issue accordingly.

All the best,
Sascha