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

Adding aws-az-experiment, Disable availability zones for load-balancer #36

Merged
merged 3 commits into from
Feb 15, 2022
Merged

Conversation

oumkale
Copy link
Member

@oumkale oumkale commented Dec 27, 2021

Signed-off-by: Oum Kale oumkale@chaosnative.com

What this PR does / why we need it:

  • Disable availability zones for load-balancer
  • Removes the specified Availability Zones from the set of Availability Zones for the specified load balancer in EC2-Classic or a default VPC.

For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets.

There must be at least one Availability Zone registered with a load balancer at all times. After an Availability Zone is removed, all instances registered with the load balancer that are in the removed Availability Zone go into the OutOfService state. Then, the load balancer attempts to equally balance the traffic among its remaining Availability Zones.

Checklist:

  • Fixes #
  • PR messages has document related information
  • Labelled this PR & related issue with breaking-changes tag
  • PR messages has breaking changes related information
  • Labelled this PR & related issue with requires-upgrade tag
  • PR messages has upgrade related information
  • Commit has unit tests
  • Commit has integration tests
  • E2E run Required for the changes

Signed-off-by: Oum Kale <oumkale@chaosnative.com>
@oumkale
Copy link
Member Author

oumkale commented Dec 27, 2021

Experiment Logs:

time=2021-11-30 14:22:09,189 level=INFO  msg=Experiment Name: aws-az-chaos
time=2021-11-30 14:22:09,189 level=INFO  msg=[PreReq]: Initialise Chaos Variables for the aws-az-chaos experiment
time=2021-11-30 14:22:09,189 level=INFO  msg=[PreReq]: Updating the chaos result of aws-az-chaos experiment (SOT)
time=2021-11-30 14:22:09,836 level=INFO  msg=[Info]: The application information is as follows Namespace=litmus, Label=, Ramp Time=0
time=2021-11-30 14:22:09,836 level=INFO  msg=[Status]: Verify that the AUT (Application Under Test) is running (pre-chaos)
time=2021-11-30 14:22:09,865 level=INFO  msg=Found credentials in shared credentials file: /tmp/cloud_config.yml
time=2021-11-30 14:22:11,255 level=INFO  msg=[Info]: LoadBalancer and Availablity of zone has been checked
time=2021-11-30 14:22:11,271 level=INFO  msg=[Info]: Target available zone list, ['us-east-2a', 'us-east-2c']
time=2021-11-30 14:22:11,282 level=INFO  msg=[Info]: Detaching the following zone, Zone Name us-east-2a
time=2021-11-30 14:22:20,029 level=INFO  msg=[Info]: Detaching the following zone, Zone Name us-east-2c
time=2021-11-30 14:22:21,809 level=INFO  msg=[Wait]: Wait for the chaos interval 10
time=2021-11-30 14:22:31,818 level=INFO  msg=[Status]: Atach the available zone back to load balancer
time=2021-11-30 14:22:34,868 level=INFO  msg=[Status]: Checking AWS load balancer's AZ status
time=2021-11-30 14:22:36,232 level=INFO  msg=[Info]: LoadBalancer and Availablity of zone has been checked
time=2021-11-30 14:22:36,233 level=INFO  msg=[Info]: Target available zone list, ['us-east-2a', 'us-east-2c']
time=2021-11-30 14:22:36,313 level=INFO  msg=[Info]: Detaching the following zone, Zone Name us-east-2a
time=2021-11-30 14:22:37,742 level=INFO  msg=[Info]: Detaching the following zone, Zone Name us-east-2c
time=2021-11-30 14:22:39,200 level=INFO  msg=[Wait]: Wait for the chaos interval 10
time=2021-11-30 14:22:49,210 level=INFO  msg=[Status]: Atach the available zone back to load balancer
time=2021-11-30 14:23:00,604 level=INFO  msg=[Status]: Checking AWS load balancer's AZ status
time=2021-11-30 14:23:01,849 level=INFO  msg=[Info]: LoadBalancer and Availablity of zone has been checked
time=2021-11-30 14:23:01,849 level=INFO  msg=[Completion]: aws-az-chaos chaos is done
time=2021-11-30 14:23:01,849 level=INFO  msg=[Confirmation]: aws-az-chaos chaos has been injected successfully
time=2021-11-30 14:23:01,849 level=INFO  msg=[Status]: Verify that the AUT (Application Under Test) is running (post-chaos)
time=2021-11-30 14:23:03,009 level=INFO  msg=[Info]: LoadBalancer and Availablity of zone has been checked
time=2021-11-30 14:23:03,036 level=INFO  msg=[The End]: Updating the chaos result of aws-az-chaos experiment (EOT)

