Comments (10)
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.
This has now been released. Could you please try and let us know if it solved the pb?
from chaostoolkit-kubernetes.
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.
What was your selector?
from chaostoolkit-kubernetes.
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.
Thanks. Can you show me the entire action as you used it please?
from chaostoolkit-kubernetes.
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.
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.
Thanks. After correcting name, this works as expected.
from chaostoolkit-kubernetes.
Fantastic news! :)
from chaostoolkit-kubernetes.
Related Issues (20)
- Failed to discover chaostoolkit-kubernetes HOT 1
- `service_is_initialized` should use field_selector when name is provided
- delete_deployment uses an incorrect label_selector due to variable and arg being the same name
- Bug in chaosk8s.statefulset.probes.statefulset_fully_available: V1StatefulSetStatus' object has no attribute 'unavailable_replicas' HOT 2
- Using two different source of truth to filter pods HOT 4
- deny_all_ingress not working HOT 1
- SSL Error - CERTIFICATE_VERIFY_FAILED HOT 3
- Merge terminate_pods and delete_pods to avoid confusion and unnecessary code bloat HOT 1
- Kubernetes delete_pod action is not working HOT 1
- exec_in_pods cannot use space in the command itself HOT 3
- Receiving msg: ConnectionRefusedError: [Errno 111] Connection refused HOT 2
- exec_in_pods fails to parse stderr as json HOT 1
- There is a cmd splitting issue, therefore the shell commands will not parse correctly
- [error] deny-all-ingress is not working
- terminate_pod is not working for OpenShift HOT 4
- exec_in_pods function can not handle pipe operator
- How to get the value for tolerance for all_pods_healthy Steady State Hypothesis probe ? HOT 2
- Link to the documentation in the README is broken HOT 2
- Using Kubernetes extension for Chaos Toolkit as a Kubernetes Operator
- chaostoolkit-kubernetes: Stress memory calls a stress cpu HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chaostoolkit-kubernetes.