Bug 486401 - Satellite sync while syncing arch information with hosted, deletes some 'sun4v' related rows in database
Satellite sync while syncing arch information with hosted, deletes some 'sun4...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization (Show other bugs)
530
All Linux
high Severity high
: ---
: ---
Assigned To: Pradeep Kilambi
Sayli Karmarkar
:
Depends On:
Blocks: 238435 457000
  Show dependency treegraph
 
Reported: 2009-02-19 11:24 EST by Sayli Karmarkar
Modified: 2009-09-10 15:41 EDT (History)
5 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:41:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sayli Karmarkar 2009-02-19 11:24:51 EST
Description of problem:
Satellite sync while syncing arch information with hosted, deletes some 'sun4v' related rows in database. 

Rows from following tables are deleted:

rhnChannelPackageArchCompat
rhnServerChannelArchCompat
rhnServerPackageArchCompat
rhnServerServerGroupArchCompat

Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL5-re20090213.1-i386-embedded-oracle.iso

Steps to Reproduce:
1. Install satellite with this ISO.
2. Check following queries in the database:

select * from rhnChannelPackageArchCompat where package_arch_id=LOOKUP_PACKAGE_ARCH('sparc.sun4v-solaris');

select * from rhnServerChannelArchCompat where server_arch_id=LOOKUP_SERVER_ARCH('sparc-sun4v-solaris');

select * from rhnServerPackageArchCompat where package_arch_id=LOOKUP_PACKAGE_ARCH('sparc.sun4v-solaris');

select * from rhnServerPackageArchCompat where server_arch_id=LOOKUP_SERVER_ARCH('sparc-sun4v-solaris');

select * from rhnServerServerGroupArchCompat where server_arch_id=lookup_server_arch('sparc-sun4v-solaris');

Each of them will return some data. 

3. Start sat-sync. Just after sat-sync has completed retrieving/parsing arches and additional arches data. Check in the database again and these queries will return "no rows selected" 

Expected results:
  
They should not be deleted and shoult return same result as before sat-sync. 
We are guessing whats happening is while syncing arch information, hosted does not have 'sun4v' compatibility rows and its deleting the ones that exist in the database. 

So, we should either add same compatibility in hosted or skip these rows when syncing arches data during sat-sync. 


~SayliK
Comment 1 Milan Zazrivec 2009-02-19 11:42:01 EST
Exactly the same thing (sun4v data being flushed from the db) was
happenning to me when I did the following:

1) registered a sun4v machine to my satellite
2) disassociated my machine from its (custom) base channel
3) deleted machine profile
Comment 13 Brandon Perkins 2009-08-18 01:05:33 EDT
Fixed in WebQA.  Please re-verify.
Comment 14 Sayli Karmarkar 2009-08-18 14:32:21 EDT
Reverified. 

After sat-sync against webqa, 


SQL> select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat minus select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat_b ;

no rows selected

SQL> select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat_b minus select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat ;

no rows selected

SQL> select id, label, name from rhnCpuArch minus select id, label, name from rhnCpuArch_b ;

no rows selected

SQL> select id, label, name from rhnCpuArch_b minus select id, label, name from rhnCpuArch ;

no rows selected

SQL> select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat minus select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat_b ;

no rows selected

SQL> select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat_b minus select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat ;

no rows selected

SQL> select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchCompat minus select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchComp_b ;

no rows selected

SQL> select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchComp_b minus select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchCompat ;

no rows selected

SQL> select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat minus select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat_b ;

no rows selected

SQL> select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat_b minus select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat ;

no rows selected


No rows are being deleted expected. Moving to verified.
Comment 15 Brandon Perkins 2009-08-19 13:40:45 EDT
Fixed in Stage.  Please re-verify.
Comment 16 Sayli Karmarkar 2009-08-20 16:16:57 EDT
Validated on Satellite-5.3.0-RHEL5-re20090819.0-i386-embedded-oracle.iso. 

