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

controller: Don't include deleted formations in formation stream #2835

Merged
merged 2 commits into from
May 16, 2016

Conversation

lmars
Copy link
Contributor

@lmars lmars commented May 16, 2016

Schedulers in a cluster restored from a backup were failing to stream formation updates with the following error:

t=2016-05-16T15:51:50+0000 lvl=info msg="connecting formation event stream" component=scheduler fn=streamFormationEvents
t=2016-05-16T15:51:50+0000 lvl=warn msg="formation event stream disconnected" component=scheduler fn=streamFormationEvents err="Server error: controller: resource not found"

The stream was being closed because the controller was trying to expand deleted formations, hitting ErrNotFound when looking up the associated release and returning that to the stream.

I have updated the formation_list_since query (along with some others) to check for deleted_at IS NULL.

lmars added 2 commits May 16, 2016 18:22
Signed-off-by: Lewis Marshall <lewis@lmars.net>
Signed-off-by: Lewis Marshall <lewis@lmars.net>
@josephglanville
Copy link
Contributor

Good catch, LGTM.

@lmars lmars merged commit 866f575 into master May 16, 2016
@lmars lmars deleted the controller-fix-formation-stream branch May 16, 2016 22:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants