Bug 510669

Summary: after the upgrade I can not rhnpush package
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: UpgradesAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED NOTABUG QA Contact: Jan Hutař <jhutar>
Severity: medium Docs Contact:
Priority: medium    
Version: 530CC: cperry, gkhachik, msuchy
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-20 08:07:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 456986    

Description Jan Hutař 2009-07-10 07:24:29 UTC
Description of problem:
After the "Sat 3.7.1 7 RHEL4 i386 EO -> Sat 5.3.0 RHEL4 i386 EO" upgrade, i can not rhnpush package because of incorrect "/var/satellite/redhat/1/" rights.


Version-Release number of selected component (if applicable):
Sat 3.7.1 7 RHEL4 i386 EO -> Sat 5.3.0 RHEL4 i386 EO


How reproducible:
1 of 1 attempt


Steps to Reproduce:
1. upgrade Sat 3.7.1 7 RHEL4 i386 EO -> Sat 5.3.0 RHEL4 i386 EO
2. # rhnpush --channel=jhutar-testopia-1 --username=admin --password=admin --nosig --server=https://$(hostname)/APP bz282951-0.1-1.x86_64.rpm -v


Actual results:
Connecting to https://intel-s3ea2-03.rhts.bos.redhat.com/APP
Package bz282951-0.1-1.x86_64.rpm Not Found on RHN Server -- Uploading
Uploading package bz282951-0.1-1.x86_64.rpm
Using POST request
Internal server error 500 Internal Server Error
Error pushing bz282951-0.1-1.x86_64.rpm: Error 500Error Message:
    Package upload failed: [Errno 13] Permission denied: '/var/satellite/redhat/1/bb9'
Error Class Code: 50
Error Class Info: Invalid information uploaded to the server (500)
Waiting 2 seconds and trying again...
[...]


Expected results:
Connecting to https://sun-x4440-01.rhts.eng.bos.redhat.com/APP
Package bz282951-0.1-1.x86_64.rpm Not Found on RHN Server -- Uploading
Uploading package bz282951-0.1-1.x86_64.rpm
Using POST request


Additional info:
This worked on my other upgraded Satellites:
  Sat 5.1.1 28 RHEL4 s390x -> Sat 5.3.0 RHEL4 s390x
  Sat 5.2.0 20081028.3 RHEL5 i386 EO -> Sat 5.3.0 RHEL5 i386 EO

I was not pushing any packages to the OLD Satellite, I have pushed it first time to the upgraded one.

# ls -al /var/satellite/redhat/
total 140
drwxr-xr-x     4 apache root   4096 Jul  9 03:06 .
drwxr-xr-x     4 apache root   4096 Jul  8 19:55 ..
drwxr-xr-x     2 root   root   4096 Jul  9 03:06 1
drwxr-xr-x  3405 apache root 110592 Jul  9 07:50 NULL
# ls -al /var/satellite/redhat/1/
total 16
drwxr-xr-x  2 root   root 4096 Jul  9 03:06 .
drwxr-xr-x  4 apache root 4096 Jul  9 03:06 ..

Comment 1 Clifford Perry 2009-07-10 13:03:43 UTC
Jan - during the upgrade you would have to have copied/mounted /var/satellite/ - in the past I frequently hit this because I had /var/satellite as a local directory and then scp'd it from one server to the other during my upgrade testing. This scp action did not preserve permissions and I had to chown -R the directory structure. 

Can you please confirm exactly what you did in this upgrade with respect to the contents of /var/satellite/ during the upgrade steps. To help us determine if this is a bug or user error. 

Thanks,
Cliff

Comment 2 Jan Hutař 2009-07-11 21:25:23 UTC
Hello,
I have used local /var/satellite and just done simple satellite upgrade (no distro upgrade involved). As I'm going to redo some of my testing, I'll try this once again.

Comment 3 Garik Khachikyan 2009-07-13 09:08:24 UTC
@Jan: try to put selinux on permissive mode. It helped on my case :)

Comment 4 Clifford Perry 2009-07-13 13:57:00 UTC
Going to approve for review. Figure out if this was user error (nothing obvious) or something within upgrade processes. 

Cliff

Comment 5 Milan Zázrivec 2009-07-14 14:02:36 UTC
I upgraded a 3.7.0 i386 RHEL-4 Satellite to 5.3.0, rhnpush works
like a charm, permissions on /var/satellite/redhat/1 look good.

I can't see anything in the upgrade process that could cause this.

Comment 6 Jan Hutař 2009-07-15 07:23:26 UTC
I'm now working on an another system. Pushing to 3.7 worked fine, will report back once I'll do the upgrade.

Comment 7 Jan Hutař 2009-07-20 08:07:47 UTC
OK, that was probably some random issue, as I have tried to reproduce on some different system and it do not worked:

1. install sat371
2. push package into the custom channel
3. upgrade to sat530
4. push another package into the custom channel

All worked fine.

Original reproducer was without step "2.", but that is probably not too often scenario.

Comment 8 Miroslav Suchý 2009-08-13 11:32:36 UTC
I have been able to rhnpush withou problem:
[root@dell-pem710-01 ~]# rhnpush --server dell-pem710-01.rhts.eng.bos.redhat.com  -c  test-channel bash-completion-20060301-1.noarch.rpm
Red Hat Network username: admin
Red Hat Network password: