Bug 1972651

Summary: Restarting CodeReady Container does leave pods in unusable state
Product: OpenShift Container Platform Reporter: steinrr
Component: crcAssignee: Praveen Kumar <prkumar>
Status: CLOSED DEFERRED QA Contact: Tomáš Sedmík <tsedmik>
Severity: unspecified Docs Contact: Kevin Owen <kowen>
Priority: unspecified    
Version: 4.7CC: aos-bugs, cfergeau, eparis, gbraad, kowen, prkumar, tsedmik, veillard
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Mac OS   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-08 10:58: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 steinrr 2021-06-16 11:33:50 UTC
Description of problem:

Running latest CodeReady Container version of OpenShift on my Mac. I am able to push applications to the cluster and they are working fine.

When I stop the CodeReady Container (crc stop), and start it again (crc start) - the pods are starting and seems to run fine. But when I open the URL of any of them - I get "Application is not available". I get the same on all applications - even "Hello World" kind of applications.

So somehow shutting down CRC and starting it again creates some "strange status" on the pods. I have tried to delete the pods and also to scale to 0 instances and then add instances, but they still do not work. So even if OpenShift removes the pods and start new instances - they fail. Logs do not give any info. They only way to "fix" the application is to do a "odo push -f" that forces rebuild and redeploy of the application in the OpenShift cluster.
Version-Release number of selected component (if applicable):

How reproducible:

Can be reproduced.

Steps to Reproduce:
1. Start CodeReady Container version of OpenShift (crc start)
2. Use "odo push" to push application (e.g. nodejs example)
3. Stop CRC (crc stop)
4. Start CRC (crc start)
5. Observe that OpenShift is starting and pods are starting
6. Click URL of deployed application

Actual results:
Page showing "Application is not available" showing

Expected results:
Page of web application to show

Additional info:
* "odo push -f" fixes issue. 
* Deleting pod does not fix issue.
* Scaling pod count to 0 and then back to 1 does not fix problem.

Comment 1 Praveen Kumar 2021-06-24 06:22:30 UTC
@steinnr Can you provide some more info like which version of CRC you are using and if possible can you please put an issue on project github tracker https://github.com/code-ready/crc/issues/new/choose which have a template to provide us more info around the bug.

Comment 2 steinrr 2021-06-24 06:25:00 UTC
Output from crc version:

CodeReady Containers version: 1.27.0+3d6bc39d
OpenShift version: 4.7.11 (not embedded in executable)

I will register an issue in the CRC github as requested.

Comment 5 Gerard Braad (Red Hat) 2022-01-08 08:22:52 UTC
Closing as issue on GitHub is closed

https://github.com/code-ready/crc/issues/2474#issuecomment-867481410

```
looks like this is not issue with CRC but how odo is working right now with mounts. I am closing this issue from here and let's track it on odo side only.
```