Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Upgrading KubeCF triggers multiple database-seeder qjob runs #1168

Open
f0rmiga opened this issue Oct 6, 2020 · 7 comments
Open

Upgrading KubeCF triggers multiple database-seeder qjob runs #1168

f0rmiga opened this issue Oct 6, 2020 · 7 comments
Labels
bug Something isn't working unscheduled

Comments

@f0rmiga
Copy link
Member

f0rmiga commented Oct 6, 2020

Describe the bug

Upgrading KubeCF gets multiple database-seeder runs. They have a race condition that usually sets the wrong values in the database. E.g. the database password secrets get rotated and what the KubeCF jobs get (the latest revision) is not necessarily the last database-seeder errand to update the passwords in the database. Manually triggering the database-seeder at a later stage seems to help.

To Reproduce

Give KubeCF an upgrade from 2.2.3 to 2.5.4.

Expected behavior

Only one database-seeder run.

Environment

quarks-operator version 6.1.8+0.g2821133a.

@f0rmiga f0rmiga added the bug Something isn't working label Oct 6, 2020
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/175135667

The labels on this github issue will be updated when the story is started.

@manno
Copy link
Member

manno commented Oct 8, 2020

The seeder job was configured to run on 'config changes', so every referenced secret update could trigger the job again. The job is idempotent.

@f0rmiga
Copy link
Member Author

f0rmiga commented Oct 8, 2020

@manno You just described the bug. We don't want the job to be triggered multiple times concurrently. Fine if they are executed in the correct order, though.

@f0rmiga f0rmiga reopened this Oct 8, 2020
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/175194113

The labels on this github issue will be updated when the story is started.

@manno
Copy link
Member

manno commented Oct 19, 2020

@f0rmiga I see, but that's not how "update on config change" works. We'll have to discuss if it's possible to implement this on the operator side.
So executing in any order is fine, if the jobs are not run in parallel?

@f0rmiga
Copy link
Member Author

f0rmiga commented Oct 19, 2020

@manno I see. We can perhaps do a session to further understand the KubeCF needs and how we can leverage the current cf-operator capabilities? Or even get to the drawing board yet again?

@manno
Copy link
Member

manno commented Oct 19, 2020

Yes, we should :)
We briefly discussed smarter scripts in kubecf (they might be able to know if the database needs a migration) and we discussed making qjobs (optionally) run exclusive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working unscheduled
Projects
None yet
Development

No branches or pull requests

3 participants