Bug 1309337 - SW nightly: rhnreg_ks doesn't work with activation key
Summary: SW nightly: rhnreg_ks doesn't work with activation key
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 2.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: spacewalk-review space27
TreeView+ depends on / blocked
 
Reported: 2016-02-17 14:03 UTC by Pavel Studeník
Modified: 2017-09-28 18:06 UTC (History)
4 users (show)

Fixed In Version: spacewalk-backend-2.5.26-1
Clone Of:
Environment:
Last Closed: 2016-06-16 07:34:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Pavel Studeník 2016-02-17 14:03:16 UTC
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 12:41:01 UTC
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 13:07:16 UTC
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 13:38:08 UTC
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 12:03:50 UTC
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 15:49:55 UTC
fixed in spacewalk master:

3ba4d5bc30f337f4cba25d0a984e94ffa45f2568

Comment 6 Jan Dobes 2016-03-18 15:51:11 UTC
Pavel, could you verify it's fixed in spacewalk-backend-2.5.26-1 ? Thank you.

Comment 7 Pavel Studeník 2016-05-02 15:29:45 UTC
Verified with spacewalk-backend-2.5.36-1.el6.noarch

Comment 8 Tomáš Kašpárek 2016-06-16 07:34:31 UTC
Spacewalk 2.5 was released.

Comment 9 Eric Herget 2017-09-28 18:06:42 UTC
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.