Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1079438 - spacewalk registration fails in version 2.1 for OpenVZ containers
Summary: spacewalk registration fails in version 2.1 for OpenVZ containers
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.1
Hardware: noarch
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space22
TreeView+ depends on / blocked
 
Reported: 2014-03-21 15:03 UTC by Sebastian Trebitz
Modified: 2014-07-17 08:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-17 08:41:01 UTC
Embargoed:


Attachments (Terms of Use)
patch file which fixes /usr/share/rhn/server/handlers/xmlrpc/registration.py as a workaround (deleted)
2014-03-21 15:03 UTC, Sebastian Trebitz
no flags Details | Diff

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


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