| Summary: | Synchronizing a repo with i18n characters in name fails for second time | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Tomas Strachota <tstrachota> | ||||||||||||||||
| Component: | Content Management | Assignee: | Mike McCune <mmccune> | ||||||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Garik Khachikyan <gkhachik> | ||||||||||||||||
| Severity: | high | Docs Contact: | |||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||
| Version: | 6.0.0 | CC: | achan, bbuckingham, bkearney, dmacpher, hbrock, jesusr, mkoci, mmccune, omaciel, skarmark | ||||||||||||||||
| Target Milestone: | Unspecified | Keywords: | Triaged | ||||||||||||||||
| Target Release: | Unused | ||||||||||||||||||
| Hardware: | Unspecified | ||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||
| Whiteboard: | |||||||||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||||||||
| Doc Text: |
Synchronizing a repository with non-ASCII characters worked on first execution but failed on subsequent attempts because of limitations identifying objects such as organizations, environments, products, and repositories with UTF-8 characters. This update properly parses repositories containing non-ASCII characters. Repository synchronization works correctly on both first and subsequent attempts, regardless of the characters included.
|
Story Points: | --- | ||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||
| Last Closed: | 2012-12-04 19:42:53 UTC | Type: | --- | ||||||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||||||
| Documentation: | --- | CRM: | |||||||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||
| Bug Depends On: | |||||||||||||||||||
| Bug Blocks: | 804610, 835586, 858011 | ||||||||||||||||||
| Attachments: |
|
||||||||||||||||||
Created attachment 570314 [details]
Proposed fix
Tomas, Can you share repo feed and id/relative path used? I am not able to reproduce it. $ sudo pulp-admin repo create --id सायली --feed http://repos.fedorapeople.org/repos/pulp/pulp/dev/testing/fedora-15/x86_64/ Successfully created repository [ सायली ] $ sudo pulp-admin repo sync --id सायली -F Sync for repository सायली started Sync: Finished 21/21 new items downloaded 0/21 existing items processed Item Details: RPMs: 21/21 $ sudo pulp-admin repo sync --id सायली -F Sync for repository सायली started Sync: Finished 0/21 new items downloaded 21/21 existing items processed Item Details: RPMs: 21/21 All the logs are clean as well. Created attachment 572238 [details]
reproducer script
Sayli, this bug is seen from katello perspective. All actions were made through katello cli and therefore communication with Pulp was via it's api. Reproducer script is attached.
Sorry for not being 100% specific from the start.
we are going to be doing a bunch of fixes in 1.1 for i18 repo names, will validate this one as well. *** Bug 858000 has been marked as a duplicate of this bug. *** # REOPEN recent rpm-s provided in this errata seem not have the fix for CLI commands mentioned in: comment#3 script. It still fails (logs will follow) checked on packages: ---- katello-1.1.12-9.el6cf.noarch katello-cli-1.1.8-5.el6cf.noarch ---- Created attachment 617001 [details]
katello logs
[ERROR: 2012-09-25 07:58:11 #16038] *** ERROR: Couldn't find organization 'žába1' (404) ***
[ERROR: 2012-09-25 07:58:11 #16038] REQUEST URL: /cfse/api/organizations/%C5%BE%C3%A1ba1/providers?name=Red+Hat
[ERROR: 2012-09-25 07:58:11 #16038] HttpErrors::NotFound: Couldn't find organization 'žába1'
/usr/share/katello/app/controllers/api/api_controller.rb:98:in `find_optional_organization'
/usr/share/katello/app/controllers/api/api_controller.rb:92:in `find_organization'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:458:in `_run__1237688956__process_action__815841437__callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:221:in `_conditional_callback_around_3384'
/usr/share/katello/lib/util/threadsession.rb:79:in `thread_locals'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:220:in `_conditional_callback_around_3384'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:446:in `_run__1237688956__process_action__815841437__callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410:in `send'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `send'
(...)
With the changes to resolve this BZ, a 'label' attribute had to be added for objects such as org, env, product and repo. In cases where the object needs to be passed as part of the REST resource, the label must be used. From a Katello user point of view, this will most commonly be the organization label. The failure above is one such case. Will attach an 'updated' script where the label is provided during org creation. If one isn't provided, the user can still obtain the label that was automatically assigned using 'org list' command. The following is an example scenario, based on the original reproducer: katello> org create --name žába --label zaba Successfully created org [ žába ] katello> provider create --name test_prov --org zaba Successfully created provider [ test_prov ] katello> product create --name žába_prod --provider test_prov --url http://tstrachota.fedorapeople.org/dummy_repos/zoo/ --assumeyes --org zaba Successfully created product [ žába_prod ] Discovering repository urls, this could take some time... (+) [1] http://tstrachota.fedorapeople.org/dummy_repos/zoo Successfully created repository [ žába_prod_dummy_repos_zoo ] katello> repo synchronize --name žába_prod_dummy_repos_zoo --org zaba --product žába_prod Repo [ žába_prod_dummy_repos_zoo ] synced katello> repo synchronize --name žába_prod_dummy_repos_zoo --org zaba --product žába_prod Repo [ žába_prod_dummy_repos_zoo ] synced Created attachment 617048 [details]
Updated reproducer script
[root@qetello02 ~]# katello -u admin -p admin user create --username "Mané" --password redhat --email "mane" Successfully created user [ Mané ] [root@qetello02 ~]# katello -u admin -p admin user assign_role --username "Mané" --role "Administrator" User 'Mané' assigned to role 'Administrator' [root@qetello02 ~]# katello -u Mané -p redhat org create --name Cuiabá --label Cuiaba Successfully created org [ Cuiabá ] [root@qetello02 ~]# katello -u Mané -p redhat provider create --name test_prov --org Cuiaba Successfully created provider [ test_prov ] [root@qetello02 ~]# katello -u Mané -p redhat product create --name Cuiabá_prod --provider test_prov --url http://tstrachota.fedorapeople.org/dummy_repos/zoo/ --assumeyes --org Cuiaba Successfully created product [ Cuiabá_prod ] Discovering repository urls, this could take some time... undefined method `[]' for nil:NilClass Created attachment 617322 [details]
Reproducer with i18n username.
If the user performing the actions has a i18n username, then sync fails.
I'm working on fixing the issues found in comments 12-16 the below pull request moves the API to actually use the name as the param in the search: https://github.com/Katello/katello/pull/770 the above reproducer scripts will fail because of the UTF8 usernames which is unrelated to the above bug and pull request. That is tracked in this bz here: https://bugzilla.redhat.com/show_bug.cgi?id=862068 Created attachment 619973 [details]
reproducer without utf8 usernames
This updated reproducer script sticks to utf8 username/passwords. It does have utf8 org/product/repo names
# VERIFIED
the scenario together with making promotion to the env and consuming yum install of the rpm from that repo works now without an issue:
---
yum install penguin
Loaded plugins: product-id, pulp-profile-update, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
zaba_f346e256-f24d-4b96-8cd8-7723f6eab462_f346e256-f24d-4b96-8cd8-7723f6eab462_dummy_repos_zoo | 3.7 kB 00:00
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package penguin.noarch 0:0.9.1-1 will be installed
--> Processing Dependency: dolphin for package: penguin-0.9.1-1.noarch
--> Running transaction check
---> Package dolphin.noarch 0:3.10.232-1 will be installed
--> Processing Dependency: tiger for package: dolphin-3.10.232-1.noarch
--> Processing Dependency: bear for package: dolphin-3.10.232-1.noarch
--> Running transaction check
---> Package bear.noarch 0:4.1-1 will be installed
---> Package tiger.noarch 0:1.0-4 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================
Package Arch Version
Repository Size
============================================================================================================================
Installing:
penguin noarch 0.9.1-1
zaba_f346e256-f24d-4b96-8cd8-7723f6eab462_f346e256-f24d-4b96-8cd8-7723f6eab462_dummy_repos_zoo 2.2 k
Installing for dependencies:
bear noarch 4.1-1 zaba_f346e256-f24d-4b96-8cd8-7723f6eab462_f346e256-f24d-4b96-8cd8-7723f6eab462_dummy_repos_zoo 2.2 k
dolphin noarch 3.10.232-1
zaba_f346e256-f24d-4b96-8cd8-7723f6eab462_f346e256-f24d-4b96-8cd8-7723f6eab462_dummy_repos_zoo 2.3 k
tiger noarch 1.0-4 zaba_f346e256-f24d-4b96-8cd8-7723f6eab462_f346e256-f24d-4b96-8cd8-7723f6eab462_dummy_repos_zoo 2.2 k
Transaction Summary
============================================================================================================================
Install 4 Package(s)
Total download size: 8.9 k
Installed size: 168
Is this ok [y/N]: y
Downloading Packages:
(1/4): bear-4.1-1.noarch.rpm | 2.2 kB 00:00
(2/4): dolphin-3.10.232-1.noarch.rpm | 2.3 kB 00:00
(3/4): penguin-0.9.1-1.noarch.rpm | 2.2 kB 00:00
(4/4): tiger-1.0-4.noarch.rpm | 2.2 kB 00:00
----------------------------------------------------------------------------------------------------------------------------
Total 50 kB/s | 8.9 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : tiger-1.0-4.noarch 1/4
Installing : bear-4.1-1.noarch 2/4
Installing : dolphin-3.10.232-1.noarch 3/4
Installing : penguin-0.9.1-1.noarch 4/4
Installed products updated.
Consumer Id could not be found. Cannot update consumer profile.
Verifying : bear-4.1-1.noarch 1/4
Verifying : penguin-0.9.1-1.noarch 2/4
Verifying : tiger-1.0-4.noarch 3/4
Verifying : dolphin-3.10.232-1.noarch 4/4
Installed:
penguin.noarch 0:0.9.1-1
Dependency Installed:
bear.noarch 0:4.1-1 dolphin.noarch 0:3.10.232-1 tiger.noarch 0:1.0-4
Complete!
---
checked on:
katello-1.1.12-12.el6cf.noarch
katello-cli-1.1.8-6.el6cf.noarch
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. http://rhn.redhat.com/errata/RHSA-2012-1543.html |
Created attachment 570290 [details] Relevant part of pulp.log Description of problem: Synchronizing a repo with international characters works for first time but fails on second attempt due to missing updateinfo.xml. Version-Release number of selected component (if applicable): pulp-1.0.2-1 katello-0.2.13-1 Steps to Reproduce: 1. create a repo with i18n name 2. sync it - should work 3. sync it for second time - fails Actual results: #katello repo synchronize --id 95 Repo [ repo_žabička_ec450ca ] failed to sync: Could not add metadata from file /var/lib/pulp//repos/org_žabička_ec450ca/Library/custom/fewups_product_žabička_ec450ca/repo_žabička_ec450ca//updateinfo.xml: /var/lib/pulp//repos/org_žabička_ec450ca/Library/custom/fewups_product_žabička_ec450ca/repo_žabička_ec450ca//updateinfo.xml not found