← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1418278] [NEW] [Sahara] Copy node group template button doesn't work in some cases

 

Public bug reported:

Copy node group template doesn't work if node group template contains
None as "security_groups" field. Note, it is impossible to get into such
state using horizon.

Steps to reproduce:
1. Create node group template with security_groups=None (default value) using REST API. Note, horizon puts [] for this field. 
2. Open node group templates list in horizon
3. Click 'Copy Template' button

Observed behavior: 'Danger: An error occurred. Please try again later.'
error

Stacktrace from horizon:
Internal Server Error: /project/data_processing/nodegroup_templates/1e560118-3281-49a3-abc7-9742a3fe8408/copy
Traceback (most recent call last):
  File "/Users/alazarev/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/Users/alazarev/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/alazarev/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/Users/alazarev/openstack/horizon/horizon/workflows/views.py", line 144, in get
    context = self.get_context_data(**kwargs)
  File "/Users/alazarev/openstack/horizon/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/views.py", line 89, in get_context_data
    .get_context_data(**kwargs)
  File "/Users/alazarev/openstack/horizon/horizon/workflows/views.py", line 91, in get_context_data
    workflow = self.get_workflow()
  File "/Users/alazarev/openstack/horizon/horizon/workflows/views.py", line 81, in get_workflow
    entry_point=entry_point)
  File "/Users/alazarev/openstack/horizon/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/workflows/copy.py", line 71, in __init__
    [(sg, sg) for sg in template.security_groups])
TypeError: 'NoneType' object is not iterable

** Affects: horizon
     Importance: Undecided
     Assignee: Andrew Lazarev (alazarev)
         Status: Confirmed


** Tags: sahara

** Tags added: sahara

** Changed in: horizon
     Assignee: (unassigned) => Andrew Lazarev (alazarev)

** Changed in: horizon
       Status: New => Confirmed

-- 
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/1418278

Title:
  [Sahara] Copy node group template button doesn't work in some cases

Status in OpenStack Dashboard (Horizon):
  Confirmed

Bug description:
  Copy node group template doesn't work if node group template contains
  None as "security_groups" field. Note, it is impossible to get into
  such state using horizon.

  Steps to reproduce:
  1. Create node group template with security_groups=None (default value) using REST API. Note, horizon puts [] for this field. 
  2. Open node group templates list in horizon
  3. Click 'Copy Template' button

  Observed behavior: 'Danger: An error occurred. Please try again
  later.' error

  Stacktrace from horizon:
  Internal Server Error: /project/data_processing/nodegroup_templates/1e560118-3281-49a3-abc7-9742a3fe8408/copy
  Traceback (most recent call last):
    File "/Users/alazarev/openstack/horizon/.venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 52, in dec
      return view_func(request, *args, **kwargs)
    File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 36, in dec
      return view_func(request, *args, **kwargs)
    File "/Users/alazarev/openstack/horizon/horizon/decorators.py", line 84, in dec
      return view_func(request, *args, **kwargs)
    File "/Users/alazarev/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
      return self.dispatch(request, *args, **kwargs)
    File "/Users/alazarev/openstack/horizon/.venv/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
      return handler(request, *args, **kwargs)
    File "/Users/alazarev/openstack/horizon/horizon/workflows/views.py", line 144, in get
      context = self.get_context_data(**kwargs)
    File "/Users/alazarev/openstack/horizon/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/views.py", line 89, in get_context_data
      .get_context_data(**kwargs)
    File "/Users/alazarev/openstack/horizon/horizon/workflows/views.py", line 91, in get_context_data
      workflow = self.get_workflow()
    File "/Users/alazarev/openstack/horizon/horizon/workflows/views.py", line 81, in get_workflow
      entry_point=entry_point)
    File "/Users/alazarev/openstack/horizon/openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/workflows/copy.py", line 71, in __init__
      [(sg, sg) for sg in template.security_groups])
  TypeError: 'NoneType' object is not iterable

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


Follow ups

References