"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "devstack/plugin.sh" between
octavia-7.1.1.tar.gz and octavia-8.0.0.tar.gz

About: OpenStack Octavia is an operator-grade reference implementation for Load Balancing as a Service (LBaaS).
The "Wallaby" series (latest release).

plugin.sh  (octavia-7.1.1):plugin.sh  (octavia-8.0.0)
skipping to change at line 96 skipping to change at line 96
export DIB_REPOREF_amphora_agent=$(git --git-dir="$OCTAVIA_DIR/.git" log -1 --pretty="format:%H") export DIB_REPOREF_amphora_agent=$(git --git-dir="$OCTAVIA_DIR/.git" log -1 --pretty="format:%H")
TOKEN=$(openstack token issue -f value -c id) TOKEN=$(openstack token issue -f value -c id)
die_if_not_set $LINENO TOKEN "Keystone failed to get token." die_if_not_set $LINENO TOKEN "Keystone failed to get token."
octavia_dib_tracing_arg= octavia_dib_tracing_arg=
if [ "$OCTAVIA_DIB_TRACING" != "0" ]; then if [ "$OCTAVIA_DIB_TRACING" != "0" ]; then
octavia_dib_tracing_arg="-x" octavia_dib_tracing_arg="-x"
fi fi
if [[ ${OCTAVIA_AMP_BASE_OS:+1} ]] ; then if [[ ${OCTAVIA_AMP_BASE_OS:+1} ]] ; then
export PARAM_OCTAVIA_AMP_BASE_OS='-i '$OCTAVIA_AMP_BASE_OS export PARAM_OCTAVIA_AMP_BASE_OS='-i '$OCTAVIA_AMP_BASE_OS
fi fi
if [[ ${OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID:+1} ]] ; then if [[ ${OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID:+1} ]] ; then
export PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID='-d '$OCTAVIA_AMP_DISTRIBUT ION_RELEASE_ID export PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID='-d '$OCTAVIA_AMP_DISTR IBUTION_RELEASE_ID
fi fi
if [[ ${OCTAVIA_AMP_IMAGE_SIZE:+1} ]] ; then if [[ ${OCTAVIA_AMP_IMAGE_SIZE:+1} ]] ; then
export PARAM_OCTAVIA_AMP_IMAGE_SIZE='-s '$OCTAVIA_AMP_IMAGE_SIZE export PARAM_OCTAVIA_AMP_IMAGE_SIZE='-s '$OCTAVIA_AMP_IMAGE_SIZE
fi
if [[ ${OCTAVIA_AMP_IMAGE_ARCH:+1} ]] ; then
export PARAM_OCTAVIA_AMP_IMAGE_ARCH='-a '$OCTAVIA_AMP_IMAGE_ARCH
fi
if [[ "$(trueorfalse False OCTAVIA_AMP_DISABLE_TMP_FS)" == "True" ]]; then
export PARAM_OCTAVIA_AMP_DISABLE_TMP_FS='-f'
fi fi
# Use the infra pypi mirror if it is available # Use the infra pypi mirror if it is available
if [[ -e /etc/ci/mirror_info.sh ]]; then if [[ -e /etc/ci/mirror_info.sh ]]; then
source /etc/ci/mirror_info.sh source /etc/ci/mirror_info.sh
fi fi
if [[ ${NODEPOOL_PYPI_MIRROR:+1} ]]; then if [[ ${NODEPOOL_PYPI_MIRROR:+1} ]]; then
if [[ ${DIB_LOCAL_ELEMENTS:+1} ]]; then if [[ ${DIB_LOCAL_ELEMENTS:+1} ]]; then
export DIB_LOCAL_ELEMENTS="${DIB_LOCAL_ELEMENTS} pypi" export DIB_LOCAL_ELEMENTS="${DIB_LOCAL_ELEMENTS} pypi"
else else
skipping to change at line 127 skipping to change at line 133
export DIB_PIP_RETRIES=0 export DIB_PIP_RETRIES=0
fi fi
if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
local dib_logs=/var/log/dib-build local dib_logs=/var/log/dib-build
if [[ -e ${dib_logs} ]]; then if [[ -e ${dib_logs} ]]; then
sudo rm -rf ${dib_logs} sudo rm -rf ${dib_logs}
fi fi
sudo mkdir -m755 ${dib_logs} sudo mkdir -m755 ${dib_logs}
sudo chown $STACK_USER ${dib_logs} sudo chown $STACK_USER ${dib_logs}
$OCTAVIA_DIR/diskimage-create/diskimage-create.sh -l ${dib_logs}/$(basen ame $OCTAVIA_AMP_IMAGE_FILE).log $octavia_dib_tracing_arg -o $OCTAVIA_AMP_IMAGE_ FILE ${PARAM_OCTAVIA_AMP_BASE_OS:-} ${PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID: -} ${PARAM_OCTAVIA_AMP_IMAGE_SIZE:-} $OCTAVIA_DIR/diskimage-create/diskimage-create.sh -l ${dib_logs}/$(basen ame $OCTAVIA_AMP_IMAGE_FILE).log $octavia_dib_tracing_arg -o $OCTAVIA_AMP_IMAGE_ FILE ${PARAM_OCTAVIA_AMP_BASE_OS:-} ${PARAM_OCTAVIA_AMP_DISTRIBUTION_RELEASE_ID: -} ${PARAM_OCTAVIA_AMP_IMAGE_SIZE:-} ${PARAM_OCTAVIA_AMP_IMAGE_ARCH:-} ${PARAM_O CTAVIA_AMP_DISABLE_TMP_FS:-}
fi fi
if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then if ! [ -f $OCTAVIA_AMP_IMAGE_FILE ]; then
echo "Diskimage-builder failed to create the amphora image. Aborting." echo "Diskimage-builder failed to create the amphora image. Aborting."
exit 1 exit 1
fi fi
upload_image file://${OCTAVIA_AMP_IMAGE_FILE} $TOKEN upload_image file://${OCTAVIA_AMP_IMAGE_FILE} $TOKEN
} }
skipping to change at line 299 skipping to change at line 305
setup_logging $OCTAVIA_CONF setup_logging $OCTAVIA_CONF
iniset $OCTAVIA_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL iniset $OCTAVIA_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
# Change bind host # Change bind host
iniset $OCTAVIA_CONF api_settings bind_host $(ipv6_unquote $SERVICE_HOST) iniset $OCTAVIA_CONF api_settings bind_host $(ipv6_unquote $SERVICE_HOST)
iniset $OCTAVIA_CONF api_settings api_handler queue_producer iniset $OCTAVIA_CONF api_settings api_handler queue_producer
iniset $OCTAVIA_CONF database connection "mysql+pymysql://${DATABASE_USER}:$ {DATABASE_PASSWORD}@${DATABASE_HOST}:3306/octavia" iniset $OCTAVIA_CONF database connection "mysql+pymysql://${DATABASE_USER}:$ {DATABASE_PASSWORD}@${DATABASE_HOST}:3306/octavia"
if [[ ${OCTAVIA_ENABLE_AMPHORAV2_JOBBOARD} == True ]]; then if [[ ${OCTAVIA_ENABLE_AMPHORAV2_JOBBOARD} == True ]]; then
iniset $OCTAVIA_CONF task_flow persistence_connection "mysql+pymysql://$ {DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:3306/octavia_persistence" iniset $OCTAVIA_CONF task_flow persistence_connection "mysql+pymysql://$ {DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:3306/octavia_persistence"
iniset $OCTAVIA_CONF task_flow jobboard_expiration_time ${OCTAVIA_JOBBOA RD_EXPIRATION_TIME}
fi fi
# Configure keystone auth_token for all users # Configure keystone auth_token for all users
configure_keystone_authtoken_middleware $OCTAVIA_CONF octavia configure_keystone_authtoken_middleware $OCTAVIA_CONF octavia
# Ensure config is set up properly for authentication as admin # Ensure config is set up properly for authentication as admin
iniset $OCTAVIA_CONF service_auth auth_url $OS_AUTH_URL iniset $OCTAVIA_CONF service_auth auth_url $OS_AUTH_URL
iniset $OCTAVIA_CONF service_auth auth_type password iniset $OCTAVIA_CONF service_auth auth_type password
iniset $OCTAVIA_CONF service_auth username $OCTAVIA_USERNAME iniset $OCTAVIA_CONF service_auth username $OCTAVIA_USERNAME
iniset $OCTAVIA_CONF service_auth password $OCTAVIA_PASSWORD iniset $OCTAVIA_CONF service_auth password $OCTAVIA_PASSWORD
iniset $OCTAVIA_CONF service_auth user_domain_name $OCTAVIA_USER_DOMAIN_NAME iniset $OCTAVIA_CONF service_auth user_domain_name $OCTAVIA_USER_DOMAIN_NAME
skipping to change at line 462 skipping to change at line 469
PORT_FIXED_IP="--fixed-ip subnet=$SUBNET_ID,ip-address=$OCTAVIA_MGMT_POR T_IP" PORT_FIXED_IP="--fixed-ip subnet=$SUBNET_ID,ip-address=$OCTAVIA_MGMT_POR T_IP"
fi fi
MGMT_PORT_ID=$(openstack port create --security-group lb-health-mgr-sec-grp --device-owner Octavia:health-mgr --host=$(hostname) -c id -f value --network lb -mgmt-net $PORT_FIXED_IP octavia-health-manager-$OCTAVIA_NODE-listen-port) MGMT_PORT_ID=$(openstack port create --security-group lb-health-mgr-sec-grp --device-owner Octavia:health-mgr --host=$(hostname) -c id -f value --network lb -mgmt-net $PORT_FIXED_IP octavia-health-manager-$OCTAVIA_NODE-listen-port)
MGMT_PORT_MAC=$(openstack port show -c mac_address -f value $MGMT_PORT_ID) MGMT_PORT_MAC=$(openstack port show -c mac_address -f value $MGMT_PORT_ID)
MGMT_PORT_IP=$(openstack port show -f yaml -c fixed_ips $MGMT_PORT_ID | awk -v IP_VER=$SERVICE_IP_VERSION '{FS=",|";gsub(",","");gsub("'\''","");for(line = 1; line <= NF; ++line) {if ($line ~ /^.*- ip_address:/) {split($line, word, " ") ;if ((IP_VER == "4" || IP_VER == "") && word[3] ~ /\./) print word[3];if (IP_VER == "6" && word[3] ~ /:/) print word[3];} else {split($line, word, " ");for(ind in word) {if (word[ind] ~ /^ip_address=/) {split(word[ind], token, "=");if ((IP_ VER == "4" || IP_VER == "") && token[2] ~ /\./) print token[2];if (IP_VER == "6" && token[2] ~ /:/) print token[2];}}}}}') MGMT_PORT_IP=$(openstack port show -f yaml -c fixed_ips $MGMT_PORT_ID | awk -v IP_VER=$SERVICE_IP_VERSION '{FS=",|";gsub(",","");gsub("'\''","");for(line = 1; line <= NF; ++line) {if ($line ~ /^.*- ip_address:/) {split($line, word, " ") ;if ((IP_VER == "4" || IP_VER == "") && word[3] ~ /\./) print word[3];if (IP_VER == "6" && word[3] ~ /:/) print word[3];} else {split($line, word, " ");for(ind in word) {if (word[ind] ~ /^ip_address=/) {split(word[ind], token, "=");if ((IP_ VER == "4" || IP_VER == "") && token[2] ~ /\./) print token[2];if (IP_VER == "6" && token[2] ~ /:/) print token[2];}}}}}')
if function_exists octavia_create_network_interface_device ; then if function_exists octavia_create_network_interface_device ; then
octavia_create_network_interface_device o-hm0 $MGMT_PORT_ID $MGMT_PORT_M AC octavia_create_network_interface_device o-hm0 $MGMT_PORT_ID $MGMT_PORT_M AC
elif [[ $NEUTRON_AGENT == "openvswitch" || $Q_AGENT == "openvswitch" ]]; the
n
sudo ovs-vsctl -- --may-exist add-port ${OVS_BRIDGE:-br-int} o-hm0 -- se
t Interface o-hm0 type=internal -- set Interface o-hm0 external-ids:iface-status
=active -- set Interface o-hm0 external-ids:attached-mac=$MGMT_PORT_MAC -- set I
nterface o-hm0 external-ids:iface-id=$MGMT_PORT_ID -- set Interface o-hm0 extern
al-ids:skip_cleanup=true
elif [[ $NEUTRON_AGENT == "linuxbridge" || $Q_AGENT == "linuxbridge" ]]; the
n
if ! ip link show o-hm0 ; then
sudo ip link add o-hm0 type veth peer name o-bhm0
NETID=$(openstack network show lb-mgmt-net -c id -f value)
BRNAME=brq$(echo $NETID|cut -c 1-11)
sudo brctl addif $BRNAME o-bhm0
sudo ip link set o-bhm0 up
fi
else else
die "Unknown network controller. Please define octavia_create_network_in terface_device" die "Unknown network controller. Please define octavia_create_network_in terface_device"
fi fi
sudo ip link set dev o-hm0 address $MGMT_PORT_MAC sudo ip link set dev o-hm0 address $MGMT_PORT_MAC
# Check if the host is using nftables, an alternative to iptables # Check if the host is using nftables, an alternative to iptables
if [ -x "$(sudo bash -c 'command -v nft')" ]; then if [ -x "$(sudo bash -c 'command -v nft')" ]; then
sudo nft add table inet octavia sudo nft add table inet octavia
sudo nft add chain inet octavia o-hm0-incoming { type filter hook input priority 0\;} sudo nft add chain inet octavia o-hm0-incoming { type filter hook input priority 0\;}
sudo nft flush chain inet octavia o-hm0-incoming sudo nft flush chain inet octavia o-hm0-incoming
skipping to change at line 568 skipping to change at line 565
openstack security group rule create --protocol udp --dst-port $OCTAVIA_ AMP_LOG_TENANT_PORT lb-health-mgr-sec-grp openstack security group rule create --protocol udp --dst-port $OCTAVIA_ AMP_LOG_TENANT_PORT lb-health-mgr-sec-grp
fi fi
} }
function configure_lb_mgmt_sec_grp { function configure_lb_mgmt_sec_grp {
OCTAVIA_MGMT_SEC_GRP_ID=$(openstack security group show lb-mgmt-sec-grp -f v alue -c id) OCTAVIA_MGMT_SEC_GRP_ID=$(openstack security group show lb-mgmt-sec-grp -f v alue -c id)
iniset ${OCTAVIA_CONF} controller_worker amp_secgroup_list ${OCTAVIA_MGMT_SE C_GRP_ID} iniset ${OCTAVIA_CONF} controller_worker amp_secgroup_list ${OCTAVIA_MGMT_SE C_GRP_ID}
} }
function create_amphora_flavor { function create_amphora_flavor {
disk_size=${OCTAVIA_AMP_IMAGE_SIZE:-2}
if [[ "$OCTAVIA_AMP_IMAGE_ARCH" =~ (aarch64|arm64) ]]; then
# DIB produces images larger than size specified, add another GB to the
flavor disk
# See https://bugs.launchpad.net/diskimage-builder/+bug/1918461
disk_size=$((disk_size + 1))
fi
# Pass even if it exists to avoid race condition on multinode # Pass even if it exists to avoid race condition on multinode
openstack flavor create --id auto --ram 1024 --disk ${OCTAVIA_AMP_IMAGE_SIZE :-2} --vcpus 1 --private m1.amphora -f value -c id --property hw_rng:allowed=Tru e || true openstack flavor create --id auto --ram 1024 --disk $disk_size --vcpus 1 --p rivate m1.amphora -f value -c id --property hw_rng:allowed=True || true
amp_flavor_id=$(openstack flavor show m1.amphora -f value -c id) amp_flavor_id=$(openstack flavor show m1.amphora -f value -c id)
iniset $OCTAVIA_CONF controller_worker amp_flavor_id $amp_flavor_id iniset $OCTAVIA_CONF controller_worker amp_flavor_id $amp_flavor_id
} }
function configure_octavia_api_haproxy { function configure_octavia_api_haproxy {
install_package haproxy install_package haproxy
cp ${OCTAVIA_DIR}/devstack/etc/octavia/haproxy.cfg ${OCTAVIA_CONF_DIR}/hapro xy.cfg cp ${OCTAVIA_DIR}/devstack/etc/octavia/haproxy.cfg ${OCTAVIA_CONF_DIR}/hapro xy.cfg
skipping to change at line 650 skipping to change at line 653
stop_process $OCTAVIA_CONSUMER stop_process $OCTAVIA_CONSUMER
stop_process $OCTAVIA_HOUSEKEEPER stop_process $OCTAVIA_HOUSEKEEPER
stop_process $OCTAVIA_HEALTHMANAGER stop_process $OCTAVIA_HEALTHMANAGER
# Kill dhclient process started for o-hm0 interface # Kill dhclient process started for o-hm0 interface
pids=$(ps aux | awk '/[o]-hm0/ { print $2 }') pids=$(ps aux | awk '/[o]-hm0/ { print $2 }')
[ ! -z "$pids" ] && sudo kill $pids [ ! -z "$pids" ] && sudo kill $pids
if function_exists octavia_delete_network_interface_device ; then if function_exists octavia_delete_network_interface_device ; then
octavia_delete_network_interface_device o-hm0 octavia_delete_network_interface_device o-hm0
elif [[ $NEUTRON_AGENT == "openvswitch" || $Q_AGENT == "openvswitch" ]]; the n elif [[ $NEUTRON_AGENT == "openvswitch" || $Q_AGENT == "openvswitch" ]]; the n
# This elif can go away in the X cycle, needed for grenade old/new logic
: # Do nothing : # Do nothing
elif [[ $NEUTRON_AGENT == "linuxbridge" || $Q_AGENT == "linuxbridge" ]]; the n elif [[ $NEUTRON_AGENT == "linuxbridge" || $Q_AGENT == "linuxbridge" ]]; the n
# This elif can go away in the X cycle, needed for grenade old/new logic
if ip link show o-hm0 ; then if ip link show o-hm0 ; then
sudo ip link del o-hm0 sudo ip link del o-hm0
fi fi
else else
die "Unknown network controller. Please define octavia_delete_network_in terface_device" die "Unknown network controller. Please define octavia_delete_network_in terface_device"
fi fi
} }
function octavia_cleanup { function octavia_cleanup {
skipping to change at line 745 skipping to change at line 750
export DISABLE_AMP_IMAGE_BUILD=True export DISABLE_AMP_IMAGE_BUILD=True
fi fi
if ! [ "$DISABLE_AMP_IMAGE_BUILD" == 'True' ]; then if ! [ "$DISABLE_AMP_IMAGE_BUILD" == 'True' ]; then
build_octavia_worker_image build_octavia_worker_image
fi fi
OCTAVIA_AMP_IMAGE_ID=$(openstack image list -f value --property name=${O CTAVIA_AMP_IMAGE_NAME} -c ID) OCTAVIA_AMP_IMAGE_ID=$(openstack image list -f value --property name=${O CTAVIA_AMP_IMAGE_NAME} -c ID)
if [ -n "$OCTAVIA_AMP_IMAGE_ID" ]; then if [ -n "$OCTAVIA_AMP_IMAGE_ID" ]; then
openstack image set --tag ${OCTAVIA_AMP_IMAGE_TAG} --property hw_arc # Normalize architecture
hitecture='x86_64' --property hw_rng_model=virtio ${OCTAVIA_AMP_IMAGE_ID} # https://docs.openstack.org/nova/latest/configuration/config.html#f
ilter_scheduler.image_properties_default_architecture
hw_arch=${OCTAVIA_AMP_IMAGE_ARCH:-x86_64}
if [[ "$OCTAVIA_AMP_IMAGE_ARCH" == "amd64" ]]; then
hw_arch="x86_64"
elif [[ "$OCTAVIA_AMP_IMAGE_ARCH" == "arm64" ]]; then
hw_arch="aarch64"
fi
openstack image set --tag ${OCTAVIA_AMP_IMAGE_TAG} --property hw_arc
hitecture=${hw_arch} --property hw_rng_model=virtio ${OCTAVIA_AMP_IMAGE_ID}
fi fi
# Create a management network. # Create a management network.
build_mgmt_network build_mgmt_network
OCTAVIA_AMP_NETWORK_ID=$(openstack network show lb-mgmt-net -f value -c id) OCTAVIA_AMP_NETWORK_ID=$(openstack network show lb-mgmt-net -f value -c id)
iniset $OCTAVIA_CONF controller_worker amp_boot_network_list ${OCTAVIA_A MP_NETWORK_ID} iniset $OCTAVIA_CONF controller_worker amp_boot_network_list ${OCTAVIA_A MP_NETWORK_ID}
create_octavia_accounts create_octavia_accounts
add_load-balancer_roles add_load-balancer_roles
 End of changes. 11 change blocks. 
23 lines changed or deleted 32 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)