You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by GitBox <gi...@apache.org> on 2022/03/05 12:07:57 UTC

[GitHub] [libcloud] LanderOtto opened a new issue #1659: Missing parameter in a OpenStack Connection class

LanderOtto opened a new issue #1659:
URL: https://github.com/apache/libcloud/issues/1659


   
   I am using Openstack with Application Credential. 
   Running a simple code like this
   
   ```python
   Driver = get_driver(Provider.OPENSTACK)
   conn = Driver(ID, SECRET, ex_force_auth_url=ADDRESS, ex_force_auth_version= '3.x_appcred')
   print(conn.list_images())
   ```
   
   libcloud throws this exception
   ```
   Traceback (most recent call last):
     File "test.py", line 17, in <module>
       list_images = conn.list_images()
     File "/usr/local/lib/python3.8/dist-packages/libcloud/compute/drivers/openstack.py", line 438, in list_images
       self.connection.request('/images/detail').object, ex_only_active)
     File "/usr/local/lib/python3.8/dist-packages/libcloud/common/openstack.py", line 245, in request
       return super().request(action=action, params=params, data=data,
     File "/usr/local/lib/python3.8/dist-packages/libcloud/common/base.py", line 567, in request
       action = self.morph_action_hook(action)
     File "/usr/local/lib/python3.8/dist-packages/libcloud/common/openstack.py", line 319, in morph_action_hook
       self._populate_hosts_and_request_paths()
     File "/usr/local/lib/python3.8/dist-packages/libcloud/common/openstack.py", line 332, in _populate_hosts_and_request_paths
       osa = self.get_auth_class()
     File "/usr/local/lib/python3.8/dist-packages/libcloud/common/openstack.py", line 220, in get_auth_class
       self._osa = cls(auth_url=auth_url,
   TypeError: __init__() got an unexpected keyword argument 'auth_cache'
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] Kami commented on issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1659:
URL: https://github.com/apache/libcloud/issues/1659#issuecomment-1059765970


   I was able to confirm and reproduce the issue locally (and the proposed fix indeed appears to be working, but I didn't test it end to end).
   
   It looks like the reason why this issue hasn't been caught is because there are no unit tests which directly instantiate the driver with ``3.x_appcred`` auth method.
   
   So we need to make sure we add some tests for that as well.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] Kami commented on issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1659:
URL: https://github.com/apache/libcloud/issues/1659#issuecomment-1059768215


   I tried to look into a quick fix, but it looks like it may be involved since it appears #1557 introduced another inadvertent regression related to ``tenant_domain_id``:
   
   ```bash
   ======================================================================
   ERROR: test_ex_force_auth_version_all_possible_values (libcloud.test.compute.test_openstack.OpenStack_1_1_Auth_2_0_Tests)
   ----------------------------------------------------------------------
   Traceback (most recent call last):
     File "/home/kami/w/libcloud/libcloud/libcloud/test/compute/test_openstack.py", line 3997, in test_ex_force_auth_version_all_possible_values
       list_images = driver.list_images()
     File "/home/kami/w/libcloud/libcloud/libcloud/compute/drivers/openstack.py", line 457, in list_images
       self.connection.request("/images/detail").object, ex_only_active
     File "/home/kami/w/libcloud/libcloud/libcloud/common/openstack.py", line 276, in request
       raw=raw,
     File "/home/kami/w/libcloud/libcloud/libcloud/common/base.py", line 603, in request
       action = self.morph_action_hook(action)
     File "/home/kami/w/libcloud/libcloud/libcloud/common/openstack.py", line 353, in morph_action_hook
       self._populate_hosts_and_request_paths()
     File "/home/kami/w/libcloud/libcloud/libcloud/common/openstack.py", line 366, in _populate_hosts_and_request_paths
       osa = self.get_auth_class()
     File "/home/kami/w/libcloud/libcloud/libcloud/common/openstack.py", line 253, in get_auth_class
       auth_cache=self._ex_auth_cache,
   TypeError: __init__() got an unexpected keyword argument 'tenant_domain_id'
   ```
   
   Having said that, we should still start with (failing) unit tests - I will try to push those a bit later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] Kami commented on issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1659:
URL: https://github.com/apache/libcloud/issues/1659#issuecomment-1059816733


   I believe #1660 should fix this issue, @LanderOtto can you please verify?
   
   Sadly OpenStack code is a bit convoluted so it took longer than I would have liked to get everything working (and there was / is some cross test pollution which resulted in some failures which took a while to track down).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] LanderOtto closed issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
LanderOtto closed issue #1659:
URL: https://github.com/apache/libcloud/issues/1659


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] dpeschman commented on issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
dpeschman commented on issue #1659:
URL: https://github.com/apache/libcloud/issues/1659#issuecomment-1059785279


   > @dpeschman Any chance you will be able to look into this in the near future?
   
   I can look into in on Monday.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] LanderOtto commented on issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
LanderOtto commented on issue #1659:
URL: https://github.com/apache/libcloud/issues/1659#issuecomment-1060418068


   Yes, I confirm that it works. Thank you


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] Kami commented on issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1659:
URL: https://github.com/apache/libcloud/issues/1659#issuecomment-1059764837


   Thanks for reporting this issue.
   
   It seems likely that this regression has been introduced as part of https://github.com/apache/libcloud/pull/1557, but it's weird that none of the tests caught it.
   
   I was just preparing v3.5.0 release, but it sounds like I will need to wait until this issue is figured out and fixed (if confirmed).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [libcloud] Kami commented on issue #1659: Missing parameter in an OpenStack Connection class

Posted by GitBox <gi...@apache.org>.
Kami commented on issue #1659:
URL: https://github.com/apache/libcloud/issues/1659#issuecomment-1059765075


   @dpeschman Any chance you will be able to look into this in the near future?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@libcloud.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org