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

How to define the number of restart / stop_node on AKS Cluster? #78

Open
ShotaAshida opened this issue Oct 29, 2019 · 1 comment
Open

Comments

@ShotaAshida
Copy link

ShotaAshida commented Oct 29, 2019

Stop a node at random from a managed Azure Kubernetes Service.

This Document shows that restart_node and stop_node commands stop a node at random. However, all nodes in my cluster stopped when I tried to do command "stop_node".
And also tried to add "sample" query on argument like

        "arguments":{
          "filter": "'where resourceGroup=='Staging' and name='dmc-staging-1' | sample 1'"
        },

but it doesn't work.
My sample json is below. Do you have an any idea for this issue?

{
  "version": "1.0.0",
  "title": "...",
  "description": "...",
  "tags": [
    "azure",
    "kubernetes",
    "aks",
    "node"
  ],
  "configuration": {
    "azure": {
        "subscription_id": "xx"
    }
  },
  "secrets": {
    "azure": {
        "client_id": "xx",
        "client_secret": "xx",
        "tenant_id": "xx"
    }
  },
  "steady-state-hypothesis": {
    "title": "Services are all available and healthy",
    "probes": [
        {
          "name": "all-microservices-healthy",
          "type": "probe",
          "tolerance": true,
          "provider": {
            "func": "all_microservices_healthy",
            "type": "python",
            "module": "chaosk8s.probes"
          }
        }
    ]
  },
  "method": [
    {
      "name": "stop-node",
      "type": "action",
      "provider": {
        "func": "stop_node",
        "argument":{
          "filter": "'where resourceGroup=='Staging' and name='dmc-staging-1' | sample 1'"
        },
        "type": "python",
        "module": "chaosazure.aks.actions",
        "secrets": [
          "azure"
        ],
        "config": [
          "azure"
        ]
      }
    }
  ],
  "rollbacks": [
  ]
}

@bugra-derre
Copy link
Contributor

bugra-derre commented May 7, 2020

@ShotaAshida

The filter you provided ... It seems almost correct except that it has a apostrophe too much.

You have

"filter": "'where resourceGroup=='Staging' and name='dmc-staging-1' | sample 1'"

It should be

"filter": "where resourceGroup=='Staging' and name='dmc-staging-1' | sample 1"

Side note: The filter is nothing different than the Kusto query syntax combined with the MS Azure graph query.

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

No branches or pull requests

2 participants