Error when i try to edit a load balancer

Bug #1629261 reported by Alfredo Moralejo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Neutron LBaaS Dashboard
Invalid
Medium
Unassigned

Bug Description

Using newton rc2 versions of packages from RDO and current master HEAD of neutron-lbaas-dashboard https://github.com/openstack/neutron-lbaas-dashboard/commit/63d4427a3bad36a16c6d77e3b057db1a5a8f46a2

I've created a LB using CLI:

nova boot --image cirros --flavor m1.tiny test1
nova boot --image cirros --flavor m1.tiny test2

neutron lbaas-loadbalancer-create --name lb1 private_subnet
sleep 10
neutron lbaas-loadbalancer-show lb1 # Wait for the provisioning_status to be ACTIVE.
neutron lbaas-listener-create --loadbalancer lb1 --protocol TCP --protocol-port 80 --name listener1
sleep 10 # Sleep since LBaaS actions can take a few seconds depending on the environment.
neutron lbaas-pool-create --lb-algorithm ROUND_ROBIN --listener listener1 --protocol TCP --name pool1
sleep 10
neutron lbaas-healthmonitor-create --delay 5 --timeout 2 --max-retries 1 --type PING --pool pool1
neutron lbaas-member-create --subnet private_subnet --address 10.0.0.3 --protocol-port 22 pool1
sleep 10
neutron lbaas-member-create --subnet private_subnet --address 10.0.0.4 --protocol-port 22 pool1

When i go to lbaas dashboard i can see the LB but when i click on "Edit Load Balancer" button y get error:

Danger: An error occurred. Please try again later.

And in horizon log i see following trace:

2016-09-30 10:09:34,759 22116 ERROR horizon.workflows.base Problem instantiating action class.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/workflows/base.py", line 390, in action
    context)
  File "/usr/lib/python2.7/site-packages/neutron_lbaas_dashboard/dashboards/project/loadbalancersv2/workflows/update_lb.py", line 47, in __init__
    self.fields['address'].initial = context['address']
KeyError: 'address'
2016-09-30 10:09:34,760 22116 ERROR django.request Internal Server Error: /dashboard/project/loadbalancersv2/945537a7-8b53-4a4c-904b-fd4d466608dc/update
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 164, in get_response
    response = response.render()
  File "/usr/lib/python2.7/site-packages/django/template/response.py", line 158, in render
    self.content = self.rendered_content
  File "/usr/lib/python2.7/site-packages/django/template/response.py", line 135, in rendered_content
    content = template.render(context, self._request)
  File "/usr/lib/python2.7/site-packages/django/template/backends/django.py", line 74, in render
    return self.template.render(context)
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 210, in render
    return self._render(context)
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 202, in _render
    return self.nodelist.render(context)
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 905, in render
    bit = self.render_node(node, context)
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 919, in render_node
    return node.render(context)
  File "/usr/lib/python2.7/site-packages/django/template/defaulttags.py", line 574, in render
    six.iteritems(self.extra_context)}
  File "/usr/lib/python2.7/site-packages/django/template/defaulttags.py", line 573, in <dictcomp>
    values = {key: val.resolve(context) for key, val in
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 648, in resolve
    obj = self.var.resolve(context)
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 789, in resolve
    value = self._resolve_lookup(context)
  File "/usr/lib/python2.7/site-packages/django/template/base.py", line 849, in _resolve_lookup
    current = current()
  File "/usr/lib/python2.7/site-packages/horizon/workflows/base.py", line 734, in get_entry_point
    step._verify_contributions(self.context)
  File "/usr/lib/python2.7/site-packages/horizon/workflows/base.py", line 414, in _verify_contributions
    field = self.action.fields.get(key, None)
  File "/usr/lib/python2.7/site-packages/horizon/workflows/base.py", line 390, in action
    context)
  File "/usr/lib/python2.7/site-packages/neutron_lbaas_dashboard/dashboards/project/loadbalancersv2/workflows/update_lb.py", line 47, in __init__
    self.fields['address'].initial = context['address']
KeyError: 'address'

Revision history for this message
Michael Johnson (johnsom) wrote :

I am running upstream newton OpenStack with the 1.0.0 version of the neutron-lbaas-dashboard from pypi.

I followed your steps and then clicked the edit button on the load balancer, which brought up the dialog and I added a description to the load balancer. It completed successfully. Can you test again with the newton release a report back if this is still an issue?

Changed in neutron-lbaas-dashboard:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Alfredo Moralejo (amoralej) wrote :

The problem is related to using old panel instead of new ngloadbalancersv2 one. Using new panel, load balancer edit is working fine.

Changed in neutron-lbaas-dashboard:
status: Incomplete → Invalid
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.