Bug 171260 - rhnreg_ks fails if up2date is out-of-date (which means you can't up2date up2date)
rhnreg_ks fails if up2date is out-of-date (which means you can't up2date up2d...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date (Show other bugs)
4.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Pradeep Kilambi
Ken Reilly
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-19 21:17 EDT by Dave Miller
Modified: 2013-02-26 19:49 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 12:57:57 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 Dave Miller 2005-10-19 21:17:14 EDT
Description of problem:
rhnreg_ks with an activation key dies with a traceback during the package deploy
phase if the version of up2date on the system is outdated.  This just seems
silly since you can't use up2date to get a new up2date until after you've
registered the machine, and you can't do an automatic registration without a
current up2date.  If there's an old version of up2date on the machine, it should
just update that first before doing the rest of the package deploy.  (I tried to
get around it by adding up2date to the list of packages to be installed with
that activation key, but that didn't help)

Version-Release number of selected component (if applicable):
up2date-4.4.5-1

How reproducible:
Always

Steps to Reproduce:
1. Load a machine with a minimal RHEL4
2. Use the bootstrap.sh script provided with RHN Proxy to register the server
(which in turn calls rhnreg-ks with an activation key you provided to the script)

  
Actual results:
* registering
packages.update ([['httpd', '', '', ''], ['ntp', '', '', ''], ['php', '', '',
''], ['php-mbstring', '', '', ''], ['rhncfg', '', '', ''], ['rhncfg-actions',
'', '', ''], ['rhncfg-client', '', '', ''], ['up2date', '', '', ''],
['vim-enhanced', '', '', '']],)

Name                                    Version        Rel     
----------------------------------------------------------
httpd                                   2.0.52         19.ent            i386  
ntp                                     4.2.0.a.200406174                 i386  
php                                     4.3.9          3.8               i386  
php-mbstring                            4.3.9          3.8               i386  
rhncfg                                  4.0            32                noarch
rhncfg-actions                          4.0            32                noarch
rhncfg-client                           4.0            32                noarch
up2date                                 4.4.50         4                 i386  
vim-enhanced                            6.3.046        0.40E.7           i386  

httpd-2.0.52-19.ent.i386.rp ########################## Done.                   
ntp-4.2.0.a.20040617-4.i386 ########################## Done.                   
php-4.3.9-3.8.i386.rpm:     ########################## Done.                   
php-mbstring-4.3.9-3.8.i386 ########################## Done.                   
rhncfg-4.0-32.noarch.rpm:   ########################## Done.                   
rhncfg-actions-4.0-32.noarc ########################## Done.                   
rhncfg-client-4.0-32.noarch ########################## Done.                   
up2date-4.4.50-4.i386.rpm:  ########################## Done.                   
vim-enhanced-6.3.046-0.40E. ########################## Done.                   
apr-0.9.4-24.5.i386.rpm:    ########################## Done.                   
apr-util-0.9.4-21.i386.rpm: ########################## Done.                   
curl-7.12.1-5.rhel4.i386.rp ########################## Done.                   
httpd-suexec-2.0.52-19.ent. ########################## Done.                   
libidn-0.5.6-1.i386.rpm:    ########################## Done.                   
php-pear-4.3.9-3.8.i386.rpm ########################## Done.                   
rhnlib-1.8.1-1.p23.1.noarch ########################## Done.                   
vim-common-6.3.046-0.40E.7. ########################## Done.                   
New Up2date available
Preparing              ########################################### [100%]

Installing...
   1:rhnlib                 ########################################### [100%]
   2:rhncfg                 ########################################### [100%]
   3:libidn                 ########################################### [100%]
   4:apr                    ########################################### [100%]
   5:apr-util               ########################################### [100%]
   6:curl                   ########################################### [100%]
   7:rhncfg-client          ########################################### [100%]
   8:up2date                ########################################### [100%]
   9:vim-common             ########################################### [100%]
  10:vim-enhanced           ########################################### [100%]
  11:rhncfg-actions         ########################################### [100%]
  12:ntp                    ########################################### [100%]
  13:httpd                  ########################################### [100%]
  14:httpd-suexec           ########################################### [100%]
  15:php                    ########################################### [100%]
  16:php-mbstring           ########################################### [100%]
  17:php-pear               ########################################### [100%]
New Up2date available
Traceback (most recent call last):
  File "/usr/sbin/rhn_check", line 346, in ?
    
  File "/usr/sbin/rhn_check", line 219, in handle_action
    
  File "/usr/sbin/rhn_check", line 174, in run_action
    (status, message, data) = do_call(method, params)   
  File "/usr/sbin/rhn_check", line 91, in do_call
    retval = apply(method, params)
  File "/usr/share/rhn/actions/packages.py", line 359, in update
    # bit of a hack, but slightly "better messaging"
  File "/usr/share/rhn/actions/packages.py", line 195, in _catchErrors
    data['version'] = "0"
  File "/usr/share/rhn/actions/packages.py", line 398, in batchRun
    s = rpcServer.getServer()
  File "/usr/share/rhn/up2date_client/wrapper.py", line 1135, in batchRun
    
up2date_client.up2dateErrors.Up2dateNeedsUpdateError

-----

The activation key in question also has a config file deploy as part of the
activation.  The config file deploy never happens.

Allowing the bootstrap script to finish up2dates everything on the system, and
after doing that, rescheduling the activation key on the RHN website and running
rhn_check from the server suceeds in pushing the config files.

Expected results:
No crash, packages install, and config files deploy.

Additional info:
Comment 1 Máirín Duffy 2005-11-28 15:57:09 EST
Hi Dave, 

Are these bare-metal systems you're trying to deploy?
Comment 2 Dave Miller 2005-11-28 16:04:18 EST
(In reply to comment #1)
> Are these bare-metal systems you're trying to deploy?

Yes.
Comment 4 Adrian Likins 2006-02-28 15:17:56 EST
If this is a bare metal install, the easiest fix is to install RHEL4-U2 instead
of plain RHEL4.
Comment 5 Clifford Perry 2006-03-06 11:13:35 EST
Since the person who opened the bug report is using a bootstrap script and a RHN
Proxy server. May I suggest the following work around solution be used (or
something similar).

- Install a fresh system and then run up2date --configure --nox and choose
"keepAfterInstall" - item 17 on my system - and change to read 'yes'. 
- Manually register the system to your RHN account
- Download the most current up2date and associated packages needed to upgrade
up2date on a RHEL 4 system (just running 'up2date up2date' should work). 
- Copy the packages downloaded and place them within the /var/www/html/pub/ dir
of your RHN Proxy server
- Modify your bootstrap.sh script to first download and install the newest
versions of up2date off the RHN Proxy server
http://my-proxy.example.org/pub/<something>   
- let the bootstrap script proceed with registration as normal - this time it
should be successful since it is using the newest up2date code. 

Cliff. 
Comment 7 Dave Miller 2006-03-06 11:56:46 EST
Good suggestion.  I tried it.  Didn't help. :(

The current up2date also requires a newer rpmlib that what ships on the CD, so I
had to put a copy of rhnlib on the proxy server as well.

The weird errors about up2date being out of date no longer happen, and I don't
see any errors at all reported on the console of the machine while the bootstrap
runs now, however, the config deployment still never happens.  RHN website
reports that the config deployment failed because the machine isn't configured
for configuration management.  However, immediately requeuing the activation key
deploy and running rhn_check on the box succeeds.
Comment 8 Dave Miller 2006-03-06 11:58:38 EST
(In reply to comment #7)
> The current up2date also requires a newer rpmlib that what ships on the CD,
> so I had to put a copy of rhnlib on the proxy server as well.

Just to clarify, I meant rpmlib both places here, the second one was a typo.
Comment 9 Clifford Perry 2006-03-06 22:29:48 EST
since I do not know the contents of your bootstrap.sh script (feel free to email
it directly to me for this specific issue if needed) I am going to just state
what  should be added to the script if needed. 

ALLOW_CONFIG_ACTIONS=1
ALLOW_REMOTE_COMMANDS=1

if [ $ALLOW_CONFIG_ACTIONS -eq 1 ] ; then
    echo
    echo "* setting permissions to allow configuration management"
    echo "  NOTE: use an activation key to subscribe to the tools"
    echo "        channel and up2date rhncfg-actions"
    mkdir -m 0770 -p /etc/sysconfig/rhn/allowed-actions/configfiles/
    touch /etc/sysconfig/rhn/allowed-actions/configfiles/all
fi

if [ $ALLOW_REMOTE_COMMANDS -eq 1 ] ; then
    echo
    echo "* setting permissions to allow remote commands"
    echo "  NOTE: use an activation key to subscribe to the tools"
    echo "        channel and up2date rhncfg-actions"
    mkdir -m 0770 -p /etc/sysconfig/rhn/allowed-actions/script/
    touch /etc/sysconfig/rhn/allowed-actions/script/run
fi

Basically you would need to allow/enable Configuration management (and/or remote
commands - if so desired) prior to the bootstrap running the activation key to
register. Once done, the activation key would associate the system to the right
channels, install the rhncfg-actions (if stated under the activation keys
package listing) and schedule and deploy the configuration files. 

Now - there is also the possible chance that you are hitting another (and known)
bug which is scheduled for fix with the next U release. 

 Bug 165024 – "Invalid function call attempted" when installing a RHN proxy

The notice within the failed scheduled event (when seen within RHN for the
system) will show the above message - if you are encountering this specific issue. 

Cliff. 
Comment 10 Dave Miller 2006-03-21 22:16:41 EST
(In reply to comment #9)
> Basically you would need to allow/enable Configuration management (and/or
> remote commands - if so desired) prior to the bootstrap running the
> activation key to register. Once done, the activation key would associate
> the system to the right channels, install the rhncfg-actions (if stated under
> the activation keys package listing) and schedule and deploy the configuration 
> files. 

Yeah, that's in there, and that part appears to actually work.  Hence
rescheduling the action and running rhn_check allowing it to complete...

> Now - there is also the possible chance that you are hitting another (and
> known) bug which is scheduled for fix with the next U release. 
> 
>  Bug 165024 – "Invalid function call attempted" when installing a RHN proxy
> 
> The notice within the failed scheduled event (when seen within RHN for the
> system) will show the above message - if you are encountering this specific
issue. 

That sounds darn plausible, in fact this is the error it's failed when when we
requeue it in RHN and it works on the next attempt.  I see that in the changelog
for U3, too...  We'll get some U3 CDs burned and see how it works using that as
a base on the next machine deployment.
Comment 12 Jiri Pallich 2012-06-20 12:57:57 EDT
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.

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