Fix broken jobs in V1 API gates
This patch fixes the following issues: 1. Change the QueuePool settings to use the values recommended. The following error occurred in sol-vnflcm and sol-kubernetes job: ``` tacker.wsgi sqlalchemy.exc.TimeoutError: QueuePool limit of size 10 overflow 20 reached, connection timed out, timeout 10.00 ``` Change to remove the process of overriding the default value of oslo.db config. In Neutron, the process of overriding the default value of oslo.db has already been removed [1]. However, errors still occur when using the recommended value, so temporarily set `max_pool_size` to unlimited in FT. 2. Fix issue of `Show subscription (V1 API)`. A previous patch [2] included `sqlalchemy.row.LegacyRow` for backwards compatibility with oslo.db, which caused the error "Show subscription (V1 API)" to fail by upgrading SQLAlchemy. Fix it to work correctly by removing `row.LegacyRow`. 3. Fix to upload image successfully in FT. There was a process to get the image from the glance and upload the copy image, but it was not working properly. Changed the argument to glance so that it uploads correctly. 4. Increase wait time Terminate after Heal in sol-vnflcm job. A 409 error occurred at the time of Terminate because the process was to wait a fixed number of seconds after Heal before Terminate. The current 20 seconds may not be enough, so increase it to 60 seconds. This will be fixed to check if OpOcc is COMPLETED status in future work. 5. Split test jobs for sol-vnflcm. Split test jobs for sol-vnflcm because it takes longer to run and, it is executed using the full limit time. [1] https://review.opendev.org/c/openstack/neutron/+/456419 [2] https://review.opendev.org/c/openstack/tacker/+/910720 Closes-Bug: #2066047 Change-Id: If1cd835c8875fa844f9eac5bff5ba85103ad91aa
This commit is contained in:
parent
ef79698632
commit
8dee0c8e7e
27
.zuul.yaml
27
.zuul.yaml
@ -234,8 +234,26 @@
|
||||
Multinodes job for SOL devstack-based functional tests for vnflcm
|
||||
host-vars:
|
||||
controller-tacker:
|
||||
devstack_local_conf:
|
||||
post-config:
|
||||
$TACKER_CONF:
|
||||
database:
|
||||
max_pool_size: 0
|
||||
tox_envlist: dsvm-functional-sol-vnflcm
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: tacker-functional-devstack-multinode-sol-vnflcm-userdata
|
||||
parent: tacker-functional-devstack-multinode-sol-parent
|
||||
description: |
|
||||
Multinodes job for SOL devstack-based functional tests for vnflcm with userdata
|
||||
host-vars:
|
||||
controller-tacker:
|
||||
devstack_local_conf:
|
||||
post-config:
|
||||
$TACKER_CONF:
|
||||
database:
|
||||
max_pool_size: 0
|
||||
tox_envlist: dsvm-functional-sol-vnflcm-userdata
|
||||
|
||||
- job:
|
||||
name: tacker-functional-devstack-multinode-sol-vnfpkgm
|
||||
@ -599,8 +617,12 @@
|
||||
Multinodes job for SOL Kubernetes Multi tenant devstack-based functional tests
|
||||
host-vars:
|
||||
controller-tacker:
|
||||
devstack_local_conf:
|
||||
post-config:
|
||||
$TACKER_CONF:
|
||||
database:
|
||||
max_pool_size: 0
|
||||
tox_envlist: dsvm-functional-sol-kubernetes
|
||||
voting: false
|
||||
|
||||
- job:
|
||||
name: tacker-functional-devstack-multinode-sol-kubernetes-multi-tenant
|
||||
@ -832,6 +854,7 @@
|
||||
jobs:
|
||||
- tacker-functional-devstack-multinode-sol-legacy-nfvo
|
||||
- tacker-functional-devstack-multinode-sol-vnflcm
|
||||
- tacker-functional-devstack-multinode-sol-vnflcm-userdata
|
||||
- tacker-functional-devstack-multinode-sol-vnfpkgm
|
||||
- tacker-functional-devstack-multinode-sol-separated-nfvo
|
||||
- tacker-functional-devstack-multinode-sol-kubernetes
|
||||
|
@ -204,10 +204,7 @@ class ViewBuilder(base.BaseViewBuilder):
|
||||
|
||||
def _basic_subscription_info(self, vnf_lcm_subscription, filter=None):
|
||||
def key_exists(obj, key):
|
||||
# NOTE(ueha): Check `row.LegacyRow` type for back compatibility
|
||||
# of oslo.db<15.0.0 environment.
|
||||
if (isinstance(obj, LccnSubscriptionRequest) or
|
||||
isinstance(obj, row.LegacyRow)):
|
||||
if isinstance(obj, LccnSubscriptionRequest):
|
||||
return key in vnf_lcm_subscription
|
||||
elif isinstance(obj, row.Row):
|
||||
return key in vnf_lcm_subscription._mapping
|
||||
|
@ -89,13 +89,8 @@ oslo_messaging.set_transport_defaults(control_exchange='tacker')
|
||||
|
||||
|
||||
def set_db_defaults():
|
||||
# Update the default QueuePool parameters. These can be tweaked by the
|
||||
# conf variables - max_pool_size, max_overflow and pool_timeout
|
||||
db_options.set_defaults(
|
||||
cfg.CONF,
|
||||
connection='sqlite://',
|
||||
max_pool_size=10,
|
||||
max_overflow=20, pool_timeout=10)
|
||||
# Call to register `database` option to cfg.CONF
|
||||
db_options.set_defaults(cfg.CONF)
|
||||
|
||||
|
||||
set_db_defaults()
|
||||
|
@ -384,11 +384,11 @@ class BaseVnfLcmTest(base.BaseTackerTest):
|
||||
return image
|
||||
|
||||
@classmethod
|
||||
def _create_glance_image(cls, image_data, file_url, glance_client=None):
|
||||
def _create_glance_image(cls, image_props, image_data, glance_client=None):
|
||||
if glance_client is None:
|
||||
glance_client = cls.glance_client
|
||||
image = glance_client.images.create(**image_data)
|
||||
glance_client.images.upload(image.id, file_url)
|
||||
image = glance_client.images.create(**image_props)
|
||||
glance_client.images.upload(image.id, image_data)
|
||||
|
||||
return image.id
|
||||
|
||||
|
@ -32,7 +32,7 @@ VNF_TERMINATE_TIMEOUT = 600
|
||||
VNF_HEAL_TIMEOUT = 600
|
||||
VNF_CHANGE_EXT_CONN_TIMEOUT = 600
|
||||
RETRY_WAIT_TIME = 5
|
||||
WAIT_HEAL = 20 # Time to wait until heal op is completed in sec.
|
||||
WAIT_HEAL = 60 # Time to wait until heal op is completed in sec.
|
||||
|
||||
|
||||
def get_ext_managed_virtual_link(id, vl_desc_id, resource_id):
|
||||
@ -942,8 +942,7 @@ class VnfLcmTest(base.BaseTackerTest):
|
||||
# vnfcResourceInfo after the stack status becomes UPDATE_COMPLETE.
|
||||
# There is no intermediate status set to VNF which can be used here
|
||||
# to confirm healing action is completed successfully.
|
||||
# NOTE(yasufum): add extra 20 sec to avoid timeout.
|
||||
time.sleep(WAIT_HEAL + 25)
|
||||
time.sleep(WAIT_HEAL)
|
||||
|
||||
vnf_instance_current = self._show_vnf_instance(vnf_instance['id'])
|
||||
self._verify_vnfc_resource_info(vnf_instance, vnf_instance_current, 3)
|
||||
|
@ -36,7 +36,7 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
||||
# ModifyVNF specific image create.
|
||||
for image in images:
|
||||
specific_image_name = image.name + '2'
|
||||
image_data = {
|
||||
image_props = {
|
||||
"min_disk": image.min_disk,
|
||||
"min_ram": image.min_ram,
|
||||
"disk_format": image.disk_format,
|
||||
@ -55,7 +55,8 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
||||
with tempfile.TemporaryFile('w+b') as f:
|
||||
for content in body:
|
||||
f.write(content)
|
||||
cls._create_glance_image(image_data, f.read())
|
||||
f.seek(0)
|
||||
cls._create_glance_image(image_props, f)
|
||||
except Exception as e:
|
||||
print("Fail, Modify-VNF specific image create.", e, flush=True)
|
||||
cls.is_setup_error = True
|
@ -56,7 +56,7 @@ class VnfLcmWithMultiTenant(base.BaseVnfLcmMultiTenantTest):
|
||||
|
||||
for image in images:
|
||||
specific_image_name = f'{image.name}{2}'
|
||||
image_data = {
|
||||
image_props = {
|
||||
"min_disk": image.min_disk,
|
||||
"min_ram": image.min_ram,
|
||||
"disk_format": image.disk_format,
|
||||
@ -75,7 +75,8 @@ class VnfLcmWithMultiTenant(base.BaseVnfLcmMultiTenantTest):
|
||||
with tempfile.TemporaryFile('w+b') as f:
|
||||
for content in body:
|
||||
f.write(content)
|
||||
cls._create_glance_image(image_data, f.read())
|
||||
f.seek(0)
|
||||
cls._create_glance_image(image_props, f)
|
||||
except Exception as e:
|
||||
print("Fail, Modify-VNF specific image create.", e, flush=True)
|
||||
is_setup_error = True
|
||||
|
@ -15,12 +15,18 @@
|
||||
|
||||
import fixtures
|
||||
|
||||
from tacker.common import config
|
||||
from oslo_db import options as db_options
|
||||
|
||||
import tacker.conf
|
||||
from tacker.db import api as db_api
|
||||
from tacker.db import model_base
|
||||
from tacker.tests.unit import base
|
||||
|
||||
|
||||
CONF = tacker.conf.CONF
|
||||
db_options.set_defaults(CONF, connection='sqlite://')
|
||||
|
||||
|
||||
class SqlFixture(fixtures.Fixture):
|
||||
|
||||
# flag to indicate that the models have been loaded
|
||||
@ -46,6 +52,5 @@ class SqlFixture(fixtures.Fixture):
|
||||
class SqlTestCase(base.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
config.set_db_defaults()
|
||||
super(SqlTestCase, self).setUp()
|
||||
self.useFixture(SqlFixture())
|
||||
|
6
tox.ini
6
tox.ini
@ -45,6 +45,12 @@ setenv = {[testenv]setenv}
|
||||
commands =
|
||||
stestr --test-path=./tacker/tests/functional/sol/vnflcm run --slowest --concurrency 1 {posargs}
|
||||
|
||||
[testenv:dsvm-functional-sol-vnflcm-userdata]
|
||||
setenv = {[testenv]setenv}
|
||||
|
||||
commands =
|
||||
stestr --test-path=./tacker/tests/functional/sol/vnflcm_userdata run --slowest --concurrency 1 {posargs}
|
||||
|
||||
[testenv:dsvm-functional-sol-vnfpkgm]
|
||||
setenv = {[testenv]setenv}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user