From 2f6c30b33c074a03748b7c0273c49fe81ab96607 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Thu, 13 Mar 2014 23:32:46 -0500 Subject: [PATCH 0001/3783] 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 0002/3783] 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 0003/3783] 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 cebd563508bcf163aa39fa1999e2e423577db13b Mon Sep 17 00:00:00 2001 From: JordanP Date: Fri, 28 Mar 2014 16:15:50 +0100 Subject: [PATCH 0004/3783] 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 878376aabbeb958d950fc97c51d9c553ef2c6cbd Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 31 Mar 2014 19:14:57 -0400 Subject: [PATCH 0005/3783] 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 1ab92d9f228326eb469ab9c9b466089347752e95 Mon Sep 17 00:00:00 2001 From: Alexander Gordeev Date: Thu, 3 Apr 2014 16:17:58 +0400 Subject: [PATCH 0006/3783] 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 0007/3783] 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 0008/3783] 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 0009/3783] 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 669c4fc4afd7c8e80f8c1eed202ef8fdc2c340f2 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 3 Apr 2014 11:28:01 -0400 Subject: [PATCH 0010/3783] 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 5ca261aadaa39c9076f5d31ad2b2a9f3c88bf83d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 4 Apr 2014 22:48:02 +0200 Subject: [PATCH 0011/3783] 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 0012/3783] 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 0013/3783] 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 0014/3783] 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 0015/3783] 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 0016/3783] 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 0017/3783] 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 0018/3783] 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 0019/3783] 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 0020/3783] 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 0021/3783] 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 0022/3783] 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 0023/3783] 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 0024/3783] 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 0025/3783] 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 0026/3783] 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 + + + + +
+