trove secgroup-add-rule returns 500

Bug #1298749 reported by Mat Lowery
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
High
Nikhil Manchanda
python-troveclient
Fix Released
High
Nikhil Manchanda

Bug Description

I'm don't know what the ultimate goal for secgroup-add-rule is but right now it returns 500.

This appears to be leftover from https://review.openstack.org/#/c/50944/.

Traceback (most recent call last):
  File "/opt/stack/trove/trove/common/wsgi.py", line 251, in execute_action
    **action_args)
  File "/opt/stack/trove/trove/openstack/common/wsgi.py", line 395, in execute_action
    return self.dispatch(self.controller, action, request, **action_args)
  File "/opt/stack/trove/trove/openstack/common/wsgi.py", line 404, in dispatch
    return method(*args, **kwargs)
  File "/opt/stack/trove/trove/extensions/security_group/service.py", line 93, in create
    CONF.trove_security_group_rule_protocol,
  File "/opt/stack/oslo.config/oslo/config/cfg.py", line 1619, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option: trove_security_group_rule_protocol

After deciding what secgroup-add-rule should do, I recommend a related bug be filed in python-troveclient to clean up the secgroup-add-rule subcommand (i.e. ports that aren't used etc).

Changed in trove:
assignee: nobody → Denis M. (dmakogon)
status: New → In Progress
Changed in trove:
milestone: none → icehouse-rc1
importance: Undecided → High
Changed in python-troveclient:
assignee: nobody → Nikhil Manchanda (slicknik)
importance: Undecided → High
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-troveclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/84335

Changed in python-troveclient:
assignee: Nikhil Manchanda (slicknik) → Denis M. (dmakogon)
Changed in trove:
assignee: Denis M. (dmakogon) → Nikhil Manchanda (slicknik)
Changed in python-troveclient:
assignee: Denis M. (dmakogon) → Nikhil Manchanda (slicknik)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-troveclient (master)

Reviewed: https://review.openstack.org/84115
Committed: https://git.openstack.org/cgit/openstack/python-troveclient/commit/?id=b9507417fe7d40a7023d85131a73e56b87390672
Submitter: Jenkins
Branch: master

commit b9507417fe7d40a7023d85131a73e56b87390672
Author: Denis Makogon <email address hidden>
Date: Mon Mar 31 14:13:30 2014 +0300

    Fix create call for security group rules

    Reasons:
     - The security group rule create call was expecting
       from_port, to_port, and protocol as arguments, but
       the Trove API was ignoring these since it picks these
       up from the respective datastore confs.

    Changes:
     - Removing the extra arguments from the security-group-rule
       create command:
       - from_port
       - to_port
       - protocol

    Note that even though the user was able to specify the ports
    for the rule these were _never_ being honored since these
    were being picked up from the respective config files.

    Usage before change:
     - trove secgroup-add-rule <security_group> <protocol>
                               <from_port> <to_port> <cidr>

    Usage after change:
     - trove secgroup-add-rule <security_group> <cidr>

    Change-Id: Ic1440f735b6cf2b8b4f29c5ab9f48bcb427ca9e6
    Closes-Bug: #1298749

Changed in python-troveclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/83768
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=b5af5416ee645a5b3c7a835f8101cde7e8a7d771
Submitter: Jenkins
Branch: master

commit b5af5416ee645a5b3c7a835f8101cde7e8a7d771
Author: Denis Makogon <email address hidden>
Date: Fri Mar 28 16:53:43 2014 +0200

    Fix create call for security group rules

    We need to fix the create security group call to
    correctly use the per-datastore configs to set the
    port, and protocol values for the security group rule.

    The only parameter that the trove user should be able to
    specify for the rule is the CIDR.

    Changes:
    - Use the datastore specific ports and protocol for creating
      the new security group rule.

    Changes:
    - using datastore-specific ports for building new rules, based upon income CIDR;

    Change-Id: Ic1440f735b6cf2b8b4f29c5ab9f48bcb427ca9e6
    Closes-Bug: #1298749

Changed in trove:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: icehouse-rc1 → 2014.1
Changed in python-troveclient:
status: Fix Committed → Fix Released
milestone: none → python-troveclient-v1
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.