You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scheduling: auto-stop limit can be bypassed by disabling auto-stop #3630
I think users should be allowed to increase the autostop time. Otherwise, an admin has too much power, which can cause work and productivity loss for workspace users. What if the admin is not around or not reachable, and they need to increase the time?
@matifali the control feature is optional and will just be in our product's enterprise (paid) version. In massive deployments, it's not feasible for admins to track down individuals that are spending too much, so they rely on this kind of end-to-end control.
I understand. But it should not be so in OSS version. I am an admin and volunteering to manage our groups servers. So I like to give users as much flexibility as they wish.
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.
So we recently changed the "auto-stop limit" to "auto-stop default" which is applied to all workspaces but is overridable by the user. To make this more enforceable, I suggest we do the following:
Enterprise feature: Add a "Enforce auto stop" checkbox to the template settings page. When checked, this changes the "auto-stop default" to "auto-stop after" in the template settings page. Additionally, users cannot change their auto-stop value or disable auto stop for their individual workspaces.
If the user keeps a workspace connection open (e.g code-server with websocket or SSH connection), Coder will continue to push the auto-stop time by 1 hour. At this point, we don't want to offer a feature that "kicks" developers out of their workspace, but it's something we may consider down the road.
If cloud cost is a problem and a lot of workspaces are being "kept alive" despite auto stop settings, workarounds are still possible in this model. For example, an admin would write a bash script/CRON job to stop all workspaces that were started over 72 hours ago.
I'm not totally clear on why we changed the "max auto-stop" to default. A developer's incentive is to keep their machine on as long as possible. To me, this advice from the template doesn't seem to provide much value. Why don't we have auto-stop max and also enforce that auto-stop is enabled if its set?
@ammario In Coder v1, we had feature requests (and built a feature) to allow users to configure their own auto-stop behavior per workspace. Specifically, this customer wanted to enable data scientists to disable/set an auto-stop value for long-running jobs. However, they wanted to ensure that other workspaces, by default stop at a specific "default" time.
I don't have strong opinions on whether we build this feature as a "default" or a "max," but we will still need to add an option to allow users (or specific groups) to override this behavior. Another option is to use something like @mtojek's proposal for grants: #5106
I think grants is a lot of complexity for where we're at today. I think we should just use max (which can also be the default). I think that approach minimizes the number of configuration options.
We still need the ability for a user to configure a custom auto-stop duration for their workspace. This was a feature we built for v1 use cases that will migrate to v2.
changed the title [-]Auto-stop limit can be bypassed by disabling auto-stop[/-][+]scheduling: auto-stop limit can be bypassed by disabling auto-stop[/+]on Feb 6, 2023
Closing in favor of #6047, which solves this problem by adding a "max template ttl" control for enterprise customers. This feature will enable template admins to force workspaces to turn off within a certain amount of time, even if the user wants it to stay on for longer.
Activity
matifali commentedon Aug 23, 2022
I think users should be allowed to increase the autostop time. Otherwise, an admin has too much power, which can cause work and productivity loss for workspace users. What if the admin is not around or not reachable, and they need to increase the time?
ammario commentedon Aug 23, 2022
@matifali the control feature is optional and will just be in our product's enterprise (paid) version. In massive deployments, it's not feasible for admins to track down individuals that are spending too much, so they rely on this kind of end-to-end control.
matifali commentedon Aug 23, 2022
I understand. But it should not be so in OSS version. I am an admin and volunteering to manage our groups servers. So I like to give users as much flexibility as they wish.
github-actions commentedon Oct 23, 2022
This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.
ammario commentedon Nov 11, 2022
Reopened as needed by @kconley-sq
bpmct commentedon Nov 16, 2022
So we recently changed the "auto-stop limit" to "auto-stop default" which is applied to all workspaces but is overridable by the user. To make this more enforceable, I suggest we do the following:
Enterprise feature: Add a "Enforce auto stop" checkbox to the template settings page. When checked, this changes the "auto-stop default" to "auto-stop after" in the template settings page. Additionally, users cannot change their auto-stop value or disable auto stop for their individual workspaces.
If the user keeps a workspace connection open (e.g code-server with websocket or SSH connection), Coder will continue to push the auto-stop time by 1 hour. At this point, we don't want to offer a feature that "kicks" developers out of their workspace, but it's something we may consider down the road.
If cloud cost is a problem and a lot of workspaces are being "kept alive" despite auto stop settings, workarounds are still possible in this model. For example, an admin would write a bash script/CRON job to stop all workspaces that were started over 72 hours ago.
ammario commentedon Nov 16, 2022
I'm not totally clear on why we changed the "max auto-stop" to default. A developer's incentive is to keep their machine on as long as possible. To me, this advice from the template doesn't seem to provide much value. Why don't we have auto-stop max and also enforce that auto-stop is enabled if its set?
bpmct commentedon Nov 22, 2022
bpmct commentedon Dec 5, 2022
@ammario In Coder v1, we had feature requests (and built a feature) to allow users to configure their own auto-stop behavior per workspace. Specifically, this customer wanted to enable data scientists to disable/set an auto-stop value for long-running jobs. However, they wanted to ensure that other workspaces, by default stop at a specific "default" time.
I don't have strong opinions on whether we build this feature as a "default" or a "max," but we will still need to add an option to allow users (or specific groups) to override this behavior. Another option is to use something like @mtojek's proposal for grants: #5106
ammario commentedon Dec 5, 2022
I think grants is a lot of complexity for where we're at today. I think we should just use max (which can also be the default). I think that approach minimizes the number of configuration options.
bpmct commentedon Dec 6, 2022
We still need the ability for a user to configure a custom auto-stop duration for their workspace. This was a feature we built for v1 use cases that will migrate to v2.
ammario commentedon Dec 7, 2022
The user can always set an auto-stop duration that is less than the template max.
ammario commentedon Feb 6, 2023
This should be a per-template setting.
[-]Auto-stop limit can be bypassed by disabling auto-stop[/-][+]scheduling: auto-stop limit can be bypassed by disabling auto-stop[/+]deansheather commentedon Feb 14, 2023
Closing in favor of #6047, which solves this problem by adding a "max template ttl" control for enterprise customers. This feature will enable template admins to force workspaces to turn off within a certain amount of time, even if the user wants it to stay on for longer.