Bug 1602066 - ironic node-list fails with __init__() got an unexpected keyword argument 'cafile'
Summary: ironic node-list fails with __init__() got an unexpected keyword argument 'ca...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-ironicclient
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: z2
: 15.0 (Stein)
Assignee: Steve Baker
QA Contact: mlammon
URL:
Whiteboard:
: 1653349 1667541 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-17 18:00 UTC by Marius Cornea
Modified: 2020-03-05 11:54 UTC (History)
10 users (show)

Fixed In Version: python-ironicclient-2.7.3-0.20200116080442.0bd26cc.el8ost
Doc Type: Bug Fix
Doc Text:
Previously, unsupported cert arguments (cafile, certfile, keyfile) were used to create the CLI session for deprecated ironic commands and the commands failed. With this update, the correct arguments are used and all deprecated ironic commands function correctly.
Clone Of:
Environment:
Last Closed: 2020-03-05 11:54:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 689662 0 'None' MERGED fix session cert arguments 2020-02-19 23:29:16 UTC
Red Hat Product Errata RHBA-2020:0715 0 None None None 2020-03-05 11:54:27 UTC

Description Marius Cornea 2018-07-17 18:00:45 UTC
Description of problem:

ironic node-list fails with __init__() got an unexpected keyword argument 'cafile'

Version-Release number of selected component (if applicable):
(undercloud) [stack@undercloud-0 ~]$ rpm -qa | grep ironic
puppet-ironic-13.1.1-0.20180709144235.f792496.el7ost.noarch
python2-ironic-inspector-client-3.2.0-0.20180529111245.6048afc.el7ost.noarch
python2-ironicclient-2.4.0-0.20180626143850.a49938d.el7ost.noarch


How reproducible:
100%

Steps to Reproduce:
1. Deploy OSP14 undercloud
2. Run ironic node-list

Actual results:
(undercloud) [stack@undercloud-0 ~]$ ironic node-list
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
__init__() got an unexpected keyword argument 'cafile'

Expected results:
No errors.

Additional info:
Unified CLI works fine:
(undercloud) [stack@undercloud-0 ~]$ openstack baremetal node list
+--------------------------------------+--------------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name         | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+--------------+---------------+-------------+--------------------+-------------+
| 5ce20d5d-c490-4582-be98-0f6639f69771 | compute-0    | None          | power off   | available          | False       |
| a779580a-a576-4fe3-b530-36509a715e7c | controller-0 | None          | power off   | available          | False       |
+--------------------------------------+--------------+---------------+-------------+--------------------+-------------+

Comment 1 Bob Fournier 2018-07-18 18:26:25 UTC
Marius - is there a stack trace in /var/log/ironic/ and, if so, can you include it?

Comment 2 Marius Cornea 2018-07-18 18:31:05 UTC
I couldn't find anything in the logs related to this, from what I can tell it's strictly client side:

(undercloud) [stack@undercloud-0 ~]$ ironic --debug node-list
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
DEBUG (extension:189) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG (extension:189) found extension EntryPoint.parse('none = keystoneauth1.loading._plugins.noauth:NoAuth')
DEBUG (extension:189) found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1')
DEBUG (extension:189) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG (extension:189) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3adfspassword = keystoneauth1.extras._saml2._loading:ADFSPassword')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG (extension:189) found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos')
DEBUG (extension:189) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials')
DEBUG (extension:189) found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth')
DEBUG (extension:189) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:189) found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP')
DEBUG (extension:189) found extension EntryPoint.parse('v3applicationcredential = keystoneauth1.loading._plugins.identity.v3:ApplicationCredential')
DEBUG (extension:189) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos')
DEBUG (extension:189) found extension EntryPoint.parse('v1password = swiftclient.authv1:PasswordLoader')
DEBUG (extension:189) found extension EntryPoint.parse('noauth = cinderclient.contrib.noauth:CinderNoAuthLoader')
DEBUG (extension:189) found extension EntryPoint.parse('token_endpoint = openstackclient.api.auth_plugin:TokenEndpoint')
DEBUG (extension:189) found extension EntryPoint.parse('aodh-noauth = aodhclient.noauth:AodhNoAuthLoader')
__init__() got an unexpected keyword argument 'cafile'

Comment 3 Dmitry Tantsur 2018-08-14 13:26:10 UTC
Hi!

