From 5855a64434cb94e34880e9a84765dd48671fba79 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 26 Oct 2011 15:44:27 -0400 Subject: [PATCH 1/3] Add syslog option, off by default. Add syslog option to glance and nova. --- files/glance-api.conf | 2 +- files/glance-registry.conf | 2 +- stack.sh | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/files/glance-api.conf b/files/glance-api.conf index 0358a7a..3499ff7 100644 --- a/files/glance-api.conf +++ b/files/glance-api.conf @@ -27,7 +27,7 @@ registry_port = 9191 log_file = %DEST%/glance/api.log # Send logs to syslog (/dev/log) instead of to file specified by `log_file` -use_syslog = False +use_syslog = %SYSLOG% # ============ Notification System Options ===================== diff --git a/files/glance-registry.conf b/files/glance-registry.conf index c3ca9a7..351b09f 100644 --- a/files/glance-registry.conf +++ b/files/glance-registry.conf @@ -19,7 +19,7 @@ log_file = %DEST%/glance/registry.log filesystem_store_datadir = %DEST%/glance/images # Send logs to syslog (/dev/log) instead of to file specified by `log_file` -use_syslog = False +use_syslog = %SYSLOG% # SQLAlchemy connection string for the reference implementation # registry server. Any valid SQLAlchemy connection string is fine. diff --git a/stack.sh b/stack.sh index 628ce54..02267d2 100755 --- a/stack.sh +++ b/stack.sh @@ -78,6 +78,9 @@ source ./stackrc # Destination path for installation ``DEST`` DEST=${DEST:-/opt/stack} +# Configure services to syslog instead of writing to individual log files +SYSLOG=${SYSLOG:-False} + # OpenStack is designed to be run as a regular user (Dashboard will fail to run # as root, since apache refused to startup serve content from root user). If # stack.sh is run as root, it automatically creates a stack user with @@ -460,11 +463,13 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/glance,g" -i $GLANCE_CONF sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_CONF sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_CONF + sudo sed -e "s,%SYSLOG%,$SYSLOG,g" -i $GLANCE_CONF GLANCE_API_CONF=$GLANCE_DIR/etc/glance-api.conf cp $FILES/glance-api.conf $GLANCE_API_CONF sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_API_CONF sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_API_CONF + sudo sed -e "s,%SYSLOG%,$SYSLOG,g" -i $GLANCE_API_CONF fi # Nova @@ -579,6 +584,9 @@ fi if [ -n "$MULTI_HOST" ]; then add_nova_flag "--multi_host=$MULTI_HOST" fi +if [ "$SYSLOG" != "False" ]; then + add_nova_flag "--use_syslog=1" +fi # Nova Database # ~~~~~~~~~~~~~ From b957a855f944f1dd62622679d16ff98cf84e99eb Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Thu, 27 Oct 2011 13:07:37 -0700 Subject: [PATCH 2/3] fix for #109 - set the hostname to GUEST_NAME --- tools/build_kvm.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/build_kvm.sh b/tools/build_kvm.sh index 36457d5..e6cb3e3 100755 --- a/tools/build_kvm.sh +++ b/tools/build_kvm.sh @@ -341,7 +341,14 @@ chroot $ROOTFS chown -R stack $DEST # Change boot params so that we get a console log sudo sed -e "s/quiet splash/splash console=ttyS0 console=ttyS1,19200n8/g" -i $ROOTFS/boot/grub/menu.lst sudo sed -e "s/^hiddenmenu//g" -i $ROOTFS/boot/grub/menu.lst -#chroot $ROOTFS grub-install /dev/vda + +# Set the hostname +echo $GUEST_NAME > $ROOTFS/etc/hostname + +# We need the hostname to resolve for rabbit to launch +if ! grep -q $GUEST_NAME $ROOTFS/etc/hosts; then + echo "$GUEST_IP $GUEST_NAME" >> $ROOTFS/etc/hosts +fi # Unmount umount $ROOTFS || echo 'ok' From 0e74ecb4ac81832fa8d1340e45a2008825067b91 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Thu, 27 Oct 2011 13:21:52 -0700 Subject: [PATCH 3/3] fix so that our first floating ip doesn't end in .0 --- stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 82cc157..c79fb46 100755 --- a/stack.sh +++ b/stack.sh @@ -207,7 +207,7 @@ function read_password { PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-eth0} FIXED_RANGE=${FIXED_RANGE:-10.0.0.0/24} FIXED_NETWORK_SIZE=${FIXED_NETWORK_SIZE:-256} -FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.1/28} +FLOATING_RANGE=${FLOATING_RANGE:-172.24.4.224/28} NET_MAN=${NET_MAN:-FlatDHCPManager} EC2_DMZ_HOST=${EC2_DMZ_HOST:-$HOST_IP} FLAT_NETWORK_BRIDGE=${FLAT_NETWORK_BRIDGE:-br100}