-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Feat/event based instance replacement - Merged all "new" commit from master #433
Feat/event based instance replacement - Merged all "new" commit from master #433
Commits on Aug 20, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 719ad73 - Browse repository at this point
Copy the full SHA 719ad73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ad0e99 - Browse repository at this point
Copy the full SHA 2ad0e99View commit details -
3
Configuration menu - View commit details
-
Copy full SHA for 89a188c - Browse repository at this point
Copy the full SHA 89a188cView commit details
Commits on Oct 11, 2019
-
UserData wrappers for CloudFormation helper scripts when using Beanst…
…alk (LeanerCloud#366) * Support custom role for cfn-init in Beanstalk UserData * Wrappers & refactoring * Docs * Docs fixes * More docs fixes * Docs fixes * Yet more docs fixes * Lambda & Kubernetes config * AutoSpottingElasticBeanstalk managed policy + Rename beanstalk_cfn_init_role to beanstalk_cfn_wrappers * Update param description * Kubernetes config fix * Rename Beanstalk variable + Move test data * Add missing permission for AutoSpottingBeanstalk role
Configuration menu - View commit details
-
Copy full SHA for 4382e90 - Browse repository at this point
Copy the full SHA 4382e90View commit details
Commits on Nov 7, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d078902 - Browse repository at this point
Copy the full SHA d078902View commit details
Commits on Nov 19, 2019
-
Configuration menu - View commit details
-
Copy full SHA for b6e040e - Browse repository at this point
Copy the full SHA b6e040eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a33cc2c - Browse repository at this point
Copy the full SHA a33cc2cView commit details -
Begin - port regional CloudFormation stack changes to the main templa…
…te so it can also run from a StackSet
Configuration menu - View commit details
-
Copy full SHA for 900568a - Browse repository at this point
Copy the full SHA 900568aView commit details
Commits on Nov 20, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 1c854e0 - Browse repository at this point
Copy the full SHA 1c854e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2784995 - Browse repository at this point
Copy the full SHA 2784995View commit details
Commits on Nov 26, 2019
-
Multiple fixes to handle lambda concurrency
As instaces can be launched in concurrency/overlapping we have the problems related to multiple lambdas acting on the same ASG
Configuration menu - View commit details
-
Copy full SHA for 168e97a - Browse repository at this point
Copy the full SHA 168e97aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0cc82a1 - Browse repository at this point
Copy the full SHA 0cc82a1View commit details
Commits on Nov 27, 2019
-
Configuration menu - View commit details
-
Copy full SHA for a1350fc - Browse repository at this point
Copy the full SHA a1350fcView commit details -
Created Queue in CF template Begin sending message
Configuration menu - View commit details
-
Copy full SHA for a0ae84b - Browse repository at this point
Copy the full SHA a0ae84bView commit details
Commits on Nov 28, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d8261a2 - Browse repository at this point
Copy the full SHA d8261a2View commit details
Commits on Nov 29, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 3a6fd0a - Browse repository at this point
Copy the full SHA 3a6fd0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a53041 - Browse repository at this point
Copy the full SHA 1a53041View commit details
Commits on Dec 2, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 68b8338 - Browse repository at this point
Copy the full SHA 68b8338View commit details
Commits on Dec 3, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 40224d7 - Browse repository at this point
Copy the full SHA 40224d7View commit details
Commits on Dec 6, 2019
-
* Use inline python lambda to increase ASG
Use it only if AttachInstances method fails for wrong ASG max size.
Configuration menu - View commit details
-
Copy full SHA for 1899417 - Browse repository at this point
Copy the full SHA 1899417View commit details
Commits on Dec 8, 2019
-
Configuration menu - View commit details
-
Copy full SHA for f102241 - Browse repository at this point
Copy the full SHA f102241View commit details
Commits on Dec 9, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 1d395bc - Browse repository at this point
Copy the full SHA 1d395bcView commit details
Commits on Dec 10, 2019
-
* Improvements on event based instance replacement
- Ported to StackSet deploy mode. - Fix to "ScalingActivityInProgress" if launched ondemand instance is terminated before going "inservice": Created method "waitForInstanceStatus", that wait, until a max retry (5), that an instance belonging to an ASG is in the desired status (InService). (Sleep time is 5*retry) - Fix to multiple problems caused by lambda concurrency changing ASG MaxSize: Created another Lambda (LambdaManageASG) in the same region of the main one; code python3.7, inline in template. Lambda concurrency is set to one. Is function is to change ASG MaxSize by the ammount specified. Used a "try-catch approach": if AttachInstances return error code "ValidationError" and string "update the AutoScalingGroup sizes" is present in error message, means that we need to increase ASG MaxSize. So we execute method changeAutoScalingMaxSize that invoke LambdaManageASG. If invoke return error "ErrCodeTooManyRequestsException", means that multiple Main lambdas are executing LambdaManageASG, we sleep for a random interval part of seconds and retry. Method attachSpotInstance now return an int that represent the ammount of change to the ASG MaxSize, so that in swapWithGroupMember we can defer the call to changeAutoScalingMaxSize to decrease the ASG MaxSize of the previously increased ammount. We use "waitForInstanceStatus" in attachSpotInstance before returning to be sure that spot instance has been attached and are InService before beginning to terminate ondemand one.
Configuration menu - View commit details
-
Copy full SHA for 36e82a8 - Browse repository at this point
Copy the full SHA 36e82a8View commit details
Commits on Dec 30, 2019
-
* Improvements on event based instance replacement
- Add logPrefix to better identify lambda actions in case of concurent executions. TE = Spot terminate event ST = Instance start event SC = Schedule event TE and ST are followed by instanceID, SC is followed by activation time.
Configuration menu - View commit details
-
Copy full SHA for 63ba2b2 - Browse repository at this point
Copy the full SHA 63ba2b2View commit details -
* Improvements on event based instance replacement
- fix/improvement on Suspending/Resuming Termination process: suspend/resume is now handled by LambdaManageASG too. When i successfully suspend termination, i add a tag "autospotting_suspend_process_by" with value equals to the instanceId event that triggered the main lambda. When i try to resume termination first check if the value of the tag above equals the current one. If not, means that another main lambda, different from the one who suspended it, is trying to resume the process; in that case i do not resume it. Considered that LambdaManageASG has a concurrent execution limit set to 1 we can have the following cases: 1) *) A main lambda suspend the process. *) No other lambda suspend it. *) Main lambda resume the process. *) Another main lambda suspend the process *) ....and so on 2) *) A main lambda suspend the process. *) Before the first one resume the process another one suspend it (so replacing the tag value) *) First lambda do not resume the process (tag value differ) *) Second lambda resume the process In the wrost scenario of a Lambda dying before resuming the process, it will be resumed after another one will suspend it.
Configuration menu - View commit details
-
Copy full SHA for d49a0d3 - Browse repository at this point
Copy the full SHA d49a0d3View commit details
Commits on Dec 31, 2019
-
* Improvements on event based instance replacement
code cosmetic fix
Configuration menu - View commit details
-
Copy full SHA for 476ba58 - Browse repository at this point
Copy the full SHA 476ba58View commit details
Commits on Jan 2, 2020
-
* Improvements on event based instance replacement
- for rand seed instead of using time.Now().UnixNano() we build a seed based on the instanceId that triggered the event. The seed is build this way: for every char of instanceId (starting from third char) we get his rune "representation" and sum it to previous one. We use it as a temporary seed and get a random number between 0 and 9. The final seed is the concatenation of the generated random numbers. This way we have a seed number (int64) that depend from the instanceId and of the same lenght.
Configuration menu - View commit details
-
Copy full SHA for 1f358a6 - Browse repository at this point
Copy the full SHA 1f358a6View commit details -
* Improvements on event based instance replacement
- no more need to "revert attach/detach order when running on minimum capacity". Defer changeAutoScalingMaxSize and use same logic of swapWithGroupMember.
Configuration menu - View commit details
-
Copy full SHA for 621bb79 - Browse repository at this point
Copy the full SHA 621bb79View commit details -
* Improvements on event based instance replacement
- Use suspendResumeProcess for schedule replaceOnDemandInstanceWithSpot too. We use it as a trick to avoid rare cases of concurrency between scheduled and event lambdas. As lambda that handle "suspendResumeProcess" have a concurrency limit of one, scheduled and event lambdas, if concurrent, will be "time shifted" by a random value. This way they will not execute attachSpotInstance at the same time. In case of scheduled lambda we add the "S" char to the instanceId used for the randSeed to avoid that it resume process suspended by event lambda. - Fix in swapWithGroupMember: defer asg.suspendResumeProcess for resume so that it will be executed even if function swapWithGroupMember return error.
Configuration menu - View commit details
-
Copy full SHA for 2edb1a1 - Browse repository at this point
Copy the full SHA 2edb1a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a137cc - Browse repository at this point
Copy the full SHA 6a137ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83c474c - Browse repository at this point
Copy the full SHA 83c474cView commit details
Commits on Mar 31, 2020
-
fix terminateRandomSpotInstanceIfHavingEnough
need another condition to avoid terminating valid spot instance in case ASG have minOnDemand > 0 if all ASG instances are in state running and Min OnDemand instance equals total ondemand running and all instances running equals desired capacity means that i do not need to terminate a spot instance need some testing
Configuration menu - View commit details
-
Copy full SHA for a00efde - Browse repository at this point
Copy the full SHA a00efdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for c93bffd - Browse repository at this point
Copy the full SHA c93bffdView commit details -
fix terminateRandomSpotInstanceIfHavingEnough
changed allInstancesRunning to return ondemand instances running too
Configuration menu - View commit details
-
Copy full SHA for 1c26c6c - Browse repository at this point
Copy the full SHA 1c26c6cView commit details
Commits on Apr 1, 2020
-
Specify/override multiplier for the on-demand price on a group
level As i.price already have been multiplied by the global value, if specified, i need first to divide it by the same value and then multiply it by the multiplier specific to the ASG. We need to do this for both scheduled and event actions. For event we act in function belongsToEnabledASG. For schedule we act in launchSpotReplacement. Need deep testing...
Configuration menu - View commit details
-
Copy full SHA for 073c636 - Browse repository at this point
Copy the full SHA 073c636View commit details -
Specify/override multiplier for the on-demand price on a group
level - fix in loadConfOnDemandPriceMultiplier need to use a.config.OnDemandPriceMultiplier in place of a.region.conf.OnDemandPriceMultiplier this way a.region.conf.OnDemandPriceMultiplier will conserve the original global value
Configuration menu - View commit details
-
Copy full SHA for b8a4a1e - Browse repository at this point
Copy the full SHA b8a4a1eView commit details
Commits on Apr 2, 2020
-
Merge remote-tracking branch 'upstream/feat/event-based-instance-repl…
…acement' into feat/event-based-instance-replacement upstream merge
Configuration menu - View commit details
-
Copy full SHA for 56e03d7 - Browse repository at this point
Copy the full SHA 56e03d7View commit details
Commits on Apr 3, 2020
-
Configuration menu - View commit details
-
Copy full SHA for ae8f29b - Browse repository at this point
Copy the full SHA ae8f29bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b3d0daa - Browse repository at this point
Copy the full SHA b3d0daaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2fbf9e0 - Browse repository at this point
Copy the full SHA 2fbf9e0View commit details -
For Test_autoScalingGroup_terminateRandomSpotInstanceIfHavingEnough
added contion: "spot capacity is correct, skip termination"
Configuration menu - View commit details
-
Copy full SHA for 582c525 - Browse repository at this point
Copy the full SHA 582c525View commit details
Commits on Jul 8, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 647337e - Browse repository at this point
Copy the full SHA 647337eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e771de7 - Browse repository at this point
Copy the full SHA e771de7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d83a91 - Browse repository at this point
Copy the full SHA 8d83a91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a57534 - Browse repository at this point
Copy the full SHA 7a57534View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0778fa - Browse repository at this point
Copy the full SHA a0778faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ef762d - Browse repository at this point
Copy the full SHA 2ef762dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 036b91e - Browse repository at this point
Copy the full SHA 036b91eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ff296e - Browse repository at this point
Copy the full SHA 8ff296eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fdab5b - Browse repository at this point
Copy the full SHA 3fdab5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a641137 - Browse repository at this point
Copy the full SHA a641137View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56f05f0 - Browse repository at this point
Copy the full SHA 56f05f0View commit details -
Merge Ignore terminating spot instances that don't belong to
AutoSpotting (master) and Enable Spot Termination ASG Checking (event) [33a444c]
Configuration menu - View commit details
-
Copy full SHA for 9135a45 - Browse repository at this point
Copy the full SHA 9135a45View commit details -
Configuration menu - View commit details
-
Copy full SHA for f20ad02 - Browse repository at this point
Copy the full SHA f20ad02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71820f8 - Browse repository at this point
Copy the full SHA 71820f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bae2d5 - Browse repository at this point
Copy the full SHA 5bae2d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a086398 - Browse repository at this point
Copy the full SHA a086398View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83e4396 - Browse repository at this point
Copy the full SHA 83e4396View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f849fb - Browse repository at this point
Copy the full SHA 3f849fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 13eba5b - Browse repository at this point
Copy the full SHA 13eba5bView commit details
Commits on Jul 9, 2020
-
Configuration menu - View commit details
-
Copy full SHA for b83f6fd - Browse repository at this point
Copy the full SHA b83f6fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for acfa8ad - Browse repository at this point
Copy the full SHA acfa8adView commit details -
Configuration menu - View commit details
-
Copy full SHA for b5ade8b - Browse repository at this point
Copy the full SHA b5ade8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80cfa8b - Browse repository at this point
Copy the full SHA 80cfa8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for eefe516 - Browse repository at this point
Copy the full SHA eefe516View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42d3c71 - Browse repository at this point
Copy the full SHA 42d3c71View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6de9c2e - Browse repository at this point
Copy the full SHA 6de9c2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cc90f7 - Browse repository at this point
Copy the full SHA 8cc90f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcdf509 - Browse repository at this point
Copy the full SHA bcdf509View commit details -
Configuration menu - View commit details
-
Copy full SHA for 165ce0e - Browse repository at this point
Copy the full SHA 165ce0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb05c6f - Browse repository at this point
Copy the full SHA cb05c6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8907710 - Browse repository at this point
Copy the full SHA 8907710View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9c3ff1 - Browse repository at this point
Copy the full SHA c9c3ff1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 742e011 - Browse repository at this point
Copy the full SHA 742e011View commit details
Commits on Jul 28, 2020
-
cronEventAction - fix to logic
need to invert test for needReplaceOnDemandInstances and onDemandInstance == nil currently if onDemandInstance == nil methods return and execution stop. This way the check to terminate a spotInstace if their number is more than required is never done. Assume that ASG scale down and terminate the onDemand instances that autospotting is not terminating [autospotting_min_on_demand_number]. On the next runs onDemandInstance will be nil and spot instances in excess will not be terminated.
Configuration menu - View commit details
-
Copy full SHA for af6ccfc - Browse repository at this point
Copy the full SHA af6ccfcView commit details
Commits on Jul 29, 2020
-
Merge branch 'feat/event-based-instance-replacement' into feat/event-…
…based-instance-replacement
Configuration menu - View commit details
-
Copy full SHA for a6e9bbb - Browse repository at this point
Copy the full SHA a6e9bbbView commit details