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 1404102 - __init__.py:237 (login_koji_session): AttributeError: 'module' object has no attribute 'ssl'
Summary: __init__.py:237 (login_koji_session): AttributeError: 'module' object has no ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpkg
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: cqi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-13 05:04 UTC by Pavel Raiskup
Modified: 2017-01-07 00:21 UTC (History)
7 users (show)

Fixed In Version: rpkg-1.47-7.fc25 rpkg-1.47-7.fc24 rpkg-1.47-7.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-06 21:49:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pavel Raiskup 2016-12-13 05:04:19 UTC
Based on $Sumary, it looks rpkg tries to tell me that the certificate
was revoked (or some genric ssl issue), but it outputs this cryptic
message instead.

Comment 1 cqi 2016-12-13 05:13:37 UTC
What versions of pyrpkg, fedpkg and koji are you using?

If you are using fedpkg-1.26-3.fc25 and rpkg-1.47-5.fc25, then koji-1.11.0-1.fc24.noarch must be used. The infra including Koji and pkgs has moved to kerberos authentication already.

Comment 2 Pavel Raiskup 2016-12-13 05:27:12 UTC
$ rpm -q fedpkg rpkg koji
fedpkg-1.26-3.fc25.noarch
rpkg-1.47-5.fc25.noarch
koji-1.11.0-1.fc25.noarch

Full error:
Creating repo object from /home/praiskup/rh/packages/PyGreSQL/fedora
Initiating a koji session to http://koji.fedoraproject.org/kojihub
Could not execute build: 'module' object has no attribute 'ssl'
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 16, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/fedpkg/__main__.py", line 77, in main
    sys.exit(client.args.command())
  File "/usr/lib/python2.7/site-packages/pyrpkg/cli.py", line 988, in build
    sets, nvr_check)
  File "/usr/lib/python2.7/site-packages/pyrpkg/__init__.py", line 1880, in build
    build_target = self.kojisession.getBuildTarget(self.target)
  File "/usr/lib/python2.7/site-packages/pyrpkg/__init__.py", line 216, in kojisession
    self.load_kojisession()
  File "/usr/lib/python2.7/site-packages/fedpkg/__init__.py", line 314, in load_kojisession
    return super(Commands, self).load_kojisession(anon)
  File "/usr/lib/python2.7/site-packages/pyrpkg/__init__.py", line 381, in load_kojisession
    self.login_koji_session(koji_config, self._kojisession)
  File "/usr/lib/python2.7/site-packages/pyrpkg/__init__.py", line 330, in login_koji_session
    except koji.ssl.SSLCommon.SSL.Error as error:
AttributeError: 'module' object has no attribute 'ssl'

Comment 3 Pavel Raiskup 2016-12-13 05:33:52 UTC
$ klist
Ticket cache: DIR::/var/tmp/krb5cc_dir_17122/tktMPcvBU
Default principal: praiskup

Valid starting       Expires              Service principal
12/13/2016 06:32:20  12/14/2016 06:32:20  krbtgt/FEDORAPROJECT.ORG
        renew until 12/20/2016 06:32:17

Comment 4 cqi 2016-12-13 05:44:56 UTC
cat /etc/koji.conf

authtype should be kerberos

Check if there is /etc/koji.conf.rpmnew. If there is, rename it to /etc/koji.conf. Because, there is krb_rdns that is also required.

Comment 5 Pavel Raiskup 2016-12-13 06:06:33 UTC
I added those two params and the 'fedpkg build' command started to hang.

So I needed to switch from 'http' to 'https' in 'weburl' and 'server'
arguments.  And now it seems to work, thanks a lot, it helped!

Still, can we have better error reporting -> clear failure for 'http'
protocol, and clear error message for $Summary?

Comment 6 cqi 2016-12-13 06:17:45 UTC
> Still, can we have better error reporting -> clear failure for 'http'
protocol, and clear error message for $Summary?

Sure. This will be improved.

Comment 7 Marcin Zajaczkowski 2016-12-15 01:06:30 UTC
Sorry for hijacking this bug report - if you feel this is an another issue I can create a new one.

After upgrading to koji-1.11.0-1.fc25.noarch I started to have the error from a summary - "... no attribute 'ssl'". I changed authentication to Kerberos, however, I don't have Kerberos configured.

> $ fedpkg build
> Could not execute build: (-1765328189, 'No credentials cache found')

> $ klist
> klist: Credentials cache keyring 'persistent:1000:1000' not found

Unfortunately, I haven't found information how to configure it. Both https://fedoraproject.org/wiki/Using_the_Koji_build_system and https://docs.pagure.org/koji/server_howto/#setting-up-kerberos-for-authentication doesn't precise it.

I tried with `fedora-packager-setup`, but it only setups SSL certificates.

Q1. Is there documentation how to configure Kerberos to work with Koji?
Q2. Is SSL/TLS certificates still supported in koji-1.11.0-1?

Comment 8 cqi 2016-12-15 06:31:19 UTC
Patch: https://pagure.io/rpkg/pull-request/175

Comment 9 Lubomír Sedlář 2016-12-15 06:47:52 UTC
Marcin, take a look at this page for more information about Kerberos for Fedora Infrastructure.
https://fedoraproject.org/wiki/Infrastructure/Kerberos

Comment 10 Marcin Zajaczkowski 2016-12-15 09:48:57 UTC
Thanks Lubomir for a tip. It helped. In addition it seems that I missed the mail "Packagers - Flag day 2016 Important changes" explaining it precisely...

Nevertheless maybe it would be good to enhance `fedora-packager-setup` to detect and at least notify about missing Kerberos token?

Comment 11 cqi 2016-12-15 09:58:32 UTC
I think fedpkg could be do better. It is capable of supporting the detection of whether credential cache has Fedora specific credential. If there is no, fedpkg could warn user with a clear message, e.g. "No credential got from Fedora."

Comment 12 Fedora Update System 2016-12-16 11:56:45 UTC
rpkg-1.47-6.fc25 fedpkg-1.26-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-730ed750f8

Comment 13 Fedora Update System 2016-12-16 11:58:52 UTC
fedpkg-1.26-4.fc24 rpkg-1.47-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1146121922

Comment 14 Fedora Update System 2016-12-16 12:02:32 UTC
fedpkg-1.26-4.el7 rpkg-1.47-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 15 Fedora Update System 2016-12-16 12:02:48 UTC
fedpkg-1.26-4.el7 rpkg-1.47-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 16 Fedora Update System 2016-12-17 00:51:52 UTC
fedpkg-1.26-4.el7, rpkg-1.47-6.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 17 Fedora Update System 2016-12-17 01:37:53 UTC
fedpkg-1.26-4.fc25, rpkg-1.47-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-730ed750f8

Comment 18 Fedora Update System 2016-12-19 15:22:52 UTC
fedpkg-1.26-4.el7 rpkg-1.47-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 19 Fedora Update System 2016-12-19 15:23:06 UTC
fedpkg-1.26-4.fc25 rpkg-1.47-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-730ed750f8

Comment 20 Fedora Update System 2016-12-19 20:59:34 UTC
fedpkg-1.26-4.fc24, rpkg-1.47-6.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1146121922

Comment 21 Fedora Update System 2016-12-20 08:52:09 UTC
fedpkg-1.26-4.el7, rpkg-1.47-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-14415f0f51

Comment 22 Fedora Update System 2016-12-20 09:22:37 UTC
fedpkg-1.26-4.fc25, rpkg-1.47-7.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-730ed750f8

Comment 23 Fedora Update System 2016-12-20 17:21:40 UTC
fedpkg-1.26-4.fc25, rpkg-1.47-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2016-12-21 10:54:12 UTC
fedpkg-1.26-4.fc24 rpkg-1.47-7.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1146121922

Comment 25 Fedora Update System 2016-12-21 15:48:36 UTC
fedpkg-1.26-4.fc24, rpkg-1.47-7.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1146121922

Comment 26 Fedora Update System 2017-01-06 21:49:35 UTC
fedpkg-1.26-4.fc24, rpkg-1.47-7.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2017-01-07 00:21:46 UTC
fedpkg-1.26-4.el7, rpkg-1.47-7.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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