Description of problem: If there is an error with the /var/satellite filesystem on the satellite and a user attempts to publish a package, then the database will be in an inconsistent state. A record of the rpm will exist in the database, but the rpm will not exist in /var/satellite. What is worse is that the database records are incomplete, and the rpm does not show up in the webui. Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. create 32 thousand subdirectories in /var/satellite/redhat/1, that will cause errors with ext3 2. try to rhnpush a package 3. notice that the package did not make it into the filesystem 4. notice that a record of the rpm exists in the rhnPackage oracle table Actual results: reported error, but not all database transactions rolled back Expected results: rhnpush throws an error and rolls back all db transactions Additional info:
fixed! Committed revision 132011 Committed revision 132012 create 32000 + directories under /var/satellite/redhat/1 puts the file system in a state such that any more additional files will get a "oo many links" error. With this state rhnpush is basically failing to put the package on the filesystm. But includesa n entry in the db.. this is because packageUpload cal computes the db entries and populates the db before actually putting the file on filesystem by reading the package metadata from its header. I fixed the logic such that it first validates the package on file and then does the db entires. This is the test after the fix: create 32000+ dirs under /var/satellite/redhat/1 [root@rlx-0-22 ~]# ls -l /var/satellite/redhat/1/ |wc -l 31999 [root@rlx-0-22 ~]# mkdir /var/satellite/redhat/1/asm/ mkdir: cannot create directory `/var/satellite/redhat/1/asm/': Too many links so its in a stale state.. now try uploading a package [root@rlx-0-22 rhnpush]# rhnpush --server=rlx-0-22.rhndev.redhat.com --username admin --password redhat --channel=test-push ~/asm-1.4.1-2jpp.noarch.rpm -vvvvConnecting to http://rlx-0-22.rhndev.redhat.com/APP url is http://rlx-0-22.rhndev.redhat.com/PACKAGE-PUSH Result codes: 200 OK Computing md5sum and package Info .This may take sometime ... %%%%%%%%%%%%%%%%%%%%%%%%% Package /root/asm-1.4.1-2jpp.noarch.rpm Not Found on RHN Server -- Uploading Uploading package /root/asm-1.4.1-2jpp.noarch.rpm Using POST request Internal server error 500 Internal Server Error Error pushing /root/asm-1.4.1-2jpp.noarch.rpm: Error Message: Package upload failed: [Errno 31] Too many links: '/var/satellite/redhat/1/asm' Error Class Code: 50 Error Class Info: Invalid information uploaded to the server (500) [root@rlx-0-22 rhnpush]# so the push failed. lets check the filesystem, [root@rlx-0-22 ~]# ls /var/satellite/redhat/1/asm ls: /var/satellite/redhat/1/asm: No such file or directory so it failed to put it on file system Now check the db: SQL> select 1 from rhnPackageName where name = 'asm'; no rows selected SQL> So there is no trace of asm package in the db's rhnpackageName which means its not in the db This should fix the issue Goldman is facing.
verified. rhn-satellite-5.1.0-8-redhat-linux-as-i386-4-embedded-oracle.iso
this hotfix needs to be for SERVER: rhns-4.2.2-3.noarch CLIENT: rhnpush-4.2.2-3.noarch We will update our rhn infrastructure to this version. This event sent from IssueTracker by vzlatkin issue 120145
Committed revision 134812.
5.1 Sat GA so Closed for Current Release.
Removed Bug 238843 blocks bug 421541.