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

Reregister existing framework and support escape of slash in task names #2

Merged
merged 2 commits into from
Dec 1, 2016

Conversation

kohend
Copy link
Contributor

@kohend kohend commented Dec 1, 2016

I found out that when I tried to reregister an existing framework I received a mismatch of the framework ID in different fields:
Failed to validate scheduler::Call: 'framework_id' differs from 'subscribe.framework_info.id'
Since the subscribe call sets the framework ID to null.
This sets it to the framework ID given if defined, and prints out the error output from Mesos upon failure to register.
In addition, since we wanted to use task names with slashes to match the marathon groups we're using, I added an escape of the task name to underscores, like marathon does internally.

Copy link
Owner

@tobilg tobilg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to understand this correctly, with that change you ideally wan to handle re-registrations "only", while the scheduler is still running? self.frameworkId is never set from outside, so if the scheduler gets restarted, I guess there's no way to recover (yet)

@tobilg
Copy link
Owner

tobilg commented Dec 1, 2016

Thanks for the PR! As said in my review comment, I'd like to understand the use case better. As the frameworks don't persist their data in ZK yet, I think there's currently no way to restart a scheduler... This is yet to be fixed.

@kohend
Copy link
Contributor Author

kohend commented Dec 1, 2016

I wrote code to persist the framework ID in ZK, I put it in the "boilerplate" end of things (currently in our internal git, waiting for code review), I understand that task information needs to be persistent as well to allow a takeover of a restarted scheduler, but this is a step in the right direction.
It was impossible to develop when each restart registered a new framework.

@tobilg tobilg merged commit 3b74c66 into tobilg:master Dec 1, 2016
@tobilg
Copy link
Owner

tobilg commented Dec 1, 2016

Merged, thanks! Let's have a chat about the ZK stuff if you like. I'm both in the Mesos and DC/OS Slack channels.

@tobilg
Copy link
Owner

tobilg commented Dec 2, 2016

I released the version 0.2.9 just now.

tobilg pushed a commit that referenced this pull request Dec 29, 2016
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