Code Monkey home page Code Monkey logo

Comments (4)

naacbin avatar naacbin commented on July 26, 2024

After some testing having a try/catch may not be a solution.
The problem come from line 571, logger.critical stop the app. A fix would be to change logger.critical to logger.error and exit function (with a return for example).

What I did to "fix":

if volume_type == 'bind' and not host_path.startswith("\\\\"):
    try:
        os.makedirs(host_path, exist_ok=True)
    except PermissionError:
        logger.error("Unable to create the volume folder on the filesystem locally.")
        logger.error(f"Insufficient permissions to create the folder: {host_path}")
        return 0
    except FileExistsError:
        # The volume targets a file that already exists on the file system
        pass
mount = Mount(container_path, host_path, read_only=read_only, type=volume_type)
self.__mounts.append(mount)

Running again gives:

[V] Config: Enabling host timezones
[-] Unable to create the volume folder on the filesystem locally.
[-] Insufficient permissions to create the folder: /etc/timezone
[V] Config: Enabling shared resources volume

┌──────────────────┬─────────────────────────────────────────────────────────┐
│          Volumes │ /tmp/.X11-unix ➡ /tmp/.X11-unix                         │
│                  │ /etc/localtime ➡ /etc/localtime (RO)                    │
│                  │ /home/user/.exegol/my-resources ➡ /my-resources         │
│                  │ /home/user/ctf/Exegol/exegol-resources ➡ /opt/resources │
└──────────────────┴─────────────────────────────────────────────────────────┘

from exegol.

Dramelac avatar Dramelac commented on July 26, 2024

Hi, thanks for the feedback!
Indeed this situation had not been foreseen.
The critical behavior with the program exit is however intended in case the volume is manually specified by the user via CLI.

Don't worry, I'll handle it

from exegol.

Dramelac avatar Dramelac commented on July 26, 2024

Fixed in the dev branch, will be included in the next release.
I close the ticket, feel free to test (in the dev branch) and reopen it if the problem is not completely corrected.

from exegol.

ShutdownRepo avatar ShutdownRepo commented on July 26, 2024

Thanks @Dramelac ! Fyi @naacbin you can test those changes by running exegol update -v and then choose dev when the program asks to select a git branch for the wrapper source code, or by checking out the dev branch from this repo manually.

from exegol.

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.