Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails container does not restart properly on OpenShift 4.x #119

Closed
serhei opened this issue Dec 12, 2019 · 2 comments
Closed

Rails container does not restart properly on OpenShift 4.x #119

serhei opened this issue Dec 12, 2019 · 2 comments

Comments

@serhei
Copy link

serhei commented Dec 12, 2019

Expected Behaviour (verified with Minishift 1.34.0 + OpenShift 3.11.0):

Doing an oc rollout will cleanly restart the Rails container:

$ git clone https://github.com/sclorg/rails-ex                                                                                                                                 
$ oc new-app rails-ex/openshift/templates/rails-postgresql.json -p SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex
$ oc get pods
NAME                               READY     STATUS      RESTARTS   AGE
postgresql-1-n8b94                 1/1       Running     0          20m
rails-postgresql-example-1-build   0/1       Completed   0          20m
rails-postgresql-example-1-tdl2n   1/1       Running     0          17m
$ oc rollout --latest rails-postgresql-example
$ oc get pods
NAME                               READY     STATUS      RESTARTS   AGE
postgresql-1-n8b94                 1/1       Running     0          21m
rails-postgresql-example-1-build   0/1       Completed   0          21m
rails-postgresql-example-2-xrk95   1/1       Running     0          31s

Actual Behaviour (verified with CodeReady Containers 1.2.0 + OpenShift 4.2.8)

On attempting oc rollout, the -hook-pre container hangs in 'Pending' state for over 30min:

$ git clone https://github.com/sclorg/rails-ex
$ oc new-app rails-ex/openshift/templates/rails-postgresql.json -p SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex
$ oc get pods
NAME                               READY   STATUS      RESTARTS   AGE
postgresql-1-46mtk                    1/1     Running     0          4m29s
postgresql-1-deploy                   0/1     Completed   0          4m46s
rails-postgresql-example-1-build      0/1     Completed   0          4m47s
rails-postgresql-example-1-deploy     1/1     Running     0          48s
rails-postgresql-example-1-hook-pre   0/1     Completed   0          39s
rails-postgresql-example-1-vzmtw      0/1     Running     0          15s
$ oc rollout latest rails-postgresql-example
$ oc get pods
NAME                                  READY   STATUS      RESTARTS   AGE
postgresql-1-46mtk                    1/1     Running     0          38m
postgresql-1-deploy                   0/1     Completed   0          38m
rails-postgresql-example-1-build      0/1     Completed   0          38m
rails-postgresql-example-1-deploy     0/1     Completed   0          34m
rails-postgresql-example-1-hook-pre   0/1     Completed   0          34m
rails-postgresql-example-1-vzmtw      1/1     Running     0          34m
rails-postgresql-example-2-deploy     1/1     Running     0          33m
rails-postgresql-example-2-hook-pre   0/1     Pending     0          33m
@phracek
Copy link
Member

phracek commented Mar 25, 2024

Hi @serhei , During the time we have migrated Rails-Ex application to Deployment.

Can you please verify, if the problem still persists? Thank you.
I see, as well, that you are using rails-postgresql.json which is ephemeral, would it be possible to test it with rails-postgresql-persistent.json? Thank you.

@phracek
Copy link
Member

phracek commented May 16, 2024

Closing this as the whole rail-ex application is working properly in OpenShift 4 environment. see tests.

@phracek phracek closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants