| Summary: | "Diff: [['package_group', 5, 6], ['cookie', '', 'None']]" when re-pushing package | ||
|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | Jan Hutař <jhutar> |
| Component: | Server | Assignee: | Jan Pazdziora <jpazdziora> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.6 | CC: | jpazdziora, mmraka |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | spacewalk-backend-1.7.7-1 spacewalk-schema-1.7.20-1 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-03-07 09:55:23 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: | 765736 | ||
|
Description
Jan Hutař
2011-11-25 06:43:55 UTC
The error that I observe is
Uploading failed for psklenar-is-testing-me-first-1-1.noarch.rpm
Error: Package with same name already exists on server but contents differ (package recompiled). Use --force or remove old package before uploading the newer version.
Diff: [['cookie', '', 'None']]
-- there is no package_group in the diff. But the cookie is deterministic.
I've now fixed the cookie problem in Spacewalk master, 6eede99aaf2f65ea50f8e73d61f11a16210e05db. The bug was caused by the fact that null value from the database was put to the channel dump (export) as string "None". Let me know if you have a reproducer for the package_group difference -- I was not able to see it. Spacewalk 1.6 has been released. Reopening. We were able to come across the package_group issue again.
The problem seems to be that the same group is inserted to rhnpackagegroup multiple times, and presumably which id you get is not as stable on PostgreSQL as on Oracle.
# select * from rhnpackagegroup ;
id | name | created | modified
----+----------------------------+------------------------+------------------------
1 | NoGroup | 2012-01-19 12:36:34-05 | 2012-01-19 12:36:34-05
4 | Applications/Productivity | 2012-01-19 13:34:29-05 | 2012-01-19 13:34:29-05
7 | Unspecified | 2012-01-19 13:45:43-05 | 2012-01-19 13:45:43-05
:
2 | test | 2012-01-19 12:52:03-05 | 2012-01-19 12:52:03-05
:
3 | Applications/Productivity | 2012-01-19 13:14:12-05 | 2012-01-19 13:14:12-05
:
5 | grp | 2012-01-19 13:44:57-05 | 2012-01-19 13:44:57-05
:
6 | grp | 2012-01-19 13:45:05-05 | 2012-01-19 13:45:05-05
8 | Unspecified | 2012-01-19 13:45:57-05 | 2012-01-19 13:45:57-05
(8 rows)
Another interesting thing to note is
# PGPASSWORD=spacepw psql -U spaceuser spaceschema
psql (8.4.9)
Type "help" for help.
spaceschema=# select * from rhnpackagegroup where name = 'grp' ;
id | name | created | modified
----+------+---------+----------
(0 rows)
spaceschema=# select * from rhnpackagegroup where name like 'grp%' ;
id | name | created | modified
----+------+------------------------+------------------------
5 | grp | 2012-01-19 13:44:57-05 | 2012-01-19 13:44:57-05
:
6 | grp | 2012-01-19 13:45:05-05 | 2012-01-19 13:45:05-05
(2 rows)
spaceschema=# select * from rhnpackagegroup where name = 'grp ' ;
id | name | created | modified
----+------+------------------------+------------------------
6 | grp | 2012-01-19 13:45:05-05 | 2012-01-19 13:45:05-05
(1 row)
The dump used to migrate from Oracle to PostgreSQL is: -- Types for rhnpackagegroup: DOUBLE PRECISION VARCHAR2 DATE DATE copy rhnpackagegroup(id,name,created,modified) from stdin; 1 NoGroup 2012-01-19 12:36:34 2012-01-19 12:36:34 4 Applications/Productivity 2012-01-19 13:34:29 2012-01-19 13:34:29 7 Unspecified\x0a 2012-01-19 13:45:43 2012-01-19 13:45:43 2 test\x0a 2012-01-19 12:52:03 2012-01-19 12:52:03 3 Applications/Productivity\x0a 2012-01-19 13:14:12 2012-01-19 13:14:12 5 grp\x0a 2012-01-19 13:44:57 2012-01-19 13:44:57 6 grp 2012-01-19 13:45:05 2012-01-19 13:45:05 8 Unspecified 2012-01-19 13:45:57 2012-01-19 13:45:57 \. Note that once it has \x0a, and once it has space after the group name. An extra \n (\x0a) is a bug in RHEL5 rpm-python - see bug 783451. I added code to workaround this issue + data fix: commit c06105b1ca5395be47b9245fe04b980ca2e4200a 756918 - fix data for package_group commit 11989296652ad5620e3d799b65b31ddf5cfc00af 756918 - workaround for package_group issue One more commit
commit e8e976df476bc51ca95325f00c8d433428060dd7
756918 - fix data for package_group
Spacewalk 1.7 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes17 |