Bug 1409333
Summary: | dnf-plugins/spacewalk.py - TypeError: argument of type 'NoneType' is not iterable | ||
---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | Fermulator <redhat-bugzilla> |
Component: | Clients | Assignee: | Tomáš Kašpárek <tkasparek> |
Status: | CLOSED DUPLICATE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.6 | CC: | ogajduse |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-06-13 17:49:42 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: | 1484117 |
Description
Fermulator
2016-12-31 21:29:51 UTC
DNF plugin package versions may also be needed $ rpm -qa | grep dnf | grep plugin python2-dnf-plugins-core-0.1.21-3.fc24.noarch dnf-plugin-system-upgrade-0.7.1-3.fc24.noarch python3-dnf-plugins-core-0.1.21-3.fc24.noarch python-dnf-plugins-extras-migrate-0.0.12-3.fc24.noarch dnf-plugins-core-0.1.21-3.fc24.noarch python-dnf-plugins-extras-common-0.0.12-3.fc24.noarch python3-dnf-plugin-system-upgrade-0.7.1-3.fc24.noarch python2-dnf-plugin-system-upgrade-0.7.1-3.fc24.noarch dnf-plugin-spacewalk-2.6.3-1.fc24.noarch Also of note, w.r.t. the failed dnf update and administrator pushed packages -- once the client re-enabled the local fedora-updates.repo, (rather than relying on the spacewalk server for packages), the update is successful. So this is isolated down to the Python bug as noted above. This /could/ be the same as https://bugzilla.redhat.com/show_bug.cgi?id=1331494#c12. That bug report, while not initially about that issue, eventually led to it. This is the code in the dnf-plugins/spacewalk.py {{{ def add_http_headers(self, handle): http_headers = [] for header in self.needed_headers: if not header in self.login_info: error = MISSING_HEADER % header raise dnf.Error.RepoError(error) if self.login_info[header] in (None, ''): # This doesn't work due to bug in librepo (or even deeper in libcurl) # the workaround bellow can be removed once BZ#1211662 is fixed #http_headers.append("%s;" % header) http_headers.append("%s: \nX-libcurl-Empty-Header-Workaround: *" % header) else: http_headers.append("%s: %s" % (header, self.login_info[header])) if not self.force_http: http_headers.append("X-RHN-Transport-Capability: follow-redirects=3") if http_headers: handle.setopt(librepo.LRO_HTTPHEADER, http_headers) }}} Note sure as of yet what the issue is. Need to understand what the importance of "login_info" is. (I tried augmenting and ultimately removing the code surrounding it -- the for loop: "for header in self.needed_headers" -- but ended up hitting other error conditions). It's clear that login_info is initialized to "None" in activate_channels(). Then it tries to populate it via the up2date information: {{{ try: login_info = up2date_client.up2dateAuth.getLoginInfo(timeout=self.conf.timeout) except up2dateErrors.RhnServerException as e: logger.error("%s\n%s\n%s", COMMUNICATION_ERROR, RHN_DISABLED, e) return if not login_info: logger.error("%s\n%s", NOT_REGISTERED_ERROR, RHN_DISABLED) self._write_channels_file({}) return }}} For my client system, I don't have any login information defined ... is it required? {{{ $ sudo cat /etc/sysconfig/rhn/up2date | grep -i login }}} Reproducer and the results are exactly the same as in the BZ#1331494 The fix is available in the nightly repository. *** This bug has been marked as a duplicate of bug 1331494 *** This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug. |