Bug 1309337 - SW nightly: rhnreg_ks doesn't work with activation key
SW nightly: rhnreg_ks doesn't work with activation key
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
2.4
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Dobes
Red Hat Satellite QA List
:
Depends On:
Blocks: spacewalk-review space27
  Show dependency treegraph
 
Reported: 2016-02-17 09:03 EST by Pavel Studeník
Modified: 2017-09-28 14:06 EDT (History)
4 users (show)

See Also:
Fixed In Version: spacewalk-backend-2.5.26-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-16 03:34:31 EDT
Type: Bug
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 Pavel Studeník 2016-02-17 09:03:16 EST
Description of problem:
I can't register system with Fedora 23 to spacewalk.

Version-Release number of selected component (if applicable):
>> rpm -qf /usr/sbin/rhnreg_ks
rhn-setup-2.5.11-1.fc23.noarch

How reproducible:
only Fedora 23 issue

Actual results:

>> rhnreg_ks --activationkey=1-d2b0a549059aa6933f2e8c6434a3f48d --force --profilename='test'
...
D: opening  db index       /var/lib/rpm/Providename 0x400 mode=0x0
D: rpcServer: Calling XMLRPC registration.upgrade_version
A protocol error occurred: Internal Server Error , attempt #1,
rhn-plugin: Error communicating with server. The message was:
Internal Server Error

# tail /var/log/rhn/rhn_server_xmlrpc.log 
2016/02/17 13:57:43 -04:00 5834 2620:52:0:1040:a6ba:dbff:fe33:77b1: server/apacheRequest.call_function('ERROR', 'Unhandled exception', AttributeError("Server instance has no attribute 'virt_uuid'",))


Additional info:
some situation with parameter --novirtinfo

>> rhnreg_ks --activationkey=1-d2b0a549059aa6933f2e8c6434a3f48d --force --profilename='test'  --novirtinfo
..
D: rpcServer: Calling XMLRPC registration.upgrade_version
A protocol error occurred: Internal Server Error , attempt #1,
rhn-plugin: Error communicating with server. The message was:
Internal Server Error
Comment 1 Pavel Studeník 2016-03-10 07:41:01 EST
I added traceaback from dnf-plugin-spacewalk

# dnf repolist
Traceback (most recent call last):
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 214, in doCall
    ret = method(*args, **kwargs)
  File "/usr/lib64/python3.4/xmlrpc/client.py", line 1098, in __call__
    return self.__send(self.__name, args)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 48, in _request1
    ret = self._request(methodname, params)
  File "/usr/lib/python3.4/site-packages/rhn/rpclib.py", line 394, in _request
    self._handler, request, verbose=self._verbose)
  File "/usr/lib/python3.4/site-packages/rhn/transports.py", line 177, in request
    headers, fd = req.send_http(host, handler)
  File "/usr/lib/python3.4/site-packages/rhn/transports.py", line 736, in send_http
    response.status, response.reason, response.msg)
xmlrpc.client.ProtocolError: <ProtocolError for hp-dl120g5-01.rhts.eng.bos.redhat.com /XMLRPC: 500 Internal Server Error>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/dnf-plugins/spacewalk.py", line 102, in activate_channels
    login_info = up2date_client.up2dateAuth.getLoginInfo(timeout=self.conf.timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 229, in getLoginInfo
    login(timeout=timeout)
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 193, in login
    maybeUpdateVersion()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 51, in maybeUpdateVersion
    newSystemId = s.registration.upgrade_version(getSystemId(), systemVer)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 67, in __call__
    return rpcServer.doCall(method, *args, **kwargs)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 290, in doCall
    raise_with_tb(up2dateErrors.CommunicationError(e.errmsg))
  File "/usr/lib/python3.4/site-packages/rhn/tb.py", line 25, in raise_with_tb
    raise e
up2date_client.up2dateErrors.CommunicationError: rhn-plugin: Error communicating with server. The message was:
Internal Server Error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 93, in _main
    cli.configure(list(map(ucd, args)))
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1044, in configure
    self.base.plugins.run_config()
  File "/usr/lib/python3.4/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python3.4/site-packages/dnf/util.py", line 157, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python3.4/site-packages/dnf-plugins/spacewalk.py", line 83, in config
    self.activate_channels(self.cli.demands.sack_activation)
  File "/usr/lib/python3.4/site-packages/dnf-plugins/spacewalk.py", line 105, in activate_channels
    ustr(e))
  File "/usr/lib/python3.4/site-packages/rhn/i18n.py", line 32, in ustr
    return str(obj, 'utf8', errors='ignore')
TypeError: coercing to str: need a bytes-like object, CommunicationError found
Comment 2 Pavel Studeník 2016-03-10 08:07:16 EST
Registration looks complete, but I found only one interesting thing. The information about network interfaces are missing.

Primary network interface: (empty)

The problem exists only on Spacewalk Nightly and Fedora 23

python3-hwdata-1.10.1-4.fc23.noarch
hwdata-0.286-1.fc23.noarch
python-hwdata-1.10.1-4.fc23.noarch
Comment 3 Jan Dobes 2016-03-14 09:38:08 EDT
Pavel, could you try to register system with spacewalk-backend 2.5.12 version on server?

https://koji.spacewalkproject.org/koji/taskinfo?taskID=200751
Comment 4 Pavel Studeník 2016-03-16 08:03:50 EDT
I tried to register system to Satellite 5.7 and it works correctly without error.

Packages from Comment 3 work good as well. It looks that problem is backend.

spacewalk-backend-2.5.12-1.git.0.73d1c32.fc23.noarch
Comment 5 Jan Dobes 2016-03-18 11:49:55 EDT
fixed in spacewalk master:

3ba4d5bc30f337f4cba25d0a984e94ffa45f2568
Comment 6 Jan Dobes 2016-03-18 11:51:11 EDT
Pavel, could you verify it's fixed in spacewalk-backend-2.5.26-1 ? Thank you.
Comment 7 Pavel Studeník 2016-05-02 11:29:45 EDT
Verified with spacewalk-backend-2.5.36-1.el6.noarch
Comment 8 Tomáš Kašpárek 2016-06-16 03:34:31 EDT
Spacewalk 2.5 was released.
Comment 9 Eric Herget 2017-09-28 14:06:42 EDT
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.

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