-
Notifications
You must be signed in to change notification settings - Fork 84
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
Reload process via sighup when autoscale policy files are added or changed #306
Comments
Hi @josegonzalez, The Autoscaler should reload file policies on 2020-11-02T19:54:58.641-0500 [INFO] agent: caught signal: signal=hangup
2020-11-02T19:54:58.641-0500 [INFO] file_policy_source: file policy source ID monitor received reload signal
2020-11-02T19:54:58.642-0500 [DEBUG] file_policy_source: starting file policy monitor: file=bin/policies/cluster.hcl policy_id=cf0c9617-92df-6960-834d-0e6a8711297a
2020-11-02T19:54:58.643-0500 [DEBUG] file_policy_source: starting file policy monitor: file=bin/policies/cluster2.hcl policy_id=2e9e2992-7296-cb13-34c4-66559419cfce If this is not happening for you then it's a bug. Would you be able to provide some logs from the Autoscaler around the time the |
That works if you send an explicit If you are deploying the The alternative would be for [1] You might think, "this is dumb, why would anyone ever want this?". The use case is when you have a golden ami and roll out new versions of that AMI via Autoscale groups that are managed via cloudformation. You could architect it such that rolling out the new AMI would create a new ASG and would want |
I think your use case is very valid, but the requirement for an explicit Having an explicit signal prevents the Autoscaler from reading files that are being edited, for example. It wouldn't happen in your example because you are doing the right thing 😄 But imagine editing a live policy file and your editor auto-saves as you type. This would trigger the Autoscaler to reload its policies constantly and have (potentially) invalid and unfinished policies read. So having an explicit signal gives more control over when the reload happens. For the use case you described, I think the API I mentioned in #307 would work as well. When you create the ASG you would also create a new policy in this API. |
In what cases are folks SSH'ing onto a box in production to edit an autoscaling policy? I think it's more of a theoretical concern - maybe something you've seen in local testing - but I think it's unlikely in production if you have these templated out. |
@josegonzalez with #312 and #313 merged I am going to close this one. Auto-reload for policy files is not something we plan on working right now. But thanks for the idea, it generated some great discussion and new features 🎉 |
Changing a policy file will not reload the autoscaler config, which isn't great if you're deploying nomad in a way that would automatically create/change policies when autoscale groups or similar change underneath.
The text was updated successfully, but these errors were encountered: