uyuni icon indicating copy to clipboard operation
uyuni copied to clipboard

Stracktraces at reposync for repositories that do not exist

Open juliogonzalez opened this issue 3 years ago • 1 comments

Problem description

The following information is very important in order to help us to understand your problem. Omission of the following details can cause delays or can receive no attention at all.

Version of Uyuni Server and Proxy (if used)

Master (as of 2022 July 5th)

Details about the issue

While testing Oracle 9, I added the Stable EL9 client tools, that do not exist yet (https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/EL9-Uyuni-Client-Tools/EL_9/ returns a 404).

However, besides an error about the repository being invalid, there are also a couple of stracktraces, that IMHO should not be there:

12:12:17 ======================================
12:12:17 | Channel: oraclelinux9-uyuni-client-x86_64
12:12:17 ======================================
12:12:17 Sync of channel started.
Recuperando los metadatos del repositorio 'oraclelinux9-uyuni-client-x86_64' ...........................................................................................................................................................................................[error]
12:12:19 RepoMDError: Cannot access repository.
El repositorio 'oraclelinux9-uyuni-client-x86_64' no es válido.
[oraclelinux9-uyuni-client-x86_64|https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/EL9-Uyuni-Client-Tools/EL_9/] No se han encontrado metadatos válidos en la URL especificada
Historial:
 - [oraclelinux9-uyuni-client-x86_64|https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/EL9-Uyuni-Client-Tools/EL_9/] Repository type can't be determined.

Compruebe si los URI definidos para este repositorio apuntan a un repositorio válido.
Se va a omitir el repositorio 'oraclelinux9-uyuni-client-x86_64' debido al error anterior.
No es posible actualizar los repositorios debido a errores.

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/reposync.py", line 610, in sync
    repo_checksum_type = plugin.get_md_checksum_type()
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/repo_plugins/yum_src.py", line 748, in get_md_checksum_type
    if self._md_exists('repomd'):
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/repo_plugins/yum_src.py", line 697, in _md_exists
    self.setup_repo(self.repo)
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/repo_plugins/yum_src.py", line 644, in setup_repo
    raise RepoMDError("Cannot access repository.\n{}".format(sstr(process.stderr)))
spacewalk.satellite_tools.repo_plugins.yum_src.RepoMDError: Cannot access repository.
El repositorio 'oraclelinux9-uyuni-client-x86_64' no es válido.
[oraclelinux9-uyuni-client-x86_64|https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/EL9-Uyuni-Client-Tools/EL_9/] No se han encontrado metadatos válidos en la URL especificada
Historial:
 - [oraclelinux9-uyuni-client-x86_64|https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/EL9-Uyuni-Client-Tools/EL_9/] Repository type can't be determined.

Compruebe si los URI definidos para este repositorio apuntan a un repositorio válido.
Se va a omitir el repositorio 'oraclelinux9-uyuni-client-x86_64' debido al error anterior.
No es posible actualizar los repositorios debido a errores.


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/spacewalk-repo-sync", line 286, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/bin/spacewalk-repo-sync", line 269, in main
    elapsed_time, channel_ret_code = sync.sync()
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/reposync.py", line 654, in sync
    self.sendErrorMail("RepoMDError: %s" % e)
  File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/reposync.py", line 2367, in sendErrorMail
    rhnMail.send(headers, extra + body)
  File "/usr/lib/python3.6/site-packages/spacewalk/common/rhnMail.py", line 80, in send
    smtp.sendmail(sender, headers_recipients.to_addresses, msg)
  File "/usr/lib64/python3.6/smtplib.py", line 860, in sendmail
    msg = _fix_eols(msg).encode('ascii')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe1' in position 348: ordinal not in range(128)

juliogonzalez avatar Jul 05 '22 10:07 juliogonzalez

Oddly enough, rerunning does not show the stacktraces again:

12:47:12 ======================================
12:47:12 | Channel: oraclelinux9-uyuni-client-x86_64
12:47:12 ======================================
12:47:12 Sync of channel started.
Retrieving repository 'oraclelinux9-uyuni-client-x86_64' metadata ......................................................................................................................................................................................................[error]
12:47:13 RepoMDError: Cannot access repository.
Repository 'oraclelinux9-uyuni-client-x86_64' is invalid.
[oraclelinux9-uyuni-client-x86_64|https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/EL9-Uyuni-Client-Tools/EL_9/] Valid metadata not found at specified URL                                                                                         
History:                                                                                                                                                                                                                                                                       
 - [oraclelinux9-uyuni-client-x86_64|https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:/EL9-Uyuni-Client-Tools/EL_9/] Repository type can't be determined.                                                                                           

Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository 'oraclelinux9-uyuni-client-x86_64' because of the above error.
Could not refresh the repositories because of errors.

juliogonzalez avatar Jul 05 '22 10:07 juliogonzalez

@Ripper66Six this is a different stracktrace, so it should better be tracked on a separate issue, as it looks like a different issue, even if it happens with reposync and handling packages. Can you create one?

juliogonzalez avatar Jun 27 '23 14:06 juliogonzalez

Hello @juliogonzalez,

I have deleted the entry and will provide this in a separate issue.

Kind regards

Ripper66Six avatar Jun 28 '23 06:06 Ripper66Six