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

GCP: Add option to configure minimum number of instances #32

Closed

Conversation

mohsenrezaeithe
Copy link
Contributor

@mohsenrezaeithe mohsenrezaeithe commented Sep 17, 2019

Fixes #30

On the UI

  1. Configurable in the image configs:
    image
  2. Visible on the profile page:
    image

On the server
The quota check guards the minimum number of instances that must be kept alive at all times for the image group:

[2019-09-17 07:02:54,749]   INFO [uled executor 3] - te.IdleTimeoutTerminateFactory - Will stop instance GoogleCloudInstance{myName='poc-tcagent-poc-stg2-1567103841-1040'}, profile 'GCP POC staging'{id=google-1, projectId=_Root} with idle time 12 minutes (idle time is 3 minutes)
[2019-09-17 07:02:54,749]   INFO [uled executor 3] - l.instances.StopInstanceAction - Terminating instance 'poc-tcagent-poc-stg2-1567103841-1040', profile 'GCP POC staging'{id=google-1, projectId=_Root}, reason: "Idle timeout reached"
[2019-09-17 07:02:54,749]   INFO [uled executor 3] - r.impl.DBCloudStateManagerImpl - Image: GoogleCloudImage{myName='poc-tcagent-poc-stg2-1567103841-'}, profile: profile 'GCP POC staging'{id=google-1, projectId=_Root} was marked to CONTAIN agent
[2019-09-17 07:02:54,758]   INFO [uled executor 3] - clouds.google.GoogleCloudImage - Unable to terminate anymore instances. Configured minimum limit has reached (min: 1)

@mohsenrezaeithe
Copy link
Contributor Author

Did some more testing, and it looks like the return on terminateInstance() causes something to mark the agent as CONTAIN:

[2019-09-17 06:57:54,656]   INFO [uled executor 2] - r.impl.DBCloudStateManagerImpl - Image: GoogleCloudImage{myName='poc-tcagent-poc-stg2-1567103841-'}, profile: profile 'GCP POC staging'{id=google-1, projectId=_Root} was marked to CONTAIN agent

which I'm assuming is also related to this warning on the profile:
image

Any suggestion on what's the best way to achieve the minimum number limitation?

@mohsenrezaeithe
Copy link
Contributor Author

@dimyriy @dmitry-treskunov is this something that can be pulled into the profiles implementation, or needs to be implemented on the server?

@mohsenrezaeithe mohsenrezaeithe deleted the min_instance_limit branch November 4, 2023 23:13
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.

Add support for minimum num of instances as hot standbys
3 participants