← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1511748] Re: Adding new security group rule Custom ICMP rule has wrong error messages

 

Reviewed:  https://review.openstack.org/249662
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=edfde8b3f54cc4264d770e5fd49f07d164a85a28
Submitter: Jenkins
Branch:    master

commit edfde8b3f54cc4264d770e5fd49f07d164a85a28
Author: Suraj Deshmukh <surajssd009005@xxxxxxxxx>
Date:   Wed Nov 25 14:53:17 2015 +0530

    ICMP type & code validation while adding Security Group rules
    
    While adding new 'Security Group Rule' viz. 'Custom ICMP rule' when
    wrong ICMP 'type' or 'code' was given the errors it would show were
    'Not a valid port number'; which is misleading. The errors should
    rather be 'Not a valid ICMP type' or 'Not a valid ICMP code'.
    
    Also for validating ICMP 'type' and 'code' there wasn't any dedicated
    functionality in 'oslo.utils/netutils' so the code for validating 'TCP
    ports' was used. TCP ports are in range 0 to 65535 while ICMP 'type'
    and 'code' are in range 0 to 255, so using 'TCP port validation' code
    is incorrect.
    
    When -1 is used in 'ICMP code' or 'ICMP type' that means any number
    0 to 255 is valid.
    
    Here newer dedicated functionality of 'oslo.utils/netutils' is used
    for validating ICMP 'type' and ICMP 'code'.
    
    Change-Id: I8e227a0021d418294fa7b7756d58e39f2100850a
    Closes-Bug: #1511748


** Changed in: horizon
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1511748

Title:
  Adding new security group rule Custom ICMP rule has wrong error
  messages

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  When adding new rules to 'default' security group. When trying to add
  new 'Custom ICMP rule', I am not able to select 'Type' as -1 and
  'Code' as -1 as well. But the same works from the command line utility
  i.e. [$ nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0].

  But the problem is the errors that are provided are wrong. Instead of
  'wrong code' or 'wrong type' it says 'wrong port'. The exact info can
  be seen in snapshot at [1]. I am running this off a devstack single
  node instance.

  
  [1] http://ibin.co/2KphvtVSTrCV

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1511748/+subscriptions


References