KatharaFramework / Kathara

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

Bug in cleaning devices with custom shell #186

Closed tcaiazzi closed 2 years ago

tcaiazzi commented 2 years ago

Bug Description Starting a device, that does not have bash installed, using a custom shell (different from /bin/bash) causes an error while cleaning the device.

To Reproduce Steps to reproduce the behavior:

  1. Start a device (using an image that does not have bash installed) with a custom shell:
    kathara vstart -n pc1 --image nlnetlabs/routinator --shell /bin/sh
  2. Clean the device:
    kathara vclean -n pc1
    CRITICAL - 400 Client Error for http+docker://localhost/v1.4/exec /f9311af766b9bc6be994bde369cf7562cf8017faefbcd99dbf1683273e65bec7/start: Bad Request ("OCI runtime exec failed: exec failed: unable to start container process: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown")

    The clean commands use the /bin/bash shell taking it from the settings.

Expected behavior The device should be cleaned with no errors.

gianlock commented 7 months ago

Hi, I encountered similar problem in the new version 3.7.1.

  1. start a lab with kathara lstart
  2. Close the lab with kathara lclean
  3. starting the lab again I have a similar error as in the picture attached image
tcaiazzi commented 7 months ago

Hi @gianlock,

Thanks for reaching out!

To reproduce your issue, I also need your network scenario. Can you please share it?

Thanks đŸ˜„

gianlock commented 7 months ago

Hey @tcaiazzi ,

for sure, the scenario was "basic ipv4" from your basic las. But it happens with different scenarios, at least where eth0 configuration is involved.

Btw, for now i solved downgrade the docker version to 25.0. So I think the problem is with docker 26 version (latest).

Skazza94 commented 7 months ago

Hi @gianlock, the problem was not related to the custom shell, but to something that changed in Docker 26 as you pointed out (see #278).

We are releasing a new version of KatharĂ¡ (3.7.4) right now to address the issue.

Cheers, Mariano.