KatharaFramework / Kathara

A lightweight container-based network emulation system.
https://www.kathara.org/
GNU General Public License v3.0
461 stars 64 forks source link

Unable to start lab with Kubernetes backend #305

Closed Aperence closed 3 months ago

Aperence commented 3 months ago

Operating System

Fedora 40

Kathará Version

3.7.4

Bug Description

Whenever I try to create a new lab with Kubernetes as the backend, I receive the following error. This error also arise when trying to stop devices started with vstart

(ApiException) (404)                                                                                                                                                                               
         Reason: Not Found                                                                                                                                                                                  
         HTTP response headers: HTTPHeaderDict({'Audit-Id': '369fd449-0247-458d-94f7-662935abf148', 'Cache-Control': 'no-cache, private', 'Content-Type': 'text/plain; charset=utf-8',                      
         'X-Content-Type-Options': 'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '3976a917-516e-43fa-aa34-192e1751264f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '99716e4b-2e34-49a8-a714-e2c720f2c908', 'Date':
         'Mon, 26 Aug 2024 10:33:55 GMT', 'Content-Length': '19'})                                                                                                                                          
         HTTP response body: 404 page not found 

Steps To Reproduce

r1[0]="A" r1[1]="B/02:42:ac:11:00:02" # Specify the MAC address assigned to interface eth1 of r1 r1[port]="32000" r1[image]="kathara/base" r1[sysctl]="net.ipv6.conf.all.forwarding=1"

r2[0]="C" r2[1]="B" r2[port]="2000:500/udp" r2[exec]="echo Hi"

pc1[0]="A" pc1[bridged]="true"

pc2[0]="C" pc2[mem]="128m" pc2[shell]="/bin/sh"

- run `kathara lstart`

### Expected Behavior

Have a running lab

### Check Command Output

```shell
Current Manager is:             Kubernetes (Megalos)
Manager version is:             v1.29.5
Python version is:              3.11.8 (main, Feb 28 2024, 00:00:00) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)]
Kathara version is:             3.7.4
Operating System version is:    Linux-6.10.6-200.fc40.x86_64-x86_64
[Deploying devices] ⠋ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1[Deploying devices]   
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1
[Deleting devices]   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1
× Running container failed: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Audit-Id': 'ff83f79b-6cd9-41d6-b666-d87714f4ef8c', 'Cache-Control': 'no-cache, private', 'Content-Type': 'text/plain; charset=utf-8', 'X-Content-Type-Options': 
'nosniff', 'X-Kubernetes-Pf-Flowschema-Uid': '3976a917-516e-43fa-aa34-192e1751264f', 'X-Kubernetes-Pf-Prioritylevel-Uid': '99716e4b-2e34-49a8-a714-e2c720f2c908', 'Date': 'Mon, 26 Aug 2024 10:37:56 GMT', 
'Content-Length': '19'})
HTTP response body: 404 page not found
Aperence commented 3 months ago

Seems like I simply forgot to add the Megalos CNI to my cluster