[Satellite6] Synchronizing a Content View with long named repo to a Capsule fails

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • having a repository with long name (approx. 90 or more characters)
  • publishing a Content View with that repository
  • synchronizing the Content View to Capsule fails on creating a repository

Resolution

For final resolution, see This content is not included.this bugzilla status.

As a workaround, use short names of Content Views, Organizations and/or Lifecycle Environments.

For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues

For more KB articles/solutions related to Red Hat Satellite 6.x Capsule Sync Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Capsule Sync Issues

Root Cause

Katello maintains in pulp repositories for individual repos in individual versions of Content Views. The repos are identified / named accordingly to the:

  • Organization name
  • Lifecycle Environment name
  • Content View name
  • product name
  • underlying repository name

If concatening the above, one gets a string / final repository name like: Default_Organization-Library-CV_TEST-Red_Hat_Enterprise_MRG_Messaging_3_for_RHEL_7-Red_Hat_Enterprise_MRG_Messaging_3_for_RHEL_7_RPMs_x86_64_7_2.

If synchronizing to a Capsule is required, then a directory with repo name suffixed by "-yum_importer" is required.

If this final strin exceeds 256 characters, pulp is unable to create that directory, since usual filesystems (see [XFS]([1] Content from github.com is not included.https://github.com/torvalds/linux/blob/master/fs/xfs/libxfs/xfs_types.h#L107%20as%20an%20example)%20allows%20dirnames%20up%20to%20256%20characters%20%22only%22.

Therefore whole Capsule synchronization fails later on.

A workaround until This content is not included.underlying bug is fixed suggests to shorten Organization name, Lifecycle Environment name and/or Content View name.

Diagnostic Steps

  • /var/log/messages on Satellite having:
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832) Exception adding importer to repo [Default_Organization-Library-Test_Servers6_8-Red_Hat_Enterprise_Linux_Scalable_File_System__for_RHEL_Server__-_Extended_Update_Support-Red_Hat_Enterprise_Linux_Scalable_File_System_for_RHEL_6_Server_-_Extended_Update_Support_RPMs_x86_64_6Server]; the repo will be deleted
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832) Traceback (most recent call last):
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/pulp/server/controllers/repository.py", line 411, in create_repo
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     importer_controller.set_importer(repo_id, importer_type_id, importer_repo_plugin_config)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/celery/local.py", line 167, in <lambda>
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     __call__ = lambda x, *a, **kw: x._get_current_object()(*a, **kw)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 473, in __call__
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     return super(Task, self).__call__(*args, **kwargs)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 103, in __call__
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     return super(PulpTask, self).__call__(*args, **kwargs)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/celery/app/task.py", line 420, in __call__
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     return self.run(*args, **kwargs)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/pulp/server/controllers/importer.py", line 112, in set_importer
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     importer.save()
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/pulp/server/db/model/__init__.py", line 283, in save
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     self._write_pem_file(key, path)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/pulp/server/db/model/__init__.py", line 344, in _write_pem_file
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     misc.mkdir(os.path.dirname(self._pki_path))
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib/python2.6/site-packages/pulp/plugins/util/misc.py", line 48, in mkdir
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     os.makedirs(path)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)   File "/usr/lib64/python2.6/os.py", line 157, in makedirs
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832)     mkdir(name, mode)
Feb 26 10:06:42 satellite pulp: pulp.server.controllers.repository:ERROR: (2646-56832) OSError: [Errno 36] File name too long: '/var/lib/pulp/importers/Default_Organization-Library-Test_Servers6_8-Red_Hat_Enterprise_Linux_Scalable_File_System__for_RHEL_Server__-_Extended_Update_Support-Red_Hat_Enterprise_Linux_Scalable_File_System_for_RHEL_6_Server_-_Extended_Update_Support_RPMs_x86_64_6Server-yum_importer'
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.