euca-authorize and euca-revoke throws unknown error for invalid port range

Bug #739815 reported by Tushar Patil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
John Tran
python-boto (Ubuntu)
Invalid
Low
Unassigned

Bug Description

If I provide invalid port range not in the range of 1 to 65535 to euca-authorize and euca-revoke, then it gives error message as "UnknownError: An unknown error has occurred. Please try your request again.".

$euca-authorize -P tcp -p -222222 -s 0.0.0.0/0 default
$euca-revoke -P tcp -p -222222 -s 0.0.0.0/0 default

/nova/api/ec2/cloud.py is already throwing InvalidInputException, but it is not catched in the /nova/api/ec2/__init__.py->Executor->__call__ method and hence the Exception block is executed which reports Unknown Error to the caller.

Related branches

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Dave Walker (davewalker) wrote :

Using boto 2.0, this doesn't seem to reach nova and returns a less than desirable error. Therefore opening a boto task, as this should be resolved with both client and server.

$ euca-authorize -P tcp -p -222222 -s 0.0.0.0/0 default
Traceback (most recent call last):
  File "/usr/bin/euca-authorize", line 198, in <module>
    main()
  File "/usr/bin/euca-authorize", line 112, in main
    from_port = int(ports[0])
ValueError: invalid literal for int() with base 10: ''

$ euca-revoke -P tcp -p -222222 -s 0.0.0.0/0 default
Traceback (most recent call last):
  File "/usr/bin/euca-revoke", line 201, in <module>
    main()
  File "/usr/bin/euca-revoke", line 111, in main
    from_port = int(ports[0])
ValueError: invalid literal for int() with base 10: ''

Changed in python-boto (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Dave Walker (davewalker) wrote :

Ah, i copied and pasted the entry from the description which contained a "-" infront of the port. This is obviously invalid syntax.

With correct syntax, it does indeed return as described:
$ euca-authorize -P tcp -p 222222 -s 0.0.0.0/0 default
default None None tcp 222222 222222 0.0.0.0/0
UnknownError: An unknown error has occurred. Please try your request again.

Changed in python-boto (Ubuntu):
status: Confirmed → Invalid
John Tran (jtran)
Changed in nova:
assignee: nobody → John Tran (jtran)
Thierry Carrez (ttx)
Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-4
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-4 → 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.