Chaos Result 👍

Name:         aws-az-chaos6htv8-aws-az-chaos
Namespace:    litmus
Labels:       app.kubernetes.io/component=experiment-job
              app.kubernetes.io/part-of=litmus
              app.kubernetes.io/version=latest
              chaosUID=db1d6f97-14fe-41b4-8a9b-a158daccdde2
              controller-uid=3579ec9f-f6a5-4102-841b-dc8020fa5a6d
              job-name=aws-az-chaos-s2tlld
              name=aws-az-chaos6htv8-aws-az-chaos
Annotations:  <none>
API Version:  litmuschaos.io/v1alpha1
Kind:         ChaosResult
Metadata:
  Creation Timestamp:  2021-11-30T14:22:09Z
  Generation:          2
  Managed Fields:
    API Version:  litmuschaos.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
        f:labels:
          .:
          f:app.kubernetes.io/component:
          f:app.kubernetes.io/part-of:
          f:app.kubernetes.io/version:
          f:chaosUID:
          f:controller-uid:
          f:job-name:
          f:name:
      f:spec:
        .:
        f:engine:
        f:experiment:
        f:instance:
      f:status:
        .:
        f:experimentStatus:
        f:history:
    Manager:         kubectl
    Operation:       Update
    Time:            2021-11-30T14:22:09Z
  Resource Version:  55286
  UID:               67e005e1-7846-4e60-8dd4-9d43a4abae99
Spec:
  Engine:      aws-az-chaos6htv8
  Experiment:  aws-az-chaos
  Instance:    
Status:
  Experiment Status:
    Fail Step:                 N/A
    Phase:                     Completed
    Probe Success Percentage:  100
    Verdict:                   Pass
  History:
    Failed Runs:   0
    Passed Runs:   1
    Stopped Runs:  0
Events:
  Type    Reason   Age   From                       Message
  ----    ------   ----  ----                       -------
  Normal  Awaited  105s  aws-az-chaos-s2tlld-4b42b  Experiment aws-az-chaos, Result Awaited
  Normal  Pass     51s   aws-az-chaos-s2tlld-4b42b  Experiment aws-az-chaos, Result Pass

bin/experiment/experiment.py Outdated Show resolved Hide resolved
chaosLib/litmus/aws_az_chaos/lib/aws_az_chaos.py Outdated Show resolved Hide resolved
experiments/aws_az/aws_az_chaos/test/test.yml Outdated Show resolved Hide resolved
pkg/aws_az/environment/environment.py Outdated Show resolved Hide resolved
pkg/aws_az/environment/environment.py Outdated Show resolved Hide resolved
pkg/aws_status/status.py Outdated Show resolved Hide resolved
chaosLib/litmus/aws_az_chaos/lib/aws_az_chaos.py Outdated Show resolved Hide resolved
chaosLib/litmus/aws_az_chaos/lib/aws_az_chaos.py Outdated Show resolved Hide resolved
Signed-off-by: Oum Kale <oumkale@chaosnative.com>
experiments/aws_az/aws_az_chaos/experiment/aws_az_chaos.py Outdated Show resolved Hide resolved
experiments/aws_az/aws_az_chaos/experiment/aws_az_chaos.py Outdated Show resolved Hide resolved
pkg/aws_az/environment/environment.py Show resolved Hide resolved
pkg/aws_az/environment/environment.py Outdated Show resolved Hide resolved
experiments/aws_az/aws_az_chaos/experiment/aws_az_chaos.py Outdated Show resolved Hide resolved
experiments/aws_az/aws_az_chaos/experiment/aws_az_chaos.py Outdated Show resolved Hide resolved
Signed-off-by: Oum Kale <oumkale@chaosnative.com>
@ksatchit ksatchit merged commit 7e04ebb into litmuschaos:master Feb 15, 2022
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.

None yet

4 participants