tacker vnf manager events tab 500 error

Bug #1912589 reported by Gizem
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Confirmed
Medium
Hiromu Asahina

Bug Description

1. Use following template for scaling

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0

description: sample-tosca-vnfd-scaling

metadata:
  template_name: sample-tosca-vnfd-scaling

topology_template:
  node_templates:
    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      properties:
        image: cirros-0.4.0-x86_64-disk
        mgmt_driver: noop
        availability_zone: nova
        flavor: m1.tiny

    CP1:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        management: true
        order: 0
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL1
        - virtualBinding:
            node: VDU1

    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      properties:
        image: cirros-0.4.0-x86_64-disk
        mgmt_driver: noop
        availability_zone: nova
        flavor: m1.tiny

    VL1:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: net_mgmt
        vendor: Tacker

  policies:
    - SP1:
        type: tosca.policies.tacker.Scaling
        targets: [VDU1]
        properties:
          increment: 1
          cooldown: 120
          min_instances: 1
          max_instances: 6
          default_instances: 2

2. After this command "tacker vnf-scale --vnf-name name --scaling-policy-name SP1 --scaling-type in", i can create new instances.
3. After several commands are run vnf manager events tab will go to 500 Internal Server Error. I can not see my vnf events.
4. error logs:

ERROR django.request Internal Server Error: /dashboard/nfv/vnfmanager/b626ecf1-cd5d-4ac4-8ce2-6af598c9b88 c/
2020-11-28 16:36:56.706466 Traceback (most recent call last):
2020-11-28 16:36:56.706472 File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
2020-11-28 16:36:56.706481 response = get_response(request)
2020-11-28 16:36:56.706484 File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
2020-11-28 16:36:56.706487 response = self.process_exception_by_middleware(e, request)
2020-11-28 16:36:56.706489 File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
2020-11-28 16:36:56.706492 response = wrapped_callback(request, *callback_args, **callback_kwargs)
2020-11-28 16:36:56.706495 File "/opt/stack/horizon/horizon/decorators.py", line 52, in dec
2020-11-28 16:36:56.706497 return view_func(request, *args, **kwargs)
2020-11-28 16:36:56.706500 File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
2020-11-28 16:36:56.706502 return view_func(request, *args, **kwargs)
2020-11-28 16:36:56.706505 File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
2020-11-28 16:36:56.706507 return view_func(request, *args, **kwargs)
2020-11-28 16:36:56.706510 File "/opt/stack/horizon/horizon/decorators.py", line 112, in dec
2020-11-28 16:36:56.706512 return view_func(request, *args, **kwargs)
2020-11-28 16:36:56.706515 File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
2020-11-28 16:36:56.706518 return self.dispatch(request, *args, **kwargs)
2020-11-28 16:36:56.706520 File "/usr/local/lib/python3.6/site-packages/django/views/generic/base.py", line 97, in dispatch
2020-11-28 16:36:56.706523 return handler(request, *args, **kwargs)
2020-11-28 16:36:56.706525 File "/opt/stack/horizon/horizon/tabs/views.py", line 71, in get
2020-11-28 16:36:56.706528 return self.handle_tabbed_response(context["tab_group"], context)
2020-11-28 16:36:56.706531 File "/opt/stack/horizon/horizon/tabs/views.py", line 65, in handle_tabbed_response
2020-11-28 16:36:56.706533 return http.HttpResponse(tab_group.selected.render())
2020-11-28 16:36:56.706541 File "/opt/stack/horizon/horizon/tabs/base.py", line 372, in render
2020-11-28 16:36:56.706544 return render_to_string(self.get_template_name(self.request), context)
2020-11-28 16:36:56.706547 File "/usr/local/lib/python3.6/site-packages/django/template/loader.py", line 62, in render_to_string
2020-11-28 16:36:56.706549 return template.render(context, request)
2020-11-28 16:36:56.706552 File "/usr/local/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
2020-11-28 16:36:56.706554 return self.template.render(context)
2020-11-28 16:36:56.706557 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 171, in render
2020-11-28 16:36:56.706559 return self._render(context)
2020-11-28 16:36:56.706562 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 163, in _render
2020-11-28 16:36:56.706564 return self.nodelist.render(context)
2020-11-28 16:36:56.706567 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706569 bit = node.render_annotated(context)
2020-11-28 16:36:56.706572 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706575 return self.render(context)
2020-11-28 16:36:56.706577 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 987, in render
2020-11-28 16:36:56.706580 output = self.filter_expression.resolve(context)
2020-11-28 16:36:56.706582 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 671, in resolve
2020-11-28 16:36:56.706585 obj = self.var.resolve(context)
2020-11-28 16:36:56.706588 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 796, in resolve
2020-11-28 16:36:56.706590 value = self._resolve_lookup(context)
2020-11-28 16:36:56.706593 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 858, in _resolve_lookup
2020-11-28 16:36:56.706596 current = current()
2020-11-28 16:36:56.706598 File "/opt/stack/horizon/horizon/tables/base.py", line 1418, in render
2020-11-28 16:36:56.706601 return table_template.render(extra_context, self.request)
2020-11-28 16:36:56.706603 File "/usr/local/lib/python3.6/site-packages/django/template/backends/django.py", line 61, in render
2020-11-28 16:36:56.706606 return self.template.render(context)
2020-11-28 16:36:56.706608 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 171, in render
2020-11-28 16:36:56.706611 return self._render(context)
2020-11-28 16:36:56.706614 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 163, in _render
2020-11-28 16:36:56.706617 return self.nodelist.render(context)
2020-11-28 16:36:56.706619 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706622 bit = node.render_annotated(context)
2020-11-28 16:36:56.706624 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706627 return self.render(context)
2020-11-28 16:36:56.706630 File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 513, in render
2020-11-28 16:36:56.706632 return self.nodelist.render(context)
2020-11-28 16:36:56.706635 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706637 bit = node.render_annotated(context)
2020-11-28 16:36:56.706640 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706643 return self.render(context)
2020-11-28 16:36:56.706645 File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 513, in render
2020-11-28 16:36:56.706648 return self.nodelist.render(context)
2020-11-28 16:36:56.706650 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706655 bit = node.render_annotated(context)
2020-11-28 16:36:56.706657 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706660 return self.render(context)
2020-11-28 16:36:56.706662 File "/usr/local/lib/python3.6/site-packages/django/template/loader_tags.py", line 53, in render
2020-11-28 16:36:56.706665 result = self.nodelist.render(context)
2020-11-28 16:36:56.706668 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706670 bit = node.render_annotated(context)
2020-11-28 16:36:56.706673 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706675 return self.render(context)
2020-11-28 16:36:56.706678 File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 309, in render
2020-11-28 16:36:56.706680 return nodelist.render(context)
2020-11-28 16:36:56.706683 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706685 bit = node.render_annotated(context)
2020-11-28 16:36:56.706688 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706691 return self.render(context)
2020-11-28 16:36:56.706693 File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 309, in render
2020-11-28 16:36:56.706696 return nodelist.render(context)
2020-11-28 16:36:56.706699 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706701 bit = node.render_annotated(context)
2020-11-28 16:36:56.706704 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706707 return self.render(context)
2020-11-28 16:36:56.706710 File "/usr/local/lib/python3.6/site-packages/django/template/loader_tags.py", line 188, in render
2020-11-28 16:36:56.706712 return template.render(context)
2020-11-28 16:36:56.706715 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 173, in render
2020-11-28 16:36:56.706718 return self._render(context)
2020-11-28 16:36:56.706720 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 163, in _render
2020-11-28 16:36:56.706723 return self.nodelist.render(context)
2020-11-28 16:36:56.706726 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706729 bit = node.render_annotated(context)
2020-11-28 16:36:56.706731 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706734 return self.render(context)
2020-11-28 16:36:56.706736 File "/usr/local/lib/python3.6/site-packages/django/template/defaulttags.py", line 309, in render
2020-11-28 16:36:56.706739 return nodelist.render(context)
2020-11-28 16:36:56.706741 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 937, in render
2020-11-28 16:36:56.706744 bit = node.render_annotated(context)
2020-11-28 16:36:56.706746 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 904, in render_annotated
2020-11-28 16:36:56.706749 return self.render(context)
2020-11-28 16:36:56.706752 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 987, in render
2020-11-28 16:36:56.706754 output = self.filter_expression.resolve(context)
2020-11-28 16:36:56.706757 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 671, in resolve
2020-11-28 16:36:56.706759 obj = self.var.resolve(context)
2020-11-28 16:36:56.706762 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 796, in resolve
2020-11-28 16:36:56.706765 value = self._resolve_lookup(context)
2020-11-28 16:36:56.706769 File "/usr/local/lib/python3.6/site-packages/django/template/base.py", line 858, in _resolve_lookup
2020-11-28 16:36:56.706772 current = current()
2020-11-28 16:36:56.706774 File "/opt/stack/horizon/horizon/tables/base.py", line 1881, in get_pagination_string
2020-11-28 16:36:56.706777 return "=".join([self._meta.pagination_param, self.get_marker()])
2020-11-28 16:36:56.706779 File "/opt/stack/horizon/horizon/tables/base.py", line 1872, in get_marker
2020-11-28 16:36:56.706782 if self.data else ''
2020-11-28 16:36:56.706784 File "/usr/local/lib/python3.6/site-packages/django/utils/functional.py", line 238, in wrapper
2020-11-28 16:36:56.706787 return func(*args, **kwargs)
2020-11-28 16:36:56.706789 File "/usr/local/lib/python3.6/site-packages/django/utils/http.py", line 62, in urlquote_plus
2020-11-28 16:36:56.706792 return quote_plus(url, safe)
2020-11-28 16:36:56.706794 File "/usr/lib64/python3.6/urllib/parse.py", line 841, in quote_plus
2020-11-28 16:36:56.706797 string = quote(string, safe + space, encoding, errors)
2020-11-28 16:36:56.706800 File "/usr/lib64/python3.6/urllib/parse.py", line 825, in quote
2020-11-28 16:36:56.706802 return quote_from_bytes(string, safe)
2020-11-28 16:36:56.706805 File "/usr/lib64/python3.6/urllib/parse.py", line 850, in quote_from_bytes
2020-11-28 16:36:56.706808 raise TypeError("quote_from_bytes() expected bytes")
2020-11-28 16:36:56.706813 TypeError: quote_from_bytes() expected bytes
2020-11-28 16:36:56.706819