I don't have your version, but I tried both python2-ironicclient-2.3.0-0.20180315153520.964556b and python2-ironicclient-2.5.0-0.20180806095605.fb94fb8 from RDO and I could not see this problem.

Given the debug log, I suspect there may be an issue with another client. This is how extensions log looks for me:

DEBUG (extension:189) found extension EntryPoint.parse('noauth = cinderclient.contrib.noauth:CinderNoAuthLoader')
DEBUG (extension:189) found extension EntryPoint.parse('aodh-noauth = aodhclient.noauth:AodhNoAuthLoader')
DEBUG (extension:189) found extension EntryPoint.parse('gnocchi-basic = gnocchiclient.auth:GnocchiBasicLoader')
DEBUG (extension:189) found extension EntryPoint.parse('gnocchi-noauth = gnocchiclient.auth:GnocchiNoAuthLoader')
DEBUG (session:448) REQ: curl -g -i -X GET http://192.168.24.1:5000/ -H "Accept: application/json" -H "User-Agent: ironic keystoneauth1/3.7.0 python-requests/2.14.2 CPython/2.7.5"

Is it possible something is wrong with aodhclient or gnocchiclient? Does uninstalling or upgrading either of them help?

Comment 4 Marius Cornea 2018-08-20 11:36:02 UTC
(In reply to Dmitry Tantsur from comment #3)
> Hi!
> 
> I don't have your version, but I tried both
> python2-ironicclient-2.3.0-0.20180315153520.964556b and
> python2-ironicclient-2.5.0-0.20180806095605.fb94fb8 from RDO and I could not
> see this problem.
> 
> Given the debug log, I suspect there may be an issue with another client.
> This is how extensions log looks for me:
> 
> DEBUG (extension:189) found extension EntryPoint.parse('noauth =
> cinderclient.contrib.noauth:CinderNoAuthLoader')
> DEBUG (extension:189) found extension EntryPoint.parse('aodh-noauth =
> aodhclient.noauth:AodhNoAuthLoader')
> DEBUG (extension:189) found extension EntryPoint.parse('gnocchi-basic =
> gnocchiclient.auth:GnocchiBasicLoader')
> DEBUG (extension:189) found extension EntryPoint.parse('gnocchi-noauth =
> gnocchiclient.auth:GnocchiNoAuthLoader')
> DEBUG (session:448) REQ: curl -g -i -X GET http://192.168.24.1:5000/ -H
> "Accept: application/json" -H "User-Agent: ironic keystoneauth1/3.7.0
> python-requests/2.14.2 CPython/2.7.5"
> 
> Is it possible something is wrong with aodhclient or gnocchiclient? Does
> uninstalling or upgrading either of them help?

Looks like issue is not present in the latest puddle anymore so I'm closing this issue.

Comment 5 wasantha gamage 2019-02-07 17:11:43 UTC
I still see this in latest RHOSP 14,

(undercloud) [stack@undercloud ~]$ ironic node-list
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
__init__() got an unexpected keyword argument 'cafile'
(undercloud) [stack@undercloud ~]$ rpm -qa | grep -i ronic
python2-ironic-inspector-client-3.3.0-0.20180810080932.53bf4e8.el7ost.noarch
puppet-ironic-13.3.1-0.20181013115250.el7ost.noarch
python2-ironicclient-2.5.0-0.20180810135843.fb94fb8.el7ost.noarch
(undercloud) [stack@undercloud ~]$ 
(undercloud) [stack@undercloud ~]$ ironic --debug node-list
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
DEBUG (extension:189) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG (extension:189) found extension EntryPoint.parse('none = keystoneauth1.loading._plugins.noauth:NoAuth')
DEBUG (extension:189) found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1')
DEBUG (extension:189) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG (extension:189) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3adfspassword = keystoneauth1.extras._saml2._loading:ADFSPassword')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG (extension:189) found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos')
DEBUG (extension:189) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:189) found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials')
DEBUG (extension:189) found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth')
DEBUG (extension:189) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:189) found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP')
DEBUG (extension:189) found extension EntryPoint.parse('v3applicationcredential = keystoneauth1.loading._plugins.identity.v3:ApplicationCredential')
DEBUG (extension:189) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG (extension:189) found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos')
DEBUG (extension:189) found extension EntryPoint.parse('v1password = swiftclient.authv1:PasswordLoader')
DEBUG (extension:189) found extension EntryPoint.parse('noauth = cinderclient.contrib.noauth:CinderNoAuthLoader')
DEBUG (extension:189) found extension EntryPoint.parse('token_endpoint = openstackclient.api.auth_plugin:TokenEndpoint')
DEBUG (extension:189) found extension EntryPoint.parse('aodh-noauth = aodhclient.noauth:AodhNoAuthLoader')
DEBUG (extension:189) found extension EntryPoint.parse('gnocchi-basic = gnocchiclient.auth:GnocchiBasicLoader')
DEBUG (extension:189) found extension EntryPoint.parse('gnocchi-noauth = gnocchiclient.auth:GnocchiNoAuthLoader')
__init__() got an unexpected keyword argument 'cafile'

Comment 6 Bob Fournier 2019-02-07 18:44:46 UTC
*** Bug 1653349 has been marked as a duplicate of this bug. ***

Comment 7 Dmitry Tantsur 2019-04-11 10:43:13 UTC
I think we've seen upstream reports as well, so this may be a valid bug. But given that the `ironic` CLI is deprecated, I'm lowering the priority.

Comment 8 Dmitry Tantsur 2019-04-11 10:55:09 UTC
*** Bug 1667541 has been marked as a duplicate of this bug. ***

Comment 9 Steve Baker 2019-10-20 21:51:46 UTC
I can reproduce this on a pip installed python-ironicclient-2.4.0, investigating now

Comment 12 Steve Baker 2019-10-21 01:26:33 UTC
I've proposed a fix in stable/rocky and stable/stein upstream

This fix can be pulled into rhos/rhos-15.0-patches but there doesn't seem to be a rhos/rhos-14.0-patches branch, which is needed to fix the version this bz is filed against.

Comment 15 Bob Fournier 2019-10-23 12:24:07 UTC
Retargeting this to OSP-15 as OSP-14 EOL is in Jan. 2020 and this is low priority.

Comment 17 Bob Fournier 2020-02-19 23:28:58 UTC
Works now...

(undercloud) [stack@undercloud-0 ~]$ ironic node-list
The "ironic" CLI is deprecated and will be removed in the S* release. Please use the "openstack baremetal" CLI instead.
/usr/lib/python3.6/site-packages/urllib3/connection.py:362: SubjectAltNameWarning: Certificate for 192.168.24.2 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
/usr/lib/python3.6/site-packages/urllib3/connection.py:362: SubjectAltNameWarning: Certificate for 192.168.24.2 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
+--------------------------------------+--------------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name         | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+--------------+---------------+-------------+--------------------+-------------+
| 47277b39-a07c-4fc5-8884-c37090653a33 | ceph-0       | None          | power on    | available          | False       |
| 63a2e165-ce45-449c-bc46-b2fd25fabe4a | ceph-1       | None          | power on    | available          | False       |
| 4861a6bb-2c79-408e-aa7e-be5fd0499e7a | ceph-2       | None          | power on    | available          | False       |
| 67748543-2f8c-458d-aa1e-54453cd125b4 | compute-0    | None          | power on    | available          | False       |
| b492f55c-90c1-476c-a7e2-71a63e5cf472 | compute-1    | None          | power on    | available          | False       |
| 66de0c14-7722-45f5-a706-b1946d807f91 | controller-0 | None          | power on    | available          | False       |
| 039e55d6-175b-4940-9682-990b4867c948 | controller-1 | None          | power on    | available          | False       |
| fb273682-00ca-49b2-8682-d8149378009b | controller-2 | None          | power on    | available          | False       |
+--------------------------------------+--------------+---------------+-------------+--------------------+-------------+

(undercloud) [stack@undercloud-0 ~]$ 
()[ironic@undercloud-0 /]$ rpm -qa | grep ironic
python3-ironic-lib-2.16.3-0.20190607070401.eca4ac9.el8ost.noarch
python3-ironicclient-2.7.3-0.20200116080442.0bd26cc.el8ost.noarch
puppet-ironic-14.4.1-0.20191008010416.987a46a.el8ost.noarch
python3-ironic-inspector-client-3.5.0-0.20190313131319.9bb1150.el8ost.noarch
openstack-ironic-common-12.1.4-0.20200103210507.fcd4da0.el8ost.noarch
openstack-ironic-staging-drivers-0.11.1-0.20191023080430.ab5bb1d.el8ost.noarch
openstack-ironic-conductor-12.1.4-0.20200103210507.fcd4da0.el8ost.noarch

Comment 20 errata-xmlrpc 2020-03-05 11:54:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0715


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