Skip to content

Commit

Permalink
Tweaks for ps6
Browse files Browse the repository at this point in the history
* fixup network names
* switch default openstack configure profile to prodstack6
  • Loading branch information
dosaboy committed Jun 27, 2024
1 parent d27d16a commit d6f9a94
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
13 changes: 9 additions & 4 deletions common/generate_bundle_base
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ update_master_opts ${MOD_PASSTHROUGH_OPTS[@]}
vip_start=${MASTER_OPTS[VIP_ADDR_START]}
if [[ -z $vip_start ]] && [[ -e ~/novarc ]]; then
# prodstack
cidr=$(source ~/novarc; openstack subnet list --name subnet_${OS_USERNAME} -c Subnet -f value 2>/dev/null)
cidr=$(source ~/novarc; openstack subnet list --name subnet_${OS_USERNAME}-psd -c Subnet -f value 2>/dev/null)
if [[ -z $cidr ]]; then
# stsstack
cidr=$(source ~/novarc; openstack subnet list --name ${OS_USERNAME}_admin_subnet -c Subnet -f value 2>/dev/null)
fi
if [[ -n $cidr ]]; then
vip_start=$(echo $cidr| sed -r 's/([0-9]+\.[0-9]+).+/\1/g').150.0
if [[ -n $cidr ]]; then
vip_start=$(echo $cidr| sed -r 's/([0-9]+\.[0-9]+).+/\1/g').150.0
fi
else
# our primary network is /24 network and we are arbitrarily using the
# last 20 addresses for vips which is prone to collisions but we have
# no alternative currently.
vip_start=$(echo $cidr| sed -r 's/([0-9]+\.[0-9]+\.[0-9]+).+/\1/g').234
fi
fi
VIP_START_PREFIX=${vip_start%\.*}
Expand Down
2 changes: 1 addition & 1 deletion openstack/configure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -u
profile=${1:-stsstack}
profile=${1:-prodstack6}
net_type=${2:-""}
./profiles/$profile $net_type
10 changes: 5 additions & 5 deletions openstack/profiles/prodstack6
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash -ex
source ~/novarc
GATEWAY=`openstack subnet show subnet_$OS_USERNAME -c gateway_ip -f value`
CIDR=`openstack subnet show subnet_$OS_USERNAME -c cidr -f value`
ABC=${CIDR%%.0*}
export GATEWAY=`openstack subnet show subnet_${OS_USERNAME}-psd-internal -c gateway_ip -f value`
CIDR=`openstack subnet show subnet_${OS_USERNAME}-psd-internal -c cidr -f value`
ABC=${CIDR%.0*}

[[ -z "$NAMESERVER" ]] && export NAMESERVER="91.189.91.131"
[[ -z "$SWIFT_IP" ]] && export SWIFT_IP="10.140.56.22"

# Set defaults, if not already set.
[[ -z "$GATEWAY" ]] && export GATEWAY="$GATEWAY"
[[ -z "$CIDR_EXT" ]] && export CIDR_EXT="$CIDR"
[[ -z "$FIP_RANGE" ]] && export FIP_RANGE="${ABC}.200:${ABC}.254"
[[ -z "$FIP_RANGE" ]] && export FIP_RANGE="${ABC}.3:${ABC}.254"
[[ -z "$CIDR_PRIV" ]] && export CIDR_PRIV="192.168.21.0/24"

export UNDERCLOUD_NETWORK_NAME="$(sed -E --quiet "s/.+OS_PROJECT_NAME=(.+)_project/net_\1/p" ~/novarc)"
export UNDERCLOUD_NETWORK_NAME="$(sed -E --quiet "s/.+OS_PROJECT_NAME=(.+)_project/net_\1-psd-internal/p" ~/novarc)"

./profiles/default "$@"

0 comments on commit d6f9a94

Please sign in to comment.