Giter Site home page Giter Site logo

Comments (10)

Lawouach avatar Lawouach commented on May 30, 2024

Hi,

Sorry for being so long to respond. The API had indeed changed and it's been fixed in master but it's not released it yet. I should be releasing this week a new version of that's fine?

from chaostoolkit-kubernetes.

Lawouach avatar Lawouach commented on May 30, 2024

This has now been released. Could you please try and let us know if it solved the pb?

from chaostoolkit-kubernetes.

nitinbhat avatar nitinbhat commented on May 30, 2024

Draining a node is failing.

[2024-05-06 06:53:11 DEBUG] [actions:75] Found 0 nodes
[2024-05-06 06:53:11 DEBUG] [activity:317] Activity failed
Traceback (most recent call last):
File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
return func(**arguments)
File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaosk8s/node/actions.py", line 307, in drain_nodes
nodes = _select_nodes(
File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaosk8s/node/actions.py", line 94, in _select_nodes
raise ActivityFailed("failed to find a node that matches selector")
chaoslib.exceptions.ActivityFailed: failed to find a node that matches selector

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/activity.py", line 310, in run_activity
    result = run_python_activity(activity, configuration, secrets)
  File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 58, in run_python_activity
    raise ActivityFailed(
  File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaoslib/provider/python.py", line 56, in run_python_activity
    return func(**arguments)
  File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaosk8s/node/actions.py", line 307, in drain_nodes
    nodes = _select_nodes(
  File "/home/dev/.venvs/chaostk/lib/python3.9/site-packages/chaosk8s/node/actions.py", line 94, in _select_nodes
    raise ActivityFailed("failed to find a node that matches selector")
chaoslib.exceptions.ActivityFailed: chaoslib.exceptions.ActivityFailed: failed to find a node that matches selector

[2024-05-06 06:53:11 ERROR] [activity:268] => failed: chaoslib.exceptions.ActivityFailed: failed to find a node that matches selector

This is valid label though. Am I missing anything here?

NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME LABELS datkube-control-plane Ready control-plane 178m v1.26.3 10.101.0.2 <none> Ubuntu 22.04.2 LTS 5.10.0-22-amd64 containerd://1.6.19-46-g941215f49 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=datkube-control-plane,kubernetes.io/os=linux,node-role.kubernetes.io/control-plane=,node.kubernetes.io/exclude-from-external-load-balancers= datkube-worker Ready <none> 177m v1.26.3 10.101.0.5 <none> Ubuntu 22.04.2 LTS 5.10.0-22-amd64 containerd://1.6.19-46-g941215f49 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=datkube-worker,kubernetes.io/os=linux,tmm=true datkube-worker2 Ready <none> 177m v1.26.3 10.101.0.4 <none> Ubuntu 22.04.2 LTS 5.10.0-22-amd64 containerd://1.6.19-46-g941215f49 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=datkube-worker2,kubernetes.io/os=linux,tmm=true datkube-worker3 Ready <none> 177m v1.26.3 10.101.0.3 <none> Ubuntu 22.04.2 LTS 5.10.0-22-amd64 containerd://1.6.19-46-g941215f49 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=datkube-worker3,kubernetes.io/os=linux,tmm=true

This is issue is also seen with all node operations like cordon_node, delete_node etc.

from chaostoolkit-kubernetes.

Lawouach avatar Lawouach commented on May 30, 2024

What was your selector?

from chaostoolkit-kubernetes.

nitinbhat avatar nitinbhat commented on May 30, 2024

What was your selector?

label_selector: "kubernetes.io/hostname=datkube-worker3"

$kgn --show-labels | grep worker3
datkube-worker3 Ready 5h55m v1.26.3 10.101.0.3 Ubuntu 22.04.2 LTS 5.10.0-22-amd64 containerd://1.6.19-46-g941215f49 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=datkube-worker3,kubernetes.io/os=linux,tmm=true

from chaostoolkit-kubernetes.

Lawouach avatar Lawouach commented on May 30, 2024

Thanks. Can you show me the entire action as you used it please?

from chaostoolkit-kubernetes.

nitinbhat avatar nitinbhat commented on May 30, 2024

Thanks. Can you show me the entire action as you used it please?

Sure

  • type: action
    name: drain-node
    provider:
    type: python
    module: chaosk8s.node.actions
    func: drain_nodes
    arguments:
    name: drain-nodes
    label_selector: "kubernetes.io/hostname=datkube-worker3"

from chaostoolkit-kubernetes.

Lawouach avatar Lawouach commented on May 30, 2024

Thanks. I think it's because you set name: drain-nodes in the arguments. Your node is called datkube-control-plane. But I would ignore the name argument entirely if you don't want to aim a particular node with the given label.

from chaostoolkit-kubernetes.

nitinbhat avatar nitinbhat commented on May 30, 2024

Thanks. After correcting name, this works as expected.

from chaostoolkit-kubernetes.

Lawouach avatar Lawouach commented on May 30, 2024

Fantastic news! :)

from chaostoolkit-kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.