lbaas: custom_attr - unable to modify non-global section attributes

Bug #1519321 reported by Senthilnathan Murugappan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
In Progress
High
Unassigned
Trunk
Fix Committed
High
Unassigned

Bug Description

2015-11-24 Tue 03:44:48:921.728 PST a2s41 [Thread 140274332723136, Pid 3199]: NetNS run errors:
Traceback (most recent call last):
  File "/usr/bin/opencontrail-vrouter-netns", line 9, in <module>
    load_entry_point('opencontrail-vrouter-netns==0.1', 'console_scripts', 'opencontrail-vrouter-netns')()
  File "/usr/lib/python2.7/dist-packages/opencontrail_vrouter_netns/vrouter_netns.py", line 450, in main
    vrouter_netns.args.func()
  File "/usr/lib/python2.7/dist-packages/opencontrail_vrouter_netns/vrouter_netns.py", line 407, in create
    netns_mgr.set_lbaas()
  File "/usr/lib/python2.7/dist-packages/opencontrail_vrouter_netns/vrouter_netns.py", line 138, in set_lbaas
    self.keystone_auth_cfg_file)
  File "/usr/lib/python2.7/dist-packages/opencontrail_vrouter_netns/haproxy_process.py", line 23, in start_update_haproxy
    keystone_auth_conf_file)
  File "/usr/lib/python2.7/dist-packages/opencontrail_vrouter_netns/haproxy_config.py", line 57, in build_config
    conf += _set_frontend(config, conf_dir, keystone_auth_conf_file) + '\n\n'
  File "/usr/lib/python2.7/dist-packages/opencontrail_vrouter_netns/haproxy_config.py", line 148, in _set_frontend
    return _construct_config_block(config, conf, "vip", vip_custom_attributes)
  File "/usr/lib/python2.7/dist-packages/opencontrail_vrouter_netns/haproxy_config.py", line 67, in _construct_config_block
    cmd = custom_attributes_dict['global'][key]['cmd']
KeyError: u'rate_limit_sessions'

Below patch should fix the same
 def _construct_config_block(lb_config, conf, custom_attr_section, custom_attributes):
     for key, value in custom_attributes.iteritems():
- cmd = custom_attributes_dict['global'][key]['cmd']
+ cmd = custom_attributes_dict[custom_attr_section][key]['cmd']
         conf.append(cmd % value)

Tags: lbaas
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/15376
Submitter: Senthilnathan Murugappan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/15376
Committed: http://github.org/Juniper/contrail-controller/commit/f1c64c4f7f2a90a312a8f2fb49718b602dd49010
Submitter: Zuul
Branch: master

commit f1c64c4f7f2a90a312a8f2fb49718b602dd49010
Author: Senthilnathan Murugappan <email address hidden>
Date: Tue Nov 24 03:45:49 2015 -0800

lbaas: custom_attr unable to modify non-global section attributes

Change-Id: I68af02095c8a198b3ecadc0c54ae90676d758555
Closes-Bug: #1519321

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/15662
Submitter: Senthilnathan Murugappan (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/15662
Committed: http://github.org/Juniper/contrail-controller/commit/dbe7049e39ccf43459d02ce0cb4804b1f1f37277
Submitter: Zuul
Branch: R2.20

commit dbe7049e39ccf43459d02ce0cb4804b1f1f37277
Author: Senthilnathan Murugappan <email address hidden>
Date: Tue Nov 24 03:45:49 2015 -0800

lbaas: custom_attr unable to modify non-global section attributes

Should be checking for max_conn key rather than maxconn

Change-Id: I97e0e2dbecefbda19b60ceb3b974726559b5cb10
Closes-Bug: #1519321
Closes-Bug: #1519308

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22-dev

Review in progress for https://review.opencontrail.org/15797
Submitter: Varun Lodaya (<email address hidden>)

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.