From 2983474e37d6c97c482e154a1f0d1f60a709915b Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Sun, 9 Mar 2014 18:36:42 +0100 Subject: [PATCH 0001/3803] Use the $SERVICE_HOST in backup_swift_url The $SERVICE_HOST is used to specify the swift proxy endpoint, the c-bak should use the same endpoint. Change-Id: Ia815f514839b0d1ec3fb9bb40992637c4f123e06 --- lib/cinder | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cinder b/lib/cinder index dd2956a5b4..dadbe40a3b 100644 --- a/lib/cinder +++ b/lib/cinder @@ -274,6 +274,10 @@ function configure_cinder { iniset $CINDER_CONF DEFAULT lock_path $CINDER_STATE_PATH iniset $CINDER_CONF DEFAULT periodic_interval $CINDER_PERIODIC_INTERVAL + if is_service_enabled swift; then + iniset $CINDER_CONF DEFAULT backup_swift_url "http://$SERVICE_HOST:8080/v1/AUTH_" + fi + if is_service_enabled ceilometer; then iniset $CINDER_CONF DEFAULT notification_driver "cinder.openstack.common.notifier.rpc_notifier" fi From ccb3d10e04f7be773daf1bddd0bc2bff024ce6f4 Mon Sep 17 00:00:00 2001 From: Newell Jensen Date: Mon, 10 Mar 2014 14:28:52 -0700 Subject: [PATCH 0002/3803] Makes error message easier to understand. If the host ip address is indeterminate while executing stack.sh, an error message is displayed. This error message could be a source of confusion since it references localrc, which is depreciated. This patch makes the error message clearer and easier to understand. It does this by taking out the reference to localrc. It also points the user towards local.conf where there are suggestions on how to set HOST_IP. Change-Id: I41f14a2de85449d2a08ab7eb2849844a1087b147 Closes-Bug: #1290556 --- stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 148ce04e28..817da26a8e 100755 --- a/stack.sh +++ b/stack.sh @@ -289,7 +289,7 @@ FIXED_NETWORK_SIZE=${FIXED_NETWORK_SIZE:-256} HOST_IP=$(get_default_host_ip $FIXED_RANGE $FLOATING_RANGE "$HOST_IP_IFACE" "$HOST_IP") if [ "$HOST_IP" == "" ]; then - die $LINENO "Could not determine host ip address. Either localrc specified dhcp on ${HOST_IP_IFACE} or defaulted" + die $LINENO "Could not determine host ip address. See local.conf for suggestions on setting HOST_IP." fi # Allow the use of an alternate hostname (such as localhost/127.0.0.1) for service endpoints. From 1749106c3abb17ee7cf30eb69bc9b744f3fc5a95 Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Wed, 12 Mar 2014 14:38:25 +0100 Subject: [PATCH 0003/3803] Remove unused package dependencies * /sbin/vconfig command is not used by either nova or neutron. * Now the AMQP carrot is not used, not even optionally by the oslo.messaging. * python-gfalgs just referenced as a similar configuration style, by neutron. Change-Id: Idde5446e47e7da1dd204ea518ab816e2cce77c7d --- files/apts/nova | 2 -- files/rpms-suse/nova | 2 -- files/rpms/neutron | 1 - files/rpms/nova | 3 --- 4 files changed, 8 deletions(-) diff --git a/files/apts/nova b/files/apts/nova index ae925c3293..dfb25c7f37 100644 --- a/files/apts/nova +++ b/files/apts/nova @@ -25,7 +25,6 @@ socat # used by ajaxterm python-mox python-paste python-migrate -python-gflags python-greenlet python-libvirt # NOPRIME python-libxml2 @@ -34,7 +33,6 @@ python-numpy # used by websockify for spice console python-pastedeploy python-eventlet python-cheetah -python-carrot python-tempita python-sqlalchemy python-suds diff --git a/files/rpms-suse/nova b/files/rpms-suse/nova index ee4917d702..c3c878fb4a 100644 --- a/files/rpms-suse/nova +++ b/files/rpms-suse/nova @@ -24,7 +24,6 @@ python-Routes python-SQLAlchemy python-Tempita python-boto -python-carrot python-cheetah python-eventlet python-feedparser @@ -37,7 +36,6 @@ python-mox python-mysql python-numpy # needed by websockify for spice console python-paramiko -python-python-gflags python-sqlalchemy-migrate python-suds python-xattr # needed for glance which is needed for nova --- this shouldn't be here diff --git a/files/rpms/neutron b/files/rpms/neutron index 42d7f68d37..e5c901be37 100644 --- a/files/rpms/neutron +++ b/files/rpms/neutron @@ -21,4 +21,3 @@ rabbitmq-server # NOPRIME qpid-cpp-server # NOPRIME sqlite sudo -vconfig diff --git a/files/rpms/nova b/files/rpms/nova index a607d925e1..61b0e9a0d1 100644 --- a/files/rpms/nova +++ b/files/rpms/nova @@ -17,11 +17,9 @@ mysql-server # NOPRIME parted polkit python-boto -python-carrot python-cheetah python-eventlet python-feedparser -python-gflags python-greenlet python-iso8601 python-kombu @@ -42,4 +40,3 @@ rabbitmq-server # NOPRIME qpid-cpp-server # NOPRIME sqlite sudo -vconfig From 2f6c30b33c074a03748b7c0273c49fe81ab96607 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Thu, 13 Mar 2014 23:32:46 -0500 Subject: [PATCH 0004/3803] Update client-env to use openstackclient commands Updated the only instance of a keystoneclient command, to check if the identity service is enabled. Change-Id: If86f71c1610a79690d6c6a8eb423b6fa234372bb --- exercises/client-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/client-env.sh b/exercises/client-env.sh index d955e4d1e1..4e8259cd06 100755 --- a/exercises/client-env.sh +++ b/exercises/client-env.sh @@ -64,7 +64,7 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then STATUS_KEYSTONE="Skipped" else echo -e "\nTest Keystone" - if keystone catalog --service identity; then + if openstack endpoint show identity; then STATUS_KEYSTONE="Succeeded" else STATUS_KEYSTONE="Failed" From 2d4c8da8031d4ca8638befe1c039c6197d3ac08d Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Wed, 19 Mar 2014 10:42:01 +0100 Subject: [PATCH 0005/3803] Upgrade to cirros 0.3.2 Cirros 0.3.2 is fixing the host name setting issue, which is required for turning on the tempest instance validation tests. Change-Id: I1b87740ab02c4eb0a8df653a35e1f85d40abda51 Related-Bug: #1132686 --- lib/tempest | 17 ++++++++++------- stackrc | 18 ++++++++++-------- tools/xen/README.md | 2 +- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/lib/tempest b/lib/tempest index af5493e2c1..d81423bc1d 100644 --- a/lib/tempest +++ b/lib/tempest @@ -56,7 +56,7 @@ BUILD_INTERVAL=1 BUILD_TIMEOUT=196 -BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-0.3.1" +BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-${CIRROS_VERSION}" # Cinder/Volume variables TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default} @@ -310,9 +310,9 @@ function configure_tempest { iniset $TEMPEST_CONFIG boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud" iniset $TEMPEST_CONFIG boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}" iniset $TEMPEST_CONFIG boto s3_materials_path "$BOTO_MATERIALS_PATH" - iniset $TEMPEST_CONFIG boto ari_manifest cirros-0.3.1-x86_64-initrd.manifest.xml - iniset $TEMPEST_CONFIG boto ami_manifest cirros-0.3.1-x86_64-blank.img.manifest.xml - iniset $TEMPEST_CONFIG boto aki_manifest cirros-0.3.1-x86_64-vmlinuz.manifest.xml + iniset $TEMPEST_CONFIG boto ari_manifest cirros-${CIRROS_VERSION}-x86_64-initrd.manifest.xml + iniset $TEMPEST_CONFIG boto ami_manifest cirros-${CIRROS_VERSION}-x86_64-blank.img.manifest.xml + iniset $TEMPEST_CONFIG boto aki_manifest cirros-${CIRROS_VERSION}-x86_64-vmlinuz.manifest.xml iniset $TEMPEST_CONFIG boto instance_type "$boto_instance_type" iniset $TEMPEST_CONFIG boto http_socket_timeout 30 iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros} @@ -326,7 +326,10 @@ function configure_tempest { fi # Scenario - iniset $TEMPEST_CONFIG scenario img_dir "$FILES/images/cirros-0.3.1-x86_64-uec" + iniset $TEMPEST_CONFIG scenario img_dir "$FILES/images/cirros-${CIRROS_VERSION}-x86_64-uec" + iniset $TEMPEST_CONFIG scenario ami_img_file "cirros-${CIRROS_VERSION}-x86_64-blank.img" + iniset $TEMPEST_CONFIG scenario ari_img_file "cirros-${CIRROS_VERSION}-x86_64-initrd" + iniset $TEMPEST_CONFIG scenario aki_img_file "cirros-${CIRROS_VERSION}-x86_64-vmlinuz" # Large Ops Number iniset $TEMPEST_CONFIG scenario large_ops_number ${TEMPEST_LARGE_OPS_NUMBER:-0} @@ -403,8 +406,8 @@ function install_tempest { # init_tempest() - Initialize ec2 images function init_tempest { - local base_image_name=cirros-0.3.1-x86_64 - # /opt/stack/devstack/files/images/cirros-0.3.1-x86_64-uec + local base_image_name=cirros-${CIRROS_VERSION}-x86_64 + # /opt/stack/devstack/files/images/cirros-${CIRROS_VERSION}-x86_64-uec local image_dir="$FILES/images/${base_image_name}-uec" local kernel="$image_dir/${base_image_name}-vmlinuz" local ramdisk="$image_dir/${base_image_name}-initrd" diff --git a/stackrc b/stackrc index 4a997bf77c..dd52161dba 100644 --- a/stackrc +++ b/stackrc @@ -306,12 +306,14 @@ esac # glance as a disk image. If it ends in .gz, it is uncompressed first. # example: # http://cloud-images.ubuntu.com/releases/precise/release/ubuntu-12.04-server-cloudimg-armel-disk1.img -# http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-rootfs.img.gz +# http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-rootfs.img.gz # * OpenVZ image: # OpenVZ uses its own format of image, and does not support UEC style images #IMAGE_URLS="http://smoser.brickies.net/ubuntu/ttylinux-uec/ttylinux-uec-amd64-11.2_2.6.35-15_1.tar.gz" # old ttylinux-uec image -#IMAGE_URLS="http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img" # cirros full disk image +#IMAGE_URLS="http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-disk.img" # cirros full disk image + +CIRROS_VERSION=${CIRROS_VERSION:-"0.3.2"} # Set default image based on ``VIRT_DRIVER`` and ``LIBVIRT_TYPE``, either of # which may be set in ``localrc``. Also allow ``DEFAULT_IMAGE_NAME`` and @@ -323,11 +325,11 @@ case "$VIRT_DRIVER" in libvirt) case "$LIBVIRT_TYPE" in lxc) # the cirros root disk in the uec tarball is empty, so it will not work for lxc - DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-rootfs} - IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-rootfs.img.gz"};; + DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-rootfs} + IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-rootfs.img.gz"};; *) # otherwise, use the uec style image (with kernel, ramdisk, disk) - DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-uec} - IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};; + DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec} + IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"};; esac ;; vsphere) @@ -337,8 +339,8 @@ case "$VIRT_DRIVER" in DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.0-x86_64-disk} IMAGE_URLS=${IMAGE_URLS:-"https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz"};; *) # Default to Cirros with kernel, ramdisk and disk image - DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-uec} - IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};; + DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-${CIRROS_VERSION}-x86_64-uec} + IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/${CIRROS_VERSION}/cirros-${CIRROS_VERSION}-x86_64-uec.tar.gz"};; esac HEAT_FETCHED_TEST_IMAGE=${HEAT_FETCHED_TEST_IMAGE:-""} diff --git a/tools/xen/README.md b/tools/xen/README.md index 712782bc5f..c8f47be393 100644 --- a/tools/xen/README.md +++ b/tools/xen/README.md @@ -97,7 +97,7 @@ Of course, use real passwords if this machine is exposed. # Download a vhd and a uec image IMAGE_URLS="\ https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz,\ - http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz" + http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz" # Explicitly set virt driver VIRT_DRIVER=xenserver From c68a8f67a70538d4081c63742a27743e1172c147 Mon Sep 17 00:00:00 2001 From: Dane LeBlanc Date: Thu, 20 Mar 2014 19:10:08 -0400 Subject: [PATCH 0006/3803] stack.sh fails for Cisco plugin with missing cisco_plugins.ini error When the Cisco Nexus monolithic plugin is configured in the localrc, stack.sh fails with the error message: sed: can't read /etc/neutron/plugins/cisco/cisco_plugins.ini: No such file or directory This failure was introduced with the merge of change set 76992 (bug #1285884). Change set 76992 removed the copying of Q_PLUGIN_EXTRA_CONF_FILES from the neutron project area to directories under /etc/neutron. This copy from neutron to /etc is required by the Cisco Nexus monolithic plugin, since this plugin follows the original model for generating extra config files based on localrc settings: - Copy default config file(s) from neutron project to /etc using a relative path (relative to neutron and relative to /) - Modify the copies of the config file(s) using localrc settings - Add a --config-file command line setting for neutron server which points to the modified config file(s) under /etc The fix is to add the copying of the default versions of the extra config files from neutron to /etc into the cisco devstack script. Change-Id: Ifbae197ed591f7cccfd6d51eae2b21e31eb0a409 Closes-Bug: #1295411 --- lib/neutron_plugins/cisco | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/neutron_plugins/cisco b/lib/neutron_plugins/cisco index a1b089e1a3..ca9be75a95 100644 --- a/lib/neutron_plugins/cisco +++ b/lib/neutron_plugins/cisco @@ -183,6 +183,15 @@ function neutron_plugin_configure_common { ovs_neutron_plugin_configure_common Q_PLUGIN_EXTRA_CONF_PATH=etc/neutron/plugins/cisco Q_PLUGIN_EXTRA_CONF_FILES=(cisco_plugins.ini) + # Copy extra config files to /etc so that they can be modified + # later according to Cisco-specific localrc settings. + mkdir -p /$Q_PLUGIN_EXTRA_CONF_PATH + local f + local extra_conf_file + for (( f=0; $f < ${#Q_PLUGIN_EXTRA_CONF_FILES[@]}; f+=1 )); do + extra_conf_file=$Q_PLUGIN_EXTRA_CONF_PATH/${Q_PLUGIN_EXTRA_CONF_FILES[$f]} + cp $NEUTRON_DIR/$extra_conf_file /$extra_conf_file + done else Q_PLUGIN_CONF_PATH=etc/neutron/plugins/cisco Q_PLUGIN_CONF_FILENAME=cisco_plugins.ini From 348ae44f640d14ebeb15ee3b514cf9b46e35771e Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Thu, 20 Mar 2014 16:56:04 +0000 Subject: [PATCH 0007/3803] XenAPI: Find location for XenAPI plugins Plugins can be installed in different places in dom0; re-enable the use of xapi_plugin_location Change-Id: If94ec6b250ad5b4f7730cfbf443d937eb85feb5c --- lib/nova_plugins/hypervisor-xenserver | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/nova_plugins/hypervisor-xenserver b/lib/nova_plugins/hypervisor-xenserver index 10bda2cf5b..c37969b9e8 100644 --- a/lib/nova_plugins/hypervisor-xenserver +++ b/lib/nova_plugins/hypervisor-xenserver @@ -63,9 +63,13 @@ function configure_nova_hypervisor { local ssh_dom0 ssh_dom0="sudo -u $DOMZERO_USER ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$dom0_ip" + # Find where the plugins should go in dom0 + xen_functions=`cat $TOP_DIR/tools/xen/functions` + PLUGIN_DIR=`$ssh_dom0 "$xen_functions; set -eux; xapi_plugin_location"` + # install nova plugins to dom0 tar -czf - -C $NOVA_DIR/plugins/xenserver/xenapi/etc/xapi.d/plugins/ ./ | - $ssh_dom0 'tar -xzf - -C /etc/xapi.d/plugins/ && chmod a+x /etc/xapi.d/plugins/*' + $ssh_dom0 "tar -xzf - -C $PLUGIN_DIR && chmod a+x $PLUGIN_DIR/*" # install console logrotate script tar -czf - -C $NOVA_DIR/tools/xenserver/ rotate_xen_guest_logs.sh | From 499315fb655680a97042d09787d377c754b28fc3 Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Tue, 25 Mar 2014 10:42:14 +0100 Subject: [PATCH 0008/3803] Use urandom for heat key generation Reading from /dev/random can block an virtual machine even for several minutes, when the entropy pool is empty at the read time. I have doubts we really need to use /dev/random here. Even the ssh-keygen uses /dev/urandom by default, so the /dev/random is a little bit overkill here. Change-Id: I6d2c6364c2b445304a33b0140e3cdc6804404b63 --- lib/heat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/heat b/lib/heat index f66f0a8454..26d58e0d7c 100644 --- a/lib/heat +++ b/lib/heat @@ -96,7 +96,7 @@ function configure_heat { iniset $HEAT_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition iniset $HEAT_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT iniset $HEAT_CONF database connection `database_connection_url heat` - iniset $HEAT_CONF DEFAULT auth_encryption_key `hexdump -n 16 -v -e '/1 "%02x"' /dev/random` + iniset $HEAT_CONF DEFAULT auth_encryption_key `hexdump -n 16 -v -e '/1 "%02x"' /dev/urandom` # logging iniset $HEAT_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL From 2a09d0c6a80a9ae65555e1f5b3bb1493d8253b09 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Fri, 14 Mar 2014 00:33:58 -0500 Subject: [PATCH 0009/3803] Update neutron-adv-test to use openstackclient commands There were a few references of keystoneclient in exercises/neutron-adv-test.sh, this patch will change those commands to their openstackclient equivalents. Change-Id: I88892fcfacd3dd6354ec269b270cee3da358447a --- exercises/neutron-adv-test.sh | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/exercises/neutron-adv-test.sh b/exercises/neutron-adv-test.sh index 0a24fe9df7..6679670aee 100755 --- a/exercises/neutron-adv-test.sh +++ b/exercises/neutron-adv-test.sh @@ -100,15 +100,6 @@ PUBLIC_ROUTER1_NET="admin-net1" DEMO1_ROUTER1_NET="demo1-net1" DEMO2_ROUTER1_NET="demo2-net1" -KEYSTONE="keystone" - -# Manually create a token by querying keystone (sending JSON data). Keystone -# returns a token and catalog of endpoints. We use python to parse the token -# and save it. - -TOKEN=`keystone token-get | grep ' id ' | awk '{print $4}'` -die_if_not_set $LINENO TOKEN "Keystone fail to get token" - # Various functions # ----------------- @@ -150,21 +141,21 @@ function get_image_id { function get_tenant_id { local TENANT_NAME=$1 - local TENANT_ID=`keystone tenant-list | grep " $TENANT_NAME " | head -n 1 | get_field 1` + local TENANT_ID=`openstack project list | grep " $TENANT_NAME " | head -n 1 | get_field 1` die_if_not_set $LINENO TENANT_ID "Failure retrieving TENANT_ID for $TENANT_NAME" echo "$TENANT_ID" } function get_user_id { local USER_NAME=$1 - local USER_ID=`keystone user-list | grep $USER_NAME | awk '{print $2}'` + local USER_ID=`openstack user list | grep $USER_NAME | awk '{print $2}'` die_if_not_set $LINENO USER_ID "Failure retrieving USER_ID for $USER_NAME" echo "$USER_ID" } function get_role_id { local ROLE_NAME=$1 - local ROLE_ID=`keystone role-list | grep $ROLE_NAME | awk '{print $2}'` + local ROLE_ID=`openstack role list | grep $ROLE_NAME | awk '{print $2}'` die_if_not_set $LINENO ROLE_ID "Failure retrieving ROLE_ID for $ROLE_NAME" echo "$ROLE_ID" } @@ -199,28 +190,21 @@ function neutron_debug_admin { } function add_tenant { - local TENANT=$1 - local USER=$2 - - $KEYSTONE tenant-create --name=$TENANT - $KEYSTONE user-create --name=$USER --pass=${ADMIN_PASSWORD} - - local USER_ID=$(get_user_id $USER) - local TENANT_ID=$(get_tenant_id $TENANT) - - $KEYSTONE user-role-add --user-id $USER_ID --role-id $(get_role_id Member) --tenant-id $TENANT_ID + openstack project create $1 + openstack user create $2 --password ${ADMIN_PASSWORD} --project $1 + openstack role add Member --project $1 --user $2 } function remove_tenant { local TENANT=$1 local TENANT_ID=$(get_tenant_id $TENANT) - $KEYSTONE tenant-delete $TENANT_ID + openstack project delete $TENANT_ID } function remove_user { local USER=$1 local USER_ID=$(get_user_id $USER) - $KEYSTONE user-delete $USER_ID + openstack user delete $USER_ID } function create_tenants { From cbd97ca975d1889d39f2ffd34b498080ef1ca3a9 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 27 Mar 2014 12:48:43 +0000 Subject: [PATCH 0010/3803] use disable/enable_apache_site on Ubuntu Using the specific Apache2 tools a2ensite and a2dissite (used in the methods disable/enable_apache_site in lib/apache) should be the preferred way to disable the default site and to enable the horizon site. fixes bug #1298031 Change-Id: I2f247c0b6e605a330086a558e03e2c36666c55be --- lib/horizon | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/horizon b/lib/horizon index 27c2d26a01..90a2bc5cef 100644 --- a/lib/horizon +++ b/lib/horizon @@ -114,11 +114,9 @@ function init_horizon { local horizon_conf=/etc/$APACHE_NAME/$APACHE_CONF_DIR/horizon.conf if is_ubuntu; then - # Clean up the old config name - sudo rm -f /etc/apache2/sites-enabled/000-default - # Be a good citizen and use the distro tools here + disable_apache_site 000-default sudo touch $horizon_conf - sudo a2ensite horizon.conf + enable_apache_site horizon.conf elif is_fedora; then sudo sed '/^Listen/s/^.*$/Listen 0.0.0.0:80/' -i /etc/httpd/conf/httpd.conf elif is_suse; then From cebd563508bcf163aa39fa1999e2e423577db13b Mon Sep 17 00:00:00 2001 From: JordanP Date: Fri, 28 Mar 2014 16:15:50 +0100 Subject: [PATCH 0011/3803] Remove keystone_ec2_uri flag from lib/heat As per I9908e17bed33fdc64d058a6d6db7b29f9c8d53d6 keystone_ec2_uri is now derived from auth_uri. Thus keystone_ec2_uri is useless now Change-Id: I97954fdbbd74a6920b307f33873bcc8d70331bf4 --- lib/heat | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/heat b/lib/heat index f66f0a8454..b62883386b 100644 --- a/lib/heat +++ b/lib/heat @@ -119,7 +119,6 @@ function configure_heat { # ec2authtoken iniset $HEAT_CONF ec2authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0 - iniset $HEAT_CONF ec2authtoken keystone_ec2_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ec2tokens # paste_deploy [[ "$HEAT_STANDALONE" = "True" ]] && iniset $HEAT_CONF paste_deploy flavor standalone From e3a9160c0d6c7802141fb147339ab12f76482c85 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 28 Mar 2014 12:40:56 -0500 Subject: [PATCH 0012/3803] Fix Neutron plugin XTRACE handling The various Neutron plugin files need to have unique variables for the xtrace state as they are sometimes nested more than two levels deep and MY_XTRACE is getting stomped. This gives each of the neutron_plugin and neutron_thirdparty include files a unique XTRACE state variable. I don't think this is a problem with any of the other plugin include files (yet) so this just handles Neutron for now. Change-Id: I7c272a48e7974edecaff5f431ff7443dd6622588 --- lib/neutron_plugins/bigswitch_floodlight | 4 ++-- lib/neutron_plugins/cisco | 4 ++-- lib/neutron_plugins/embrane | 4 ++-- lib/neutron_plugins/ibm | 4 ++-- lib/neutron_plugins/linuxbridge | 4 ++-- lib/neutron_plugins/midonet | 4 ++-- lib/neutron_plugins/ml2 | 4 ++-- lib/neutron_plugins/nec | 4 ++-- lib/neutron_plugins/nuage | 4 ++-- lib/neutron_plugins/ofagent_agent | 4 ++-- lib/neutron_plugins/oneconvergence | 4 ++-- lib/neutron_plugins/openvswitch | 4 ++-- lib/neutron_plugins/openvswitch_agent | 4 ++-- lib/neutron_plugins/ovs_base | 4 ++-- lib/neutron_plugins/plumgrid | 4 ++-- lib/neutron_plugins/ryu | 4 ++-- lib/neutron_plugins/services/firewall | 4 ++-- lib/neutron_plugins/services/loadbalancer | 4 ++-- lib/neutron_plugins/services/metering | 4 ++-- lib/neutron_plugins/services/vpn | 4 ++-- lib/neutron_plugins/vmware_nsx | 4 ++-- lib/neutron_thirdparty/bigswitch_floodlight | 4 ++-- lib/neutron_thirdparty/midonet | 4 ++-- lib/neutron_thirdparty/ryu | 4 ++-- lib/neutron_thirdparty/trema | 4 ++-- lib/neutron_thirdparty/vmware_nsx | 4 ++-- 26 files changed, 52 insertions(+), 52 deletions(-) diff --git a/lib/neutron_plugins/bigswitch_floodlight b/lib/neutron_plugins/bigswitch_floodlight index b1b77d7606..efdd9ef794 100644 --- a/lib/neutron_plugins/bigswitch_floodlight +++ b/lib/neutron_plugins/bigswitch_floodlight @@ -2,7 +2,7 @@ # ------------------------------------ # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +BS_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/ovs_base @@ -74,4 +74,4 @@ function neutron_plugin_check_adv_test_requirements { } # Restore xtrace -$MY_XTRACE +$BS_XTRACE diff --git a/lib/neutron_plugins/cisco b/lib/neutron_plugins/cisco index a1b089e1a3..7f7c049931 100644 --- a/lib/neutron_plugins/cisco +++ b/lib/neutron_plugins/cisco @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +CISCO_XTRACE=$(set +o | grep xtrace) set +o xtrace # Scecify the VSM parameters @@ -324,4 +324,4 @@ function neutron_plugin_setup_interface_driver { } # Restore xtrace -$MY_XTRACE +$CISCO_XTRACE diff --git a/lib/neutron_plugins/embrane b/lib/neutron_plugins/embrane index 62f9737e51..cce108a4a1 100644 --- a/lib/neutron_plugins/embrane +++ b/lib/neutron_plugins/embrane @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +EMBR_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/openvswitch @@ -37,4 +37,4 @@ function neutron_plugin_configure_service { } # Restore xtrace -$MY_XTRACE +$EMBR_XTRACE diff --git a/lib/neutron_plugins/ibm b/lib/neutron_plugins/ibm index 22c8578e64..3aef9d0359 100644 --- a/lib/neutron_plugins/ibm +++ b/lib/neutron_plugins/ibm @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +IBM_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/ovs_base @@ -130,4 +130,4 @@ function neutron_ovs_base_cleanup { } # Restore xtrace -$MY_XTRACE +$IBM_XTRACE diff --git a/lib/neutron_plugins/linuxbridge b/lib/neutron_plugins/linuxbridge index 362fd5b39e..96b14f190b 100644 --- a/lib/neutron_plugins/linuxbridge +++ b/lib/neutron_plugins/linuxbridge @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +LBRIDGE_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/linuxbridge_agent @@ -53,4 +53,4 @@ function has_neutron_plugin_security_group { } # Restore xtrace -$MY_XTRACE +$LBRIDGE_XTRACE diff --git a/lib/neutron_plugins/midonet b/lib/neutron_plugins/midonet index 742e3b2f0f..c5373d656f 100644 --- a/lib/neutron_plugins/midonet +++ b/lib/neutron_plugins/midonet @@ -6,7 +6,7 @@ MIDONET_API_PORT=${MIDONET_API_PORT:-8080} MIDONET_API_URL=${MIDONET_API_URL:-http://localhost:$MIDONET_API_PORT/midonet-api} # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +MN_XTRACE=$(set +o | grep xtrace) set +o xtrace function is_neutron_ovs_base_plugin { @@ -84,4 +84,4 @@ function neutron_plugin_check_adv_test_requirements { } # Restore xtrace -$MY_XTRACE +$MN_XTRACE diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2 index e985dcb4a5..db43fcf291 100644 --- a/lib/neutron_plugins/ml2 +++ b/lib/neutron_plugins/ml2 @@ -2,7 +2,7 @@ # ------------------------------ # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +ML2_XTRACE=$(set +o | grep xtrace) set +o xtrace # Enable this to simply and quickly enable tunneling with ML2. @@ -119,4 +119,4 @@ function has_neutron_plugin_security_group { } # Restore xtrace -$MY_XTRACE +$ML2_XTRACE diff --git a/lib/neutron_plugins/nec b/lib/neutron_plugins/nec index 6d4bfca244..d76f7d4aaf 100644 --- a/lib/neutron_plugins/nec +++ b/lib/neutron_plugins/nec @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +NEC_XTRACE=$(set +o | grep xtrace) set +o xtrace # Configuration parameters @@ -127,4 +127,4 @@ function neutron_plugin_check_adv_test_requirements { } # Restore xtrace -$MY_XTRACE +$NEC_XTRACE diff --git a/lib/neutron_plugins/nuage b/lib/neutron_plugins/nuage index 3649f39bfd..86f09d2b54 100644 --- a/lib/neutron_plugins/nuage +++ b/lib/neutron_plugins/nuage @@ -2,7 +2,7 @@ # ---------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +NU_XTRACE=$(set +o | grep xtrace) set +o xtrace function neutron_plugin_create_nova_conf { @@ -66,4 +66,4 @@ function has_neutron_plugin_security_group { } # Restore xtrace -$MY_XTRACE +$NU_XTRACE diff --git a/lib/neutron_plugins/ofagent_agent b/lib/neutron_plugins/ofagent_agent index 724df41d4c..6610ea3fb6 100644 --- a/lib/neutron_plugins/ofagent_agent +++ b/lib/neutron_plugins/ofagent_agent @@ -2,7 +2,7 @@ # ---------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +OFA_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/ovs_base @@ -91,4 +91,4 @@ function neutron_plugin_check_adv_test_requirements { } # Restore xtrace -$MY_XTRACE +$OFA_XTRACE diff --git a/lib/neutron_plugins/oneconvergence b/lib/neutron_plugins/oneconvergence index 0aebff629c..06f1eee8c7 100644 --- a/lib/neutron_plugins/oneconvergence +++ b/lib/neutron_plugins/oneconvergence @@ -1,7 +1,7 @@ # Neutron One Convergence plugin # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +OC_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/ovs_base @@ -73,4 +73,4 @@ function neutron_plugin_create_nova_conf { } # Restore xtrace -$MY_XTRACE +$OC_XTRACE diff --git a/lib/neutron_plugins/openvswitch b/lib/neutron_plugins/openvswitch index bdbc5a9367..c644fed1e3 100644 --- a/lib/neutron_plugins/openvswitch +++ b/lib/neutron_plugins/openvswitch @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +OVS_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/openvswitch_agent @@ -57,4 +57,4 @@ function has_neutron_plugin_security_group { } # Restore xtrace -$MY_XTRACE +$OVS_XTRACE diff --git a/lib/neutron_plugins/openvswitch_agent b/lib/neutron_plugins/openvswitch_agent index 3a2bdc316a..33ca17a841 100644 --- a/lib/neutron_plugins/openvswitch_agent +++ b/lib/neutron_plugins/openvswitch_agent @@ -2,7 +2,7 @@ # ----------------------------- # Save trace setting -PLUGIN_XTRACE=$(set +o | grep xtrace) +OVSA_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/ovs_base @@ -128,4 +128,4 @@ function neutron_plugin_check_adv_test_requirements { } # Restore xtrace -$PLUGIN_XTRACE +$OVSA_XTRACE diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base index 0a2ba58fbb..ae7f815aba 100644 --- a/lib/neutron_plugins/ovs_base +++ b/lib/neutron_plugins/ovs_base @@ -2,7 +2,7 @@ # ------------------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +OVSB_XTRACE=$(set +o | grep xtrace) set +o xtrace OVS_BRIDGE=${OVS_BRIDGE:-br-int} @@ -77,4 +77,4 @@ function _neutron_ovs_base_configure_nova_vif_driver { } # Restore xtrace -$MY_XTRACE +$OVSB_XTRACE diff --git a/lib/neutron_plugins/plumgrid b/lib/neutron_plugins/plumgrid index 19f94cb78c..67080f459f 100644 --- a/lib/neutron_plugins/plumgrid +++ b/lib/neutron_plugins/plumgrid @@ -3,7 +3,7 @@ # ------------------------------------ # Save trace settings -MY_XTRACE=$(set +o | grep xtrace) +PG_XTRACE=$(set +o | grep xtrace) set +o xtrace function neutron_plugin_create_nova_conf { @@ -52,4 +52,4 @@ function neutron_plugin_check_adv_test_requirements { is_service_enabled q-agt && is_service_enabled q-dhcp && return 0 } # Restore xtrace -$MY_XTRACE +$PG_XTRACE diff --git a/lib/neutron_plugins/ryu b/lib/neutron_plugins/ryu index 9ae36d38fa..ceb89faf6e 100644 --- a/lib/neutron_plugins/ryu +++ b/lib/neutron_plugins/ryu @@ -2,7 +2,7 @@ # ------------------ # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +RYU_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/ovs_base @@ -77,4 +77,4 @@ function neutron_plugin_check_adv_test_requirements { } # Restore xtrace -$MY_XTRACE +$RYU_XTRACE diff --git a/lib/neutron_plugins/services/firewall b/lib/neutron_plugins/services/firewall index ab6c32426a..b5253dbeef 100644 --- a/lib/neutron_plugins/services/firewall +++ b/lib/neutron_plugins/services/firewall @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +FW_XTRACE=$(set +o | grep xtrace) set +o xtrace FWAAS_PLUGIN=neutron.services.firewall.fwaas_plugin.FirewallPlugin @@ -24,4 +24,4 @@ function neutron_fwaas_stop { } # Restore xtrace -$MY_XTRACE +$FW_XTRACE diff --git a/lib/neutron_plugins/services/loadbalancer b/lib/neutron_plugins/services/loadbalancer index 531f52f9f5..78e7738345 100644 --- a/lib/neutron_plugins/services/loadbalancer +++ b/lib/neutron_plugins/services/loadbalancer @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +LB_XTRACE=$(set +o | grep xtrace) set +o xtrace @@ -48,4 +48,4 @@ function neutron_lbaas_stop { } # Restore xtrace -$MY_XTRACE +$LB_XTRACE diff --git a/lib/neutron_plugins/services/metering b/lib/neutron_plugins/services/metering index 0e5f75b27b..51123e2ff8 100644 --- a/lib/neutron_plugins/services/metering +++ b/lib/neutron_plugins/services/metering @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +METER_XTRACE=$(set +o | grep xtrace) set +o xtrace @@ -27,4 +27,4 @@ function neutron_metering_stop { } # Restore xtrace -$MY_XTRACE +$METER_XTRACE diff --git a/lib/neutron_plugins/services/vpn b/lib/neutron_plugins/services/vpn index e56d3613c2..d920ba621f 100644 --- a/lib/neutron_plugins/services/vpn +++ b/lib/neutron_plugins/services/vpn @@ -2,7 +2,7 @@ # --------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +VPN_XTRACE=$(set +o | grep xtrace) set +o xtrace @@ -30,4 +30,4 @@ function neutron_vpn_stop { } # Restore xtrace -$MY_XTRACE +$VPN_XTRACE diff --git a/lib/neutron_plugins/vmware_nsx b/lib/neutron_plugins/vmware_nsx index fe793549f7..f2f87355ef 100644 --- a/lib/neutron_plugins/vmware_nsx +++ b/lib/neutron_plugins/vmware_nsx @@ -2,7 +2,7 @@ # ------------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +NSX_XTRACE=$(set +o | grep xtrace) set +o xtrace source $TOP_DIR/lib/neutron_plugins/ovs_base @@ -146,4 +146,4 @@ function neutron_plugin_check_adv_test_requirements { } # Restore xtrace -$MY_XTRACE +$NSX_XTRACE diff --git a/lib/neutron_thirdparty/bigswitch_floodlight b/lib/neutron_thirdparty/bigswitch_floodlight index f03de56295..033731e27c 100644 --- a/lib/neutron_thirdparty/bigswitch_floodlight +++ b/lib/neutron_thirdparty/bigswitch_floodlight @@ -2,7 +2,7 @@ # ------------------------------------------ # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +BS3_XTRACE=$(set +o | grep xtrace) set +o xtrace BS_FL_CONTROLLERS_PORT=${BS_FL_CONTROLLERS_PORT:-localhost:80} @@ -49,4 +49,4 @@ function check_bigswitch_floodlight { } # Restore xtrace -$MY_XTRACE +$BS3_XTRACE diff --git a/lib/neutron_thirdparty/midonet b/lib/neutron_thirdparty/midonet index ad417bbc29..099a66eb2d 100644 --- a/lib/neutron_thirdparty/midonet +++ b/lib/neutron_thirdparty/midonet @@ -17,7 +17,7 @@ MIDONET_CLIENT_BRANCH=${MIDONET_CLIENT_BRANCH:-master} MIDONET_CLIENT_DIR=${MIDONET_CLIENT_DIR:-$MIDONET_DIR/python-midonetclient} # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +MN3_XTRACE=$(set +o | grep xtrace) set +o xtrace function configure_midonet { @@ -46,4 +46,4 @@ function check_midonet { } # Restore xtrace -$MY_XTRACE +$MN3_XTRACE diff --git a/lib/neutron_thirdparty/ryu b/lib/neutron_thirdparty/ryu index b2c1b613fe..bbe227eeb9 100644 --- a/lib/neutron_thirdparty/ryu +++ b/lib/neutron_thirdparty/ryu @@ -2,7 +2,7 @@ # ----------------------- # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +RYU3_XTRACE=$(set +o | grep xtrace) set +o xtrace @@ -75,4 +75,4 @@ function check_ryu { } # Restore xtrace -$MY_XTRACE +$RYU3_XTRACE diff --git a/lib/neutron_thirdparty/trema b/lib/neutron_thirdparty/trema index d465ac753e..f829aa82ff 100644 --- a/lib/neutron_thirdparty/trema +++ b/lib/neutron_thirdparty/trema @@ -13,7 +13,7 @@ TREMA_APPS_REPO=${TREMA_APPS_REPO:-https://github.com/trema/apps.git} TREMA_APPS_BRANCH=${TREMA_APPS_BRANCH:-master} # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +TREMA3_XTRACE=$(set +o | grep xtrace) set +o xtrace TREMA_DIR=${TREMA_DIR:-$DEST/trema} @@ -114,4 +114,4 @@ function check_trema { } # Restore xtrace -$MY_XTRACE +$TREMA3_XTRACE diff --git a/lib/neutron_thirdparty/vmware_nsx b/lib/neutron_thirdparty/vmware_nsx index 3fecc62560..7a76570775 100644 --- a/lib/neutron_thirdparty/vmware_nsx +++ b/lib/neutron_thirdparty/vmware_nsx @@ -11,7 +11,7 @@ # * NSX_GATEWAY_NETWORK_CIDR --> CIDR to configure br-ex, e.g. 172.24.4.211/24 # Save trace setting -MY_XTRACE=$(set +o | grep xtrace) +NSX3_XTRACE=$(set +o | grep xtrace) set +o xtrace # This is the interface that connects the Devstack instance @@ -83,4 +83,4 @@ function check_vmware_nsx { } # Restore xtrace -$MY_XTRACE +$NSX3_XTRACE From c9c0e370392915671063b43cb706adcabb06916a Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Mon, 31 Mar 2014 13:29:18 +0200 Subject: [PATCH 0013/3803] Update openSUSE-13.1 dependencies The package libxml2-python was replaced by python-libxml2 since 12.2. Rather use mariadb instead of mysql-community-server since the package receives far more attention. Change-Id: I8514048d05731750684862aa1e94331d7f602b68 --- files/rpms-suse/neutron | 2 +- files/rpms-suse/nova | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/rpms-suse/neutron b/files/rpms-suse/neutron index e9ccf5921b..462513d977 100644 --- a/files/rpms-suse/neutron +++ b/files/rpms-suse/neutron @@ -3,7 +3,7 @@ dnsmasq-utils # dist:opensuse-12.3 ebtables iptables iputils -mysql-community-server # NOPRIME +mariadb # NOPRIME python-boto python-eventlet python-greenlet diff --git a/files/rpms-suse/nova b/files/rpms-suse/nova index ee4917d702..ee75966e94 100644 --- a/files/rpms-suse/nova +++ b/files/rpms-suse/nova @@ -12,8 +12,7 @@ kvm # NOPRIME qemu # NOPRIME libvirt # NOPRIME libvirt-python # NOPRIME -libxml2-python -mysql-community-server # NOPRIME +mariadb # NOPRIME parted polkit python-M2Crypto @@ -31,6 +30,7 @@ python-feedparser python-greenlet python-iso8601 python-kombu +python-libxml2 python-lockfile python-lxml # needed for glance which is needed for nova --- this shouldn't be here python-mox From 0ebf2dfe62b094b1c7e507c75794dbef2bf250cd Mon Sep 17 00:00:00 2001 From: Ryan McNair Date: Fri, 7 Mar 2014 05:31:56 +0000 Subject: [PATCH 0014/3803] cinder_driver_certs.sh always passes driver In cinder_driver_certs.sh, the tests are run and output is piped to "tee". Currently, checking the exit code of this command only checks that "tee" exited properly. Using the pipefail option for this script will ensure the entire pipe succeeds before passing a driver. Change-Id: I58311aa0e2c779467d39c4477c4ea39d14eda207 Closes-Bug: #1289129 --- driver_certs/cinder_driver_cert.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driver_certs/cinder_driver_cert.sh b/driver_certs/cinder_driver_cert.sh index d2c636f89d..7726e7eb01 100755 --- a/driver_certs/cinder_driver_cert.sh +++ b/driver_certs/cinder_driver_cert.sh @@ -19,6 +19,8 @@ # # SCREEN_LOGDIR=/opt/stack/screen-logs +set -o pipefail + CERT_DIR=$(cd $(dirname "$0") && pwd) TOP_DIR=$(cd $CERT_DIR/..; pwd) From 1bb9ef63c535b274a4b8c905f54335bbb1d779c3 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Mon, 31 Mar 2014 11:41:54 -0700 Subject: [PATCH 0015/3803] Update compute driver name for Ironic Commit 08448e3a mistakenly updated the location of the Ironic compute driver to be loaded from within the Nova tree. However, no such module exists as the compute and scheduler drivers both live in the Ironic tree. This reverts that and adds a note explaining the setting. Change-Id: I7f32f77bd7e5fd1f6b41014ac71bbf6e1a7d84cf --- lib/nova_plugins/hypervisor-ironic | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/nova_plugins/hypervisor-ironic b/lib/nova_plugins/hypervisor-ironic index 9bd4217820..e72f7c1dc0 100644 --- a/lib/nova_plugins/hypervisor-ironic +++ b/lib/nova_plugins/hypervisor-ironic @@ -35,10 +35,12 @@ function cleanup_nova_hypervisor { # configure_nova_hypervisor - Set config files, create data dirs, etc function configure_nova_hypervisor { configure_libvirt - iniset $NOVA_CONF ironic sql_connection `database_connection_url nova_bm` LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.firewall.NoopFirewallDriver"} - iniset $NOVA_CONF DEFAULT compute_driver nova.virt.ironic.IronicDriver + # NOTE(adam_g): The ironic compute driver currently lives in the ironic + # tree. We purposely configure Nova to load it from there until it moves + # back into Nova proper. + iniset $NOVA_CONF DEFAULT compute_driver ironic.nova.virt.ironic.IronicDriver iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER iniset $NOVA_CONF DEFAULT scheduler_host_manager ironic.nova.scheduler.ironic_host_manager.IronicHostManager iniset $NOVA_CONF DEFAULT ram_allocation_ratio 1.0 @@ -49,6 +51,7 @@ function configure_nova_hypervisor { iniset $NOVA_CONF ironic admin_url $KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v2.0 iniset $NOVA_CONF ironic admin_tenant_name demo iniset $NOVA_CONF ironic api_endpoint http://$SERVICE_HOST:6385/v1 + iniset $NOVA_CONF ironic sql_connection `database_connection_url nova_bm` } # install_nova_hypervisor() - Install external components From 878376aabbeb958d950fc97c51d9c553ef2c6cbd Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 31 Mar 2014 19:14:57 -0400 Subject: [PATCH 0016/3803] Avoid pm-is-supported spam in logs Per the libvirt team, the only way to stop the spam in libvirtd logs is to install pm-utils package. Details are in: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/994476 Closes-Bug: #1274772 Closes-Bug: #1297512 Change-Id: Ia2f7a388470dcd8a3e2c12cf2980beccd65af94c --- files/apts/nova | 1 + 1 file changed, 1 insertion(+) diff --git a/files/apts/nova b/files/apts/nova index ae925c3293..5e6d39d531 100644 --- a/files/apts/nova +++ b/files/apts/nova @@ -15,6 +15,7 @@ sudo kvm # NOPRIME qemu # dist:wheezy,jessie NOPRIME libvirt-bin # NOPRIME +pm-utils libjs-jquery-tablesorter # Needed for coverage html reports vlan curl From 099e5e3f81233e2151f8645bc1ff6431eab9492b Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 31 Mar 2014 10:35:43 -0400 Subject: [PATCH 0017/3803] don't use pip -e install for libraries libraries in openstack shouldn't be installed editable, as it causes all manner of issues (especially complicated by the use of namespace packages). Install these globally as part of the devstack installation process. Change-Id: I11acb169e74069be0618e57496ff342f9e788493 --- clean.sh | 2 -- functions-common | 27 ++++++++++++++++++++++----- lib/infra | 2 +- lib/oslo | 31 ++++++++----------------------- lib/stackforge | 4 ++-- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/clean.sh b/clean.sh index 3707d8411e..f3b2a99fdf 100755 --- a/clean.sh +++ b/clean.sh @@ -40,7 +40,6 @@ source $TOP_DIR/lib/rpc_backend source $TOP_DIR/lib/tls -source $TOP_DIR/lib/oslo source $TOP_DIR/lib/horizon source $TOP_DIR/lib/keystone source $TOP_DIR/lib/glance @@ -84,7 +83,6 @@ if [[ -d $TOP_DIR/extras.d ]]; then fi # Clean projects -cleanup_oslo cleanup_cinder cleanup_glance cleanup_keystone diff --git a/functions-common b/functions-common index e6caaa3bff..6340c5ce5d 100644 --- a/functions-common +++ b/functions-common @@ -1239,6 +1239,19 @@ function pip_install { && $SUDO_PIP rm -rf ${pip_build_tmp} } +# this should be used if you want to install globally, all libraries should +# use this, especially *oslo* ones +function setup_install { + local project_dir=$1 + setup_package_with_req_sync $project_dir +} + +# this should be used for projects which run services, like all services +function setup_develop { + local project_dir=$1 + setup_package_with_req_sync $project_dir -e +} + # ``pip install -e`` the package, which processes the dependencies # using pip before running `setup.py develop` # @@ -1247,8 +1260,9 @@ function pip_install { # # Uses globals ``TRACK_DEPENDS``, ``REQUIREMENTS_DIR``, ``UNDO_REQUIREMENTS`` # setup_develop directory -function setup_develop { +function setup_package_with_req_sync { local project_dir=$1 + local flags=$2 # Don't update repo if local changes exist # Don't use buggy "git diff --quiet" @@ -1260,7 +1274,7 @@ function setup_develop { $SUDO_CMD python update.py $project_dir) fi - setup_develop_no_requirements_update $project_dir + setup_package $project_dir $flags # We've just gone and possibly modified the user's source tree in an # automated way, which is considered bad form if it's a development @@ -1281,12 +1295,15 @@ function setup_develop { # using pip before running `setup.py develop` # Uses globals ``STACK_USER`` # setup_develop_no_requirements_update directory -function setup_develop_no_requirements_update { +function setup_package { local project_dir=$1 + local flags=$2 - pip_install -e $project_dir + pip_install $flags $project_dir # ensure that further actions can do things like setup.py sdist - safe_chown -R $STACK_USER $1/*.egg-info + if [[ "$flags" == "-e" ]]; then + safe_chown -R $STACK_USER $1/*.egg-info + fi } diff --git a/lib/infra b/lib/infra index 7f70ff2787..e2f7dadf3d 100644 --- a/lib/infra +++ b/lib/infra @@ -46,7 +46,7 @@ function install_infra { # Install pbr git_clone $PBR_REPO $PBR_DIR $PBR_BRANCH - setup_develop $PBR_DIR + setup_install $PBR_DIR } # Restore xtrace diff --git a/lib/oslo b/lib/oslo index 8ef179c047..2e1f6bffa0 100644 --- a/lib/oslo +++ b/lib/oslo @@ -34,44 +34,29 @@ TASKFLOW_DIR=$DEST/taskflow # install_oslo() - Collect source and prepare function install_oslo { - # TODO(sdague): remove this once we get to Icehouse, this just makes - # for a smoother transition of existing users. - cleanup_oslo - git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH - setup_develop $CLIFF_DIR + setup_install $CLIFF_DIR git_clone $OSLOCFG_REPO $OSLOCFG_DIR $OSLOCFG_BRANCH - setup_develop $OSLOCFG_DIR + setup_install $OSLOCFG_DIR git_clone $OSLOMSG_REPO $OSLOMSG_DIR $OSLOMSG_BRANCH - setup_develop $OSLOMSG_DIR + setup_install $OSLOMSG_DIR git_clone $OSLORWRAP_REPO $OSLORWRAP_DIR $OSLORWRAP_BRANCH - setup_develop $OSLORWRAP_DIR + setup_install $OSLORWRAP_DIR git_clone $OSLOVMWARE_REPO $OSLOVMWARE_DIR $OSLOVMWARE_BRANCH - setup_develop $OSLOVMWARE_DIR + setup_install $OSLOVMWARE_DIR git_clone $PYCADF_REPO $PYCADF_DIR $PYCADF_BRANCH - setup_develop $PYCADF_DIR + setup_install $PYCADF_DIR git_clone $STEVEDORE_REPO $STEVEDORE_DIR $STEVEDORE_BRANCH - setup_develop $STEVEDORE_DIR + setup_install $STEVEDORE_DIR git_clone $TASKFLOW_REPO $TASKFLOW_DIR $TASKFLOW_BRANCH - setup_develop $TASKFLOW_DIR -} - -# cleanup_oslo() - purge possibly old versions of oslo -function cleanup_oslo { - # this means we've got an old oslo installed, lets get rid of it - if ! python -c 'import oslo.config' 2>/dev/null; then - echo "Found old oslo.config... removing to ensure consistency" - local PIP_CMD=$(get_pip_command) - pip_install oslo.config - sudo $PIP_CMD uninstall -y oslo.config - fi + setup_install $TASKFLOW_DIR } # Restore xtrace diff --git a/lib/stackforge b/lib/stackforge index dca08cc2c2..e6528afc59 100644 --- a/lib/stackforge +++ b/lib/stackforge @@ -40,10 +40,10 @@ function install_stackforge { cleanup_stackforge git_clone $WSME_REPO $WSME_DIR $WSME_BRANCH - setup_develop_no_requirements_update $WSME_DIR + setup_package $WSME_DIR git_clone $PECAN_REPO $PECAN_DIR $PECAN_BRANCH - setup_develop_no_requirements_update $PECAN_DIR + setup_package $PECAN_DIR } # cleanup_stackforge() - purge possibly old versions of stackforge libraries From e309e5a9f80808eaede72e4d8885d2b16a4b5153 Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 1 Apr 2014 16:28:36 +0100 Subject: [PATCH 0018/3803] Default RABBIT_HOST to be the SERVICE_HOST. Using localhost for RABBIT_HOST can cause problems - particularly on systems where IPv6 is partially broken and localhost resolves to an IPv6 address. The service should logically be running on SERVICE_HOST unless otherwise overridden. Change-Id: I6efb71b8b95174770066f38403d5d428ec88c3b6 --- stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 91f188f739..b4d30ee61c 100755 --- a/stack.sh +++ b/stack.sh @@ -425,7 +425,7 @@ initialize_database_backends && echo "Using $DATABASE_TYPE database backend" || # Rabbit connection info if is_service_enabled rabbit; then - RABBIT_HOST=${RABBIT_HOST:-localhost} + RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST} read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT." fi From e500346e404d99d8d779150c57043fcf8c5bcaae Mon Sep 17 00:00:00 2001 From: Bob Ball Date: Tue, 1 Apr 2014 22:31:00 +0100 Subject: [PATCH 0019/3803] Trove: Set appropriate service URLs Without setting these, they default to localhost which works in the the gate, but may not work in all devstack setups. Change-Id: I50eadbf0b4975cf04ec945bcf463c2738e6e7a3c --- lib/trove | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/trove b/lib/trove index 75b990f91e..42d22198f3 100644 --- a/lib/trove +++ b/lib/trove @@ -147,6 +147,9 @@ function configure_trove { iniset $TROVE_CONF_DIR/trove.conf DEFAULT rabbit_password $RABBIT_PASSWORD iniset $TROVE_CONF_DIR/trove.conf DEFAULT sql_connection `database_connection_url trove` iniset $TROVE_CONF_DIR/trove.conf DEFAULT add_addresses True + iniset $TROVE_CONF_DIR/trove.conf DEFAULT nova_compute_url $NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2 + iniset $TROVE_CONF_DIR/trove.conf DEFAULT cinder_url $CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1 + iniset $TROVE_CONF_DIR/trove.conf DEFAULT swift_url http://$SERVICE_HOST:8080/v1/AUTH_ iniset $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample DEFAULT rabbit_password $RABBIT_PASSWORD sed -i "s/localhost/$NETWORK_GATEWAY/g" $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample @@ -164,6 +167,9 @@ function configure_trove { iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT nova_proxy_admin_user radmin iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT nova_proxy_admin_tenant_name trove iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT nova_proxy_admin_pass $RADMIN_USER_PASS + iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT nova_compute_url $NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2 + iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT cinder_url $CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v1 + iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT swift_url http://$SERVICE_HOST:8080/v1/AUTH_ iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT trove_auth_url $TROVE_AUTH_ENDPOINT setup_trove_logging $TROVE_CONF_DIR/trove-taskmanager.conf fi From 9b38eb239294b91d3f8d6cc1471d12e8e15e7cb7 Mon Sep 17 00:00:00 2001 From: Stephen Ma Date: Wed, 2 Apr 2014 02:13:09 +0000 Subject: [PATCH 0020/3803] Neutron.conf is not setup unless q-svc is enabled In a multi-node environment, a node may have the neutron- openvswitch-agent running but not the neutron API server. The agent uses neutron.conf as one of the configuration files. Devstack sets up neutron.conf only when q-svc is enabled. Neutron.conf also needs to be configured when q-agt is enabled. Change-Id: I3d454caff0b49a61ee1a78f68b1bca98e29f21de Closes-Bug: 1184064 --- lib/neutron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index 294fface3d..546b17a3e2 100644 --- a/lib/neutron +++ b/lib/neutron @@ -274,7 +274,7 @@ function configure_neutron { if is_service_enabled q-fwaas; then _configure_neutron_fwaas fi - if is_service_enabled q-svc; then + if is_service_enabled q-agt q-svc; then _configure_neutron_service fi if is_service_enabled q-agt; then From ce365ce1ccc801e05a8ca0a6ee13f9a52886724d Mon Sep 17 00:00:00 2001 From: Sphoorti Joglekar Date: Tue, 1 Apr 2014 19:47:40 +0530 Subject: [PATCH 0021/3803] Edit docs to include git.openstack.org url This patch proposes a change to clone the devstack repository from git://git.openstack.org rather than https://github.com since git urls are faster than https and put less loads on the server. Change-Id: I7fe6a0f81be812dacfef575caa1cf0ae800f9a29 --- tools/build_docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_docs.sh b/tools/build_docs.sh index c566e6356f..384b1fabb6 100755 --- a/tools/build_docs.sh +++ b/tools/build_docs.sh @@ -22,7 +22,7 @@ # -------- # Source repo/branch for DevStack -MASTER_REPO=${MASTER_REPO:-https://github.com/openstack-dev/devstack.git} +MASTER_REPO=${MASTER_REPO:-git://git.openstack.org/openstack-dev/devstack} MASTER_BRANCH=${MASTER_BRANCH:-master} # http://devstack.org is a GitHub gh-pages site in the https://github.com/cloudbuilders/devtack.git repo From d7f7cb275cf0dd78a1490a056685b6753591d14f Mon Sep 17 00:00:00 2001 From: Sergey Skripnick Date: Fri, 14 Mar 2014 14:13:16 +0200 Subject: [PATCH 0022/3803] Add python-dev to general requirements Package python-openstackclient depends on pycrypto, and pycrypto depends on python-dev. Since python-openstackclient should be installed in any case, python-dev should be in general requirements. Change-Id: I2d6f5919bdc1175252c78cd203a8769d3892b923 Closes: bug 1292477 --- files/apts/cinder | 1 - files/apts/general | 1 + files/apts/glance | 1 - files/apts/keystone | 1 - files/apts/swift | 1 - files/rpms/cinder | 1 - files/rpms/general | 1 + files/rpms/glance | 1 - files/rpms/swift | 1 - 9 files changed, 2 insertions(+), 7 deletions(-) diff --git a/files/apts/cinder b/files/apts/cinder index 712fee99ec..7819c31655 100644 --- a/files/apts/cinder +++ b/files/apts/cinder @@ -2,6 +2,5 @@ tgt lvm2 qemu-utils libpq-dev -python-dev open-iscsi open-iscsi-utils # Deprecated since quantal dist:precise diff --git a/files/apts/general b/files/apts/general index 995c0c6f88..020d84fe84 100644 --- a/files/apts/general +++ b/files/apts/general @@ -18,5 +18,6 @@ tcpdump euca2ools # only for testing client tar python-cmd2 # dist:precise +python-dev python2.7 bc diff --git a/files/apts/glance b/files/apts/glance index 6dc878e4de..e80f447a16 100644 --- a/files/apts/glance +++ b/files/apts/glance @@ -5,7 +5,6 @@ libpq-dev # testonly libssl-dev # testonly libxml2-dev libxslt1-dev # testonly -python-dev python-eventlet python-routes python-greenlet diff --git a/files/apts/keystone b/files/apts/keystone index 564921b78b..57fde80aea 100644 --- a/files/apts/keystone +++ b/files/apts/keystone @@ -1,4 +1,3 @@ -python-dev python-lxml python-pastescript python-pastedeploy diff --git a/files/apts/swift b/files/apts/swift index 37d5bc049e..0c27b5b982 100644 --- a/files/apts/swift +++ b/files/apts/swift @@ -4,7 +4,6 @@ libffi-dev memcached python-configobj python-coverage -python-dev python-eventlet python-greenlet python-netifaces diff --git a/files/rpms/cinder b/files/rpms/cinder index 423d57cd98..ce6181eedf 100644 --- a/files/rpms/cinder +++ b/files/rpms/cinder @@ -1,7 +1,6 @@ lvm2 scsi-target-utils qemu-img -python-devel postgresql-devel iscsi-initiator-utils python-lxml #dist:f19,f20,rhel7 diff --git a/files/rpms/general b/files/rpms/general index 6cfe31eaf1..99be725d88 100644 --- a/files/rpms/general +++ b/files/rpms/general @@ -15,6 +15,7 @@ python-setuptools python-prettytable # dist:rhel6 [1] python-unittest2 python-virtualenv +python-devel screen tar tcpdump diff --git a/files/rpms/glance b/files/rpms/glance index 2007e2ea9e..f959c224d8 100644 --- a/files/rpms/glance +++ b/files/rpms/glance @@ -6,7 +6,6 @@ mysql-devel # testonly openssl-devel # testonly postgresql-devel # testonly python-argparse -python-devel python-eventlet python-greenlet python-lxml #dist:f19,f20,rhel7 diff --git a/files/rpms/swift b/files/rpms/swift index bf29ea29b7..ec53424ada 100644 --- a/files/rpms/swift +++ b/files/rpms/swift @@ -4,7 +4,6 @@ libffi-devel memcached python-configobj python-coverage -python-devel python-eventlet python-greenlet python-netifaces From 45d3d9ab2ba55ece2fa4add9cdbac08c0ab51a1d Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Wed, 2 Apr 2014 18:47:02 +0200 Subject: [PATCH 0023/3803] horizon does not uses django-registration It was removed from the requirements since long, by a47aa6fdc33ee29be886b45236e276a42a70b4df. Just the files/rpms/horizon referencing it. Change-Id: Ic1d413855e80a6f64d9d255f2d3a41f0925332c5 --- files/rpms/horizon | 1 - 1 file changed, 1 deletion(-) diff --git a/files/rpms/horizon b/files/rpms/horizon index 2dd24e0763..38d349d7a3 100644 --- a/files/rpms/horizon +++ b/files/rpms/horizon @@ -1,5 +1,4 @@ Django -django-registration gcc httpd # NOPRIME mod_wsgi # NOPRIME From 59d9cecb163c2a0ffa636b85149bb3c7e2c4626c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 2 Apr 2014 18:43:42 -0400 Subject: [PATCH 0024/3803] bring back oslo_clean oslo_clean is still needed at this point, removing it was premature, especially for upgrade testing. Change-Id: Ic845d835f587923423f83ac698bd825f3fa5dd1f --- clean.sh | 2 ++ lib/oslo | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/clean.sh b/clean.sh index f3b2a99fdf..3707d8411e 100755 --- a/clean.sh +++ b/clean.sh @@ -40,6 +40,7 @@ source $TOP_DIR/lib/rpc_backend source $TOP_DIR/lib/tls +source $TOP_DIR/lib/oslo source $TOP_DIR/lib/horizon source $TOP_DIR/lib/keystone source $TOP_DIR/lib/glance @@ -83,6 +84,7 @@ if [[ -d $TOP_DIR/extras.d ]]; then fi # Clean projects +cleanup_oslo cleanup_cinder cleanup_glance cleanup_keystone diff --git a/lib/oslo b/lib/oslo index 2e1f6bffa0..3cf72186a1 100644 --- a/lib/oslo +++ b/lib/oslo @@ -34,6 +34,10 @@ TASKFLOW_DIR=$DEST/taskflow # install_oslo() - Collect source and prepare function install_oslo { + # TODO(sdague): remove this once we get to Icehouse, this just makes + # for a smoother transition of existing users. + cleanup_oslo + git_clone $CLIFF_REPO $CLIFF_DIR $CLIFF_BRANCH setup_install $CLIFF_DIR @@ -59,6 +63,17 @@ function install_oslo { setup_install $TASKFLOW_DIR } +# cleanup_oslo() - purge possibly old versions of oslo +function cleanup_oslo { + # this means we've got an old oslo installed, lets get rid of it + if ! python -c 'import oslo.config' 2>/dev/null; then + echo "Found old oslo.config... removing to ensure consistency" + local PIP_CMD=$(get_pip_command) + pip_install oslo.config + sudo $PIP_CMD uninstall -y oslo.config + fi +} + # Restore xtrace $XTRACE From 1ab92d9f228326eb469ab9c9b466089347752e95 Mon Sep 17 00:00:00 2001 From: Alexander Gordeev Date: Thu, 3 Apr 2014 16:17:58 +0400 Subject: [PATCH 0025/3803] Delete unused neutron port For purpose of creating fake baremetal nodes environment for ironic functional/integration testing the unused neutron port to be created. Adding the removal part and helpful comments. Change-Id: I855ba1dbbf13f343d513ba387716996d6e4c20a6 --- lib/ironic | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/ironic b/lib/ironic index 979420f2cb..0e29e8c0ed 100644 --- a/lib/ironic +++ b/lib/ironic @@ -315,8 +315,13 @@ function enroll_vms { IRONIC_NET_ID=$(neutron net-list | grep private | get_field 1) local idx=0 - # work around; need to know what netns neutron uses for private network - neutron port-create private + # work around; need to know what netns neutron uses for private network. + # Without knowing how to interconnect the networks, PXE won't work properly + # for fake baremetal instances. The network should be configured prior all + # the instances operation. If we don't do this, the first port creation + # only happens in the middle of fake baremetal instance's spawning by nova, + # so we'll end up with unbootable fake baremetal VM due to broken PXE. + PORT_ID=$(neutron port-create private | grep " id " | get_field 2) while read MAC; do @@ -357,6 +362,10 @@ function enroll_vms { sudo ovs-vsctl -- --if-exists del-port ovs-tap1 -- add-port br-int ovs-tap1 tag=$TAG_ID sudo ovs-vsctl -- --if-exists del-port brbm-tap1 -- add-port $IRONIC_VM_NETWORK_BRIDGE brbm-tap1 + + # Remove the port needed only for workaround. For additional info read the + # comment at the beginning of this function + neutron port-delete $PORT_ID } function configure_tftpd { From 8450a92a4d0299fff89717e665ce31d54731d3f0 Mon Sep 17 00:00:00 2001 From: Paul Michali Date: Wed, 2 Apr 2014 19:12:22 +0000 Subject: [PATCH 0026/3803] Devstack support for Neutron VPNaaS Includes two enhancements to support VPNaaS and allow other vendor implementation support. Goal is to provide a solution for VPN .ini files until a more general solution can be defined to handle all reference and vendor .ini files. First, the /opt/stack/neutron/etc/vpn_agent.ini file is copied to /etc/neutron, to allow the selected device drivers for agent to be specified. Both reference and vendor implementations can be uncommented in this file, prior to stacking. Second, to allow vendor VPN implementations to provide an .ini file to the agent at start-up time, an environment variable is defined and can be set in the localrc to specify one or more .ini files. The desire is NOT to include vendor settings in the global vpn_agent.ini. Change-Id: I5370ee57bbe326eff505a53055da4fddc0838de4 Closes-Bug: 1301552 --- lib/neutron | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index 294fface3d..f110d9eff6 100644 --- a/lib/neutron +++ b/lib/neutron @@ -495,7 +495,7 @@ function start_neutron_agents { L3_CONF_FILES="$L3_CONF_FILES --config-file $Q_FWAAS_CONF_FILE" fi if is_service_enabled q-vpn; then - screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $L3_CONF_FILES" + screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $VPN_CONF_FILES" else screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY $L3_CONF_FILES" fi @@ -658,6 +658,7 @@ function _configure_neutron_dhcp_agent { } function _configure_neutron_l3_agent { + local cfg_file Q_L3_ENABLED=True # for l3-agent, only use per tenant router if we have namespaces Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE @@ -669,6 +670,15 @@ function _configure_neutron_l3_agent { Q_FWAAS_CONF_FILE=$NEUTRON_CONF_DIR/fwaas_driver.ini fi + if is_service_enabled q-vpn; then + Q_VPN_CONF_FILE=$NEUTRON_CONF_DIR/vpn_agent.ini + cp $NEUTRON_DIR/etc/vpn_agent.ini $Q_VPN_CONF_FILE + VPN_CONF_FILES="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE --config-file=$Q_VPN_CONF_FILE" + for cfg_file in ${Q_VPN_EXTRA_CONF_FILES[@]}; do + VPN_CONF_FILES+=" --config-file $cfg_file" + done + fi + cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE iniset $Q_L3_CONF_FILE DEFAULT verbose True From b4bef1fd1c62871cff6669d8c480ba2ddef96331 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Thu, 3 Apr 2014 19:24:57 +0200 Subject: [PATCH 0027/3803] Enable colors for Sahara log Change-Id: If915be21a7090c93e0be4c1961058c155ed9ca2c --- lib/sahara | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/sahara b/lib/sahara index 1ff0cf9c26..cb867105ba 100644 --- a/lib/sahara +++ b/lib/sahara @@ -142,6 +142,11 @@ function configure_sahara { iniset $SAHARA_CONF_FILE DEFAULT use_syslog $SYSLOG + # Format logging + if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then + setup_colorized_logging $SAHARA_CONF_FILE DEFAULT + fi + recreate_database sahara utf8 $SAHARA_BIN_DIR/sahara-db-manage --config-file $SAHARA_CONF_FILE upgrade head } From 43bd667be6b299eba72011a501bdf332665a045d Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Thu, 3 Apr 2014 11:13:13 -0700 Subject: [PATCH 0028/3803] Set flag in Tempest enabling Ironic scenario tests When Ironic has been configured as the backing compute driver, set the corresponding flag in Tempest that will cause a corresponding scenario test to run. Change-Id: I2bb6009c338cb301bd332e640a845fc1f6cb9336 --- lib/tempest | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tempest b/lib/tempest index a4558cedc1..3b2de7d291 100644 --- a/lib/tempest +++ b/lib/tempest @@ -360,6 +360,11 @@ function configure_tempest { # Networking iniset $TEMPEST_CONFIG network-feature-enabled api_extensions "${NETWORK_API_EXTENSIONS:-all}" + # Baremetal + if [ "$VIRT_DRIVER" = "ironic" ] ; then + iniset $TEMPEST_CONFIG baremetal driver_enabled True + fi + # service_available for service in ${TEMPEST_SERVICES//,/ }; do if is_service_enabled $service ; then From 0936e67f547ec8a9c77d6b66670c4f21d10c926c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 3 Apr 2014 14:48:48 -0400 Subject: [PATCH 0029/3803] add an image_list tool this is an interface from devstack to provide a more robust listing of the possible image urls that we might ask for during a devstack run. This allows tools like nodepool, or 3rd party CI systems to precache all this content in advance. Change-Id: I7474f553ecf28e51a2340bef5bcefa962dbadc24 --- tools/image_list.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 tools/image_list.sh diff --git a/tools/image_list.sh b/tools/image_list.sh new file mode 100755 index 0000000000..fa6b92ebb0 --- /dev/null +++ b/tools/image_list.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# Keep track of the devstack directory +TOP_DIR=$(cd $(dirname "$0")/.. && pwd) + +source $TOP_DIR/functions + +# Possible virt drivers, if we have more, add them here. Always keep +# dummy in the end position to trigger the fall through case. +DRIVERS="openvz ironic libvirt vsphere xenserver dummy" + +# Extra variables to trigger getting additional images. +ENABLED_SERVICES=h-api +HEAT_FETCHED_TEST_IMAGE="Fedora-i386-20-20131211.1-sda" + +# Loop over all the virt drivers and collect all the possible images +ALL_IMAGES="" +for driver in $DRIVERS; do + VIRT_DRIVER=$driver + URLS=$(source $TOP_DIR/stackrc && echo $IMAGE_URLS) + if [[ ! -z "$ALL_IMAGES" ]]; then + ALL_IMAGES+=, + fi + ALL_IMAGES+=$URLS +done + +# Make a nice list +echo $ALL_IMAGES | tr ',' '\n' | sort | uniq + +# Sanity check - ensure we have a minimum number of images +num=$(echo $ALL_IMAGES | tr ',' '\n' | sort | uniq | wc -l) +if [[ "$num" -lt 5 ]]; then + echo "ERROR: We only found $num images in $ALL_IMAGES, which can't be right." + exit 1 +fi From ad13ba291785f6110d5846db0f4b7a7f0b316da4 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 3 Apr 2014 10:43:33 -0400 Subject: [PATCH 0030/3803] download fedora x86_64 image if heat is enabled clean up the logic around producing a valid cfn image for heat testing. If heat is enabled, add the f20 x86_64 imageurl to the list of images that we support, and set that as the tempest orchestration image. The crux of this change is left commented out for now because we need a two phase update of nodepool content before we can move away from the old image (otherwise fedora mirrors will kill us with bad downloads). Change-Id: I1da9f259a3267b1bd27e9899755204c8fff41153 --- lib/tempest | 7 ++----- stackrc | 12 ++++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/tempest b/lib/tempest index a4558cedc1..0b5f332672 100644 --- a/lib/tempest +++ b/lib/tempest @@ -321,11 +321,8 @@ function configure_tempest { iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # Orchestration test image - if [[ ! -z "$HEAT_FETCHED_TEST_IMAGE" ]]; then - iniset $TEMPEST_CONFIG orchestration image_ref "$HEAT_FETCHED_TEST_IMAGE" - elif [[ "$HEAT_CREATE_TEST_IMAGE" = "True" ]]; then - disk_image_create /usr/share/tripleo-image-elements "vm fedora heat-cfntools" "i386" "fedora-vm-heat-cfntools-tempest" - iniset $TEMPEST_CONFIG orchestration image_ref "fedora-vm-heat-cfntools-tempest" + if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then + iniset $TEMPEST_CONFIG orchestration image_ref $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2") fi # Scenario diff --git a/stackrc b/stackrc index 4418be1c06..8320c9b1e1 100644 --- a/stackrc +++ b/stackrc @@ -341,11 +341,23 @@ case "$VIRT_DRIVER" in IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};; esac +# if heat is enabled, bring in a linux image with cfn enabled +# TODO(sdague) this next block can be removed after nodepool has the 64bit image in it's cache HEAT_FETCHED_TEST_IMAGE=${HEAT_FETCHED_TEST_IMAGE:-""} if [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-i386-20-20131211.1-sda" ]]; then + HEAT_CFN_IMAGE_URL="https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2" IMAGE_URLS+=",https://dl.fedoraproject.org/pub/fedora/linux/releases/20/Images/i386/$HEAT_FETCHED_TEST_IMAGE.qcow2" +elif [[ "$HEAT_FETCHED_TEST_IMAGE" == "Fedora-x86_64-20-20131211.1-sda" ]]; then + HEAT_CFN_IMAGE_URL="https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2" + IMAGE_URLS+=",https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2" fi +# Uncomment after nodepool changes land +#if [[ "$ENABLED_SERVICES" =~ 'h-api' ]]; then +# HEAT_CFN_IMAGE_URL=${HEAT_CFN_IMAGE_URL:-"https://download.fedoraproject.org/pub/fedora/linux/releases/20/Images/x86_64/Fedora-x86_64-20-20131211.1-sda.qcow2"} +# IMAGE_URLS+=",$HEAT_CFN_IMAGE_URL" +#fi + # 10Gb default volume backing file size VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-10250M} From 669c4fc4afd7c8e80f8c1eed202ef8fdc2c340f2 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 3 Apr 2014 11:28:01 -0400 Subject: [PATCH 0031/3803] increase heat guests heat is booting a real fedora, which makes m1.tiny completely not appropriate. We want to limit disk io, so boot as a 2 vcpu 1G guest to try to get some better performance out of these guests when tested in tempest. Change-Id: I80de67080a5106c2d8921e146c37c614ee5f8abf --- lib/tempest | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/tempest b/lib/tempest index 0b5f332672..639a0d02c9 100644 --- a/lib/tempest +++ b/lib/tempest @@ -320,9 +320,18 @@ function configure_tempest { iniset $TEMPEST_CONFIG boto http_socket_timeout 30 iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros} - # Orchestration test image - if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then - iniset $TEMPEST_CONFIG orchestration image_ref $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2") + # Orchestration Tests + if is_service_enabled heat; then + if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then + iniset $TEMPEST_CONFIG orchestration image_ref $(basename "$HEAT_CFN_IMAGE_URL" ".qcow2") + fi + # build a specialized heat flavor that is likely to be fast + available_flavors=$(nova flavor-list) + if [[ ! ( $available_flavors =~ 'm1.heat' ) ]]; then + nova flavor-create m1.heat 451 1024 0 2 + fi + iniset $TEMPEST_CONFIG orchestration instance_type "m1.heat" + iniset $TEMPEST_CONFIG orchestration build_timeout 900 fi # Scenario From 28491ef1f262803cce5740067a5b5372d40c0142 Mon Sep 17 00:00:00 2001 From: Masayuki Igawa Date: Tue, 4 Mar 2014 10:57:50 +0900 Subject: [PATCH 0032/3803] Install fping package Now, we can't use os-fping API by default because devstack doesn't install the fping package. This commit adds installing the package and enabling to use os-fping API. Change-Id: Ibdc7479a9038321e4fc3953774a6f3e1dac90530 Closes-Bug: #1287468 --- files/apts/n-api | 1 + files/rpms-suse/n-api | 1 + files/rpms/n-api | 1 + 3 files changed, 3 insertions(+) diff --git a/files/apts/n-api b/files/apts/n-api index e0e5e7f5b3..b4372d9361 100644 --- a/files/apts/n-api +++ b/files/apts/n-api @@ -1,2 +1,3 @@ python-dateutil msgpack-python +fping diff --git a/files/rpms-suse/n-api b/files/rpms-suse/n-api index 0f08daace3..6f59e603b2 100644 --- a/files/rpms-suse/n-api +++ b/files/rpms-suse/n-api @@ -1 +1,2 @@ python-dateutil +fping diff --git a/files/rpms/n-api b/files/rpms/n-api index 0f08daace3..6f59e603b2 100644 --- a/files/rpms/n-api +++ b/files/rpms/n-api @@ -1 +1,2 @@ python-dateutil +fping From 5ca261aadaa39c9076f5d31ad2b2a9f3c88bf83d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 4 Apr 2014 22:48:02 +0200 Subject: [PATCH 0033/3803] Fix typo in nova_admin_username The last parameter is unneeded, the value is always set to "nova". Change-Id: I7167d3559e8dfdb51ac8264e274f7ba167c18dfe --- lib/neutron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index 546b17a3e2..b7c9464f3d 100644 --- a/lib/neutron +++ b/lib/neutron @@ -765,7 +765,7 @@ function _configure_neutron_service { iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_status_change $Q_NOTIFY_NOVA_PORT_STATUS_CHANGE iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_data_changes $Q_NOTIFY_NOVA_ON_PORT_DATA_CHANGES iniset $NEUTRON_CONF DEFAULT nova_url "$NOVA_SERVICE_PROTOCOL://$NOVA_SERVICE_HOST:$NOVA_SERVICE_PORT/v2" - iniset $NEUTRON_CONF DEFAULT nova_admin_username nova $NOVA_USER + iniset $NEUTRON_CONF DEFAULT nova_admin_username nova iniset $NEUTRON_CONF DEFAULT nova_admin_password $SERVICE_PASSWORD ADMIN_TENANT_ID=$(openstack project list | awk "/ service / { print \$2 }") iniset $NEUTRON_CONF DEFAULT nova_admin_tenant_id $ADMIN_TENANT_ID From 7a7fb49b155c6efa5c5545ffe2a66f5f5e116f02 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 7 Apr 2014 13:31:07 +0000 Subject: [PATCH 0034/3803] only remove network states from Nova when n-net is enabled When n-net is not enabled but q-dhcp is enabled then it's not necessary to remove the states directory of nova-network. Change-Id: Ib4b37aa7df2b3cda3048b278ddad24e87e3744c9 --- stack.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stack.sh b/stack.sh index c715a8526b..4de79bb0eb 100755 --- a/stack.sh +++ b/stack.sh @@ -1001,9 +1001,13 @@ if is_service_enabled n-net q-dhcp; then fi clean_iptables - rm -rf ${NOVA_STATE_PATH}/networks - sudo mkdir -p ${NOVA_STATE_PATH}/networks - safe_chown -R ${USER} ${NOVA_STATE_PATH}/networks + + if is_service_enabled n-net; then + rm -rf ${NOVA_STATE_PATH}/networks + sudo mkdir -p ${NOVA_STATE_PATH}/networks + safe_chown -R ${USER} ${NOVA_STATE_PATH}/networks + fi + # Force IP forwarding on, just in case sudo sysctl -w net.ipv4.ip_forward=1 fi From ce03d102879755581222d1171e24d22654ff9ea4 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Mon, 7 Apr 2014 17:01:53 +0200 Subject: [PATCH 0035/3803] Fix openvswitch package and service names for openSUSE Change-Id: Iaf173422e4d009bdd7ed7ed79af2269c44039060 --- files/rpms-suse/opendaylight | 1 - lib/neutron_plugins/ovs_base | 3 +-- lib/opendaylight | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/files/rpms-suse/opendaylight b/files/rpms-suse/opendaylight index d6c7146331..f7fafffae1 100644 --- a/files/rpms-suse/opendaylight +++ b/files/rpms-suse/opendaylight @@ -1,4 +1,3 @@ openvswitch # NOPRIME -openvswitch-controller # NOPRIME openvswitch-switch # NOPRIME diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base index ae7f815aba..1e293a187e 100644 --- a/lib/neutron_plugins/ovs_base +++ b/lib/neutron_plugins/ovs_base @@ -44,9 +44,8 @@ function _neutron_ovs_base_install_agent_packages { # Ensure that the service is started restart_service openvswitch elif is_suse; then - install_package openvswitch + install_package openvswitch-switch restart_service openvswitch-switch - restart_service openvswitch-controller fi } diff --git a/lib/opendaylight b/lib/opendaylight index 1022e2c061..3a8f40f029 100644 --- a/lib/opendaylight +++ b/lib/opendaylight @@ -117,9 +117,8 @@ function install_opendaylight-compute { # Ensure that the service is started restart_service openvswitch elif is_suse; then - install_package openvswitch + install_package openvswitch-switch restart_service openvswitch-switch - restart_service openvswitch-controller fi } From cfc9ebba85cfdb2d03a0ed2451cad097f07e4b7e Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Tue, 8 Apr 2014 09:34:44 +0200 Subject: [PATCH 0036/3803] Set parameters for OpenDaylight ML2 driver Now that https://review.openstack.org/#/c/85589/ is merged, the OpenDaylight ML2 driver requires that url, username and password parameters are set. Change-Id: Iecbdd3275387bea145a5d274d359a15eceaee6b7 Closes-Bug: #1304226 --- extras.d/80-opendaylight.sh | 1 + lib/opendaylight | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/extras.d/80-opendaylight.sh b/extras.d/80-opendaylight.sh index 57b43288e0..c3c85fc963 100644 --- a/extras.d/80-opendaylight.sh +++ b/extras.d/80-opendaylight.sh @@ -14,6 +14,7 @@ if is_service_enabled odl-server; then configure_opendaylight init_opendaylight elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + configure_ml2_odl # This has to start before Neutron start_opendaylight elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then diff --git a/lib/opendaylight b/lib/opendaylight index 1022e2c061..e7f594bb78 100644 --- a/lib/opendaylight +++ b/lib/opendaylight @@ -35,6 +35,15 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base # ODL_MGR_IP= ODL_MGR_IP=${ODL_MGR_IP:-$SERVICE_HOST} +# The ODL endpoint URL +ODL_ENDPOINT=${ODL_ENDPOINT:-http://${ODL_MGR_IP}:8080/controller/nb/v2/neutron} + +# The ODL username +ODL_USERNAME=${ODL_USERNAME:-admin} + +# The ODL password +ODL_PASSWORD=${ODL_PASSWORD:-admin} + # ODL_DIR=$DEST/opendaylight @@ -80,6 +89,12 @@ function configure_opendaylight { echo "ovsdb.of.version=1.3" >> $ODL_DIR/opendaylight/configuration/config.ini } +function configure_ml2_odl { + populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl url=$ODL_ENDPOINT + populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl username=$ODL_USERNAME + populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_odl password=$ODL_PASSWORD +} + # init_opendaylight() - Initialize databases, etc. function init_opendaylight { # clean up from previous (possibly aborted) runs From dc97a0ec6aab120f0b19d6eea45c148c54befce6 Mon Sep 17 00:00:00 2001 From: Roman Prykhodchenko Date: Tue, 8 Apr 2014 14:19:58 +0300 Subject: [PATCH 0037/3803] Set a correct whitelist for drivers in Ironic Ironic recently introduced a feature called Drivers whitelist. It allows to specify the drivers that are enabled. The default list is not appropriate for functional and integration testing so devstack needs to be updated. Change-Id: Iccc81343f4d5a7dec8b371934a8c9849d9ffac23 --- lib/ironic | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ironic b/lib/ironic index 979420f2cb..a1d3d108c2 100644 --- a/lib/ironic +++ b/lib/ironic @@ -42,6 +42,7 @@ IRONIC_POLICY_JSON=$IRONIC_CONF_DIR/policy.json IRONIC_SCRIPTS_DIR=${IRONIC_SCRIPTS_DIR:-$TOP_DIR/tools/ironic/scripts} IRONIC_TEMPLATES_DIR=${IRONIC_TEMPLATES_DIR:-$TOP_DIR/tools/ironic/templates} IRONIC_BAREMETAL_BASIC_OPS=$(trueorfalse False $IRONIC_BAREMETAL_BASIC_OPS) +IRONIC_DRIVERS_WHITELIST=${IRONIC_DRIVERS_WHITELIST:-fake,pxe_ssh} IRONIC_SSH_USERNAME=${IRONIC_SSH_USERNAME:-`whoami`} IRONIC_SSH_KEY_DIR=${IRONIC_SSH_KEY_DIR:-$IRONIC_DATA_DIR/ssh_keys} IRONIC_SSH_KEY_FILENAME=${IRONIC_SSH_KEY_FILENAME:-ironic_key} @@ -171,6 +172,7 @@ function configure_ironic_conductor { cp -r $IRONIC_DIR/etc/ironic/rootwrap.d $IRONIC_CONF_DIR iniset $IRONIC_CONF_FILE DEFAULT rootwrap_config $IRONIC_ROOTWRAP_CONF + iniset $IRONIC_CONF_FILE DEFAULT drivers_whitelist $IRONIC_DRIVERS_WHITELIST iniset $IRONIC_CONF_FILE conductor api_url http://$HOST_IP:6385 iniset $IRONIC_CONF_FILE pxe tftp_server $HOST_IP iniset $IRONIC_CONF_FILE pxe tftp_root $IRONIC_TFTPBOOT_DIR From 61c09b88cd1e26e54e44408d3888e9b563d8f49f Mon Sep 17 00:00:00 2001 From: Thang Pham Date: Wed, 26 Mar 2014 11:57:04 -0400 Subject: [PATCH 0038/3803] Enabled non-root users to read nfs_shares.conf. If you use the cinder NFS driver, it will create a file called nfs_shares.conf, containing a list of NFS shares cinder can use. The file is created with 660 permissions and owned by root:root. When c-vol starts, it has problems reading nfs_shares.conf, resulting in a "[Errno 13] Permission denied: '/etc/cinder/nfs_shares.conf'". This patch creates nfs_shares.conf without using sudo, so c-vol can at least read it. Change-Id: Ifce2bd4b9ff2191445a1964c1ce09c823d096d68 Closes-Bug: #1297916 --- lib/cinder_plugins/nfs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cinder_plugins/nfs b/lib/cinder_plugins/nfs index 2d9d875245..5f4cc5369a 100644 --- a/lib/cinder_plugins/nfs +++ b/lib/cinder_plugins/nfs @@ -30,8 +30,7 @@ set +o xtrace function configure_cinder_driver { iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.drivers.nfs.NfsDriver" iniset $CINDER_CONF DEFAULT nfs_shares_config "$CINDER_CONF_DIR/nfs_shares.conf" - echo "$CINDER_NFS_SERVERPATH" | sudo tee "$CINDER_CONF_DIR/nfs_shares.conf" - sudo chmod 660 $CINDER_CONF_DIR/nfs_shares.conf + echo "$CINDER_NFS_SERVERPATH" | tee "$CINDER_CONF_DIR/nfs_shares.conf" } # Restore xtrace From 6066327474f9e4a9f3f6f3db11138f06c942ecb8 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Tue, 8 Apr 2014 13:47:17 -0400 Subject: [PATCH 0039/3803] euca-bundle-image requires a new architecture parameter Ran into this issue while trying to enable UCA. This switch was documented by the euca2ools team in: https://eucalyptus.atlassian.net/browse/DOC-807 Closes-Bug: #1304571 Change-Id: I1ea7c6a760c75e67f09e566d73e571be3a1d89ea --- lib/tempest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tempest b/lib/tempest index 0b5f332672..f366ff87ec 100644 --- a/lib/tempest +++ b/lib/tempest @@ -416,9 +416,9 @@ function init_tempest { ( #new namespace # tenant:demo ; user: demo source $TOP_DIR/accrc/demo/demo - euca-bundle-image -i "$kernel" --kernel true -d "$BOTO_MATERIALS_PATH" - euca-bundle-image -i "$ramdisk" --ramdisk true -d "$BOTO_MATERIALS_PATH" - euca-bundle-image -i "$disk_image" -d "$BOTO_MATERIALS_PATH" + euca-bundle-image -r x86_64 -i "$kernel" --kernel true -d "$BOTO_MATERIALS_PATH" + euca-bundle-image -r x86_64 -i "$ramdisk" --ramdisk true -d "$BOTO_MATERIALS_PATH" + euca-bundle-image -r x86_64 -i "$disk_image" -d "$BOTO_MATERIALS_PATH" ) 2>&1 Date: Tue, 8 Apr 2014 11:52:05 -0700 Subject: [PATCH 0040/3803] Restart only nova-compute when deploying Ironic lib/ironic redundantly restarts *all* Nova services as part of its bootstrap. Only nova-compute should be restarted to ensure its resource tracker has picked up newly enlisted Ironic nodes. This change limits the restart to only nova-compute and triggers it after nodes have been enlisted in Ironic. Change-Id: I87a508d6611a16fa6b966ab18e15aa9fbcc5e8c7 --- lib/ironic | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/ironic b/lib/ironic index 979420f2cb..3308791b5b 100644 --- a/lib/ironic +++ b/lib/ironic @@ -496,19 +496,6 @@ function prepare_baremetal_basic_ops { fi done - SCREEN_NAME=${SCREEN_NAME:-stack} - SERVICE_DIR=${SERVICE_DIR:-${DEST}/status} - - # stop all nova services - stop_nova || true - - # remove any nova services failure status - find $SERVICE_DIR/$SCREEN_NAME -name 'n-*.failure' -exec rm -f '{}' \; - - # start them again - start_nova_api - start_nova - TOKEN=$(keystone token-get | grep ' id ' | get_field 2) die_if_not_set $LINENO TOKEN "Keystone fail to get token" @@ -520,6 +507,11 @@ function prepare_baremetal_basic_ops { create_bridge_and_vms enroll_vms configure_tftpd + + # restart nova-compute to ensure its resource tracking is up to + # date with newly enrolled nodes + stop_nova_compute || true + start_nova_compute } function cleanup_baremetal_basic_ops { From 03523256179905b0bf8afd7ec0facb427e29de82 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Tue, 8 Apr 2014 13:43:56 +0100 Subject: [PATCH 0041/3803] Inject the domain name for devstack in tempest A new setting for the keystone domain name is introduced in tempest by change https://review.openstack.org/#/c/81872/. The default value in tempest is set to None, so that it is not devstack specific. It's up to devstack to configure the name of the keystone domain defined in devstack. Partially implements bp multi-keystone-api-version-tests Change-Id: I3d1406407759e1fdce0704fa2d6aa025f23a5f08 --- lib/tempest | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tempest b/lib/tempest index 0b5f332672..ebee315d53 100644 --- a/lib/tempest +++ b/lib/tempest @@ -153,6 +153,7 @@ function configure_tempest { # user and tenant are set up... ADMIN_USERNAME=${ADMIN_USERNAME:-admin} ADMIN_TENANT_NAME=${ADMIN_TENANT_NAME:-admin} + ADMIN_DOMAIN_NAME=${ADMIN_DOMAIN_NAME:-Default} TEMPEST_USERNAME=${TEMPEST_USERNAME:-demo} TEMPEST_TENANT_NAME=${TEMPEST_TENANT_NAME:-demo} ALT_USERNAME=${ALT_USERNAME:-alt_demo} @@ -267,6 +268,7 @@ function configure_tempest { iniset $TEMPEST_CONFIG identity admin_username $ADMIN_USERNAME iniset $TEMPEST_CONFIG identity admin_password "$password" iniset $TEMPEST_CONFIG identity admin_tenant_name $ADMIN_TENANT_NAME + iniset $TEMPEST_CONFIG identity admin_domain_name $ADMIN_DOMAIN_NAME iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v2} # Image From 815ef98fa2f61dcc10ad9cf74a64a7e1848dcb60 Mon Sep 17 00:00:00 2001 From: Shiv Haris Date: Tue, 8 Apr 2014 15:19:12 -0700 Subject: [PATCH 0042/3803] Add missing function neutron_plugin_configure_service to brocade specific file Closes bug: 1304701 Change-Id: I18f90865a015b9dc6db4123d46492140ca67a38f --- lib/neutron_plugins/brocade | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/neutron_plugins/brocade b/lib/neutron_plugins/brocade index 4443fa7823..e4cc754039 100644 --- a/lib/neutron_plugins/brocade +++ b/lib/neutron_plugins/brocade @@ -24,6 +24,30 @@ function neutron_plugin_configure_common { Q_PLUGIN_CLASS="neutron.plugins.brocade.NeutronPlugin.BrocadePluginV2" } +function neutron_plugin_configure_service { + + if [[ "$BROCADE_SWITCH_OS_VERSION" != "" ]]; then + iniset /$Q_PLUGIN_CONF_FILE switch osversion $BROCADE_SWITCH_OS_VERSION + fi + + if [[ "$BROCADE_SWITCH_OS_TYPE" != "" ]]; then + iniset /$Q_PLUGIN_CONF_FILE switch ostype $BROCADE_SWITCH_OS_TYPE + fi + + if [[ "$BROCADE_SWITCH_PASSWORD" != "" ]]; then + iniset /$Q_PLUGIN_CONF_FILE switch password $BROCADE_SWITCH_PASSWORD + fi + + if [[ "$BROCADE_SWITCH_USERNAME" != "" ]]; then + iniset /$Q_PLUGIN_CONF_FILE switch username $BROCADE_SWITCH_USERNAME + fi + + if [[ "$BROCADE_SWITCH_IPADDR" != "" ]]; then + iniset /$Q_PLUGIN_CONF_FILE switch address $BROCADE_SWITCH_IPADDR + fi + +} + function neutron_plugin_configure_debug_command { iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT external_network_bridge } From 5cd250f11e11aff809c207b0a77bc8e7ba5b6c36 Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Wed, 9 Apr 2014 16:42:31 -0400 Subject: [PATCH 0043/3803] Revert "Devstack support for Neutron VPNaaS" This reverts commit 8450a92a4d0299fff89717e665ce31d54731d3f0. Change-Id: I6dd0f44a1a57735de292bc4ed4eaa929dc308297 --- lib/neutron | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/neutron b/lib/neutron index f4a7f3852b..546b17a3e2 100644 --- a/lib/neutron +++ b/lib/neutron @@ -495,7 +495,7 @@ function start_neutron_agents { L3_CONF_FILES="$L3_CONF_FILES --config-file $Q_FWAAS_CONF_FILE" fi if is_service_enabled q-vpn; then - screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $VPN_CONF_FILES" + screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $L3_CONF_FILES" else screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY $L3_CONF_FILES" fi @@ -658,7 +658,6 @@ function _configure_neutron_dhcp_agent { } function _configure_neutron_l3_agent { - local cfg_file Q_L3_ENABLED=True # for l3-agent, only use per tenant router if we have namespaces Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE @@ -670,15 +669,6 @@ function _configure_neutron_l3_agent { Q_FWAAS_CONF_FILE=$NEUTRON_CONF_DIR/fwaas_driver.ini fi - if is_service_enabled q-vpn; then - Q_VPN_CONF_FILE=$NEUTRON_CONF_DIR/vpn_agent.ini - cp $NEUTRON_DIR/etc/vpn_agent.ini $Q_VPN_CONF_FILE - VPN_CONF_FILES="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE --config-file=$Q_VPN_CONF_FILE" - for cfg_file in ${Q_VPN_EXTRA_CONF_FILES[@]}; do - VPN_CONF_FILES+=" --config-file $cfg_file" - done - fi - cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE iniset $Q_L3_CONF_FILE DEFAULT verbose True From 6d227a4a5b64e052a27bf01450024504f6c50e3a Mon Sep 17 00:00:00 2001 From: Attila Fazekas Date: Wed, 9 Apr 2014 14:42:42 +0200 Subject: [PATCH 0044/3803] Add EPEL-7 repo for RHEL7 * RHEL7 requires epel for many dependencies. * The default RDO URL also switched to an icehouse version. * RHEL6 RDO repo also will be configured for RHEL7, but the configuration variable name remains RHEL6_RDO_REPO_RPM for compatibility reasons. Change-Id: I414c0f5357bf24c8d5657ea8231515461862e734 --- stack.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/stack.sh b/stack.sh index 983a6bf022..8ac013493c 100755 --- a/stack.sh +++ b/stack.sh @@ -215,21 +215,24 @@ if [[ "$os_VENDOR" =~ (Debian) ]]; then apt_get install --force-yes gplhost-archive-keyring fi -if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then - # Installing Open vSwitch on RHEL6 requires enabling the RDO repo. - RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack-havana/rdo-release-havana.rpm"} - RHEL6_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-havana"} +if [[ is_fedora && $DISTRO =~ (rhel) ]]; then + # Installing Open vSwitch on RHEL requires enabling the RDO repo. + RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack-icehouse/rdo-release-icehouse.rpm"} + RHEL6_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-icehouse"} if ! sudo yum repolist enabled $RHEL6_RDO_REPO_ID | grep -q $RHEL6_RDO_REPO_ID; then echo "RDO repo not detected; installing" yum_install $RHEL6_RDO_REPO_RPM || \ die $LINENO "Error installing RDO repo, cannot continue" fi - - # RHEL6 requires EPEL for many Open Stack dependencies - RHEL6_EPEL_RPM=${RHEL6_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"} + # RHEL requires EPEL for many Open Stack dependencies + if [[ $DISTRO =~ (rhel7) ]]; then + EPEL_RPM=${RHEL7_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/beta/7/x86_64/epel-release-7-0.1.noarch.rpm"} + else + EPEL_RPM=${RHEL6_EPEL_RPM:-"http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"} + fi if ! sudo yum repolist enabled epel | grep -q 'epel'; then echo "EPEL not detected; installing" - yum_install ${RHEL6_EPEL_RPM} || \ + yum_install ${EPEL_RPM} || \ die $LINENO "Error installing EPEL repo, cannot continue" fi From 746dceeb68e6bd2bee4b06fc5744821ba801642c Mon Sep 17 00:00:00 2001 From: Paul Michali Date: Wed, 2 Apr 2014 19:12:22 +0000 Subject: [PATCH 0045/3803] Devstack support for Neutron VPNaaS Includes two enhancements to support VPNaaS and allow other vendor implementation support. Goal is to provide a solution for VPN .ini files until a more general solution can be defined to handle all reference and vendor .ini files. First, the /opt/stack/neutron/etc/vpn_agent.ini file is copied to /etc/neutron, to allow the selected device drivers for agent to be specified. Both reference and vendor implementations can be uncommented in this file, prior to stacking. Second, to allow vendor VPN implementations to provide an .ini file to the agent at start-up time, an environment variable is defined and can be set in the localrc to specify one or more .ini files. The desire is NOT to include vendor settings in the global vpn_agent.ini. Change-Id: Ia8250db660216a5296cb6ba2af1538b8c90d187c Closes-Bug: 1301552 --- lib/neutron | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index 546b17a3e2..02dcaf60d8 100644 --- a/lib/neutron +++ b/lib/neutron @@ -127,6 +127,10 @@ Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-False} # See _configure_neutron_common() for details about setting it up declare -a Q_PLUGIN_EXTRA_CONF_FILES +# List of (optional) config files for VPN device drivers to use with +# the neutron-q-vpn agent +declare -a Q_VPN_EXTRA_CONF_FILES + Q_RR_CONF_FILE=$NEUTRON_CONF_DIR/rootwrap.conf if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then @@ -495,7 +499,7 @@ function start_neutron_agents { L3_CONF_FILES="$L3_CONF_FILES --config-file $Q_FWAAS_CONF_FILE" fi if is_service_enabled q-vpn; then - screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $L3_CONF_FILES" + screen_it q-vpn "cd $NEUTRON_DIR && $AGENT_VPN_BINARY $VPN_CONF_FILES" else screen_it q-l3 "cd $NEUTRON_DIR && python $AGENT_L3_BINARY $L3_CONF_FILES" fi @@ -658,6 +662,7 @@ function _configure_neutron_dhcp_agent { } function _configure_neutron_l3_agent { + local cfg_file Q_L3_ENABLED=True # for l3-agent, only use per tenant router if we have namespaces Q_L3_ROUTER_PER_TENANT=$Q_USE_NAMESPACE @@ -669,6 +674,15 @@ function _configure_neutron_l3_agent { Q_FWAAS_CONF_FILE=$NEUTRON_CONF_DIR/fwaas_driver.ini fi + if is_service_enabled q-vpn; then + Q_VPN_CONF_FILE=$NEUTRON_CONF_DIR/vpn_agent.ini + cp $NEUTRON_DIR/etc/vpn_agent.ini $Q_VPN_CONF_FILE + VPN_CONF_FILES="--config-file $NEUTRON_CONF --config-file=$Q_L3_CONF_FILE --config-file=$Q_VPN_CONF_FILE" + for cfg_file in ${Q_VPN_EXTRA_CONF_FILES[@]}; do + VPN_CONF_FILES+=" --config-file $cfg_file" + done + fi + cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE iniset $Q_L3_CONF_FILE DEFAULT verbose True From 0526bb8222c14f2dfe927305625d78a3f13021b3 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Thu, 3 Apr 2014 08:27:33 +0200 Subject: [PATCH 0046/3803] Use iniset for changing my.conf and avoid deprecated config options The mysql config file is using INI format so use the iniset function to manipulate it. This change also rearranges the config updates a bit allowing us to make mulitple changes in a single sudo call. This reduces the number of required process forks, and the number of times the 'functions' file needs to be sourced a bit. The "log-slow-queries" option is deprecated since mysql 5.1.29 and got removed with 5.6.x. Use the newer slow-query-log-file/slow-query-log settings instead. They are available since 5.1.12. This fixes a problem with running devstack with mysql-5.6, which is e.g. part of openSUSE 13.1. Change-Id: Iea28bf05c664b5387d51dae1a63a780344623596 --- lib/databases/mysql | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/lib/databases/mysql b/lib/databases/mysql index 7a0145ae1b..0a96cf8af4 100644 --- a/lib/databases/mysql +++ b/lib/databases/mysql @@ -83,36 +83,28 @@ function configure_database_mysql { # Now update ``my.cnf`` for some local needs and restart the mysql service - # Change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) - sudo sed -i '/^bind-address/s/127.0.0.1/0.0.0.0/g' $MY_CONF + # Change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) and + # set default db type to InnoDB + sudo bash -c "source $TOP_DIR/functions && \ + iniset $MY_CONF mysqld bind-address 0.0.0.0 && \ + iniset $MY_CONF mysqld default-storage-engine InnoDB" - # Set default db type to InnoDB - if sudo grep -q "default-storage-engine" $MY_CONF; then - # Change it - sudo bash -c "source $TOP_DIR/functions; iniset $MY_CONF mysqld default-storage-engine InnoDB" - else - # Add it - sudo sed -i -e "/^\[mysqld\]/ a \ -default-storage-engine = InnoDB" $MY_CONF - fi if [[ "$DATABASE_QUERY_LOGGING" == "True" ]]; then echo_summary "Enabling MySQL query logging" - # Turn on slow query log - sudo sed -i '/log.slow.queries/d' $MY_CONF - sudo sed -i -e "/^\[mysqld\]/ a \ - log-slow-queries = /var/log/mysql/mysql-slow.log" $MY_CONF - - # Log all queries (any query taking longer than 0 seconds) - sudo sed -i '/long.query.time/d' $MY_CONF - sudo sed -i -e "/^\[mysqld\]/ a \ - long-query-time = 0" $MY_CONF - - # Log all non-indexed queries - sudo sed -i '/log.queries.not.using.indexes/d' $MY_CONF - sudo sed -i -e "/^\[mysqld\]/ a \ - log-queries-not-using-indexes" $MY_CONF + sudo sed -e '/log.slow.queries/d' \ + -e '/long.query.time/d' \ + -e '/log.queries.not.using.indexes/d' \ + -i $MY_CONF + + # Turn on slow query log, log all queries (any query taking longer than + # 0 seconds) and log all non-indexed queries + sudo bash -c "source $TOP_DIR/functions && \ + iniset $MY_CONF mysqld slow-query-log 1 && \ + iniset $MY_CONF mysqld slow-query-log-file /var/log/mysql/mysql-slow.log && \ + iniset $MY_CONF mysqld long-query-time 0 && \ + iniset $MY_CONF mysqld log-queries-not-using-indexes 1" fi From 55dd68a6e17f0e5e13d7d6f83fee6003069951d2 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Fri, 11 Apr 2014 17:08:28 +0200 Subject: [PATCH 0047/3803] Use nova bindir of /usr/bin on SUSE Similar to Fedora pip on SUSE installs things into /usr/bin by default. Change-Id: I73a71288915b99d553ebe9d8e17ac7abef451a60 --- lib/nova | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nova b/lib/nova index 5cc94ec676..47e4afcf24 100644 --- a/lib/nova +++ b/lib/nova @@ -438,8 +438,8 @@ function create_nova_conf { iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x" iniset $NOVA_CONF osapi_v3 enabled "True" - if is_fedora; then - # nova defaults to /usr/local/bin, but fedora pip likes to + if is_fedora || is_suse; then + # nova defaults to /usr/local/bin, but fedora and suse pip like to # install things in /usr/bin iniset $NOVA_CONF DEFAULT bindir "/usr/bin" fi From 8af6faed817e8128498551603ee04470559410a5 Mon Sep 17 00:00:00 2001 From: Adam Gandelman Date: Fri, 11 Apr 2014 17:06:14 -0700 Subject: [PATCH 0048/3803] Enable console logging for Ironic baremetal VMs Logs console output of VMs created for use by Ironic to $DATA_DIR/ironic/logs. This gives Jenkins something to archive that will be useful for debugging any deployment ramdisk issue blocking provisioning. Change-Id: I7d234a6a13dbe8579f685e46d7712dae497272a5 --- lib/ironic | 15 ++++++++++- tools/ironic/scripts/configure-vm | 41 ++++++++++++++++++++----------- tools/ironic/scripts/create-nodes | 17 +++++++++++-- tools/ironic/templates/vm.xml | 9 +++++-- 4 files changed, 63 insertions(+), 19 deletions(-) diff --git a/lib/ironic b/lib/ironic index 8d7687bac5..1aa85eab80 100644 --- a/lib/ironic +++ b/lib/ironic @@ -65,6 +65,10 @@ IRONIC_VM_NETWORK_RANGE=${IRONIC_VM_NETWORK_RANGE:-192.0.2.0/24} IRONIC_VM_MACS_CSV_FILE=${IRONIC_VM_MACS_CSV_FILE:-$IRONIC_DATA_DIR/ironic_macs.csv} IRONIC_AUTHORIZED_KEYS_FILE=${IRONIC_AUTHORIZED_KEYS_FILE:-$HOME/.ssh/authorized_keys} +# By default, baremetal VMs will console output to file. +IRONIC_VM_LOG_CONSOLE=${IRONIC_VM_LOG_CONSOLE:-True} +IRONIC_VM_LOG_DIR=${IRONIC_VM_LOG_DIR:-$IRONIC_DATA_DIR/logs/} + DIB_DIR=${DIB_DIR:-$DEST/diskimage-builder} # Use DIB to create deploy ramdisk and kernel. @@ -177,6 +181,9 @@ function configure_ironic_conductor { iniset $IRONIC_CONF_FILE pxe tftp_server $HOST_IP iniset $IRONIC_CONF_FILE pxe tftp_root $IRONIC_TFTPBOOT_DIR iniset $IRONIC_CONF_FILE pxe tftp_master_path $IRONIC_TFTPBOOT_DIR/master_images + if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] ; then + iniset $IRONIC_CONF_FILE pxe pxe_append_params "nofb nomodeset vga=normal console=ttyS0" + fi } # create_ironic_cache_dir() - Part of the init_ironic() process @@ -306,9 +313,15 @@ function configure_ironic_dirs { function create_bridge_and_vms { # Call libvirt setup scripts in a new shell to ensure any new group membership sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/setup-network" + if [[ "$IRONIC_VM_LOG_CONSOLE" == "True" ]] ; then + LOG_ARG="$IRONIC_VM_LOG_DIR" + else + LOG_ARG="" + fi sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/create-nodes \ $IRONIC_VM_SPECS_CPU $IRONIC_VM_SPECS_RAM $IRONIC_VM_SPECS_DISK \ - amd64 $IRONIC_VM_COUNT $IRONIC_VM_NETWORK_BRIDGE $IRONIC_VM_EMULATOR" >> $IRONIC_VM_MACS_CSV_FILE + amd64 $IRONIC_VM_COUNT $IRONIC_VM_NETWORK_BRIDGE $IRONIC_VM_EMULATOR \ + $LOG_ARG" >> $IRONIC_VM_MACS_CSV_FILE } function enroll_vms { diff --git a/tools/ironic/scripts/configure-vm b/tools/ironic/scripts/configure-vm index 9936b76c4f..4c42c491c5 100755 --- a/tools/ironic/scripts/configure-vm +++ b/tools/ironic/scripts/configure-vm @@ -9,6 +9,25 @@ templatedir = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'templates') +CONSOLE_LOG = """ + + + + + + + + + + + + + + + +""" + + def main(): parser = argparse.ArgumentParser( description="Configure a kvm virtual machine for the seed image.") @@ -30,6 +49,8 @@ def main(): help='The libvirt network name to use') parser.add_argument('--libvirt-nic-driver', default='e1000', help='The libvirt network driver to use') + parser.add_argument('--console-log', + help='File to log console') parser.add_argument('--emulator', default=None, help='Path to emulator bin for vm template') args = parser.parse_args() @@ -44,6 +65,7 @@ def main(): 'cpus': args.cpus, 'bootdev': args.bootdev, 'network': args.network, + 'nicdriver': args.libvirt_nic_driver, 'emulator': args.emulator, } @@ -55,22 +77,13 @@ def main(): elif os.path.exists("/usr/bin/qemu-kvm"): # Redhat params['emulator'] = "/usr/bin/qemu-kvm" - nicparams = { - 'nicdriver': args.libvirt_nic_driver, - 'network': args.network, - } - - params['bm_network'] = """ - - - - - -
-""" % nicparams - + if args.console_log: + params['console_log'] = CONSOLE_LOG % {'console_log': args.console_log} + else: + params['console_log'] = '' libvirt_template = source_template % params conn = libvirt.open("qemu:///system") + a = conn.defineXML(libvirt_template) print ("Created machine %s with UUID %s" % (args.name, a.UUIDString())) diff --git a/tools/ironic/scripts/create-nodes b/tools/ironic/scripts/create-nodes index d81113a4d5..140bffe46f 100755 --- a/tools/ironic/scripts/create-nodes +++ b/tools/ironic/scripts/create-nodes @@ -4,7 +4,7 @@ # Creates baremetal poseur nodes for ironic testing purposes -set -exu +set -ex # Keep track of the devstack directory TOP_DIR=$(cd $(dirname "$0")/.. && pwd) @@ -24,6 +24,7 @@ esac TOTAL=$(($5 - 1)) BRIDGE=$6 EMULATOR=$7 +LOGDIR=$8 LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"e1000"} LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"} @@ -43,6 +44,10 @@ if [ "$pool_state" != "running" ] ; then virsh pool-start $LIBVIRT_STORAGE_POOL >&2 fi +if [ -n "$LOGDIR" ] ; then + mkdir -p "$LOGDIR" +fi + PREALLOC= if [ -f /etc/debian_version ]; then PREALLOC="--prealloc-metadata" @@ -51,6 +56,11 @@ fi DOMS="" for idx in $(seq 0 $TOTAL) ; do NAME="baremetal${BRIDGE}_${idx}" + if [ -n "$LOGDIR" ] ; then + VM_LOGGING="--console-log $LOGDIR/${NAME}_console.log" + else + VM_LOGGING="" + fi DOMS="$DOMS $NAME" VOL_NAME="baremetal${BRIDGE}-${idx}.qcow2" (virsh list --all | grep -q $NAME) && continue @@ -62,7 +72,10 @@ for idx in $(seq 0 $TOTAL) ; do # Pre-touch the VM to set +C, as it can only be set on empty files. sudo touch "$volume_path" sudo chattr +C "$volume_path" || true - $TOP_DIR/scripts/configure-vm --bootdev network --name $NAME --image "$volume_path" --arch $ARCH --cpus $CPU --memory $MEM --libvirt-nic-driver $LIBVIRT_NIC_DRIVER --emulator $EMULATOR --network $BRIDGE >&2 + $TOP_DIR/scripts/configure-vm \ + --bootdev network --name $NAME --image "$volume_path" \ + --arch $ARCH --cpus $CPU --memory $MEM --libvirt-nic-driver $LIBVIRT_NIC_DRIVER \ + --emulator $EMULATOR --network $BRIDGE $VM_LOGGING >&2 done for dom in $DOMS ; do diff --git a/tools/ironic/templates/vm.xml b/tools/ironic/templates/vm.xml index b18dec055f..4f40334b7d 100644 --- a/tools/ironic/templates/vm.xml +++ b/tools/ironic/templates/vm.xml @@ -27,14 +27,19 @@
- %(network)s - %(bm_network)s + + + + +
+