indent using 4 spaces (2/3)
As advised in I072cf8bf6748d0c910fecffdf2282bcc4656d038, code should use 4 spaces for indentation. This commit enforces the use of 4 spaces indentation. In order to simplify the review process, this patch only cover the following elements: - nagios3 - network-utils - neutron-openvswitch - nova-api - nova-baremetal - nova-compute - nova-kvm - openstack-client - openstack-db - openstack-ssl Change-Id: I489746d384c0c2c5a4f2b12444606e3bf8e3ce11
This commit is contained in:
parent
45ff3c1a87
commit
e73cbc8e2b
|
@ -7,7 +7,7 @@ install-packages nagios3
|
|||
sed -i "s/check_external_commands=0/check_external_commands=1/" /etc/nagios3/nagios.cfg
|
||||
# fix a minior display issue
|
||||
if [ -f /etc/nagios3/conf.d/extinfo_nagios2.cfg ]; then
|
||||
sed -i "s/base\/debian/debian/g" /etc/nagios3/conf.d/extinfo_nagios2.cfg
|
||||
sed -i "s/base\/debian/debian/g" /etc/nagios3/conf.d/extinfo_nagios2.cfg
|
||||
fi
|
||||
# set all servers as having ssh
|
||||
sed -i '0,/ssh-servers/! s/localhost/*/' /etc/nagios3/conf.d/hostgroups_nagios2.cfg
|
||||
|
|
|
@ -48,7 +48,7 @@ BOOTPROTO=none
|
|||
HOTPLUG=no
|
||||
EOF_CAT
|
||||
|
||||
#bridge config
|
||||
#bridge config
|
||||
if [ -z "$bridge_ip_addr" ]; then
|
||||
cat > $tmp_bridge_config <<EOF_CAT
|
||||
DEVICE=$bridge
|
||||
|
@ -105,7 +105,7 @@ function configure_bridge_interface_dhcp_eni() {
|
|||
sed -e "/auto $interface*/,/^$/d" -i $tmp_config
|
||||
sed -e "/auto $bridge*/,/^$/d" -i $tmp_config
|
||||
|
||||
#interface config
|
||||
#interface config
|
||||
cat >> $tmp_config <<-EOF_CAT
|
||||
auto $interface
|
||||
allow-$bridge $interface
|
||||
|
@ -114,7 +114,7 @@ allow-$bridge $interface
|
|||
ovs_type OVSPort
|
||||
EOF_CAT
|
||||
|
||||
#bridge config
|
||||
#bridge config
|
||||
if [ -z "$bridge_ip_addr" ]; then
|
||||
cat >> $tmp_config <<EOF_CAT
|
||||
auto $bridge
|
||||
|
@ -172,11 +172,11 @@ fi
|
|||
if [ -n "$PUBLIC_INTERFACE_ROUTE" ]; then
|
||||
DEFAULT_VIA=$(ip route show | awk '/default / { print $3 }')
|
||||
if [ "$DEFAULT_VIA" != "$PUBLIC_INTERFACE_ROUTE" ]; then
|
||||
if [ -z "$(ip route show 169.254.169.254)" ]; then
|
||||
# No explicit route to 169.254.169.254 - set one.
|
||||
ip route add 169.254.169.254/32 via $DEFAULT_VIA
|
||||
fi
|
||||
ip route prepend dev $EXTERNAL_BRIDGE default via $PUBLIC_INTERFACE_ROUTE
|
||||
ip route del default via $DEFAULT_VIA
|
||||
if [ -z "$(ip route show 169.254.169.254)" ]; then
|
||||
# No explicit route to 169.254.169.254 - set one.
|
||||
ip route add 169.254.169.254/32 via $DEFAULT_VIA
|
||||
fi
|
||||
ip route prepend dev $EXTERNAL_BRIDGE default via $PUBLIC_INTERFACE_ROUTE
|
||||
ip route del default via $DEFAULT_VIA
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -4,5 +4,5 @@ set -eux
|
|||
install-packages openvswitch-switch
|
||||
|
||||
if [ "$DIB_INIT_SYSTEM" == "systemd" ] ; then
|
||||
systemctl enable openvswitch.service
|
||||
systemctl enable openvswitch.service
|
||||
fi
|
||||
|
|
|
@ -34,12 +34,12 @@ PHYSICAL_INTERFACE_RAW_DEVICE=$(os-apply-config --key neutron.ovs.public_interfa
|
|||
PUBLIC_INTERFACE_ROUTE=$(os-apply-config --key neutron.ovs.public_interface_route --type netaddress --key-default '')
|
||||
|
||||
if [ -n "$PHYSICAL_INTERFACE_RAW_DEVICE" ]; then
|
||||
if ! (ip link show dev $PHYSICAL_INTERFACE) ; then
|
||||
VLAN_ID=$(echo $PHYSICAL_INTERFACE | sed s/vlan//)
|
||||
vconfig set_name_type VLAN_PLUS_VID_NO_PAD
|
||||
vconfig add $PHYSICAL_INTERFACE_RAW_DEVICE $VLAN_ID
|
||||
fi
|
||||
ip link set $PHYSICAL_INTERFACE up
|
||||
if ! (ip link show dev $PHYSICAL_INTERFACE) ; then
|
||||
VLAN_ID=$(echo $PHYSICAL_INTERFACE | sed s/vlan//)
|
||||
vconfig set_name_type VLAN_PLUS_VID_NO_PAD
|
||||
vconfig add $PHYSICAL_INTERFACE_RAW_DEVICE $VLAN_ID
|
||||
fi
|
||||
ip link set $PHYSICAL_INTERFACE up
|
||||
fi
|
||||
|
||||
# NOTE: ensure-bridge actually takes care of this now but it
|
||||
|
|
|
@ -4,9 +4,9 @@ set -eux
|
|||
TEMPLATE_ROOT=$(dirname $0)/../os-apply-config
|
||||
|
||||
get_additional_config(){
|
||||
if [ -e ${TEMPLATE_ROOT}/etc/nova/nova-${1}.conf ]; then
|
||||
echo "--config-file /etc/nova/nova.conf --config-file /etc/nova/nova-${1}.conf"
|
||||
fi
|
||||
if [ -e ${TEMPLATE_ROOT}/etc/nova/nova-${1}.conf ]; then
|
||||
echo "--config-file /etc/nova/nova.conf --config-file /etc/nova/nova-${1}.conf"
|
||||
fi
|
||||
}
|
||||
|
||||
NOVA_COMPONENTS="api cert scheduler consoleauth conductor"
|
||||
|
|
|
@ -5,12 +5,12 @@ install-packages syslinux tftpd-hpa xinetd
|
|||
|
||||
mkdir -p /tftpboot/pxelinux.cfg/
|
||||
if [ -f /usr/lib/syslinux/pxelinux.0 ]; then
|
||||
cp /usr/lib/syslinux/pxelinux.0 /tftpboot/ # Ubuntu
|
||||
cp /usr/lib/syslinux/pxelinux.0 /tftpboot/ # Ubuntu
|
||||
elif [ -f /usr/share/syslinux/pxelinux.0 ]; then
|
||||
cp /usr/share/syslinux/pxelinux.0 /tftpboot/ # Fedora/RHEL
|
||||
cp /usr/share/syslinux/pxelinux.0 /tftpboot/ # Fedora/RHEL
|
||||
else
|
||||
echo "Failed to find pxelinux.0."
|
||||
exit 1
|
||||
echo "Failed to find pxelinux.0."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Disable the tftp-hpa upstart job, we're using xinetd
|
||||
|
|
|
@ -10,7 +10,7 @@ CONFIG_PARAMETERS="--config-dir /etc/nova"
|
|||
TEMPLATE_ROOT=$(dirname $0)/../os-apply-config
|
||||
|
||||
if [ -e ${TEMPLATE_ROOT}/etc/nova/nova-compute.conf ]; then
|
||||
CONFIG_PARAMETERS="${CONFIG_PARAMETERS} --config-file /etc/nova/nova.conf --config-file /etc/nova/nova-compute.conf"
|
||||
CONFIG_PARAMETERS="${CONFIG_PARAMETERS} --config-file /etc/nova/nova.conf --config-file /etc/nova/nova-compute.conf"
|
||||
fi
|
||||
|
||||
os-svc-daemon -i "$NOVA_VENV_DIR" -e "LIBVIRT_DEFAULT_URI=qemu:///system" nova-compute nova nova-compute "${CONFIG_PARAMETERS}"
|
||||
|
@ -19,6 +19,6 @@ os-svc-daemon -i "$NOVA_VENV_DIR" -e "LIBVIRT_DEFAULT_URI=qemu:///system" nova-c
|
|||
# Use the rootwrap config from the source repo.
|
||||
install -o root -g root -m 0755 -d /etc/nova/rootwrap.d
|
||||
for f in $(ls /opt/stack/nova/etc/nova/rootwrap.d/); do
|
||||
install -o root -g root -m 644 /opt/stack/nova/etc/nova/rootwrap.d/$f /etc/nova/rootwrap.d/$f
|
||||
install -o root -g root -m 644 /opt/stack/nova/etc/nova/rootwrap.d/$f /etc/nova/rootwrap.d/$f
|
||||
done
|
||||
install -o root -g root -m 0644 /opt/stack/nova/etc/nova/rootwrap.conf /etc/nova/rootwrap.conf
|
||||
|
|
|
@ -6,7 +6,7 @@ install-packages libvirt-bin python-libvirt kvm pm-utils kpartx
|
|||
|
||||
# Fedora don't always have the libvirtd group created
|
||||
if ! grep ^libvirtd /etc/group > /dev/null 2>&1; then
|
||||
groupadd -f libvirtd
|
||||
groupadd -f libvirtd
|
||||
fi
|
||||
|
||||
usermod -a -G libvirtd nova
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
set -eux
|
||||
|
||||
function usage() {
|
||||
echo "options:"
|
||||
echo " -h show usage and exit"
|
||||
echo " -c client bin name"
|
||||
echo " -i Optional: installation directory for the virtualenv."
|
||||
echo " If not specified defaults to /opt/stack/venv/python-<client name>client"
|
||||
echo " -s enable --system-site-packages in the virtualenv."
|
||||
exit $1
|
||||
echo "options:"
|
||||
echo " -h show usage and exit"
|
||||
echo " -c client bin name"
|
||||
echo " -i Optional: installation directory for the virtualenv."
|
||||
echo " If not specified defaults to /opt/stack/venv/python-<client name>client"
|
||||
echo " -s enable --system-site-packages in the virtualenv."
|
||||
exit $1
|
||||
}
|
||||
|
||||
client=""
|
||||
|
@ -30,8 +30,8 @@ while getopts "hsi:c:" opt; do
|
|||
done
|
||||
|
||||
if [[ -z "$client" ]]; then
|
||||
echo "missing required 'client' parameter"
|
||||
exit 1
|
||||
echo "missing required 'client' parameter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
repo=python-${client}client
|
||||
|
@ -58,20 +58,20 @@ set -u
|
|||
pushd /opt/stack/$repo
|
||||
client_manifest=$(get-pip-manifest ${repo})
|
||||
if [ -n "$client_manifest" ]; then
|
||||
use-pip-manifest $client_manifest
|
||||
use-pip-manifest $client_manifest
|
||||
else
|
||||
# Need setuptools>=1.0 to manage connections when
|
||||
# downloading from pypi using http_proxy and https_proxy
|
||||
pip install -U 'setuptools>=1.0'
|
||||
# Need setuptools>=1.0 to manage connections when
|
||||
# downloading from pypi using http_proxy and https_proxy
|
||||
pip install -U 'setuptools>=1.0'
|
||||
|
||||
# bug #1293812 : Avoid easy_install triggering on pbr.
|
||||
pip install -U 'pbr>=0.5.21,<1.0'
|
||||
# bug #1293812 : Avoid easy_install triggering on pbr.
|
||||
pip install -U 'pbr>=0.5.21,<1.0'
|
||||
|
||||
if [ -e requirements.txt ]; then
|
||||
pip install -r requirements.txt
|
||||
elif [ -e tools/pip-requires ]; then
|
||||
pip install -r tools/pip-requires
|
||||
fi
|
||||
if [ -e requirements.txt ]; then
|
||||
pip install -r requirements.txt
|
||||
elif [ -e tools/pip-requires ]; then
|
||||
pip install -r tools/pip-requires
|
||||
fi
|
||||
fi
|
||||
|
||||
# Always replay this, as we cannot use the entry this would generate in the manifest
|
||||
|
|
|
@ -5,9 +5,9 @@ install-packages mysql-server python-mysqldb
|
|||
|
||||
my_cnf=
|
||||
if [ -f /etc/mysql/my.cnf ]; then
|
||||
my_cnf=/etc/mysql/my.cnf # Ubuntu
|
||||
my_cnf=/etc/mysql/my.cnf # Ubuntu
|
||||
elif [ -f /etc/my.cnf ]; then
|
||||
my_cnf=/etc/my.cnf # Fedora/RHEL
|
||||
my_cnf=/etc/my.cnf # Fedora/RHEL
|
||||
fi
|
||||
|
||||
sed -i 's/127.0.0.1/0.0.0.0/g' $my_cnf
|
||||
|
|
|
@ -22,7 +22,7 @@ install-packages stunnel4
|
|||
|
||||
# Debian/Ubuntu don't install stunnel4 in a working configuration.
|
||||
if [ -e /etc/default/stunnel4 ]; then
|
||||
cat > /etc/default/stunnel4 << EOF
|
||||
cat > /etc/default/stunnel4 << EOF
|
||||
ENABLED=1
|
||||
FILES="/etc/stunnel/*.conf"
|
||||
OPTIONS=""
|
||||
|
|
Loading…
Reference in New Issue