Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] FileNotFoundError on exegol start #156

Closed
clomic opened this issue May 10, 2023 · 3 comments
Closed

[BUG] FileNotFoundError on exegol start #156

clomic opened this issue May 10, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@clomic
Copy link

clomic commented May 10, 2023

Describe the bug

On an ubuntu 22.04.2 LTS instance,
I got an error when trying to start a fresh installed light exegol image:

$ exegol start
[*] Exegol is currently in version v4.2.0
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏
[+] We thank HackTheBox for sponsoring the multi-arch support 💚
[*] Starting exegol
[!] No containers have been created yet

🛸 Available images
┌───────────┬─────────────────────┬──────────────────────┐
│ Image tag │ Size                │ Status               │
├───────────┼─────────────────────┼──────────────────────┤
│ light     │ 11.8GB              │ Up to date (v.3.0.2) │
│ nightly   │ 14.3GB (compressed) │ Not installed        │
│ web       │ 7.2GB (compressed)  │ Not installed        │
│ osint     │ 4.0GB (compressed)  │ Not installed        │
│ full      │ 13.1GB (compressed) │ Not installed        │
│ ad        │ 9.6GB (compressed)  │ Not installed        │
└───────────┴─────────────────────┴──────────────────────┘

[*] You can use a name that does not already exist to build a new image from local sources
[?] Select an image by its name (light):
[!] The DISPLAY environment variable is not set on your host. This can prevent GUI apps to start
[?] Enter the name of your new exegol container (default):

⭐ Container summary
┌──────────────────┬──────────────────────────────┐
│             Name │ default                      │
│            Image │ light - v.3.0.2 (Up to date) │
├──────────────────┼──────────────────────────────┤
│              GUI │ On ✔                         │
│          Network │ host                         │
│         Timezone │ On ✔                         │
│ Exegol resources │ On ✔ (/opt/resources)        │
│     My resources │ On ✔ (/opt/my-resources)     │
│    Shell logging │ Off 🪓                       │
│       Privileged │ Off ✔                        │
│        Workspace │ Dedicated (/workspace)       │
└──────────────────┴──────────────────────────────┘

[?] Is the container configuration correct? [Y/n]:
[*] Command line of the configuration: exegol start default light
[*] To use exegol without interaction, read CLI options with exegol start -h
[*] Creating new exegol container
[-] It seems that something unexpected happened ...
[-] To draw our attention to the problem and allow us to fix it, you can share your error with us (by copying and pasting it with this syntax: ``` <error> ```) by creating a GitHub issue at this address: https://github.com/ThePorgs/Exegol/issues
[+] Thank you for your collaboration!




╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:376 in          │
│ __loadOrCreateContainer                                                                          │
│                                                                                                  │
│   373 │   │   │   if container_tag is None and (container_tags is None or len(container_tags)    │
│   374 │   │   │   │   # Interactive container selection                                          │
│   375 │   │   │   │   cls.__container = cast(Union[Optional[ExegolContainer], List[ExegolConta   │
│ ❱ 376 │   │   │   │   │   │   │   │   │      cls.__interactiveSelection(ExegolContainer, multi   │
│   377 │   │   │   else:                                                                          │
│   378 │   │   │   │   # Try to find the corresponding container                                  │
│   379 │   │   │   │   if multiple:                                                               │
│                                                                                                  │
│ ╭───────────────────────────────── locals ──────────────────────────────────╮                    │
│ │                cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │                    │
│ │      container_tag = None                                                 │                    │
│ │     container_tags = None                                                 │                    │
│ │           multiple = False                                                │                    │
│ │         must_exist = False                                                │                    │
│ │ override_container = None                                                 │                    │
│ ╰───────────────────────────────────────────────────────────────────────────╯                    │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:433 in          │
│ __interactiveSelection                                                                           │
│                                                                                                  │
│   430 │   │   if multiple:                                                                       │
│   431 │   │   │   user_selection = ExegolTUI.multipleSelectFromTable(object_list, object_type=   │
│   432 │   │   else:                                                                              │
│ ❱ 433 │   │   │   user_selection = ExegolTUI.selectFromTable(object_list, object_type=object_t   │
│   434 │   │   │   # Check if the user has chosen an existing object                              │
│   435 │   │   │   if type(user_selection) is str:                                                │
│   436 │   │   │   │   # Otherwise, create a new object with the supplied name                    │
│                                                                                                  │
│ ╭─────────────────────────────── locals ───────────────────────────────╮                         │
│ │         cls = <class 'exegol.manager.ExegolManager.ExegolManager'>   │                         │
│ │    multiple = False                                                  │                         │
│ │  must_exist = False                                                  │                         │
│ │ object_list = []                                                     │                         │
│ │ object_type = <class 'exegol.model.ExegolContainer.ExegolContainer'> │                         │
│ ╰──────────────────────────────────────────────────────────────────────╯                         │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/console/TUI.py:295 in selectFromTable    │
│                                                                                                  │
│   292 │   │   │   else:                                                                          │
│   293 │   │   │   │   # Using container syntax by default                                        │
│   294 │   │   │   │   logger.warning("No containers have been created yet")                      │
│ ❱ 295 │   │   │   raise IndexError                                                               │
│   296 │   │   object_type = type(data[0])                                                        │
│   297 │   │   object_name = "container" if object_type is ExegolContainer else "image"           │
│   298 │   │   action = "create" if object_type is ExegolContainer else "build"                   │
│                                                                                                  │
│ ╭──────────────────────────────── locals ────────────────────────────────╮                       │
│ │    allow_None = True                                                   │                       │
│ │           cls = <class 'exegol.console.TUI.ExegolTUI'>                 │                       │
│ │ conflict_mode = False                                                  │                       │
│ │          data = []                                                     │                       │
│ │       default = None                                                   │                       │
│ │   object_type = <class 'exegol.model.ExegolContainer.ExegolContainer'> │                       │
│ ╰────────────────────────────────────────────────────────────────────────╯                       │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolController.py:59 in main   │
│                                                                                                  │
│   56 │   │   # Set logger verbosity depending on user input                                      │
│   57 │   │   ExeLog.setVerbosity(ParametersManager().verbosity, ParametersManager().quiet)       │
│   58 │   │   # Start Main controller & Executing action selected by user CLI                     │
│ ❱ 59 │   │   ExegolController.call_action()                                                      │
│   60 │   except KeyboardInterrupt:                                                               │
│   61 │   │   logger.empty_line()                                                                 │
│   62 │   │   logger.info("Exiting")                                                              │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolController.py:39 in        │
│ call_action                                                                                      │
│                                                                                                  │
│   36 │   │   │   # Fetch main operation function                                                 │
│   37 │   │   │   main_action = cls.__action()                                                    │
│   38 │   │   │   # Execute main function                                                         │
│ ❱ 39 │   │   │   main_action()                                                                   │
│   40 │   │   else:                                                                               │
│   41 │   │   │   # TODO review required parameters                                               │
│   42 │   │   │   logger.error(f"These parameters are mandatory but missing: {','.join(missing    │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │            cls = <class 'exegol.manager.ExegolController.ExegolController'>                  │ │
│ │    main_action = <bound method ExegolManager.start of <class                                 │ │
│ │                  'exegol.manager.ExegolManager.ExegolManager'>>                              │ │
│ │ missing_params = []                                                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:77 in start     │
│                                                                                                  │
│    74 │   │   cls.__interactive_mode = not bool(ParametersManager().containertag)                │
│    75 │   │   if not cls.__interactive_mode:                                                     │
│    76 │   │   │   logger.info("Arguments supplied with the command, skipping interactive mode"   │
│ ❱  77 │   │   container = cls.__loadOrCreateContainer()                                          │
│    78 │   │   assert container is not None and type(container) is ExegolContainer                │
│    79 │   │   if not container.isNew():                                                          │
│    80 │   │   │   # Check and warn user if some parameters don't apply to the current session    │
│                                                                                                  │
│ ╭────────────────────────── locals ──────────────────────────╮                                   │
│ │ cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │                                   │
│ ╰────────────────────────────────────────────────────────────╯                                   │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:405 in          │
│ __loadOrCreateContainer                                                                          │
│                                                                                                  │
│   402 │   │   │   if must_exist:                                                                 │
│   403 │   │   │   │   logger.warning(f"The container named '{container_tag}' has not been foun   │
│   404 │   │   │   │   return [] if multiple else None                                            │
│ ❱ 405 │   │   │   return cls.__createContainer(container_tag)                                    │
│   406 │   │   assert cls.__container is not None                                                 │
│   407 │   │   return cast(Union[Optional[ExegolContainer], List[ExegolContainer]], cls.__conta   │
│   408                                                                                            │
│                                                                                                  │
│ ╭───────────────────────────────── locals ──────────────────────────────────╮                    │
│ │                cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │                    │
│ │      container_tag = None                                                 │                    │
│ │     container_tags = None                                                 │                    │
│ │           multiple = False                                                │                    │
│ │         must_exist = False                                                │                    │
│ │ override_container = None                                                 │                    │
│ ╰───────────────────────────────────────────────────────────────────────────╯                    │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:519 in          │
│ __createContainer                                                                                │
│                                                                                                  │
│   516 │   │   │   logger.info("To use exegol [orange3]without interaction[/orange3], "           │
│   517 │   │   │   │   │   │   "read CLI options with [green]exegol start -h[/green]")            │
│   518 │   │                                                                                      │
│ ❱ 519 │   │   container = DockerUtils.createContainer(model)                                     │
│   520 │   │   container.postCreateSetup()                                                        │
│   521 │   │   return container                                                                   │
│   522                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │             cls = <class 'exegol.manager.ExegolManager.ExegolManager'>                       │ │
│ │ command_options = []                                                                         │ │
│ │          config = <exegol.model.ContainerConfig.ContainerConfig object at 0x7f8a1ec07b80>    │ │
│ │           image = light (3.0.2/3.0.2 amd64) - 11.8GB - ([green]Up to date (v.3.0.2)[/green], │ │
│ │                   5.1GB)                                                                     │ │
│ │           model = <exegol.model.ExegolContainerTemplate.ExegolContainerTemplate object at    │ │
│ │                   0x7f8a1ea6ae30>                                                            │ │
│ │            name = None                                                                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/utils/DockerUtils.py:93 in               │
│ createContainer                                                                                  │
│                                                                                                  │
│    90 │   │   """Create an Exegol container from an ExegolContainerTemplate configuration.       │
│    91 │   │   Return an ExegolContainer if the creation was successful."""                       │
│    92 │   │   logger.info("Creating new exegol container")                                       │
│ ❱  93 │   │   model.prepare()                                                                    │
│    94 │   │   logger.debug(model)                                                                │
│    95 │   │   # Preload docker volume before container creation                                  │
│    96 │   │   for volume in model.config.getVolumes():                                           │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │       cls = <class 'exegol.utils.DockerUtils.DockerUtils'>                                   │ │
│ │     model = <exegol.model.ExegolContainerTemplate.ExegolContainerTemplate object at          │ │
│ │             0x7f8a1ea6ae30>                                                                  │ │
│ │ temporary = False                                                                            │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/model/ExegolContainerTemplate.py:32 in   │
│ prepare                                                                                          │
│                                                                                                  │
│   29 │                                                                                           │
│   30 │   def prepare(self):                                                                      │
│   31 │   │   """Prepare the model before creating the docker container"""                        │
│ ❱ 32 │   │   self.config.prepareShare(self.name)                                                 │
│   33 │                                                                                           │
│   34 │   def getDisplayName(self) -> str:                                                        │
│   35 │   │   """Getter of the container's name for TUI purpose"""                                │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ self = <exegol.model.ExegolContainerTemplate.ExegolContainerTemplate object at               │ │
│ │        0x7f8a1ea6ae30>                                                                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/model/ContainerConfig.py:593 in          │
│ prepareShare                                                                                     │
│                                                                                                  │
│    590 │   │   else:                                                                             │
│    591 │   │   │   # Add shared-data-volumes private workspace bind volume                       │
│    592 │   │   │   volume_path = str(UserConfig().private_volume_path.joinpath(share_name))      │
│ ❱  593 │   │   │   self.addVolume(volume_path, '/workspace', enable_sticky_group=True)           │
│    594 │                                                                                         │
│    595 │   def setNetworkMode(self, host_mode: Optional[bool]):                                  │
│    596 │   │   """Set container's network mode, true for host, false for bridge"""               │
│                                                                                                  │
│ ╭─────────────────────────────────────── locals ────────────────────────────────────────╮        │
│ │       mount = {                                                                       │        │
│ │               │   'Target': '/opt/resources',                                         │        │
│ │               │   'Source': '/home/ubuntu/.exegol/exegol-resources',                  │        │
│ │               │   'Type': 'bind',                                                     │        │
│ │               │   'ReadOnly': False                                                   │        │
│ │               }                                                                       │        │
│ │        self = <exegol.model.ContainerConfig.ContainerConfig object at 0x7f8a1ec07b80> │        │
│ │  share_name = 'default'                                                               │        │
│ │ volume_path = '/home/ubuntu/.exegol/workspaces/default'                               │        │
│ ╰───────────────────────────────────────────────────────────────────────────────────────╯        │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/model/ContainerConfig.py:804 in          │
│ addVolume                                                                                        │
│                                                                                                  │
│    801 │   │   │   │   │   else:                                                                 │
│    802 │   │   │   │   │   │   # If the directory is created by exegol, bypass user preference   │
│    803 │   │   │   │   │   │   execute_update_fs = force_sticky_group or enable_sticky_group     │
│ ❱  804 │   │   │   │   │   │   path.mkdir(exist_ok=True)                                         │
│    805 │   │   │   except PermissionError:                                                       │
│    806 │   │   │   │   logger.error("Unable to create the volume folder on the filesystem local  │
│    807 │   │   │   │   logger.critical(f"Insufficient permissions to create the folder: {host_p  │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │      container_path = '/workspace'                                                           │ │
│ │ enable_sticky_group = True                                                                   │ │
│ │   execute_update_fs = True                                                                   │ │
│ │  force_sticky_group = False                                                                  │ │
│ │           host_path = '/home/ubuntu/.exegol/workspaces/default'                              │ │
│ │          must_exist = False                                                                  │ │
│ │                path = PosixPath('/home/ubuntu/.exegol/workspaces/default')                   │ │
│ │           read_only = False                                                                  │ │
│ │                self = <exegol.model.ContainerConfig.ContainerConfig object at                │ │
│ │                       0x7f8a1ec07b80>                                                        │ │
│ │         volume_type = 'bind'                                                                 │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3.10/pathlib.py:1175 in mkdir                                                     │
│                                                                                                  │
│   1172 │   │   Create a new directory at this given path.                                        │
│   1173 │   │   """                                                                               │
│   1174 │   │   try:                                                                              │
│ ❱ 1175 │   │   │   self._accessor.mkdir(self, mode)                                              │
│   1176 │   │   except FileNotFoundError:                                                         │
│   1177 │   │   │   if not parents or self.parent == self:                                        │
│   1178 │   │   │   │   raise                                                                     │
│                                                                                                  │
│ ╭──────────────────────────── locals ─────────────────────────────╮                              │
│ │ exist_ok = True                                                 │                              │
│ │     mode = 511                                                  │                              │
│ │  parents = False                                                │                              │
│ │     self = PosixPath('/home/ubuntu/.exegol/workspaces/default') │                              │
│ ╰─────────────────────────────────────────────────────────────────╯                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.exegol/workspaces/default'

Write permission are ok :

$ ll .exegol/
total 24
drwxrwxr-x 4 ubuntu ubuntu 4096 May 10 14:11 ./
drwxr-x--- 7 ubuntu ubuntu 4096 May 10 11:14 ../
-rw-rw-r-- 1 ubuntu ubuntu  734 May 10 14:24 .datacache
-rw-rw-r-- 1 ubuntu ubuntu 1904 May 10 11:14 config.yml
drwxrwxr-x 8 ubuntu ubuntu 4096 May 10 11:14 exegol-resources/
drwxrwsr-x 2 ubuntu ubuntu 4096 May 10 14:11 my-resources/

Steps To Reproduce

No response

Exegol Wrapper Version

$ exegol version -vvv
[*] Exegol is currently in version v4.2.0
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏
[+] We thank HackTheBox for sponsoring the multi-arch support 💚
[D] Pip installation: On ✔
[D] Git source installation: Off 🪓
[D] Host OS: Linux (Kernel)
[D] Arch: amd64
[D] Raw arch: x86_64
[D] Docker desktop: Off 🪓
[D] Shell type: Linux
[D] Last wrapper update check: 2023-05-10 00:00:00

Host OS

None

Configuration of the concerned container

No response

Execution logs in debug mode

$ exegol start -vvv
[*] Exegol is currently in version v4.2.0
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[+] We thank Capgemini for supporting the project (helping with dev) 🙏
[+] We thank HackTheBox for sponsoring the multi-arch support 💚
[D] Pip installation: On ✔
[D] Git source installation: Off 🪓
[D] Host OS: Linux (Kernel)
[D] Arch: amd64
[D] Raw arch: x86_64
[D] Docker desktop: Off 🪓
[D] Shell type: Linux
[D] Last wrapper update check: 2023-05-10 00:00:00

[*] Starting exegol
[D] Attribute not found in parameters: multicontainertag
[!] No containers have been created yet
[V] Configuring new exegol container
[D] Attribute not found in parameters: multiimagetag
[D] Fetching remote image tags, digests and sizes
[D] Fetching information from: https://hub.docker.com/v2/repositories/nwodtuhs/exegol/tags?page_size=20
[D] Fetching information from: https://hub.docker.com/v2/repositories/nwodtuhs/exegol/tags?page=2&page_size=20
[D] Max page limit reached. In non-verbose mode, downloads will stop there.
[D] Fetching information from: https://hub.docker.com/v2/repositories/nwodtuhs/exegol/tags?page=3&page_size=20
[D] Fetching local image tags, digests (and other attributes)
[D] └── light   → (remote) sha256:28b31faa4a4edf5a66fb21303a86e290d7178fb57a905ef135b933cfddf7e987
[D] └── nightly → (remote) sha256:e59d1e8765b3b3f6987eb3155f48b367b20fde0c8a52acf18914d3f876954932
[D] └── web     → (remote) sha256:2d48210c019f5b4014c8121c908bb832a0a41e78ab9dc70d396c84197619e5c8
[D] └── osint   → (remote) sha256:69dd1008f8c80d2ab0310b1fd21c7aa5afdc58a349166e809805e2a38c8e5e22
[D] └── full    → (remote) sha256:2c2257cb94a8047cd03c59c512c295b89101e5982105e982c406ed850deef7d9
[D] └── full    → (remote) sha256:2c2257cb94a8047cd03c59c512c295b89101e5982105e982c406ed850deef7d9
[D] └── ad      → (remote) sha256:3c72c440a5e087e1f90fdadd259ac6f01b8a8f0813510405ee5b2eb6830d85cd
[D] └── web-3.0.1       → (remote) sha256:901640f976728b005c1291fc791db173583be4ce77e06c656fcc9ca1d90b9f78
[D] └── osint-3.0.1     → (remote) sha256:6792268d4ffd890010482584becd8b04666025b71766b0fea76ed355d6b14c4c
[D] └── light-3.0.1     → (remote) sha256:7f4cf4a55f34cc2419b57c8b4286be4e5a053316ecce2e23cce5f17a38590571
[D] └── light-3.0.1     → (remote) sha256:7f4cf4a55f34cc2419b57c8b4286be4e5a053316ecce2e23cce5f17a38590571
[D] └── full-3.0.1      → (remote) sha256:b595b71adbf4f0edc32a388f87771de377d82e059e0f9459fb62b49eb938b5cd
[D] └── full-3.0.1      → (remote) sha256:b595b71adbf4f0edc32a388f87771de377d82e059e0f9459fb62b49eb938b5cd
[D] └── ad-3.0.1        → (remote) sha256:4fc6a3d2d28929f13fb74ff4e9258f51daa8986a0603aaa37ad109bacc7f9381
[D] └── light-3.0.0     → (remote) sha256:2fe0e78dcf1924785bffeb20b52ecde82609f9c91c0fad883bb293dd65d7443d
[D] └── osint-3.0.0     → (remote) sha256:13b3d0f9d9946b0105c997260f84a5b3ea0e35d1b1da974a033def9375c109ea
[D] └── web-3.0.0       → (remote) sha256:fe361319498cdbf0c62688fc675902a54dc12ceff164ef193789d67d1140d970
[D] └── web-3.0.0       → (remote) sha256:fe361319498cdbf0c62688fc675902a54dc12ceff164ef193789d67d1140d970
[D] └── ad-3.0.0        → (remote) sha256:a174289246c5ce40227a52caf4d82faf81420c915791caad6bbf85c7d02cd5c9
[D] └── full-3.0.0      → (remote) sha256:6751cd3bf83461623a9bfab29c36edfef8b5d4e9b80c11015cf53a0061099dce
[D] └── full-3.0.0      → (remote) sha256:6751cd3bf83461623a9bfab29c36edfef8b5d4e9b80c11015cf53a0061099dce
[D] └── full-2.1.1      → (remote) sha256:c19d64e74f346999991a82a740acb392bf0da6c2fbb680c2403250f2bba31cfc
[D] └── ad-2.1.1        → (remote) sha256:b2b9a7642cd765daae0e0e517544cb4f5b0b77f8149f19165479fceb92f14f84
[D] └── web-2.1.1       → (remote) sha256:6ce49800b576f2f97d665e63ab0cb4fb946cf3d575b5918887e93887afe3c2d8
[D] └── light-2.1.1     → (remote) sha256:c048d0ebe19613e01e65d27013c5174fb41cccbe2fd9f8cde9cbb2a56b919371
[D] └── osint-2.1.1     → (remote) sha256:ffe3c2d9693b0b52d11d9104dd2a33f2cf2037b412249db340d59d7ee01497fa
[D] └── full-2.1.0      → (remote) sha256:2462e5169f04b72123ab28d34ae7b326d40240097bcebe65bc968ade06c36a9c
[D] └── ad-2.1.0        → (remote) sha256:eda497aebe8e35d685be9057793606c297548519dd16526b302d50a8f959179d
[D] └── web-2.1.0       → (remote) sha256:4520239532ce14afdfb87e4fcd9633096b90a3e8a28d8b02044e628c53cfb17f
[D] └── light-2.1.0     → (remote) sha256:ffa088736d8a3e2bab9cf3e3ae2b816d779e2a6a984ed41012ef989e3524e8b3
[D] └── osint-2.1.0     → (remote) sha256:f706f54024324899836f7568aeda8608dacd93a98d7114cd5f5b3fd093beba08
[D] └── full-2.0.2      → (remote) N/A
[D] └── light-2.0.2     → (remote) N/A
[D] └── ad-2.0.2        → (remote) N/A
[D] └── web-2.0.2       → (remote) N/A
[D] └── osint-2.0.2     → (remote) N/A
[D] └── full-2.0.1      → (remote) N/A
[D] └── ad-2.0.1        → (remote) N/A
[D] └── web-2.0.1       → (remote) N/A
[D] └── light-2.0.1     → (remote) N/A
[D] └── osint-2.0.1     → (remote) N/A
[D] └── web-2.0.0       → (remote) N/A
[D] └── light-2.0.0     → (remote) N/A
[D] └── osint-2.0.0     → (remote) N/A
[D] └── full-2.0.0b5    → (remote) N/A
[D] └── ad-2.0.0b5      → (remote) N/A
[D] └── web-2.0.0b5     → (remote) N/A
[D] └── light-2.0.0b5   → (remote) N/A
[D] └── osint-2.0.0b5   → (remote) N/A

🛸 Available images
┌───────────────┬─────────────────┬───────────────┬──────────────┬──────────────────┬──────────────────────┐
│ Id            │ Image tag       │ Download size │ Size on disk │ Build date (UTC) │ Status               │
├───────────────┼─────────────────┼───────────────┼──────────────┼──────────────────┼──────────────────────┤
│ 9e32435c316a  │ light (amd64)   │ 5.1GB         │ 11.8GB       │ 17/04/2023 00:12 │ Up to date (v.3.0.2) │
│ Not installed │ nightly (amd64) │ 14.3GB        │ N/A          │ N/A              │ Not installed        │
│ Not installed │ web (amd64)     │ 7.2GB         │ N/A          │ N/A              │ Not installed        │
│ Not installed │ osint (amd64)   │ 4.0GB         │ N/A          │ N/A              │ Not installed        │
│ Not installed │ full (amd64)    │ 13.1GB        │ N/A          │ N/A              │ Not installed        │
│ Not installed │ ad (amd64)      │ 9.6GB         │ N/A          │ N/A              │ Not installed        │
└───────────────┴─────────────────┴───────────────┴──────────────┴──────────────────┴──────────────────────┘

[*] You can use a name that does not already exist to build a new image from local sources
[?] Select an image by its name (light):
[V] Config: Enabling display sharing
[!] The DISPLAY environment variable is not set on your host. This can prevent GUI apps to start
[V] Config: Enabling host timezones
[V] Volume was successfully added for /etc/timezone
[V] Volume was successfully added for /etc/localtime
[V] Config: Enabling my-resources volume
[V] Updating the permissions of /home/ubuntu/.exegol/my-resources (and sub-folders) to allow file sharing between the container and the host user
[D] Adding setgid permission recursively on directories from /home/ubuntu/.exegol/my-resources
[D] Loading git at /home/ubuntu/.exegol/exegol-resources
[D] Repo path: /home/ubuntu/.exegol/exegol-resources/.git
[D] Git repository successfully loaded
[V] Config: Enabling exegol resources volume
[?] Enter the name of your new exegol container (default):

⭐ Container summary
┌──────────────────┬────────────────────────────────────────────────────────┐
│             Name │ default                                                │
│            Image │ light - v.3.0.2 (Up to date) (amd64)                   │
├──────────────────┼────────────────────────────────────────────────────────┤
│              GUI │ On ✔                                                   │
│          Network │ host                                                   │
│         Timezone │ On ✔                                                   │
│ Exegol resources │ On ✔ (/opt/resources)                                  │
│     My resources │ On ✔ (/opt/my-resources)                               │
│    Shell logging │ Off 🪓                                                 │
│       Privileged │ Off ✔                                                  │
│        Workspace │ Dedicated (/workspace)                                 │
│             Envs │ DISPLAY=:0                                             │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                          │
│                  │ QT_X11_NO_MITSHM=1                                     │
│          Volumes │ /tmp/.X11-unix ➡ /tmp/.X11-unix                        │
│                  │ /etc/timezone ➡ /etc/timezone (RO)                     │
│                  │ /etc/localtime ➡ /etc/localtime (RO)                   │
│                  │ /home/ubuntu/.exegol/my-resources ➡ /opt/my-resources  │
│                  │ /home/ubuntu/.exegol/exegol-resources ➡ /opt/resources │
└──────────────────┴────────────────────────────────────────────────────────┘

[?] Is the container configuration correct? [Y/n]:
[*] Command line of the configuration: exegol start default light
[*] To use exegol without interaction, read CLI options with exegol start -h
[*] Creating new exegol container
[-] It seems that something unexpected happened ...
[-] To draw our attention to the problem and allow us to fix it, you can share your error with us (by copying and pasting it with this syntax:  <error> ```) by creating a GitHub issue at this address: https://github.com/ThePorgs/Exegol/issues
[+] Thank you for your collaboration!
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:376 in          │
│ __loadOrCreateContainer                                                                          │
│                                                                                                  │
│   373 │   │   │   if container_tag is None and (container_tags is None or len(container_tags)    │
│   374 │   │   │   │   # Interactive container selection                                          │
│   375 │   │   │   │   cls.__container = cast(Union[Optional[ExegolContainer], List[ExegolConta   │
│ ❱ 376 │   │   │   │   │   │   │   │   │      cls.__interactiveSelection(ExegolContainer, multi   │
│   377 │   │   │   else:                                                                          │
│   378 │   │   │   │   # Try to find the corresponding container                                  │
│   379 │   │   │   │   if multiple:                                                               │
│                                                                                                  │
│ ╭───────────────────────────────── locals ──────────────────────────────────╮                    │
│ │                cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │                    │
│ │      container_tag = None                                                 │                    │
│ │     container_tags = None                                                 │                    │
│ │           multiple = False                                                │                    │
│ │         must_exist = False                                                │                    │
│ │ override_container = None                                                 │                    │
│ ╰───────────────────────────────────────────────────────────────────────────╯                    │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:433 in          │
│ __interactiveSelection                                                                           │
│                                                                                                  │
│   430 │   │   if multiple:                                                                       │
│   431 │   │   │   user_selection = ExegolTUI.multipleSelectFromTable(object_list, object_type=   │
│   432 │   │   else:                                                                              │
│ ❱ 433 │   │   │   user_selection = ExegolTUI.selectFromTable(object_list, object_type=object_t   │
│   434 │   │   │   # Check if the user has chosen an existing object                              │
│   435 │   │   │   if type(user_selection) is str:                                                │
│   436 │   │   │   │   # Otherwise, create a new object with the supplied name                    │
│                                                                                                  │
│ ╭─────────────────────────────── locals ───────────────────────────────╮                         │
│ │         cls = <class 'exegol.manager.ExegolManager.ExegolManager'>   │                         │
│ │    multiple = False                                                  │                         │
│ │  must_exist = False                                                  │                         │
│ │ object_list = []                                                     │                         │
│ │ object_type = <class 'exegol.model.ExegolContainer.ExegolContainer'> │                         │
│ ╰──────────────────────────────────────────────────────────────────────╯                         │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/console/TUI.py:295 in selectFromTable    │
│                                                                                                  │
│   292 │   │   │   else:                                                                          │
│   293 │   │   │   │   # Using container syntax by default                                        │
│   294 │   │   │   │   logger.warning("No containers have been created yet")                      │
│ ❱ 295 │   │   │   raise IndexError                                                               │
│   296 │   │   object_type = type(data[0])                                                        │
│   297 │   │   object_name = "container" if object_type is ExegolContainer else "image"           │
│   298 │   │   action = "create" if object_type is ExegolContainer else "build"                   │
│                                                                                                  │
│ ╭──────────────────────────────── locals ────────────────────────────────╮                       │
│ │    allow_None = True                                                   │                       │
│ │           cls = <class 'exegol.console.TUI.ExegolTUI'>                 │                       │
│ │ conflict_mode = False                                                  │                       │
│ │          data = []                                                     │                       │
│ │       default = None                                                   │                       │
│ │   object_type = <class 'exegol.model.ExegolContainer.ExegolContainer'> │                       │
│ ╰────────────────────────────────────────────────────────────────────────╯                       │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
IndexError

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolController.py:59 in main   │
│                                                                                                  │
│   56 │   │   # Set logger verbosity depending on user input                                      │
│   57 │   │   ExeLog.setVerbosity(ParametersManager().verbosity, ParametersManager().quiet)       │
│   58 │   │   # Start Main controller & Executing action selected by user CLI                     │
│ ❱ 59 │   │   ExegolController.call_action()                                                      │
│   60 │   except KeyboardInterrupt:                                                               │
│   61 │   │   logger.empty_line()                                                                 │
│   62 │   │   logger.info("Exiting")                                                              │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolController.py:39 in        │
│ call_action                                                                                      │
│                                                                                                  │
│   36 │   │   │   # Fetch main operation function                                                 │
│   37 │   │   │   main_action = cls.__action()                                                    │
│   38 │   │   │   # Execute main function                                                         │
│ ❱ 39 │   │   │   main_action()                                                                   │
│   40 │   │   else:                                                                               │
│   41 │   │   │   # TODO review required parameters                                               │
│   42 │   │   │   logger.error(f"These parameters are mandatory but missing: {','.join(missing    │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │            cls = <class 'exegol.manager.ExegolController.ExegolController'>                  │ │
│ │    main_action = <bound method ExegolManager.start of <class                                 │ │
│ │                  'exegol.manager.ExegolManager.ExegolManager'>>                              │ │
│ │ missing_params = []                                                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:77 in start     │
│                                                                                                  │
│    74 │   │   cls.__interactive_mode = not bool(ParametersManager().containertag)                │
│    75 │   │   if not cls.__interactive_mode:                                                     │
│    76 │   │   │   logger.info("Arguments supplied with the command, skipping interactive mode"   │
│ ❱  77 │   │   container = cls.__loadOrCreateContainer()                                          │
│    78 │   │   assert container is not None and type(container) is ExegolContainer                │
│    79 │   │   if not container.isNew():                                                          │
│    80 │   │   │   # Check and warn user if some parameters don't apply to the current session    │
│                                                                                                  │
│ ╭────────────────────────── locals ──────────────────────────╮                                   │
│ │ cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │                                   │
│ ╰────────────────────────────────────────────────────────────╯                                   │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:405 in          │
│ __loadOrCreateContainer                                                                          │
│                                                                                                  │
│   402 │   │   │   if must_exist:                                                                 │
│   403 │   │   │   │   logger.warning(f"The container named '{container_tag}' has not been foun   │
│   404 │   │   │   │   return [] if multiple else None                                            │
│ ❱ 405 │   │   │   return cls.__createContainer(container_tag)                                    │
│   406 │   │   assert cls.__container is not None                                                 │
│   407 │   │   return cast(Union[Optional[ExegolContainer], List[ExegolContainer]], cls.__conta   │
│   408                                                                                            │
│                                                                                                  │
│ ╭───────────────────────────────── locals ──────────────────────────────────╮                    │
│ │                cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │                    │
│ │      container_tag = None                                                 │                    │
│ │     container_tags = None                                                 │                    │
│ │           multiple = False                                                │                    │
│ │         must_exist = False                                                │                    │
│ │ override_container = None                                                 │                    │
│ ╰───────────────────────────────────────────────────────────────────────────╯                    │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/manager/ExegolManager.py:519 in          │
│ __createContainer                                                                                │
│                                                                                                  │
│   516 │   │   │   logger.info("To use exegol [orange3]without interaction[/orange3], "           │
│   517 │   │   │   │   │   │   "read CLI options with [green]exegol start -h[/green]")            │
│   518 │   │                                                                                      │
│ ❱ 519 │   │   container = DockerUtils.createContainer(model)                                     │
│   520 │   │   container.postCreateSetup()                                                        │
│   521 │   │   return container                                                                   │
│   522                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │             cls = <class 'exegol.manager.ExegolManager.ExegolManager'>                       │ │
│ │ command_options = []                                                                         │ │
│ │          config = <exegol.model.ContainerConfig.ContainerConfig object at 0x7fd941a83ac0>    │ │
│ │           image = light (3.0.2/3.0.2 amd64) - 11.8GB - ([green]Up to date (v.3.0.2)[/green], │ │
│ │                   5.1GB)                                                                     │ │
│ │           model = <exegol.model.ExegolContainerTemplate.ExegolContainerTemplate object at    │ │
│ │                   0x7fd9418e7c70>                                                            │ │
│ │            name = None                                                                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/utils/DockerUtils.py:93 in               │
│ createContainer                                                                                  │
│                                                                                                  │
│    90 │   │   """Create an Exegol container from an ExegolContainerTemplate configuration.       │
│    91 │   │   Return an ExegolContainer if the creation was successful."""                       │
│    92 │   │   logger.info("Creating new exegol container")                                       │
│ ❱  93 │   │   model.prepare()                                                                    │
│    94 │   │   logger.debug(model)                                                                │
│    95 │   │   # Preload docker volume before container creation                                  │
│    96 │   │   for volume in model.config.getVolumes():                                           │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │       cls = <class 'exegol.utils.DockerUtils.DockerUtils'>                                   │ │
│ │     model = <exegol.model.ExegolContainerTemplate.ExegolContainerTemplate object at          │ │
│ │             0x7fd9418e7c70>                                                                  │ │
│ │ temporary = False                                                                            │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/model/ExegolContainerTemplate.py:32 in   │
│ prepare                                                                                          │
│                                                                                                  │
│   29 │                                                                                           │
│   30 │   def prepare(self):                                                                      │
│   31 │   │   """Prepare the model before creating the docker container"""                        │
│ ❱ 32 │   │   self.config.prepareShare(self.name)                                                 │
│   33 │                                                                                           │
│   34 │   def getDisplayName(self) -> str:                                                        │
│   35 │   │   """Getter of the container's name for TUI purpose"""                                │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ self = <exegol.model.ExegolContainerTemplate.ExegolContainerTemplate object at               │ │
│ │        0x7fd9418e7c70>                                                                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/model/ContainerConfig.py:593 in          │
│ prepareShare                                                                                     │
│                                                                                                  │
│    590 │   │   else:                                                                             │
│    591 │   │   │   # Add shared-data-volumes private workspace bind volume                       │
│    592 │   │   │   volume_path = str(UserConfig().private_volume_path.joinpath(share_name))      │
│ ❱  593 │   │   │   self.addVolume(volume_path, '/workspace', enable_sticky_group=True)           │
│    594 │                                                                                         │
│    595 │   def setNetworkMode(self, host_mode: Optional[bool]):                                  │
│    596 │   │   """Set container's network mode, true for host, false for bridge"""               │
│                                                                                                  │
│ ╭─────────────────────────────────────── locals ────────────────────────────────────────╮        │
│ │       mount = {                                                                       │        │
│ │               │   'Target': '/opt/resources',                                         │        │
│ │               │   'Source': '/home/ubuntu/.exegol/exegol-resources',                  │        │
│ │               │   'Type': 'bind',                                                     │        │
│ │               │   'ReadOnly': False                                                   │        │
│ │               }                                                                       │        │
│ │        self = <exegol.model.ContainerConfig.ContainerConfig object at 0x7fd941a83ac0> │        │
│ │  share_name = 'default'                                                               │        │
│ │ volume_path = '/home/ubuntu/.exegol/workspaces/default'                               │        │
│ ╰───────────────────────────────────────────────────────────────────────────────────────╯        │
│                                                                                                  │
│ /home/ubuntu/.local/lib/python3.10/site-packages/exegol/model/ContainerConfig.py:804 in          │
│ addVolume                                                                                        │
│                                                                                                  │
│    801 │   │   │   │   │   else:                                                                 │
│    802 │   │   │   │   │   │   # If the directory is created by exegol, bypass user preference   │
│    803 │   │   │   │   │   │   execute_update_fs = force_sticky_group or enable_sticky_group     │
│ ❱  804 │   │   │   │   │   │   path.mkdir(exist_ok=True)                                         │
│    805 │   │   │   except PermissionError:                                                       │
│    806 │   │   │   │   logger.error("Unable to create the volume folder on the filesystem local  │
│    807 │   │   │   │   logger.critical(f"Insufficient permissions to create the folder: {host_p  │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │      container_path = '/workspace'                                                           │ │
│ │ enable_sticky_group = True                                                                   │ │
│ │   execute_update_fs = True                                                                   │ │
│ │  force_sticky_group = False                                                                  │ │
│ │           host_path = '/home/ubuntu/.exegol/workspaces/default'                              │ │
│ │          must_exist = False                                                                  │ │
│ │                path = PosixPath('/home/ubuntu/.exegol/workspaces/default')                   │ │
│ │           read_only = False                                                                  │ │
│ │                self = <exegol.model.ContainerConfig.ContainerConfig object at                │ │
│ │                       0x7fd941a83ac0>                                                        │ │
│ │         volume_type = 'bind'                                                                 │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /usr/lib/python3.10/pathlib.py:1175 in mkdir                                                     │
│                                                                                                  │
│   1172 │   │   Create a new directory at this given path.                                        │
│   1173 │   │   """                                                                               │
│   1174 │   │   try:                                                                              │
│ ❱ 1175 │   │   │   self._accessor.mkdir(self, mode)                                              │
│   1176 │   │   except FileNotFoundError:                                                         │
│   1177 │   │   │   if not parents or self.parent == self:                                        │
│   1178 │   │   │   │   raise                                                                     │
│                                                                                                  │
│ ╭──────────────────────────── locals ─────────────────────────────╮                              │
│ │ exist_ok = True                                                 │                              │
│ │     mode = 511                                                  │                              │
│ │  parents = False                                                │                              │
│ │     self = PosixPath('/home/ubuntu/.exegol/workspaces/default') │                              │
│ ╰─────────────────────────────────────────────────────────────────╯                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: '/home/ubuntu/.exegol/workspaces/default'

Exception

No response

Anything else?

No response

@clomic clomic added the bug Something isn't working label May 10, 2023
@Dramelac
Copy link
Member

Hello,
Thank you for the feedback, we are indeed missing a little trick here!

To fix the bug quickly, you can create the missing folder with the linux command: mkdir -p ~/.exegol/workspaces
I'll prepare a fix to the wrapper so that it doesn't happen anymore, thanks again for this feedback!

I hope that the command will unblock your situation, don't hesitate to confirm it or not if it doesn't work.

@clomic
Copy link
Author

clomic commented May 10, 2023

Thank you for your prompt answer. This fixes the issue!

@clomic clomic closed this as completed May 10, 2023
@Dramelac
Copy link
Member

Fix in 551deb5

@Dramelac Dramelac mentioned this issue May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants