[Bug 2072526] Re: ERROR octavia.controller.worker.v2.controller_worker jinja2.exceptions.TemplateNotFound: amphora_agent_conf.template

Felipe Reyes 2072526 at bugs.launchpad.net
Tue Aug 6 15:27:48 UTC 2024


The verification has been successful for jammy-caracal, here it's the
relevant chunk of the testing log:

**withtout** proposed:

-06 04:13:29 [INFO] ======================================================================
2024-08-06 04:13:29 [INFO] ERROR: test_create_loadbalancer (zaza.openstack.charm_tests.octavia.tests.LBAASv2Test)
2024-08-06 04:13:29 [INFO] Create load balancer.
2024-08-06 04:13:29 [INFO] ----------------------------------------------------------------------
2024-08-06 04:13:29 [INFO] Traceback (most recent call last):
2024-08-06 04:13:29 [INFO]   File "/mnt/git/charm-octavia/src/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/octavia/tests.py", line 502, in test_create_loadbalancer
2024-08-06 04:13:29 [INFO]     lb = self._create_lb_resources(self.octavia_client,
2024-08-06 04:13:29 [INFO]   File "/mnt/git/charm-octavia/src/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/octavia/tests.py", line 368, in _create_lb_resources
2024-08-06 04:13:29 [INFO]     resp = self.wait_for_lb_resource(
2024-08-06 04:13:29 [INFO]   File "/mnt/git/charm-octavia/src/.tox/func-target/lib/python3.8/site-packages/tenacity/__init__.py", line 289, in wrapped_f
2024-08-06 04:13:29 [INFO]     return self(f, *args, **kw)
2024-08-06 04:13:29 [INFO]   File "/mnt/git/charm-octavia/src/.tox/func-target/lib/python3.8/site-packages/tenacity/__init__.py", line 379, in __call__
2024-08-06 04:13:29 [INFO]     do = self.iter(retry_state=retry_state)
2024-08-06 04:13:29 [INFO]   File "/mnt/git/charm-octavia/src/.tox/func-target/lib/python3.8/site-packages/tenacity/__init__.py", line 314, in iter
2024-08-06 04:13:29 [INFO]     return fut.result()
2024-08-06 04:13:29 [INFO]   File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
2024-08-06 04:13:29 [INFO]     return self.__get_result()
2024-08-06 04:13:29 [INFO]   File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
2024-08-06 04:13:29 [INFO]     raise self._exception
2024-08-06 04:13:29 [INFO]   File "/mnt/git/charm-octavia/src/.tox/func-target/lib/python3.8/site-packages/tenacity/__init__.py", line 382, in __call__
2024-08-06 04:13:29 [INFO]     result = fn(*args, **kwargs)
2024-08-06 04:13:29 [INFO]   File "/mnt/git/charm-octavia/src/.tox/func-target/lib/python3.8/site-packages/zaza/openstack/charm_tests/octavia/tests.py", line 305, in wait_for_lb_resource
2024-08-06 04:13:29 [INFO]     raise LoadBalancerUnrecoverableError(msg)
2024-08-06 04:13:29 [INFO] zaza.openstack.utilities.exceptions.LoadBalancerUnrecoverableError: load balancer resource has not reached expected provisioning status: {'id': '4e9c5798-ef75-4616-9ce6-b387f80c1f21', 'name': 'zaza-amphora-0', 'description': 'Created by Zaza', 'provisioning_status': 'ERROR', 'operating_status': 'OFFLINE', 'admin_state_up': True, 'project_id': '5ca71241795540c79860d5bf790b483a', 'created_at': '2024-08-06T04:13:15', 'updated_at': '2024-08-06T04:13:23', 'vip_address': '10.42.0.117', 'vip_port_id': '45322c47-c10c-4729-b9c3-888469a37b20', 'vip_subnet_id': '14e2ad19-2067-49c3-8da3-69904b9c36d7', 'vip_network_id': '602eb569-a566-4b32-b15b-9db93a22225b', 'additional_vips': [], 'listeners': [], 'pools': [], 'provider': 'amphora', 'flavor_id': None, 'vip_qos_policy_id': None, 'tags': [], 'availability_zone': None, 'vip_vnic_type': 'normal', 'tenant_id': '5ca71241795540c79860d5bf790b483a'}
2024-08-06 04:13:29 [INFO] ----------------------------------------------------------------------


**With** proposed:

2024-08-06 14:38:41 [INFO] ok
2024-08-06 14:38:41 [INFO] ----------------------------------------------------------------------
2024-08-06 14:38:41 [INFO] Ran 1 test in 629.892s
2024-08-06 14:38:41 [INFO] OK
2024-08-06 14:38:41 [INFO] Events:
  Test zaza.openstack.charm_tests.octavia.tests.LBAASv2Test:
    Start: 1722954487.4878826
    Finish: 1722955121.6917126
    Elapsed Time: 634.2038300037384
    PCT Of Run Time: 100
Metadata: {}

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/2072526

Title:
  ERROR octavia.controller.worker.v2.controller_worker
  jinja2.exceptions.TemplateNotFound: amphora_agent_conf.template

Status in OpenStack Octavia Charm:
  Invalid
Status in Ubuntu Cloud Archive:
  Triaged
Status in Ubuntu Cloud Archive caracal series:
  Fix Committed
Status in octavia package in Ubuntu:
  Fix Released
Status in octavia source package in Noble:
  Fix Committed

Bug description:
  [ Impact ]
  Octavia fails to provision Amphora for load balancers.

  [ Test Plan ]
  Install Octavia as part of a Charmed OpenStack deployment for Caracal.
  Create a loadbalancer - creation will fail with stack trace from original bug report.

  [ Where problems could occur ]
  The fix for this is to ensure that data files in the Python source tree are included in the package installation; this is done by providing a MANIFEST to ensure that this happens; side effects are unlikely.

  [Original Bug Report]
  [Impact]

  Octavia fails to provision the amphora, the stacktrace logged is:

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/taskflow/engines/action_engine/executor.py", line 52, in _execute_task
      result = task.execute(**arguments)
    File "/usr/lib/python3/dist-packages/octavia/controller/worker/v2/tasks/compute_tasks.py", line 199, in execute
      return super().execute(
    File "/usr/lib/python3/dist-packages/octavia/controller/worker/v2/tasks/compute_tasks.py", line 122, in execute
      agent_cfg = agent_jinja_cfg.AgentJinjaTemplater()
    File "/usr/lib/python3/dist-packages/octavia/amphorae/backends/agent/agent_jinja_cfg.py", line 34, in __init__
      self.agent_template = jinja_env.get_template(
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 997, in get_template
      return self._load_template(name, globals)
    File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 958, in _load_template
      template = self.loader.load(self, name, self.make_globals(globals))
    File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 125, in load
      source, filename, uptodate = self.get_source(environment, name)
    File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 214, in get_source
      raise TemplateNotFound(template)
  jinja2.exceptions.TemplateNotFound: amphora_agent_conf.template

  When searching for a package where this file is, apt-file can't find
  any.
  https://packages.ubuntu.com/search?searchon=contents&keywords=amphora_agent_conf.template&mode=exactfilename&suite=noble&arch=any

  This file has been around for many years -
  https://opendev.org/openstack/octavia/commits/branch/master/octavia/amphorae/backends/agent/templates/amphora_agent_conf.template
  - and the code that's trying to use it hasn't really received changes
  during the Caracal cycle -
  https://opendev.org/openstack/octavia/commits/branch/master/octavia/amphorae/backends/agent/agent_jinja_cfg.py

  [Environment]

  * OpenStack 2024.1 (Caracal)
  * python3-octavia 1:14.0.0-0ubuntu1~cloud0

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-octavia/+bug/2072526/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list