rax-maas / rackspace-monitoring-cli

Command line utility for Rackspace Cloud Monitoring (MaaS).
49 stars 18 forks source link

CA_CERTS_PATH in apache-libcloud==2.0.0 now NoneType (from List) #87

Closed komish closed 5 years ago

komish commented 7 years ago

Version Affected

rackspace-monitoring (0.7.1)
rackspace-monitoring-cli (0.7.2)
requests (2.14.2)

Relevant Error/Traceback

$ raxmon-notification-plans-list
Traceback (most recent call last):
  File "/usr/local/bin/raxmon-notification-plans-list", line 17, in <module>
    from raxmon_cli.common import run_action
  File "/usr/local/lib/python2.7/site-packages/raxmon_cli/common.py", line 35, in <module>
    libcloud.security.CA_CERTS_PATH.insert(0, CA_CERT_PATH)
AttributeError: 'NoneType' object has no attribute 'insert'

Summary

The package apache-libcloud==2.0.0 here now initializes CA_CERTS_PATH as a NoneType as opposed to previous versions (namely apache-libcloud==1.5.0 here) which initializes this as a list with pre-configured values.

The commit message here justifies that change by indicating that the system CAs should be pulled in from certifi provided by requests but I was unable to import certifi (standalone or from requests) without first pip installing certifi. Perhaps certifi needs to be added as a dependency?

It should be noted that when I installed certifi manually, the format of CA_CERTS_PATH was a string so .insert() and .append() methods still failed. Seems like this line in apache-libcloud needed to be brought up one level of indentation but I'm not positive and could use a second set of eyes before pursuing a bug report there.

Workaround

In the interim, rolling back apache-libcloud==1.5.0 seems to do the trick.

Related

This pull request converts the .insert() to a .append() which should also be affected.

hughsaunders commented 7 years ago

Similar issue in rackspace-monitoring: https://github.com/racker/rackspace-monitoring/issues/53

komish commented 6 years ago

With the merge of racker/rackspace-monitoring#54 - can this be closed?