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

Missing request_counts table can cause workers not to start #3075

Closed
johha opened this issue Nov 25, 2022 · 0 comments · Fixed by #3076
Closed

Missing request_counts table can cause workers not to start #3075

johha opened this issue Nov 25, 2022 · 0 comments · Fixed by #3076

Comments

@johha
Copy link
Contributor

johha commented Nov 25, 2022

Issue

When updating capi from 1.139.0 to 1.140.0 the db table request_counts is removed. Related PR #2964.
While updating API nodes are deployed first which also execute the latest db migrations. This includes the removal of the request_counts table.
After the migration is executed AND before all cc-workers are updated AND a not yet updated cc-worker is restarted for any reason the restart will fail with the following error:

PG::UndefinedTable: ERROR:  relation "request_counts" does not exist

This repeats indefinitely and can cause very high CPU usage which makes the VM unreachable.

Steps to Reproduce

  • Checkout/deploy capi 1.139
  • Ensure db migrations are executed
  • Apply db migrations of capi 1.140.0 which removes table request_counts
  • start worker bundle exec rake jobs:generic
johha added a commit to sap-contributions/cloud_controller_ng that referenced this issue Nov 25, 2022
While updating capi from version 1.139.0 to 1.140.0 it can happen that
not yet updated cc-workers will fail during a restart with error `relation "request_counts" does not exist`.
To avoid this we need to create the table again.
In a future release it can be removed again.

See cloudfoundry#3075

Co-authored-by: Florian Braun <[email protected]>
johha added a commit to sap-contributions/cloud_controller_ng that referenced this issue Nov 25, 2022
While updating capi from version 1.139.0 to 1.140.0 it can happen that
not yet updated cc-workers will fail during a restart with error `relation "request_counts" does not exist`.
To avoid this we need to create the table again.
In a future release it can be removed again.

See cloudfoundry#3075

Co-authored-by: Florian Braun <[email protected]>
@philippthun philippthun linked a pull request Nov 28, 2022 that will close this issue
5 tasks
will-gant pushed a commit to sap-contributions/cloud_controller_ng that referenced this issue Dec 6, 2022
While updating capi from version 1.139.0 to 1.140.0 it can happen that
not yet updated cc-workers will fail during a restart with error `relation "request_counts" does not exist`.
To avoid this we need to create the table again.
In a future release it can be removed again.

See cloudfoundry#3075

Co-authored-by: Florian Braun <[email protected]>
will-gant pushed a commit to sap-contributions/cloud_controller_ng that referenced this issue Dec 8, 2022
While updating capi from version 1.139.0 to 1.140.0 it can happen that
not yet updated cc-workers will fail during a restart with error `relation "request_counts" does not exist`.
To avoid this we need to create the table again.
In a future release it can be removed again.

See cloudfoundry#3075

Co-authored-by: Florian Braun <[email protected]>
will-gant pushed a commit to sap-contributions/cloud_controller_ng that referenced this issue Dec 16, 2022
While updating capi from version 1.139.0 to 1.140.0 it can happen that
not yet updated cc-workers will fail during a restart with error `relation "request_counts" does not exist`.
To avoid this we need to create the table again.
In a future release it can be removed again.

See cloudfoundry#3075

Co-authored-by: Florian Braun <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants