Fix keypair creation
Use novaclient for creation of keypair instead of openstack client in devstack plugin, because the latter is not compatible with nova microversion 2.1 Also, specify explicitly Nova API version in manila wrapper over novaclient that is used by Generic and Windows drivers. Also, revert back amount of tempest threads for Ci jobs to avoid job timeout failures. Also, fix raise of SnapshotBuildErrorException in Tempest plugin. Tempest tries to raise exception SnapshotBuildErrorException from wrong place. It should use "share_exceptions" instead of "exceptions". Change-Id: Ie9ea9f6d25a13f8cd8f0ccbc73f6fa75cca35e0b Closes-Bug: #1493008 Closes-Bug: #1493072
This commit is contained in:
parent
c4dbdb414b
commit
f88c2aaeea
contrib/ci
devstack
manila/compute
manila_tempest_tests/services/share/json
@ -88,7 +88,7 @@ fi
|
||||
set +o errexit
|
||||
cd $BASE/new/tempest
|
||||
|
||||
export MANILA_TEMPEST_CONCURRENCY=${MANILA_TEMPEST_CONCURRENCY:-6}
|
||||
export MANILA_TEMPEST_CONCURRENCY=${MANILA_TEMPEST_CONCURRENCY:-12}
|
||||
export MANILA_TESTS=${MANILA_TESTS:-'manila_tempest_tests.tests.api'}
|
||||
|
||||
if [[ "$JOB_NAME" =~ "scenario" ]]; then
|
||||
|
@ -331,7 +331,7 @@ function configure_manila_ui {
|
||||
|
||||
|
||||
function create_manila_service_keypair {
|
||||
openstack keypair create $MANILA_SERVICE_KEYPAIR_NAME --public-key $MANILA_PATH_TO_PUBLIC_KEY
|
||||
nova keypair-add $MANILA_SERVICE_KEYPAIR_NAME --pub-key $MANILA_PATH_TO_PUBLIC_KEY
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
Handles all requests to Nova.
|
||||
"""
|
||||
|
||||
from novaclient import api_versions
|
||||
from novaclient import exceptions as nova_exception
|
||||
from novaclient import service_catalog
|
||||
from novaclient import utils
|
||||
@ -60,6 +61,9 @@ nova_opts = [
|
||||
cfg.StrOpt('nova_admin_auth_url',
|
||||
default='http://localhost:5000/v2.0',
|
||||
help='Identity service URL.'),
|
||||
cfg.StrOpt('nova_api_microversion',
|
||||
default='2.10',
|
||||
help='Version of Nova API to be used.'),
|
||||
]
|
||||
|
||||
CONF = cfg.CONF
|
||||
@ -70,10 +74,12 @@ LOG = log.getLogger(__name__)
|
||||
|
||||
def novaclient(context):
|
||||
if context.is_admin and context.project_id is None:
|
||||
api_version = api_versions.APIVersion(CONF.nova_api_microversion)
|
||||
c = nova_client.Client(CONF.nova_admin_username,
|
||||
CONF.nova_admin_password,
|
||||
CONF.nova_admin_tenant_name,
|
||||
CONF.nova_admin_auth_url)
|
||||
CONF.nova_admin_auth_url,
|
||||
api_version=api_version)
|
||||
c.authenticate()
|
||||
return c
|
||||
compat_catalog = {
|
||||
|
@ -358,7 +358,7 @@ class SharesClient(rest_client.RestClient):
|
||||
body = self.get_snapshot(snapshot_id)
|
||||
snapshot_status = body['status']
|
||||
if 'error' in snapshot_status:
|
||||
raise exceptions.\
|
||||
raise share_exceptions.\
|
||||
SnapshotBuildErrorException(snapshot_id=snapshot_id)
|
||||
|
||||
if int(time.time()) - start >= self.build_timeout:
|
||||
|
Loading…
x
Reference in New Issue
Block a user