Closed Bono2007 closed 1 year ago
Quand je lance ks_cloudplow_upload j'ai des erreurs : (même après une réinstallation de cloudplow)
ks_cloudplow_upload
ks_cloudplow_upload 2023-08-19 01:21:35,858 - DEBUG - config - load - Upgrading config... 2023-08-19 01:21:35,859 - DEBUG - config - load - Config was not upgraded as there were no changes to add. 2023-08-19 01:21:35,862 - DEBUG - git.cmd - execute - Popen(['git', 'cat-file', '--batch-check'], cwd=/opt/cloudplow, universal_newlines=False, shell=None, istream=<valid stream>) 2023-08-19 01:21:35,864 - ERROR - git - current_version - Exception retrieving the current commit id: Traceback (most recent call last): File "/opt/cloudplow/utils/version.py", line 42, in current_version result = repo.active_branch.commit ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/refs/symbolic.py", line 200, in _get_commit obj = self._get_object() ^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/refs/symbolic.py", line 193, in _get_object return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/objects/base.py", line 64, in new_from_sha oinfo = repo.odb.info(sha1) ^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/db.py", line 37, in info hexsha, typename, size = self._git.get_object_header(bin_to_hex(sha)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/cmd.py", line 1077, in get_object_header return self.__get_object_header(cmd, ref) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/cmd.py", line 1066, in __get_object_header return self._parse_object_header(cmd.stdout.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/cmd.py", line 1028, in _parse_object_header raise ValueError("SHA could not be resolved, git returned: %r" % (header_line.strip())) ValueError: SHA could not be resolved, git returned: b'' 2023-08-19 01:21:35,867 - DEBUG - git.cmd - execute - Popen(['git', 'fetch', '-v', 'origin'], cwd=/opt/cloudplow, universal_newlines=True, shell=None, istream=None) 2023-08-19 01:21:35,869 - DEBUG - git.cmd - wait - AutoInterrupt wait stderr: b"fatal: detected dubious ownership in repository at '/opt/cloudplow'\nTo add an exception for this directory, call:\n\n\tgit config --global --add safe.directory /opt/cloudplow" 2023-08-19 01:21:35,869 - ERROR - git - latest_version - Exception retrieving the latest commit id: Traceback (most recent call last): File "/opt/cloudplow/utils/version.py", line 30, in latest_version fetch_info = repo.remotes.origin.fetch() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/remote.py", line 790, in fetch res = self._get_fetch_info_from_stderr(proc, progress) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/git/remote.py", line 674, in _get_fetch_info_from_stderr proc.wait(stderr=stderr_text) File "/usr/lib/python3.11/site-packages/git/cmd.py", line 412, in wait raise GitCommandError(self.args, status, errstr) git.exc.GitCommandError: Cmd('git') failed due to: exit code(128) cmdline: git fetch -v origin stderr: 'fatal: detected dubious ownership in repository at '/opt/cloudplow' To add an exception for this directory, call: git config --global --add safe.directory /opt/cloudplow' 2023-08-19 01:21:35,870 - DEBUG - git - check_version - Unable to check version due to failure to determine current/latest commits 2023-08-19 01:21:35,871 - INFO - cloudplow - <module> - Started in upload mode 2023-08-19 01:21:35,871 - DEBUG - cloudplow - init_service_accounts - Start initializing of service accounts. 2023-08-19 01:21:35,871 - DEBUG - cloudplow - init_service_accounts - Finished initializing of service accounts. 2023-08-19 01:21:35,871 - INFO - cloudplow - do_hidden - Starting hidden cleaning 2023-08-19 01:21:35,872 - INFO - cloudplow - do_hidden - Finished hidden cleaning 2023-08-19 01:21:35,872 - INFO - decorators - timer - do_hidden from cloudplow.py finished in 0.0004881579661741853 seconds 2023-08-19 01:21:35,872 - INFO - cloudplow - do_upload - Waiting for running upload to finish before proceeding...
J'ai du faire un kubectl exec .... --bin/sh et git config --global --add safe.directory /opt/cloudplow puis un git pull dans le container.
git config --global --add safe.directory /opt/cloudplow
git pull
Quand je lance
ks_cloudplow_upload
j'ai des erreurs : (même après une réinstallation de cloudplow)J'ai du faire un kubectl exec .... --bin/sh et
git config --global --add safe.directory /opt/cloudplow
puis ungit pull
dans le container.