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

Add $SEEDING_LOCK_TIMEOUT for high latency seeding #15582

Closed
wants to merge 2 commits into from

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Jul 17, 2017

Before

Since seeding can only be performed on one system at a time, we set a timeout to limit our blocking of systems.

The initial seeding over a WAN can take longer than our timeout of 10 minutes.
So the initial seeding times out, the database never gets populated, and the app will never run.

Solution:

Add a variable to temporarily increase the seeding timeout.
This will give the app enough time for the initial seeding of the database.

Since subsequent seeding is quicker, this option (env variable) only needs to be used for the first boot of the application.

In addition, a more descriptive error message has been to the log.

https://bugzilla.redhat.com/show_bug.cgi?id=1422671

To test, I ran:

SEEDING_LOCK_TIMEOUT=1 bundle exec rails s

Seeding over a WAN can take longer than 10 minutes.
This allows the timeout to be increased temporarily.

https://bugzilla.redhat.com/show_bug.cgi?id=1422671
@Fryguy
Copy link
Member

Fryguy commented Jul 17, 2017

@bdunne Moving over to you for review as this might be used in the rearch.

@kbrock
Copy link
Member Author

kbrock commented Jul 17, 2017

Maybe we should drop the timeout for seeding if it were not done every boot?

@kbrock
Copy link
Member Author

kbrock commented Jul 17, 2017

Just trying to get the BZ closed

assigning miq_user_role was causing a bunch of sub queries

Did bring back more group records, but in a single query
@kbrock kbrock closed this Jul 17, 2017
@kbrock kbrock deleted the seeding_timeout branch July 17, 2017 21:23
@miq-bot
Copy link
Member

miq-bot commented Jul 17, 2017

Checked commits kbrock/manageiq@30c6781~...dc571c5 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
2 files checked, 1 offense detected

lib/evm_database.rb

@kbrock kbrock restored the seeding_timeout branch July 18, 2017 19:36
@kbrock
Copy link
Member Author

kbrock commented Jul 19, 2017

Huh. reopened ==> #15595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants