Ocata sync dsvm jobs udpate
This patch updates the setup for the various devstack gate jobs to make them functional for Ocata and thus also validates the parent patch Ocata sync patch. Note that the NFP job still needs to be updated and has been disabled in this patch. It can be re-enabled whenever its updated in a followup patch. Change-Id: I7cd5667fcc86577eb33c0233991cbb687c0ce8c9
This commit is contained in:
parent
8284bf9b3a
commit
7eb3afc6f0
@ -44,10 +44,10 @@ if [[ $ENABLE_NFP = True ]]; then
|
||||
# Make sure that your public interface is not attached to any bridge.
|
||||
PUBLIC_INTERFACE=
|
||||
|
||||
enable_plugin neutron-fwaas http://git.openstack.org/openstack/neutron-fwaas stable/newton
|
||||
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/newton
|
||||
enable_plugin neutron https://github.com/openstack/neutron.git stable/newton
|
||||
enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas stable/newton
|
||||
enable_plugin neutron-fwaas http://git.openstack.org/openstack/neutron-fwaas stable/ocata
|
||||
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/ocata
|
||||
enable_plugin neutron https://github.com/openstack/neutron.git stable/ocata
|
||||
enable_plugin neutron-vpnaas https://git.openstack.org/openstack/neutron-vpnaas stable/ocata
|
||||
enable_plugin octavia https://git.openstack.org/openstack/octavia
|
||||
#enable_plugin barbican https://git.openstack.org/openstack/barbican master
|
||||
#enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git master
|
||||
|
@ -14,9 +14,9 @@ Or, if you have virtualenvwrapper installed::
|
||||
Using DevStack
|
||||
--------------
|
||||
|
||||
First, clone the latest ``stable/newton`` branch of DevStack::
|
||||
First, clone the latest ``stable/ocata`` branch of DevStack::
|
||||
|
||||
$ git clone -b stable/newton https://git.openstack.org/openstack-dev/devstack
|
||||
$ git clone -b stable/ocata https://git.openstack.org/openstack-dev/devstack
|
||||
$ cd devstack
|
||||
|
||||
Then, create a basic ``local.conf`` including at least the following lines::
|
||||
|
@ -10,11 +10,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from neutron.db import address_scope_db
|
||||
from neutron.db import api as db_api
|
||||
from neutron.db import common_db_mixin
|
||||
from neutron.db import l3_db
|
||||
from neutron.db import models_v2
|
||||
from neutron.db import securitygroups_db
|
||||
from neutron.extensions import address_scope as ext_address_scope
|
||||
from neutron.objects import subnetpool as subnetpool_obj
|
||||
from neutron.plugins.ml2 import db as ml2_db
|
||||
from neutron_lib.api import validators
|
||||
from neutron_lib import exceptions as n_exc
|
||||
@ -174,3 +177,22 @@ def _get_tenant_id_for_create(self, context, resource):
|
||||
|
||||
common_db_mixin.CommonDbMixin._get_tenant_id_for_create = (
|
||||
_get_tenant_id_for_create)
|
||||
|
||||
|
||||
# REVISIT: In ocata, the switch to new engine facade in neutron is partial.
|
||||
# This can result in different facades being mixed up within same transaction,
|
||||
# and inconsistent behavior. Specifically, when L3 policy is deleted,
|
||||
# subnetpool is deleted (old facade), and address scope (new facade) fails to
|
||||
# be deleted since the dependent subnetpool deletion is in different session
|
||||
# that is not yet commited. The workaround is to switch address scope to old
|
||||
# engine facade. This workaround should be removed in Pike.
|
||||
def _delete_address_scope(self, context, id):
|
||||
with context.session.begin(subtransactions=True):
|
||||
if subnetpool_obj.SubnetPool.get_objects(context,
|
||||
address_scope_id=id):
|
||||
raise ext_address_scope.AddressScopeInUse(address_scope_id=id)
|
||||
address_scope = self._get_address_scope(context, id)
|
||||
address_scope.delete()
|
||||
|
||||
address_scope_db.AddressScopeDbMixin.delete_address_scope = (
|
||||
_delete_address_scope)
|
||||
|
@ -64,14 +64,18 @@ gbp group-create web1
|
||||
# PT creation
|
||||
gbp policy-target-create web-pt-1 --policy-target-group web
|
||||
|
||||
set +o xtrace
|
||||
# create external network with admin priviledge
|
||||
source $TOP_DIR/openrc admin admin
|
||||
set -o xtrace
|
||||
EXT_NET_ID=$(neutron net-create mgmt_out --router:external=True --shared | grep ' id ' | awk '{print $4}')
|
||||
EXT_SUBNET_ID=$(neutron subnet-create --ip_version 4 --gateway 172.16.73.1 --name public-subnet $EXT_NET_ID 172.16.73.0/24 | grep ' id ' | awk '{print $4}')
|
||||
openstack project list
|
||||
DEMO_PROJECT_ID=$(openstack project show demo | grep id | awk '{print $4}')
|
||||
DEMO_PROJECT_ID=$(openstack project show demo | grep "[^a-zA-Z_\d]id[^a-zA-Z_\d]" | awk '{print $4}')
|
||||
|
||||
set +o xtrace
|
||||
source $TOP_DIR/openrc demo demo
|
||||
set -o xtrace
|
||||
|
||||
# ES creation
|
||||
gbp external-segment-create --ip-version 4 --external-route destination=0.0.0.0/0,nexthop=172.16.73.1 --subnet_id=$EXT_SUBNET_ID --cidr 50.50.50.0/24 mgmt_out
|
||||
@ -91,7 +95,9 @@ PURGE_OUTPUT=$(gbp purge $DEMO_PROJECT_ID | grep 'Tenant has no supported resour
|
||||
die_if_not_set $LINENO PURGE_OUTPUT "Failure purging GBP resources"
|
||||
|
||||
# delete the neutron resources too
|
||||
set +o xtrace
|
||||
source $TOP_DIR/openrc admin admin
|
||||
set -o xtrace
|
||||
neutron subnet-delete public-subnet
|
||||
neutron net-delete mgmt_out
|
||||
|
||||
|
@ -12,7 +12,14 @@ SCREEN_LOGDIR=$DEST/logs/screen
|
||||
LOGFILE=$DEST/logs/stack.sh.log
|
||||
SKIP_EXERCISES=volumes,trove,swift,sahara,euca,bundle,boot_from_volume,aggregates,zaqar,client-env,client-args,sec_groups,neutron-adv-test,floating_ips,horizon
|
||||
|
||||
enable_plugin group-based-policy https://github.com/openstack/group-based-policy.git master
|
||||
# Revert once the patch is merged
|
||||
#enable_plugin group-based-policy https://github.com/openstack/group-based-policy.git master
|
||||
enable_plugin group-based-policy https://git.openstack.org/openstack/group-based-policy refs/changes/35/477035/33
|
||||
|
||||
ENABLE_APIC_AIM_GATE=True
|
||||
|
||||
# Update the following (most likely remove this override) once the master branch is moved to ocata
|
||||
AIM_BRANCH=sumit/ocata
|
||||
APICML2_BRANCH=sumit/ocata
|
||||
OPFLEX_BRANCH=sumit/stable/ocata
|
||||
APICAPI_BRANCH=sumit/ocata
|
||||
|
@ -45,9 +45,9 @@ enable_service q-svc
|
||||
enable_service q-agt
|
||||
enable_service q-dhcp
|
||||
enable_service q-l3
|
||||
enable_plugin neutron-fwaas http://git.openstack.org/openstack/neutron-fwaas stable/newton
|
||||
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/newton
|
||||
enable_plugin neutron https://github.com/openstack/neutron.git stable/newton
|
||||
enable_plugin neutron-fwaas http://git.openstack.org/openstack/neutron-fwaas stable/ocata
|
||||
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas stable/ocata
|
||||
enable_plugin neutron https://github.com/openstack/neutron.git stable/ocata
|
||||
|
||||
|
||||
#ENBALE OCTAVIA
|
||||
|
@ -15,14 +15,14 @@ XTRACE=$(set +o | grep xtrace)
|
||||
|
||||
function prepare_gbp_devstack {
|
||||
cd $TOP_DIR
|
||||
sudo git checkout stable/newton
|
||||
sudo git checkout stable/ocata
|
||||
sudo cp $CONTRIB_DIR/devstack/local.conf $TOP_DIR/local.conf
|
||||
sudo cp $CONTRIB_DIR/functions-gbp $TOP_DIR/exercises/
|
||||
sudo cp $CONTRIB_DIR/devstack/exercises/*.sh $TOP_DIR/exercises/
|
||||
sudo cp $CONTRIB_DIR/devstack/lib/* $TOP_DIR/lib/
|
||||
sudo cp -r $CONTRIB_DIR/devstack/gbp-templates $TOP_DIR
|
||||
sudo sed -i 's/DEST=\/opt\/stack/DEST=\/opt\/stack\/new/g' $TOP_DIR/stackrc
|
||||
sudo sed -i 's/source $TOP_DIR\/lib\/neutron-legacy/source $TOP_DIR\/lib\/neutron-legacy\nsource $TOP_DIR\/lib\/gbp/g' $TOP_DIR/stack.sh
|
||||
sudo sed -i 's/source $TOP_DIR\/lib\/neutron/source $TOP_DIR\/lib\/neutron\nsource $TOP_DIR\/lib\/gbp/g' $TOP_DIR/stack.sh
|
||||
sudo sed -i 's/# Extras Configuration/install_gbpclient\ninstall_gbpservice\ninit_gbpservice\n# Extras Configuration/g' $TOP_DIR/stack.sh
|
||||
sudo sed -i 's/create_neutron_initial_network//g' $TOP_DIR/stack.sh
|
||||
source $TOP_DIR/functions
|
||||
@ -45,25 +45,26 @@ function prepare_nfp_devstack {
|
||||
|
||||
function prepare_gbp_aim_devstack {
|
||||
cd $TOP_DIR
|
||||
sudo git checkout stable/newton
|
||||
sudo git checkout stable/ocata
|
||||
sudo cp $CONTRIB_DIR/devstack/local-aim.conf $TOP_DIR/local.conf
|
||||
sudo cp $CONTRIB_DIR/devstack/exercises-aim/gbp_aim.sh $TOP_DIR/exercises/
|
||||
sudo sed -i 's/DEST=\/opt\/stack/DEST=\/opt\/stack\/new/g' $TOP_DIR/stackrc
|
||||
sudo sed -i 's/source $TOP_DIR\/lib\/neutron/source $TOP_DIR\/lib\/neutron\nsource $TOP_DIR\/lib\/neutron-legacy/g' $TOP_DIR/stack.sh
|
||||
# Use the aim version of the shared PRS test
|
||||
sudo mv $GBP_FUNC_DIR/testcases/tc_gbp_prs_pr_shared_func.py.aim $GBP_FUNC_DIR/testcases/tc_gbp_prs_pr_shared_func.py
|
||||
sudo mv $GBP_FUNC_DIR/testcases/tc_gbp_prs_pr_shared_func.py.aim $GBP_FUNC_DIR/testcases/tc_gbp_prs_pr_shared_func.py
|
||||
sudo mv $GBP_FUNC_DIR/testcases/tc_gbp_prs_func.py.aim $GBP_FUNC_DIR/testcases/tc_gbp_prs_func.py
|
||||
# The following should updated when master moves to a new release
|
||||
# We need to do the following since the infra job clones these repos and
|
||||
# checks out the master branch (as this is the master branch) and later
|
||||
# does not switch to the stable/newton branch when installing devstack
|
||||
# does not switch to the stable/ocata branch when installing devstack
|
||||
# since the repo is already present.
|
||||
# This can be worked around by changing the job description in
|
||||
# project-config to set BRANCH_OVERRIDE to use the stable/newton branch
|
||||
sudo git --git-dir=/opt/stack/new/neutron/.git --work-tree=/opt/stack/new/neutron checkout stable/newton
|
||||
sudo git --git-dir=/opt/stack/new/nova/.git --work-tree=/opt/stack/new/nova checkout stable/newton
|
||||
sudo git --git-dir=/opt/stack/new/keystone/.git --work-tree=/opt/stack/new/keystone checkout stable/newton
|
||||
sudo git --git-dir=/opt/stack/new/cinder/.git --work-tree=/opt/stack/new/cinder checkout stable/newton
|
||||
sudo git --git-dir=/opt/stack/new/requirements/.git --work-tree=/opt/stack/new/requirements checkout stable/newton
|
||||
# project-config to set BRANCH_OVERRIDE to use the stable/ocata branch
|
||||
sudo git --git-dir=/opt/stack/new/neutron/.git --work-tree=/opt/stack/new/neutron checkout stable/ocata
|
||||
sudo git --git-dir=/opt/stack/new/nova/.git --work-tree=/opt/stack/new/nova checkout stable/ocata
|
||||
sudo git --git-dir=/opt/stack/new/keystone/.git --work-tree=/opt/stack/new/keystone checkout stable/ocata
|
||||
sudo git --git-dir=/opt/stack/new/cinder/.git --work-tree=/opt/stack/new/cinder checkout stable/ocata
|
||||
sudo git --git-dir=/opt/stack/new/requirements/.git --work-tree=/opt/stack/new/requirements checkout stable/ocata
|
||||
export ENABLED_SERVICES="key,rabbit,mysql"
|
||||
|
||||
source $TOP_DIR/functions
|
||||
@ -80,7 +81,7 @@ function source_creds {
|
||||
|
||||
function run_gbp_rally {
|
||||
cd $NEW_BASE
|
||||
git clone http://github.com/group-policy/rally.git -b dev
|
||||
git clone http://github.com/group-policy/rally.git -b dev-ocata
|
||||
cd rally
|
||||
sed -i 's/\"times\"\: 1/\"times\"\: 10/g' samples/tasks/scenarios/gbp/gbp.json
|
||||
sed -i 's/\"concurrency\"\: 1/\"concurrency\"\: 10,/g' samples/tasks/scenarios/gbp/gbp.json
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# REVISIT: Temporarily disabling this job until its updated to run with Ocata
|
||||
exit 1
|
||||
|
||||
CONTRIB_DIR="$BASE/new/group-based-policy/gbpservice/tests/contrib"
|
||||
cp $CONTRIB_DIR/functions-gbp .
|
||||
source functions-gbp
|
||||
|
@ -203,7 +203,7 @@ class Gbp_Verify(object):
|
||||
(cmd_out))
|
||||
return 0
|
||||
if cmd_val == 0:
|
||||
if cmd_out == '': # The case when grep returns null
|
||||
if name_uuid not in cmd_out: # uuid not found
|
||||
return 0
|
||||
else:
|
||||
for arg in args:
|
||||
@ -272,7 +272,7 @@ class Gbp_Verify(object):
|
||||
(cmd_out))
|
||||
return 0
|
||||
if cmd_val == 0:
|
||||
if cmd_out == '': # The case when grep returns null
|
||||
if name_uuid not in cmd_out: # uuid not found
|
||||
return 0
|
||||
else:
|
||||
for arg in args:
|
||||
@ -347,6 +347,7 @@ class Gbp_Verify(object):
|
||||
_log.info('''Function Usage: neut_ver_all('net','name')\n
|
||||
-- name_uuid == UUID or name_string\n''')
|
||||
return 0
|
||||
|
||||
# Build the command with mandatory params
|
||||
cmd = 'neutron %s-show ' % verifyobj + str(name_uuid)
|
||||
_log.info('Neutron Cmd == %s\n' % (cmd))
|
||||
|
Loading…
x
Reference in New Issue
Block a user