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

refactored create_complete_config #298

Merged
merged 5 commits into from
Mar 7, 2016
Merged

refactored create_complete_config #298

merged 5 commits into from
Mar 7, 2016

Conversation

mjksmith
Copy link
Contributor

@mjksmith mjksmith commented Mar 4, 2016

No description provided.

"""backoff_seconds represents how many seconds a penalization factor for failing tasks.
Every time a task fails, Marathon adds this value multiplied by a backoff_factor.
In PaaSTA we know how many instances a service has, so we adjust the backoff_seconds
to account for this, which prevents services with large number of instances from
being penalized more than services with small instance counts. (for example, a service
with 30 instances will get backed off 10 times faster than a service with 3 instances)."""
instances = self.get_instances()
if instances is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it necessary to pass in instances like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@solarkennedy calling format_marathon_app_dict calls both get_instances and get_backoff_seconds. Since instances might read data from zookeeper this allows us to only query zookeeper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@solarkennedy another alternative would just be to use min_instances instead of instances here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea. If this number is going to be dynamically changing a lot, then we can't use it in the hash computation. We have to use something more static. max_instances is actually what we really want

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@solarkennedy this number is actually excluded from the hash calculation. We still want users to be able to change min_instances and max_instances without causing a bounce anyways

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@solarkennedy fixed in #290

This line really should have been a part of that PR anyways

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also fix the docstring ("backoff_seconds represents how many seconds a penalization factor for failing tasks").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@keshavdv fixed in #290

@solarkennedy
Copy link
Contributor

ship

mjksmith added a commit that referenced this pull request Mar 7, 2016
refactored create_complete_config
@mjksmith mjksmith merged commit b410882 into master Mar 7, 2016
@mjksmith mjksmith deleted the create_config_rebase branch March 7, 2016 23:22
@mjksmith mjksmith removed the in review label Mar 7, 2016
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.

4 participants