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

Exegol full image update failure #121

Closed
gsbuosi opened this issue Oct 29, 2022 · 10 comments
Closed

Exegol full image update failure #121

gsbuosi opened this issue Oct 29, 2022 · 10 comments
Labels
invalid This doesn't seem right

Comments

@gsbuosi
Copy link

gsbuosi commented Oct 29, 2022

Hello, once I tried to update my full version of Exegol, I received this error message.


[+] Thank you for your collaboration!                                                                                                                                                  
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│                                                                                                  │
│ /opt/Exegol/exegol/manager/ExegolController.py:35 in main                                        │
│                                                                                                  │
│   32 │   │   # Set logger verbosity depending on user input                                      │
│   33 │   │   ExeLog.setVerbosity(ParametersManager().verbosity, ParametersManager().quiet)       │
│   34 │   │   # Start Main controller & Executing action selected by user CLI                     │
│ ❱ 35 │   │   ExegolController.call_action()                                                      │
│   36 │   except KeyboardInterrupt:                                                               │
│   37 │   │   logger.empty_line()                                                                 │
│   38 │   │   logger.info("Exiting")                                                              │
│ /opt/Exegol/exegol/manager/ExegolController.py:23 in call_action                                 │
│                                                                                                  │
│   20 │   │   │   # Fetch main operation function                                                 │
│   21 │   │   │   main_action = cls.__action()                                                    │
│   22 │   │   │   # Execute main function                                                         │
│ ❱ 23 │   │   │   main_action()                                                                   │
│   24 │   │   else:                                                                               │
│   25 │   │   │   # TODO review required parameters                                               │
│   26 │   │   │   logger.error(f"These parameters are mandatory but missing: {','.join(missing    │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │            cls = <class 'exegol.manager.ExegolController.ExegolController'>                  │ │
│ │    main_action = <bound method ExegolManager.update of <class                                │ │
│ │                  'exegol.manager.ExegolManager.ExegolManager'>>                              │ │
│ │ missing_params = []                                                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /opt/Exegol/exegol/manager/ExegolManager.py:124 in update                                        │
│                                                                                                  │
│   121 │   │   """Update python wrapper (git installation required) and Pull a docker exegol i    │
│   122 │   │   ExegolManager.print_version()                                                      │
│   123 │   │   if not ParametersManager().skip_git:                                               │
│ ❱ 124 │   │   │   UpdateManager.updateWrapper()                                                  │
│   125 │   │   │   UpdateManager.updateImageSource()                                              │
│   126 │   │   │   UpdateManager.updateResources()                                                │
│   127 │   │   if not ParametersManager().skip_images:                                            │
│                                                                                                  │
│ ╭────────────────────────── locals ──────────────────────────╮                                   │
│ │ cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │                                   │
│ ╰────────────────────────────────────────────────────────────╯                                   │
│                                                                                                  │
│ /opt/Exegol/exegol/manager/UpdateManager.py:96 in updateWrapper                                  │
│                                                                                                  │
│    93 │   @classmethod                                                                           │
│    94 │   def updateWrapper(cls) -> bool:                                                        │
│    95 │   │   """Update wrapper source code from git"""                                          │
│ ❱  96 │   │   result = cls.__updateGit(ExegolModules().getWrapperGit())                          │
│    97 │   │   if result:                                                                         │
│    98 │   │   │   cls.__untagUpdateAvailable()                                                   │
│    99 │   │   return result                                                                      │
│                                                                                                  │
│ ╭────────────────────────── locals ──────────────────────────╮                                   │
│ │ cls = <class 'exegol.manager.UpdateManager.UpdateManager'> │                                   │
│ ╰────────────────────────────────────────────────────────────╯                                   │
│                                                                                                  │
│ /opt/Exegol/exegol/manager/UpdateManager.py:125 in __updateGit                                   │
│                                                                                                  │
│   122 │   │   │   return False                                                                   │
│   123 │   │   logger.info(f"Updating Exegol [green]{gitUtils.getName()}[/green] {gitUtils.get    │
│   124 │   │   # Check if pending change -> cancel                                                │
│ ❱ 125 │   │   if not gitUtils.safeCheck():                                                       │
│   126 │   │   │   logger.error("Aborting git update.")                                           │
│   127 │   │   │   logger.empty_line()                                                            │
│   128 │   │   │   return False                                                                   │
│                                                                                                  │
│ ╭─────────────── locals ────────────────╮                                                        │
│ │ gitUtils = GitUtils 'wrapper': Active │                                                        │
│ ╰───────────────────────────────────────╯                                                        │
│                                                                                                  │
│ /opt/Exegol/exegol/utils/GitUtils.py:148 in safeCheck                                            │
│                                                                                                  │
│   145 │   │   if self.__gitRepo is None or self.__gitRemote is None:                             │
│   146 │   │   │   return False                                                                   │
│   147 │   │   # Submodule changes must be ignored to update the submodules sources independen    │
│ ❱ 148 │   │   is_dirty = self.__gitRepo.is_dirty(submodules=False)                               │
│   149 │   │   if is_dirty:                                                                       │
│   150 │   │   │   logger.warning("Local git have unsaved change. Skipping source update.")       │
│   151 │   │   return not is_dirty                                                                │
│                                                                                                  │
│ ╭───────────── locals ──────────────╮                                                            │
│ │ self = GitUtils 'wrapper': Active │                                                            │
│ ╰───────────────────────────────────╯                                                            │
│                                                                                                  │
│ /home/gsbuosi/.local/lib/python3.7/site-packages/git/repo/base.py:725 in is_dirty                │
│                                                                                                  │
│    722 │   │   if index:                                                                         │
│    723 │   │   │   # diff index against HEAD                                                     │
│    724 │   │   │   if osp.isfile(self.index.path) and \                                          │
│ ❱  725 │   │   │   │   │   len(self.git.diff('--cached', *default_args)):                        │
│    726 │   │   │   │   return True                                                               │
│    727 │   │   # END index handling                                                              │
│    728 │   │   if working_tree:                                                                  │
│                                                                                                  │
│ ╭───────────────────────────────────── locals ──────────────────────────────────────╮            │
│ │    default_args = ['--abbrev=40', '--full-index', '--raw', '--ignore-submodules'] │            │
│ │           index = True                                                            │            │
│ │            path = None                                                            │            │
│ │            self = <git.repo.base.Repo '/opt/Exegol/.git'>                         │            │
│ │      submodules = False                                                           │            │
│ │ untracked_files = False                                                           │            │
│ │    working_tree = True                                                            │            │
│ ╰───────────────────────────────────────────────────────────────────────────────────╯            │
│                                                                                                  │
│ /home/gsbuosi/.local/lib/python3.7/site-packages/git/cmd.py:639 in <lambda>                      │
│                                                                                                  │
│    636 │   │   :return: Callable object that will execute call _call_process with your argumen   │
│    637 │   │   if name[0] == '_':                                                                │
│    638 │   │   │   return LazyMixin.__getattr__(self, name)                                      │
│ ❱  639 │   │   return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)          │
│    640 │                                                                                         │
│    641 │   def set_persistent_git_options(self, **kwargs: Any) -> None:                          │
│    642 │   │   """Specify command line options to the git executable                             │
│                                                                                                  │
│ ╭─────────────────────────────────────── locals ───────────────────────────────────────╮         │
│ │   args = ('--cached', '--abbrev=40', '--full-index', '--raw', '--ignore-submodules') │         │
│ │ kwargs = {}                                                                          │         │
│ │   name = 'diff'                                                                      │         │
│ │   self = <git.cmd.Git object at 0x7f034cc916e0>                                      │         │
│ ╰──────────────────────────────────────────────────────────────────────────────────────╯         │
│                                                                                                  │
│ /home/gsbuosi/.local/lib/python3.7/site-packages/git/cmd.py:1184 in _call_process                │
│                                                                                                  │
│   1181 │   │   call.append(dashify(method))                                                      │
│   1182 │   │   call.extend(args_list)                                                            │
│   1183 │   │                                                                                     │
│ ❱ 1184 │   │   return self.execute(call, **exec_kwargs)                                          │
│   1185 │                                                                                         │
│   1186 │   def _parse_object_header(self, header_line: str) -> Tuple[str, str, int]:             │
│   1187 │   │   """                                                                               │
│                                                                                                  │
│ ╭──────────────────────────── locals ────────────────────────────╮                               │
│ │                  args = (                                      │                               │
│ │                         │   '--cached',                        │                               │
│ │                         │   '--abbrev=40',                     │                               │
│ │                         │   '--full-index',                    │                               │
│ │                         │   '--raw',                           │                               │
│ │                         │   '--ignore-submodules'              │                               │
│ │                         )                                      │                               │
│ │             args_list = [                                      │                               │
│ │                         │   '--cached',                        │                               │
│ │                         │   '--abbrev=40',                     │                               │
│ │                         │   '--full-index',                    │                               │
│ │                         │   '--raw',                           │                               │
│ │                         │   '--ignore-submodules'              │                               │
│ │                         ]                                      │                               │
│ │                  call = [                                      │                               │
│ │                         │   'git',                             │                               │
│ │                         │   'diff',                            │                               │
│ │                         │   '--cached',                        │                               │
│ │                         │   '--abbrev=40',                     │                               │
│ │                         │   '--full-index',                    │                               │
│ │                         │   '--raw',                           │                               │
│ │                         │   '--ignore-submodules'              │                               │
│ │                         ]                                      │                               │
│ │           exec_kwargs = {}                                     │                               │
│ │              ext_args = [                                      │                               │
│ │                         │   '--cached',                        │                               │
│ │                         │   '--abbrev=40',                     │                               │
│ │                         │   '--full-index',                    │                               │
│ │                         │   '--raw',                           │                               │
│ │                         │   '--ignore-submodules'              │                               │
│ │                         ]                                      │                               │
│ │ insert_after_this_arg = None                                   │                               │
│ │                kwargs = {}                                     │                               │
│ │                method = 'diff'                                 │                               │
│ │              opt_args = []                                     │                               │
│ │           opts_kwargs = {}                                     │                               │
│ │                  self = <git.cmd.Git object at 0x7f034cc916e0> │                               │
│ ╰────────────────────────────────────────────────────────────────╯                               │
│                                                                                                  │
│ /home/gsbuosi/.local/lib/python3.7/site-packages/git/cmd.py:984 in execute                       │
│                                                                                                  │
│    981 │   │   # END handle debug printing                                                       │
│    982 │   │                                                                                     │
│    983 │   │   if with_exceptions and status != 0:                                               │
│ ❱  984 │   │   │   raise GitCommandError(redacted_command, status, stderr_value, stdout_value)   │
│    985 │   │                                                                                     │
│    986 │   │   if isinstance(stdout_value, bytes) and stdout_as_string:  # could also be output  │
│    987 │   │   │   stdout_value = safe_decode(stdout_value)                                      │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │           _kill_process = <function Git.execute.<locals>._kill_process at 0x7f034cc80d40>    │ │
│ │              as_process = False                                                              │ │
│ │ cmd_not_found_exception = <class 'FileNotFoundError'>                                        │ │
│ │                 command = [                                                                  │ │
│ │                           │   'git',                                                         │ │
│ │                           │   'diff',                                                        │ │
│ │                           │   '--cached',                                                    │ │
│ │                           │   '--abbrev=40',                                                 │ │
│ │                           │   '--full-index',                                                │ │
│ │                           │   '--raw',                                                       │ │
│ │                           │   '--ignore-submodules'                                          │ │
│ │                           ]                                                                  │ │
│ │                     cwd = '/opt/Exegol'                                                      │ │
│ │                     env = {                                                                  │ │
│ │                           │   'XDG_SEAT_PATH': '/org/freedesktop/DisplayManager/Seat0',      │ │
│ │                           │   'XDG_CONFIG_DIRS': '/etc/xdg/xdg-pantheon:/etc/xdg',           │ │
│ │                           │   'PANTHEON_TERMINAL_ID': '3',                                   │ │
│ │                           │   'LANG': 'en_US.UTF-8',                                         │ │
│ │                           │   'DISPLAY': ':0',                                               │ │
│ │                           │   'SHLVL': '1',                                                  │ │
│ │                           │   'LOGNAME': 'gsbuosi',                                          │ │
│ │                           │   'LANGUAGE': 'C',                                               │ │
│ │                           │   'MANDATORY_PATH': '/usr/share/gconf/pantheon.mandatory.path',  │ │
│ │                           │   'XDG_VTNR': '7',                                               │ │
│ │                           │   ... +53                                                        │ │
│ │                           }                                                                  │ │
│ │              inline_env = None                                                               │ │
│ │                 istream = None                                                               │ │
│ │              istream_ok = 'None'                                                             │ │
│ │      kill_after_timeout = None                                                               │ │
│ │          max_chunk_size = 8192                                                               │ │
│ │                 newline = b'\n'                                                              │ │
│ │           output_stream = None                                                               │ │
│ │                    proc = <subprocess.Popen object at 0x7f034cc29610>                        │ │
│ │        redacted_command = [                                                                  │ │
│ │                           │   'git',                                                         │ │
│ │                           │   'diff',                                                        │ │
│ │                           │   '--cached',                                                    │ │
│ │                           │   '--abbrev=40',                                                 │ │
│ │                           │   '--full-index',                                                │ │
│ │                           │   '--raw',                                                       │ │
│ │                           │   '--ignore-submodules'                                          │ │
│ │                           ]                                                                  │ │
│ │                    self = <git.cmd.Git object at 0x7f034cc916e0>                             │ │
│ │                   shell = None                                                               │ │
│ │                  status = 129                                                                │ │
│ │            stderr_value = b'Not a git repository\nTo compare two paths outside a working     │ │
│ │                           tree:\nusage: git dif'+28                                          │ │
│ │        stdout_as_string = True                                                               │ │
│ │             stdout_sink = -1                                                                 │ │
│ │            stdout_value = b''                                                                │ │
│ │       subprocess_kwargs = {}                                                                 │ │
│ │      universal_newlines = False                                                              │ │
│ │         with_exceptions = True                                                               │ │
│ │    with_extended_output = False                                                              │ │
│ │             with_stdout = True                                                               │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
GitCommandError: Cmd('git') failed due to: exit code(129)
  cmdline: git diff --cached --abbrev=40 --full-index --raw --ignore-submodules
  stderr: 'Not a git repository
To compare two paths outside a working tree:
usage: git diff [--no-index] <path> <path>'
➜  Exegol 
@gsbuosi gsbuosi changed the title <update failure> Exegol full image update failure Oct 29, 2022
@Dramelac Dramelac changed the title Exegol full image update failure Exegol full image update failure Oct 29, 2022
@Dramelac
Copy link
Member

Hello,

Thank you for the report!

Can you run exegol version -vvv please ? And paste the result here in a code block ?

Thank you

@gsbuosi
Copy link
Author

gsbuosi commented Oct 30, 2022

Hi,

There you go...

image

@Dramelac
Copy link
Member

I don't know why but it seems that you have a problem with the git command.
You have installed exegol via git clone apparently, can you try to run the git diff command in your 'Exegol' folder and see if you have an error too?

@gsbuosi
Copy link
Author

gsbuosi commented Oct 30, 2022

there u go...

image

@Dramelac
Copy link
Member

Do you know why you have this error Not a git repository ?

Did you make a git clone or download the project in zip file?

@Dramelac Dramelac added bug Something isn't working waiting for additional info Further information is requested labels Oct 30, 2022
@gsbuosi
Copy link
Author

gsbuosi commented Oct 31, 2022 via email

@Dramelac
Copy link
Member

How did you install Exegol in the first place ?

  • With pip install exegol ?
  • With git clone <...> ?
  • From github by download a zip archive that you unzip on your machine ?
  • Or other ?

You can join us on discord and open a ticket, it will be easier to debug by chat: https://discord.gg/hqyXRNk5

@gsbuosi
Copy link
Author

gsbuosi commented Nov 1, 2022

I'm pretty sure was git clone <...>

@ShutdownRepo
Copy link
Member

Hi @gsbuosi, your previous screenshot (#121 (comment)) says otherwise.
We would be happy to help you, but it would be way easier through our Discord server.

If you don't want to go through Discord, that's alright but I'll then ask you to conduct the following steps, and upload here a screenshot of the command and result for each step.

  1. Remove your Exegol directory: rm -r Exegol/
  2. Remove any pip instance of Exegol: python3 -m pip uninstall exegol
  3. Reinstall Exegol with the following command line: git clone https://github.com/ShutdownRepo/Exegol
  4. Install the requirements: cd Exegol && python3 -m pip install --user --requirement requirements.txt
  5. Run python3 exegol.py version -vvv
  6. Try to update your image again

@ShutdownRepo
Copy link
Member

Closing the ticket. Debugged the issue with @gsbuosi on our Discord server. @gsbuosi cloned the repo with sudo and was running Exegol without, causing the program to be unable to read some files.
Solve: either clone the repo without sudo or use exegol with those rights. Exegol needs to access its own files properly.

@ShutdownRepo ShutdownRepo added invalid This doesn't seem right and removed bug Something isn't working waiting for additional info Further information is requested labels Nov 1, 2022
@Dramelac Dramelac mentioned this issue Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants