Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1365312 - 255 character length too short for content view names
Summary: 255 character length too short for content view names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.1.9
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact:
URL:
Whiteboard:
: 1427145 (view as bug list)
Depends On:
Blocks: 1581628
TreeView+ depends on / blocked
 
Reported: 2016-08-08 21:53 UTC by Taft Sanders
Modified: 2021-12-10 14:42 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1581628 (view as bug list)
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17949 0 Normal Closed 255 character length too short for content view names 2020-11-10 19:13:20 UTC
Red Hat Knowledge Base (Solution) 2946761 0 None None None 2017-02-28 08:13:13 UTC

Description Taft Sanders 2016-08-08 21:53:42 UTC
Description of problem:
Pulp id naming convention creates names longer than 255 characters not allowing for content views to publish/promote

Version-Release number of selected component (if applicable):
6.1.9

How reproducible:
easy

Steps to Reproduce:
1.Create content view
2.Use a name of 254 characters
3.Try to publish

Actual results:
Content view fails with following error in the logs:
Validation failed: Pulp is too long (maximum is 255 characters)

Expected results:
Content view to publish/promote

Additional info:
The pulp id consists of the Organization name, lifecycle environment, product, repository name, and content view version. The content view can be less than 254 characters for this to work, but the concatenation of all these can produce names longer than 255 characters in length.

Comment 3 Michael Hrivnak 2016-09-08 16:18:32 UTC
I am able to reproduce on the 2.11 branch. I used a 260-character string, and I saw the below traceback in the log on publish.

It appears that the filesystem (ext4 in my case) will not allow a directory name that long. According to documentation, XFS has the same limitation of 255 characters.

Since this string is used to compose a URL where content is served, and that URL maps to a directory on a filesystem, can katello just limit the length of the repo ID it generates?

Please NEEDSINFO me if you need additional pulp feedback.

Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744) Exception caught from plugin during publish for repo [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744) Traceback (most recent call last):
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/server/controllers/repository.py", line 1234, in _do_publish
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     publish_report = publish_repo(transfer_repo, conduit, call_config)
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 673, in wrap_f
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     return f(*args, **kwargs)
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp_rpm/plugins/pulp_rpm/plugins/distributors/yum/distributor.py", line 174, in publish_repo
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     return self._publisher.process_lifecycle()
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 565, in process_lifecycle
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     super(PluginStep, self).process_lifecycle()
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 162, in process_lifecycle
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     step.process()
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 252, in process
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     self._process_block()
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 296, in _process_block
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     self.process_main()
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/plugins/util/publish_step.py", line 899, in process_main
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     copytree(self.source_dir, timestamp_master_dir, symlinks=True)
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/home/vagrant/devel/pulp/server/pulp/server/util.py", line 245, in copytree
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     os.makedirs(dst)
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/usr/lib64/python2.7/os.py", line 150, in makedirs
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     makedirs(head, mode)
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)   File "/usr/lib64/python2.7/os.py", line 157, in makedirs
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744)     mkdir(name, mode)
Sep 08 16:09:02 dev pulp[4659]: pulp.server.controllers.repository:ERROR: (4659-15744) OSError: [Errno 36] File name too long: '/var/lib/pulp/published/yum/master/yum_distributor/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Comment 4 Michael Hrivnak 2016-12-12 20:51:05 UTC
If pulp were to make an improvement in this area, it would only be to fail more gracefully. Katello would still need to supply a repo_id that is <= 255 characters long, so there's nothing that a user could do to recover from that situation. As such, I'm changing the component to Content Management. Let me know if there is a pulp change that would be helpful for this case.

I did consider that pulp could try to prevent creation of a repo where the repo_id is > 255 characters long. Unfortunately, the problem is more complicated, because different distributors use the repo_id in different ways when it comes to the filesystem. Not all will necessarily use it in a file path, so it is difficult to do validation at repo creation time.

Comment 5 Brad Buckingham 2017-01-05 19:22:44 UTC
Created redmine issue http://projects.theforeman.org/issues/17949 from this bug

Comment 6 Satellite Program 2017-02-01 17:09:45 UTC
Upstream bug assigned to jsherril

Comment 7 Satellite Program 2017-02-16 21:09:45 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17949 has been resolved.

Comment 8 Justin Sherrill 2017-02-27 16:31:26 UTC
*** Bug 1427145 has been marked as a duplicate of this bug. ***

Comment 9 Oleksandr Shtaier 2017-06-08 09:41:39 UTC
Verified both on 6.2 and 6.3. Functionality works as intended and content views that has long names can be published successfully

Comment 11 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.