Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1079438

Summary: spacewalk registration fails in version 2.1 for OpenVZ containers
Product: [Community] Spacewalk Reporter: Sebastian Trebitz <sebastian>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1CC: jmikulka, mzazrivec, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-17 08:41:01 UTC Type: Bug
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: 1119298    
Attachments:
Description Flags
patch file which fixes /usr/share/rhn/server/handlers/xmlrpc/registration.py as a workaround none

Description Sebastian Trebitz 2014-03-21 15:03:25 UTC
Created attachment 877328 [details]
patch file which fixes /usr/share/rhn/server/handlers/xmlrpc/registration.py as a workaround

Description of problem:

In OpenVZ containers the registration process fails. Both server and
client packages are in version 2.1. On the client I get:

UPDATING RHN_REGISTER/UP2DATE CONFIGURATION FILES
-------------------------------------------------
* downloading necessary files
  client_config_update.py...
  client-config-overrides.txt...
* running the update scripts
  . up2date config file
 
* importing organizational GPG key
 
* attempting to install corporate public CA cert
 
REGISTRATION
------------
* registering
lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
Error communicating with server. The message was:
Internal Server Error
 
*** Error: Registering the system failed.


On the server I see this in /var/log/httpd/error_log:
        
[Fri Mar 21 14:06:50 2014] [error] Exception Handler Information
[Fri Mar 21 14:06:50 2014] [error] Traceback (most recent call last):
[Fri Mar 21 14:06:50 2014] [error]   File
"/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py",
line 123, in call_function
[Fri Mar 21 14:06:50 2014] [error]     response = apply(func, params)
[Fri Mar 21 14:06:50 2014] [error]   File
"/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 509, in
new_system
[Fri Mar 21 14:06:50 2014] [error]     architecture, data)
[Fri Mar 21 14:06:50 2014] [error]   File
"/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 368, in
create_system
[Fri Mar 21 14:06:50 2014] [error]     parse_smbios(data['smbios'])
[Fri Mar 21 14:06:50 2014] [error]   File
"/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 69, in
parse_smbios
[Fri Mar 21 14:06:50 2014] [error]     elif manufacturer.startswith('Red
Hat') and product == 'OpenStack Nova' and uuid is not None:
[Fri Mar 21 14:06:50 2014] [error] AttributeError: 'NoneType' object has
no attribute 'startswith'
[Fri Mar 21 14:06:50 2014] [error]


Version-Release number of selected component (if applicable):
spacewalk-backend-xmlrpc-2.1.55-1.el6.noarch

How reproducible:
Every time when registering a CentOS 6.5 OpenVZ container image in spacewalk using the bootstrapscript.

Steps to Reproduce:
1. Create a OpenVZ conatiner using the template from: http://download.openvz.org/template/precreated/centos-6-x86_64.tar.gz
2. Configure the the conatiners network interface and hostname
3. Start the container
4. Install all pending CentOS updates and spacewalk client packages
5. Run the spacewalk bootstrap script

Actual results:
The registration fails with a python exception on the spacewalk server.


Expected results:
The registration succeeds


Additional info:
I attached a patch file for /usr/share/rhn/server/handlers/xmlrpc/registration.py which fixes this issue as a workaround but I assume that the quality of the patch does not match the developers expectation :-)

Comment 1 Tomas Lestach 2014-03-24 10:07:56 UTC
fix available in spacewalk.git:

* master: 323e5f2a84bc39b65dabaa26700e30a1d336cd5c
* SPACEWALK-2.1: 62575617ed92c58b0a8e77d2b3c8ad7c7cd0baa8

Comment 2 Milan Zázrivec 2014-07-17 08:41:01 UTC
Spacewalk 2.2 has been released:

    https://fedorahosted.org/spacewalk/wiki/ReleaseNotes22