SQL> select * from rhnChannelPackageArchCompat where
package_arch_id=LOOKUP_PACKAGE_ARCH('sparc.sun4v-solaris');
  2  
CHANNEL_ARCH_ID PACKAGE_ARCH_ID CREATED   MODIFIED
--------------- --------------- --------- ---------
	    510 	    124 20-AUG-09 20-AUG-09

SQL> select * from rhnServerChannelArchCompat where
server_arch_id=LOOKUP_SERVER_ARCH('sparc-sun4v-solaris');

  2  
SERVER_ARCH_ID CHANNEL_ARCH_ID CREATED	 MODIFIED
-------------- --------------- --------- ---------
	  1022		   510 20-AUG-09 20-AUG-09

SQL> SQL> select * from rhnServerPackageArchCompat where
package_arch_id=LOOKUP_PACKAGE_ARCH('sparc.sun4v-solaris');
  2  
SERVER_ARCH_ID PACKAGE_ARCH_ID PREFERENCE CREATED   MODIFIED
-------------- --------------- ---------- --------- ---------
	  1020		   124	      100 20-AUG-09 20-AUG-09
	  1022		   124	       10 20-AUG-09 20-AUG-09

SQL> select * from rhnServerPackageArchCompat where
server_arch_id=LOOKUP_SERVER_ARCH('sparc-sun4v-solaris');

  2  
SERVER_ARCH_ID PACKAGE_ARCH_ID PREFERENCE CREATED   MODIFIED
-------------- --------------- ---------- --------- ---------
	  1022		   122	      100 20-AUG-09 20-AUG-09
	  1022		   124	       10 20-AUG-09 20-AUG-09
	  1022		   130	      210 20-AUG-09 20-AUG-09
	  1022		   132	      310 20-AUG-09 20-AUG-09
	  1022		   134	      410 20-AUG-09 20-AUG-09
	  1022		   135	      510 20-AUG-09 20-AUG-09
	  1022		   136	      610 20-AUG-09 20-AUG-09

7 rows selected.

SQL> SQL> select * from rhnServerServerGroupArchCompat where
server_arch_id=lookup_server_arch('sparc-sun4v-solaris');
  2  
SERVER_ARCH_ID SERVER_GROUP_TYPE CREATED   MODIFIED
-------------- ----------------- --------- ---------
	  1022		       2 20-AUG-09 20-AUG-09
	  1022		       3 20-AUG-09 20-AUG-09

------------------------------------------------------------------------
Created duplicate tables.

Satsync against stage: 
# satellite-sync --no-rpms --no-packages --no-errata --no-kickstarts -c rhel-i386-as-4

-----------------------------------------------------------------------
SQL> select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat minus select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat_b ;

no rows selected

SQL> select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat_b minus select CHANNEL_ARCH_ID, PACKAGE_ARCH_ID from rhnChannelPackageArchCompat ;

no rows selected

SQL> select id, label, name from rhnCpuArch minus select id, label, name from rhnCpuArch_b ;

no rows selected

SQL> select id, label, name from rhnCpuArch_b minus select id, label, name from rhnCpuArch ;

no rows selected

SQL> select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat minus select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat_b ;

no rows selected

SQL> select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat_b minus select SERVER_ARCH_ID, CHANNEL_ARCH_ID from rhnServerChannelArchCompat ;

no rows selected

SQL> select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchCompat minus select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchComp_b ;

no rows selected

SQL> select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchComp_b minus select SERVER_ARCH_ID, SERVER_GROUP_TYPE from rhnServerServerGroupArchCompat ;

no rows selected

SQL> select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat minus select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat_b ;

no rows selected

SQL> select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat_b minus select SERVER_ARCH_ID, PACKAGE_ARCH_ID, PREFERENCE from rhnServerPackageArchCompat ;

no rows selected
Comment 17 Brandon Perkins 2009-09-10 15:41:03 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

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