Skip to content

Conversation

@jml
Copy link
Contributor

@jml jml commented Jan 11, 2018

Repeat of #620 with a bug fix.

What was the bug fix?

In #620 (and in this PR), the ruler can get configs either from the configs server or directly from the DB. If the configs DB URL flag is set, the ruler will get the configs from the DB. Unfortunately, the DB URL flag is always set, due to defaults. This means we try to get configs from a nonexistent database. Ugh.

This PR changes the check to be for absence of configs API setting, rather than presence of configs DB setting. This works because the URL flag has no default value.

The test failure appears to be unrelated flakiness.

jml added 2 commits January 11, 2018 16:53
Works around the fact that `database.uri` has a default value, so we cannot
detect whether the user has explicitly asked for a database or not.
@jml jml requested review from bboreham and dlespiau January 11, 2018 17:40
@jml
Copy link
Contributor Author

jml commented Jan 11, 2018

Asking @dlespiau (who investigated the bug in #620) and @bboreham (who reviewed #620) to review. I think an 'approve' from either is sufficient.

@jml
Copy link
Contributor Author

jml commented Jan 11, 2018

I've verified it starts correctly on our local environment with these changes and doesn't produce the warnings seen on dev.

@jml jml merged commit a45e98d into master Jan 12, 2018
jml added a commit that referenced this pull request Feb 13, 2018
In #649, we only served DB-backed endpoints for ruler if the configs API flag
was _not_ set. This turns out to be hostile to a smooth migration, as we want
to have points where we are serving _both_ sets of endpoints so we can update
the service-ui to go from pointing at one to pointing at the other.
jml added a commit that referenced this pull request Feb 15, 2018
* Change database.uri flag to default to empty

This could theoretically break deployments of the configs service that relied
on the default being set.

In practice, we anticipate very few configs deployments expecting a database
at `configs-db.weave.local`

* Only serve DB-backed stuff if DB set

In #649, we only served DB-backed endpoints for ruler if the configs API flag
was _not_ set. This turns out to be hostile to a smooth migration, as we want
to have points where we are serving _both_ sets of endpoints so we can update
the service-ui to go from pointing at one to pointing at the other.
@tomwilkie tomwilkie deleted the 619-take-2 branch August 29, 2018 15:02
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 this pull request may close these issues.

3 participants