jrasell / sherpa

Sherpa is a highly available, fast, and flexible horizontal job scaling for HashiCorp Nomad. It is capable of running in a number of different modes to suit different requirements, and can scale based on Nomad resource metrics or external sources.
Mozilla Public License 2.0
163 stars 8 forks source link

Fix issue when autoscaling job with mix of groups w/wo policies. #71

Closed jrasell closed 4 years ago

jrasell commented 4 years ago

Jobs which had 2 groups, one which had a scaling policy and one which did not would panic when running through the autoscaler. This was caused by an unsafe check to see if an allocation was part of a group which had a scaling policy.

Closes #70

jrasell commented 4 years ago

@numiralofe this should fix the problem you are seeing. I was able to reproduce it locally and therefore test the fix also. Apologies for this.