Should support boto 2.0 server-side (was: EC2 API fails with >=boto2.0)

Bug #814365 reported by Dave Walker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya

Bug Description

Using boto2.0 as a client has been resolved with bug #704645. However having boto2.0 on nova the test suite fails for 10 out 18, this is demonstrated with test_authorize_revoke_security_group_cidr as below.

It was introduced with boto upstream commit e94096d7aeb803ea69947fd722ce4ca2aa969cff.

== Log Extract ==
Traceback (most recent call last):
  File "/home/ubuntu/src/nova/trunk/nova/tests/test_api.py", line 384, in test_authorize_revoke_security_group_cidr
    'test group')
  File "/usr/lib/python2.7/dist-packages/boto/ec2/connection.py", line 1760, in create_security_group
    SecurityGroup, verb='POST')
  File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 685, in get_object
    response = self.make_request(action, params, path, verb)
  File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 653, in make_request
    return self._mexe(http_request)
  File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 524, in _mexe
    connection = self.get_http_connection(request.host, self.is_secure)
  File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 392, in get_http_connection
    return self.new_http_connection(host, is_secure)
  File "/usr/lib/python2.7/dist-packages/mox.py", line 985, in __call__
    expected_method = self._VerifyMethodCall()
  File "/usr/lib/python2.7/dist-packages/mox.py", line 1043, in _VerifyMethodCall
    raise UnexpectedMethodCallError(self, expected)
UnexpectedMethodCallError: Unexpected method call. unexpected:- expected:+
- Stub for <bound method EC2Connection.new_http_connection of EC2Connection:127.0.0.1>.__call__('127.0.0.1:8773', False) -> None
+ Stub for <bound method EC2Connection.new_http_connection of EC2Connection:127.0.0.1>.__call__(None, False) -> <nova.tests.test_api.FakeHttplibConnection object at 0x2ac06d0>

Related branches

Revision history for this message
Thierry Carrez (ttx) wrote :

Dave, we should raise importance on this if Ubuntu wants to move to boto 2.0 for some reason...

Changed in nova:
importance: Undecided → Wishlist
status: New → Confirmed
summary: - EC2 API fails with >=boto2.0
+ Should support boto 2.0 server-side (was: EC2 API fails with >=boto2.0)
Revision history for this message
Chuck Short (zulcss) wrote :

This doesnt affect just the testsuite:

2011-07-25 11:12:18,787 AUDIT nova.api.cloud [YDZ135KETOL6H49LCNX3 chuck cloud] Revoke security group ingress mygroup
2011-07-25 11:12:18,787 ERROR nova.api [YDZ135KETOL6H49LCNX3 chuck cloud] Unexpected error raised: _revoke_rule_args_to_dict() got an unexpected keyword argument 'ip_permissions'
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/home/chuck/work/server/openstack/testing/nova/nova/api/ec2/__init__.py", line 323, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/home/chuck/work/server/openstack/testing/nova/nova/api/ec2/apirequest.py", line 78, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/home/chuck/work/server/openstack/testing/nova/nova/api/ec2/cloud.py", line 618, in revoke_security_group_ingress
(nova.api): TRACE: criteria = self._revoke_rule_args_to_dict(context, **kwargs)
(nova.api): TRACE: TypeError: _revoke_rule_args_to_dict() got an unexpected keyword argument 'ip_permissions'
(nova.api): TRACE:

If you have any questions please let me know.

Revision history for this message
Mitch Garnaat (mitch-garnaat) wrote :

Is this an issue with some outdated mocked interfaces? Some of the low-level code in boto/connection.py changed in https://github.com/boto/boto/commit/555de66459dd796c71babf6b96d938369f16a676 to allow all retried reqeuests to be re-signed. From the log entries above, it almost looks like some mocked interface is out of sync with those changes.

Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-3
Revision history for this message
Thierry Carrez (ttx) wrote :

Indeed, fixing the mocks with something like http://paste.ubuntu.com/652496/ make it go a bit further...

Then we hit:

FAIL: test_authorize_revoke_security_group_cidr (nova.tests.test_api.ApiEc2TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/chuck/work/server/openstack/testing/nova/nova/tests/test_api.py", line 407, in test_authorize_revoke_security_group_cidr
    self.assertEquals(str(group.rules[0].grants[0]), '0.0.0.0/0')
AssertionError: 'None-None' != '0.0.0.0/0'
======================================================================
FAIL: test_authorize_revoke_security_group_cidr_v6 (nova.tests.test_api.ApiEc2TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/chuck/work/server/openstack/testing/nova/nova/tests/test_api.py", line 470, in test_authorize_revoke_security_group_cidr_v6
    self.assertEquals(str(group.rules[0].grants[0]), '::/0')
AssertionError: 'None-None' != '::/0'

(full trace at http://pastebin.ubuntu.com/652502/)

Revision history for this message
John Tran (jtran) wrote :

@Chuck Short:

That particular problem was fixed by https://bugs.launchpad.net/bugs/704645 merged in to trunk yesterday.

Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
importance: Wishlist → Critical
Thierry Carrez (ttx)
Changed in nova:
importance: Critical → High
status: Confirmed → In Progress
Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote :

We need it proposed to milestone-proposed now.

Changed in nova:
status: Fix Committed → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-3 → 2011.3
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.