srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.45k stars 247 forks source link

Unexpected behavior for kinD nodes when using the --node-selector option #2106

Open simcod opened 2 months ago

simcod commented 2 months ago

To reproduce this issue, the following codebase can be used. The creation of the kinD clusters can be used in combination with the --node-selector option:

sudo containerlab deploy --topo topo.yaml --node-filter k01

However, destruction is not possible:

sudo containerlab destroy --topo topo.yaml --node-filter k01
# Output
INFO[0000] no containerlab containers found

The expected behaviour would be that containerlab only destroys the node k01.

The following commands are working as expected for the node srl01:

sudo containerlab deploy --topo topo.yaml --node-filter srl01

sudo containerlab destroy --topo topo.yaml --node-filter srl01
hellt commented 2 months ago

Yes, node filters feature has some issues, and I presume mostly with nodes deployed outside of containerlab (like kind nodes).

simcod commented 2 months ago

@hellt Thanks for your quick reply.