5.I tried this scenario on current master code.

Revision history for this message
Yasufumi Ogawa (yasufum) wrote :

Hi, it looks a bug in tacker-horizon for which I cannot fix yet. Could I confirm is there any error in tacker-server side?

Revision history for this message
Gizem (gizemelove) wrote :

I checked again server log but i think this bug occured in tacker-dasboard. I changed the horizon code a bit to understand this and saw all the events coming.

Actually, I realized there was one more problem. I am trying to create autoscaling group with tacker. But I couldn't come up with a solution because cpu_util metric was deprecated.
I can analyses of the expression like this (* (/ (aggregate rate:mean (metric cpu mean)) 300000000000.0) 100) but I can not use aggregation method rate:mean in my tosca template.

When i try to create vnf with my tosca template this error occurs:

Error: Failed to create VNF. Details heat-translator failed: - Value of property "method should be one of given statistics" is invalid.

I could not understand if I could not perform the autoscaling process properly with tacker.

Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Medium
assignee: nobody → Yasufumi Ogawa (yasufum)
Revision history for this message
Hiromu Asahina (h-asahina) wrote (last edit ):

Hi,

I tried to reproduce this bug, but I couldn't.
If you're still in trouble, could you please let us know the details?

For example, what are the exact steps you do for `trying to create autoscaling group with tacker`?
Also, what are the commands in `several commands are run vnf manager events tab`?

Changed in tacker:
assignee: Yasufumi Ogawa (yasufum) → Hiromu Asahina (h-asahina)
Revision history for this message
Navum Gupta (navum) wrote :

hi,

We tried to reproduce this bug, but we could not able reproduce it.

Following steps we had followed

1. created vnf descriptor by using file given in bug.

stack@necuser-HP-ProDesk-400-G2-MT:~/tacker$ openstack vnf descriptor create --vnfd-file tosca-vnfd-scale.yaml vnfd-scale

stack@necuser-HP-ProDesk-400-G2-MT:~/tacker$ openstack vnf descriptor list
+--------------------------------------+------------+-----------------+---------------------------+
| ID | Name | Template_Source | Description |
+--------------------------------------+------------+-----------------+---------------------------+
| 386a97e0-da8c-4475-bc8a-1f807ac0896f | vnfd-scale | onboarded | sample-tosca-vnfd-scaling |
+--------------------------------------+------------+-----------------+---------------------------+

2. created vnf using vnf descriptor created in step 1

stack@necuser-HP-ProDesk-400-G2-MT:~/tacker$ openstack vnf create --vnfd-id 386a97e0-da8c-4475-bc8a-1f807ac0896f Navum_1234

3. Login to tacker UI and open vnf manager events tab under NFV.
4. In VNF catalog tab our created vnf descriptor is showing
5. In VNF manager our created vnf is showing.
6. Then, we had performed scale out operation on created vnf

stack@necuser-HP-ProDesk-400-G2-MT:~$ openstack vnf scale --scaling-policy-name SP1 --scaling-type out 3b0b6ee9-6509-4ff8-be37-3ce7aa7ce65f

7. After that, we had performed scale out operation on created vnf

stack@necuser-HP-ProDesk-400-G2-MT:~$ openstack vnf scale --scaling-policy-name SP1 --scaling-type in 3b0b6ee9-6509-4ff8-be37-3ce7aa7ce65f

VNFD is as following

metadata:
  template_name: sample-tosca-vnfd-scaling

topology_template:
  node_templates:
    VDU1:
      type: tosca.nodes.nfv.VDU.Tacker
      properties:
        image: cirros-0.5.2-x86_64-disk
        mgmt_driver: noop
        availability_zone: nova
        flavor: m1.tiny

    CP1:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        management: true
        order: 0
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL1
        - virtualBinding:
            node: VDU1

    VDU2:
      type: tosca.nodes.nfv.VDU.Tacker
      properties:
        image: cirros-0.5.2-x86_64-disk
        mgmt_driver: noop
        availability_zone: nova
        flavor: m1.tiny

    CP2:
      type: tosca.nodes.nfv.CP.Tacker
      properties:
        management: true
        order: 0
        anti_spoofing_protection: false
      requirements:
        - virtualLink:
            node: VL1
        - virtualBinding:
            node: VDU2

    VL1:
      type: tosca.nodes.nfv.VL
      properties:
        network_name: net0
        vendor: Tacker

  policies:
    - SP1:
        type: tosca.policies.tacker.Scaling
  properties:
          targets: [VDU1, VDU2]
          increment: 1
          cooldown: 120
          min_instances: 1
          max_instances: 3
          default_instances: 2

Note: Please, share detailed procedure if we are missing something in above procedure

Revision history for this message
Yasufumi Ogawa (yasufum) wrote :

It might not be happened anymore or fixed for some reason.

Changed in tacker:
status: New → Confirmed
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.