Bug 803441 - Users cannot upload manifests to orgs with spaces in the name.
Summary: Users cannot upload manifests to orgs with spaces in the name.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-14 17:51 UTC by Corey Welton
Modified: 2019-09-25 21:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 18:31:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Welton 2012-03-14 17:51:53 UTC
Description of problem:
h/t to bcrochet for this one.

If user creates an org with spaces in the name and attempts to upload a manifest, the action fails. Furthermore, said manifest can no longer be used -- even with "Force" -- in other new orgs w/o spaces due to this manifest already being in use by another (broken) org.

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


How reproducible:


Steps to Reproduce:
1.  Create an org, "My Org" (note space in the name)
2.  Attempt to upload manifest, note error.
3.  Create an org, "MyNewOrg"
4.  Attempt to upload same manifest to second org.  Note error.
  
Actual results:
When attempting to upload to "My Org":

Subscription manifest upload for provider 'Red Hat' failed.
Reason: "Traceback (most recent call last):\n File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48, in report_error\n return method(self, *args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py\", line 127, in _auth_decorator\n value = method(self, *args, **kwargs)\n File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py\", line 333, in POST\n publish=repo_data.get('publish', None),)\n File \"/usr/lib/python2.6/site-packages/pulp/server/api/repo.py\", line 229, in create\n self.check_for_whitespace(relative_path, \"relative_path\")\n File \"/usr/lib/python2.6/site-packages/pulp/server/api/base.py\", line 68, in check_for_whitespace\n raise PulpValidationError(_(\"Given %s:[%s] is invalid. %s should not contain whitespace characters.\" % (entity_name, id, entity_name)))\nPulpValidationError: Given relative_path:[My Org/Library/content/beta/rhel/server/5/5.7/i386/source/iso] is invalid. relative_path should not contain whitespace characters.\n"
If you are uploading an older manifest, you can use the Force checkbox to overwrite existing data.


It's not readily apparent in bugzilla, but note the line break above for
:[My
Org/Library...


A second error occurs when trying to upload to MyNewOrg, but I've not included it here as I think it's a standard error.

Expected results:

User can upload manifest

Additional info:
Only slightly lessening the severity of this bug is the fact that there's a workaround: You can apparently delete your busted "My Org" and create a 'valid' one, whereupon the manifest appears to work.

Comment 1 Jeff Weiss 2012-03-14 18:42:54 UTC
on my katello server (Katello Version: 0.2.13-1.git.3.bd54a84.el6) I see the problem where you cannot upload a manifest on an org with a space in the name.

However, the same manifest can still be uploaded to other orgs (with no spaces in the name).  

Appears to be 100% reproducible.

Comment 5 Ivan Necas 2012-03-15 14:09:03 UTC
added support for spaces in system tests --rand-prefix command in commit  adbd8c8bde321957560a0bdbfc951f969a9e2ad5

    Allows the automation of detection of problems when spaces are in names of
    organizations, products, repos etc.

    Usage:

      scripts/system-test/cli_system-test "all" --rand-prefix "a a"

Besides manifest import, also org subscriptions are failing with space in the org name.

Comment 6 Ivan Necas 2012-03-15 16:40:20 UTC
Fixed in commit 62d8da25ea7bc40386413c05400b45ad2a43a3cf, including also org subscriptions problem

Comment 11 Garik Khachikyan 2012-03-21 10:33:24 UTC
# VERIFIED

corrected now.

Having an org with "space" in its name - was able to import manifest there.
and after that - syncing process also goes fine. so moving to verified.

checked against:
---
mod_wsgi-3.3-3.pulp.el6.x86_64
katello-common-0.2.15-1.git.0.16f633a.el6.noarch
pulp-selinux-server-1.0.0-6.el6.noarch
katello-repos-testing-0.2.1-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
candlepin-0.5.26-1.el6.noarch
candlepin-tomcat6-0.5.26-1.el6.noarch
katello-certs-tools-1.1.3-1.el6.noarch
qpid-cpp-server-0.12-6.el6.x86_64
katello-glue-foreman-0.2.15-1.git.0.16f633a.el6.noarch
katello-0.2.15-1.git.0.16f633a.el6.noarch
qpid-cpp-client-ssl-0.12-6.el6.x86_64
qpid-cpp-server-ssl-0.12-6.el6.x86_64
katello-cli-common-0.2.15-1.git.0.821013f.el6.noarch
katello-cli-0.2.15-1.git.0.821013f.el6.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64
python-oauth2-1.5.170-2.pulp.el6.noarch
pulp-common-1.0.0-6.el6.noarch
qpid-cpp-client-0.12-6.el6.x86_64
katello-glue-pulp-0.2.15-1.git.0.16f633a.el6.noarch
katello-selinux-0.2.3-1.git.57.6c5edb8.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-agent-1.0.3-1.git.0.cccd0b4.el6.noarch
katello-cli-tests-0.2.5-1.git.0.58ae4b6.el6.noarch
python-qpid-0.12-1.el6.noarch
katello-glue-candlepin-0.2.15-1.git.0.16f633a.el6.noarch
pulp-1.0.0-6.el6.noarch
katello-repos-0.2.1-1.el6.noarch
katello-configure-0.2.15-1.git.4.94aa90a.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
---

Comment 13 Mike McCune 2013-08-16 18:05:37 UTC
getting rid of 6.0.0 version since that doesn't exist


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