From dpierce at redhat.com Mon Jan 4 16:01:01 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Mon, 4 Jan 2010 11:01:01 -0500 Subject: [Ovirt-devel] [PATCH] Fixed errors when the user selects a different remove libvirt host. In-Reply-To: <1261414187-2481-1-git-send-email-dpierce@redhat.com> References: <1261414187-2481-1-git-send-email-dpierce@redhat.com> Message-ID: <20100104160101.GC7986@mcpierce-desktop.usersys.redhat.com> On Mon, Dec 21, 2009 at 11:49:47AM -0500, Darryl L. Pierce wrote: > Now the app will show the current connection. When the user selects > a different host then any connection exception is caught and the > previous connection restored. > > Signed-off-by: Darryl L. Pierce > --- Can I get an ACK or feedback on this? -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From gfortaine at live.com Mon Jan 4 21:01:13 2010 From: gfortaine at live.com (Guillaume FORTAINE) Date: Mon, 04 Jan 2010 22:01:13 +0100 Subject: [Ovirt-devel] Apache Tashi Message-ID: Misters, FYI : http://incubator.apache.org/tashi/ The Tashi project aims to build a software infrastructure for cloud computing on massive internet-scale datasets (what we call Big Data). The idea is to build a cluster management system that enables the Big Data that are stored in a cluster/data center to be accessed, shared, manipulated, and computed on by remote users in a convenient, efficient, and safe manner. To quote : http://docs.google.com/viewer?url=https://opencirrus.org/system/files/Tashi-OpenCirrus-Presentation-v2.ppt Where are we today? (cont) ? Our deployment of Tashi has managed 100s of VMs across 10s of hosts ? Used for day-to-day work by developers ? Light use by others ? Biggest benchmark ? Performed a ground motion simulation (HPC MPI job) using 240 VMs Best Regards, Guillaume FORTAINE From dpierce at redhat.com Tue Jan 12 16:55:08 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Tue, 12 Jan 2010 11:55:08 -0500 Subject: [Ovirt-devel] [PATCH] Adds the qemu log to the autotest output. Message-ID: <1263315308-19239-1-git-send-email-dpierce@redhat.com> When an autotest finishes running, then the output for the qemu logfile in /var/log/libvirt/qemu/ is added to the output. Signed-off-by: Darryl L. Pierce --- autotest.sh | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/autotest.sh b/autotest.sh index 7503be0..5ccdbbb 100755 --- a/autotest.sh +++ b/autotest.sh @@ -41,8 +41,9 @@ ME=$(basename "$0") WORKDIR=$(mktemp -d) + warn() { printf '%s: %s\n' "$ME" "$*" >&2; } -die() { warn "$*"; exit 1; } +die() { warn "$*"; show_libvirt_log; exit 1; } debug() { if $debugging; then log "[DEBUG] %s" "$*"; fi } trap '__st=$?; cleanup_after_testing; exit $__st' 1 2 3 13 15 @@ -69,6 +70,15 @@ Usage: $ME [-n test_name] [LOGFILE] EOF } +# $1 - the nodename +show_libvirt_log () { + local logfile=/var/log/libvirt/qemu/$1.log + + printf "\n[${logfile}]\n" + sudo cat $logfile + printf "[${logfile}]\n\n" +} + # $1 - the test function to call execute_test () { local testname=$1 @@ -404,6 +414,8 @@ destroy_node () { sudo virsh undefine $nodename > /dev/null 2>&1 fi fi + + show_libvirt_log $nodename fi } -- 1.6.5.2 From dpierce at redhat.com Thu Jan 14 20:15:45 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Thu, 14 Jan 2010 15:15:45 -0500 Subject: [Ovirt-devel] [PATCH] Presents duplicate DNS and NTP server entries. Message-ID: <1263500145-28696-1-git-send-email-dpierce@redhat.com> Checks any entered address for DNS and NTP servers against previously entered ones in order to prevent duplicates. Resolves: rhbz#555373 Signed-off-by: Darryl L. Pierce --- scripts/ovirt-config-networking | 41 ++++++++++++++++++++++++-------------- scripts/ovirt-functions | 7 ++++++ 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking index ec154c2..1342a0a 100755 --- a/scripts/ovirt-config-networking +++ b/scripts/ovirt-config-networking @@ -358,7 +358,8 @@ function configure_dns while true; do printf "\n" read -ep "Please enter the ${dns} DNS server (or ENTER to exit): " - if [[ -z "${REPLY}" ]]; then + local ADDRESS=$(trim_whitespace "$REPLY") + if [[ -z "${ADDRESS}" ]]; then if [[ -z "${DNS}" ]]; then printf "\nAborted...\n" return @@ -366,15 +367,20 @@ function configure_dns break fi fi - if is_valid_ipv4 $REPLY; then + if is_valid_ipv4 $ADDRESS; then if [[ -z "${DNS}" ]]; then - DNS="${REPLY}" - elif [[ -n "${REPLY}" ]]; then - DNS="${DNS}:${REPLY}" + DNS="${ADDRESS}" + break + elif [[ -n "${ADDRESS}" ]]; then + if [[ ! $DNS =~ $ADDRESS ]]; then + DNS="${DNS}:${ADDRESS}" + break + else + printf "${ADDRESS} is already defined as a DNS server.\n" + fi fi - break else - printf "${REPLY} is an invalid address.\n" + printf "${ADDRESS} is an invalid address.\n" fi done done @@ -403,24 +409,29 @@ function configure_ntp { local AUTO=$2 if [[ "$AUTO" == "AUTO" && -n "$OVIRT_NTP" ]]; then - NTPSERVERS=$OVIRT_NTP + NTPSERVERS=$OVIRT_NTP else - NTPSERVERS="" + NTPSERVERS="" fi if [ -z "$AUTO" ]; then if has_configured_interface true; then - while true; do - read -ep "Enter an NTP server (hit return when finished): " + while true; do + read -ep "Enter an NTP server (hit return when finished): " + local address=$(trim_whitespace "$REPLY") - if [ -z "$REPLY" ]; then break; fi + if [ -z "$address" ]; then break; fi - if is_valid_ipv4 $REPLY; then - NTPSERVERS="${NTPSERVERS}:${REPLY}" + if is_valid_ipv4 $address; then + if [[ $NTPSERVERS =~ $address ]]; then + printf "${address} is already defined as an NTP server.\n" + else + NTPSERVERS="${NTPSERVERS}:${REPLY}" + fi else printf "${REPLY} is an invalid address.\n" fi - done + done fi fi } diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 6435387..0d47dc8 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -598,6 +598,13 @@ add_if_not_exist() { || echo "$string" >> "$file" } +# $1 - the string to be trimmed +trim_whitespace () { + local text=${1} + + printf "$text" | awk '{gsub(/^[ ]*/,"",$0); gsub(/[ ]*$/,"",$0) ; print }' +} + is_numeric() { printf "$1" | grep -q -E '^[0-9]+$' } -- 1.6.5.2 From dpierce at redhat.com Thu Jan 14 20:17:01 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Thu, 14 Jan 2010 15:17:01 -0500 Subject: [Ovirt-devel] Ignore that last patch... Message-ID: <1263500222-28819-1-git-send-email-dpierce@redhat.com> The first line of the comment had a typo in it. From dpierce at redhat.com Thu Jan 14 20:17:02 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Thu, 14 Jan 2010 15:17:02 -0500 Subject: [Ovirt-devel] [PATCH] Prevents duplicate DNS and NTP server entries. In-Reply-To: <1263500222-28819-1-git-send-email-dpierce@redhat.com> References: <1263500222-28819-1-git-send-email-dpierce@redhat.com> Message-ID: <1263500222-28819-2-git-send-email-dpierce@redhat.com> Checks any entered address for DNS and NTP servers against previously entered ones in order to prevent duplicates. Resolves: rhbz#555373 Signed-off-by: Darryl L. Pierce --- scripts/ovirt-config-networking | 41 ++++++++++++++++++++++++-------------- scripts/ovirt-functions | 7 ++++++ 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking index ec154c2..1342a0a 100755 --- a/scripts/ovirt-config-networking +++ b/scripts/ovirt-config-networking @@ -358,7 +358,8 @@ function configure_dns while true; do printf "\n" read -ep "Please enter the ${dns} DNS server (or ENTER to exit): " - if [[ -z "${REPLY}" ]]; then + local ADDRESS=$(trim_whitespace "$REPLY") + if [[ -z "${ADDRESS}" ]]; then if [[ -z "${DNS}" ]]; then printf "\nAborted...\n" return @@ -366,15 +367,20 @@ function configure_dns break fi fi - if is_valid_ipv4 $REPLY; then + if is_valid_ipv4 $ADDRESS; then if [[ -z "${DNS}" ]]; then - DNS="${REPLY}" - elif [[ -n "${REPLY}" ]]; then - DNS="${DNS}:${REPLY}" + DNS="${ADDRESS}" + break + elif [[ -n "${ADDRESS}" ]]; then + if [[ ! $DNS =~ $ADDRESS ]]; then + DNS="${DNS}:${ADDRESS}" + break + else + printf "${ADDRESS} is already defined as a DNS server.\n" + fi fi - break else - printf "${REPLY} is an invalid address.\n" + printf "${ADDRESS} is an invalid address.\n" fi done done @@ -403,24 +409,29 @@ function configure_ntp { local AUTO=$2 if [[ "$AUTO" == "AUTO" && -n "$OVIRT_NTP" ]]; then - NTPSERVERS=$OVIRT_NTP + NTPSERVERS=$OVIRT_NTP else - NTPSERVERS="" + NTPSERVERS="" fi if [ -z "$AUTO" ]; then if has_configured_interface true; then - while true; do - read -ep "Enter an NTP server (hit return when finished): " + while true; do + read -ep "Enter an NTP server (hit return when finished): " + local address=$(trim_whitespace "$REPLY") - if [ -z "$REPLY" ]; then break; fi + if [ -z "$address" ]; then break; fi - if is_valid_ipv4 $REPLY; then - NTPSERVERS="${NTPSERVERS}:${REPLY}" + if is_valid_ipv4 $address; then + if [[ $NTPSERVERS =~ $address ]]; then + printf "${address} is already defined as an NTP server.\n" + else + NTPSERVERS="${NTPSERVERS}:${REPLY}" + fi else printf "${REPLY} is an invalid address.\n" fi - done + done fi fi } diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 6435387..0d47dc8 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -598,6 +598,13 @@ add_if_not_exist() { || echo "$string" >> "$file" } +# $1 - the string to be trimmed +trim_whitespace () { + local text=${1} + + printf "$text" | awk '{gsub(/^[ ]*/,"",$0); gsub(/[ ]*$/,"",$0) ; print }' +} + is_numeric() { printf "$1" | grep -q -E '^[0-9]+$' } -- 1.6.5.2 From dpierce at redhat.com Mon Jan 18 19:50:56 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Mon, 18 Jan 2010 14:50:56 -0500 Subject: [Ovirt-devel] Refactored patch... Message-ID: <1263844257-16861-1-git-send-email-dpierce@redhat.com> This patch supercedes the previous and includes fixes based on feedback from apevec. Duplicate checks now check the whole address, so substrings won't cause false positives. From dpierce at redhat.com Mon Jan 18 19:50:57 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Mon, 18 Jan 2010 14:50:57 -0500 Subject: [Ovirt-devel] [PATCH] Prevents duplicate DNS and NTP server entries. In-Reply-To: <1263844257-16861-1-git-send-email-dpierce@redhat.com> References: <1263844257-16861-1-git-send-email-dpierce@redhat.com> Message-ID: <1263844257-16861-2-git-send-email-dpierce@redhat.com> Checks any entered address for DNS and NTP servers against previously entered ones in order to prevent duplicates. Resolves: rhbz#555373 Signed-off-by: Darryl L. Pierce --- scripts/ovirt-config-networking | 54 +++++++++++++++++++++++++++----------- scripts/ovirt-functions | 7 +++++ 2 files changed, 45 insertions(+), 16 deletions(-) diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking index ec154c2..f71d44a 100755 --- a/scripts/ovirt-config-networking +++ b/scripts/ovirt-config-networking @@ -358,7 +358,8 @@ function configure_dns while true; do printf "\n" read -ep "Please enter the ${dns} DNS server (or ENTER to exit): " - if [[ -z "${REPLY}" ]]; then + local ADDRESS=$(trim_whitespace "$REPLY") + if [[ -z "${ADDRESS}" ]]; then if [[ -z "${DNS}" ]]; then printf "\nAborted...\n" return @@ -366,15 +367,20 @@ function configure_dns break fi fi - if is_valid_ipv4 $REPLY; then + if is_valid_ipv4 $ADDRESS; then if [[ -z "${DNS}" ]]; then - DNS="${REPLY}" - elif [[ -n "${REPLY}" ]]; then - DNS="${DNS}:${REPLY}" + DNS="${ADDRESS}" + break + elif [[ -n "${ADDRESS}" ]]; then + if [[ ! $DNS =~ "^${ADDRESS}$" ]]; then + DNS="${DNS}:${ADDRESS}" + break + else + printf "${ADDRESS} is already defined as a DNS server.\n" + fi fi - break else - printf "${REPLY} is an invalid address.\n" + printf "${ADDRESS} is an invalid address.\n" fi done done @@ -403,25 +409,41 @@ function configure_ntp { local AUTO=$2 if [[ "$AUTO" == "AUTO" && -n "$OVIRT_NTP" ]]; then - NTPSERVERS=$OVIRT_NTP + SERVERS=$OVIRT_NTP else - NTPSERVERS="" + SERVERS="" fi if [ -z "$AUTO" ]; then if has_configured_interface true; then - while true; do - read -ep "Enter an NTP server (hit return when finished): " + while true; do + read -ep "Enter an NTP server (hit return when finished): " + local address=$(trim_whitespace "$REPLY") - if [ -z "$REPLY" ]; then break; fi + if [ -z "$address" ]; then break; fi - if is_valid_ipv4 $REPLY; then - NTPSERVERS="${NTPSERVERS}:${REPLY}" + if is_valid_ipv4 $address; then + local unique=true + for server in $SERVERS; do + if [[ $server =~ "^${address}$" ]]; then + unique=false + fi + done + if $unique; then + SERVERS="${SERVERS} ${address}" + else + printf "${address} is already defined as an NTP server.\n" + fi else - printf "${REPLY} is an invalid address.\n" + printf "${address} is an invalid address.\n" fi - done + done fi + NTPSERVERS="" + for server in $SERVERS; do + if [ -n "${NTPSERVERS}" ]; then server=":${server}"; fi + NTPSERVERS="${NTPSERVERS}${server}" + done fi } diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 6435387..0d47dc8 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -598,6 +598,13 @@ add_if_not_exist() { || echo "$string" >> "$file" } +# $1 - the string to be trimmed +trim_whitespace () { + local text=${1} + + printf "$text" | awk '{gsub(/^[ ]*/,"",$0); gsub(/[ ]*$/,"",$0) ; print }' +} + is_numeric() { printf "$1" | grep -q -E '^[0-9]+$' } -- 1.6.5.2 From dpierce at redhat.com Mon Jan 18 20:09:18 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Mon, 18 Jan 2010 15:09:18 -0500 Subject: [Ovirt-devel] Fixed a karg issue... Message-ID: <1263845359-19692-1-git-send-email-dpierce@redhat.com> I missed one situation in the last patch. It wasn't properly handling the karg for NTP. This patch fixes that. From dpierce at redhat.com Mon Jan 18 20:09:19 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Mon, 18 Jan 2010 15:09:19 -0500 Subject: [Ovirt-devel] [PATCH] Prevents duplicate DNS and NTP server entries. In-Reply-To: <1263845359-19692-1-git-send-email-dpierce@redhat.com> References: <1263845359-19692-1-git-send-email-dpierce@redhat.com> Message-ID: <1263845359-19692-2-git-send-email-dpierce@redhat.com> Checks any entered address for DNS and NTP servers against previously entered ones in order to prevent duplicates. Resolves: rhbz#555373 Signed-off-by: Darryl L. Pierce --- scripts/ovirt-config-networking | 55 +++++++++++++++++++++++++++----------- scripts/ovirt-functions | 7 +++++ 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/scripts/ovirt-config-networking b/scripts/ovirt-config-networking index ec154c2..210da0c 100755 --- a/scripts/ovirt-config-networking +++ b/scripts/ovirt-config-networking @@ -358,7 +358,8 @@ function configure_dns while true; do printf "\n" read -ep "Please enter the ${dns} DNS server (or ENTER to exit): " - if [[ -z "${REPLY}" ]]; then + local ADDRESS=$(trim_whitespace "$REPLY") + if [[ -z "${ADDRESS}" ]]; then if [[ -z "${DNS}" ]]; then printf "\nAborted...\n" return @@ -366,15 +367,20 @@ function configure_dns break fi fi - if is_valid_ipv4 $REPLY; then + if is_valid_ipv4 $ADDRESS; then if [[ -z "${DNS}" ]]; then - DNS="${REPLY}" - elif [[ -n "${REPLY}" ]]; then - DNS="${DNS}:${REPLY}" + DNS="${ADDRESS}" + break + elif [[ -n "${ADDRESS}" ]]; then + if [[ ! $DNS =~ "^${ADDRESS}$" ]]; then + DNS="${DNS}:${ADDRESS}" + break + else + printf "${ADDRESS} is already defined as a DNS server.\n" + fi fi - break else - printf "${REPLY} is an invalid address.\n" + printf "${ADDRESS} is an invalid address.\n" fi done done @@ -403,26 +409,43 @@ function configure_ntp { local AUTO=$2 if [[ "$AUTO" == "AUTO" && -n "$OVIRT_NTP" ]]; then - NTPSERVERS=$OVIRT_NTP + SERVERS=$OVIRT_NTP else - NTPSERVERS="" + SERVERS="" fi if [ -z "$AUTO" ]; then if has_configured_interface true; then - while true; do - read -ep "Enter an NTP server (hit return when finished): " + while true; do + read -ep "Enter an NTP server (hit return when finished): " + local address=$(trim_whitespace "$REPLY") - if [ -z "$REPLY" ]; then break; fi + if [ -z "$address" ]; then break; fi - if is_valid_ipv4 $REPLY; then - NTPSERVERS="${NTPSERVERS}:${REPLY}" + if is_valid_ipv4 $address; then + local unique=true + for server in $SERVERS; do + if [[ $server =~ "^${address}$" ]]; then + unique=false + fi + done + if $unique; then + SERVERS="${SERVERS} ${address}" + else + printf "${address} is already defined as an NTP server.\n" + fi else - printf "${REPLY} is an invalid address.\n" + printf "${address} is an invalid address.\n" fi - done + done fi fi + + NTPSERVERS="" + for server in $SERVERS; do + if [ -n "${NTPSERVERS}" ]; then server=":${server}"; fi + NTPSERVERS="${NTPSERVERS}${server}" + done } function save_ntp_configuration diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 6435387..0d47dc8 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -598,6 +598,13 @@ add_if_not_exist() { || echo "$string" >> "$file" } +# $1 - the string to be trimmed +trim_whitespace () { + local text=${1} + + printf "$text" | awk '{gsub(/^[ ]*/,"",$0); gsub(/[ ]*$/,"",$0) ; print }' +} + is_numeric() { printf "$1" | grep -q -E '^[0-9]+$' } -- 1.6.5.2 From dpierce at redhat.com Mon Jan 18 22:29:59 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Mon, 18 Jan 2010 17:29:59 -0500 Subject: [Ovirt-devel] [PATCH] Fixed unpersisting directories and persisting directories that contain persisted files. Message-ID: <1263853799-5121-1-git-send-email-dpierce@redhat.com> Resolves: rhbz#556616 Signed-off-by: Darryl L. Pierce --- scripts/ovirt-functions | 107 ++++++++++++++++++++++++++++++---------------- 1 files changed, 70 insertions(+), 37 deletions(-) diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 6435387..7ed6491 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -1,4 +1,4 @@ -# -*-Shell-script-*- +\# -*-Shell-script-*- OVIRT_LOGFILE=/var/log/ovirt.log OVIRT_TMP_LOGFILE=/tmp/ovirt.log @@ -458,28 +458,41 @@ ovirt_store_config() { if grep -q " /config ext3" /proc/mounts; then printf "storing to /config :\n" for p in "$@"; do - f=$(readlink -f $p) - printf "$f" - # skip if file does not exist or is empty - if [ ! -s "$f" ]; then - printf " Skipping, file '%s' does not exist or is empty\n" $p - continue - fi - # skip if already bind-mounted - if ! grep -q " $f ext3" /proc/mounts ; then - mkdir -p /config$(dirname $f) - cp -a $f /config$f \ - && mount -n --bind /config$f $f - if [ $? -ne 0 ]; then - printf " Failed to persist\n" - rc=1 - else - printf " File persisted\n" + local persist_it=true + + # ensure that, if this is a directory + if [ -d $p ]; then + if [ -d /config$p ]; then + persist_it=false fi fi - # register in /config/files used by rc.sysinit - if ! grep -q "^$f$" /config/files 2> /dev/null ; then - printf "$f\n" >> /config/files + + if $persist_it; then + f=$(readlink -f $p) + printf "$f" + # skip if file does not exist or is empty + if [ ! -s "$f" ]; then + printf " Skipping, file '%s' does not exist or is empty\n" $p + continue + fi + # skip if already bind-mounted + if ! grep -q " $f ext3" /proc/mounts ; then + mkdir -p /config$(dirname $f) + cp -a $f /config$f \ + && mount -n --bind /config$f $f + if [ $? -ne 0 ]; then + printf " Failed to persist\n" + rc=1 + else + printf " File persisted\n" + fi + fi + # register in /config/files used by rc.sysinit + if ! grep -q "^$f$" /config/files 2> /dev/null ; then + printf "$f\n" >> /config/files + fi + else + printf "Could not persist $p: it contains an already persisted file.\n" fi done echo @@ -522,13 +535,24 @@ remove_config() { f=$(readlink -f $p) if grep -q " $f ext3" /proc/mounts ; then if umount -n $f; then - if [ -f /config$f ]; then - # refresh the file in rootfs if it was mounted over - cp -a /config$f $f + if [ -d $f ]; then + cp -ar /config/$f/* $f if [ $? -ne 0 ]; then - printf " Failed to unpersist %s\n" $f + printf " Failed to unpersist ${f}\n" + exit 1 else - printf " %s successully unpersisted\n" $f + printf " $f successfully unpersisted\n" + fi + else + if [ -f /config$f ]; then + # refresh the file in rootfs if it was mounted over + cp -a /config$f $f + if [ $? -ne 0 ]; then + printf " Failed to unpersist %s\n" $f + exit 1 + else + printf " %s successully unpersisted\n" $f + fi fi fi fi @@ -550,17 +574,26 @@ remove_config() { # WARNING: file is shredded and removed # ovirt_safe_delete_config() { - if grep -q " /config ext3" /proc/mounts; then - for f in "$@"; do - if grep -q " $f ext3" /proc/mounts ; then - umount -n $f - fi - # unregister in /config/files used by rc.sysinit - sed --copy -i "\|^$f$|d" /config/files - shred -u /config$f - done - fi - shred -u $f + local target + + for target in "$@"; do + if grep -q " $target ext3" /proc/mounts; then + umount -n $target + fi + + sed --copy -i "\|$target$|d" /config/files + + if [ -d $target ]; then + for child in $(ls -d $target/*); do + ovirt_safe_delete_config $child + done + rm -rf /config$target + rm -rf $target + else + shred -u /config$target + shred -u $target + fi + done } -- 1.6.5.2 From clement.arthur at gmail.com Tue Jan 19 08:56:29 2010 From: clement.arthur at gmail.com (Arthur Clement) Date: Tue, 19 Jan 2010 09:56:29 +0100 Subject: [Ovirt-devel] How I installed ovirt on fc 12 Message-ID: <201001190956.29356.clement.arthur@gmail.com> Hi, I installed ovirt on fedora 12 (64 bits) successfully but I had to make some changes to make it work. 1. Installation from rpms builded from the lastest git version 2. Patch ace : missing backslashes in sed commands vim /usr/share/ace/modules/ovirt/manifests/freeipa.pp line 33 : '/\\[kdcdefaults\\]/a \\ kdc_ports = 88' single_exec {"set_kdc_defaults": command => "/bin/sed -i '/\\[kdcdefaults\\]/a \\ kdc_ports = 88' /usr/share/ipa/kdc.conf.template", require => Package[ipa-server] } Line 44 : file_replacement{"ipa_proxy_config_1": file => "/etc/httpd/conf.d/ipa.conf", pattern => "^", replacement => "", require => Single_exec[replace_line_returns] } 3. Patch ipa-server https://bugzilla.redhat.com/show_bug.cgi?id=544927 https://www.redhat.com/archives/freeipa-devel/2010-January/msg00054.html I had to install ipa-server before running ace to patch /usr/lib/python2.6/site-packages/ipaserver/funcs.py. yum install ipa-server diff -u /usr/lib/python2.6/site-packages/ipaserver/funcs.py.orig /usr/lib/python2.6/site-packages/ipaserver/funcs.py --- /usr/lib/python2.6/site-packages/ipaserver/funcs.py.orig 2010-01-15 15:57:56.000000000 -0500 +++ /usr/lib/python2.6/site-packages/ipaserver/funcs.py 2010-01-15 16:00:40.000000000 -0500 @@ -332,7 +332,7 @@ schema_entry = self.__get_base_entry("", "objectclass=*", ['dn','subschemasubentry'], opts) schema_cn = schema_entry.get('subschemasubentry') - schema = self.__get_base_entry(schema_cn, "objectclass=*", ['*'], opts) + schema = self.__get_base_entry(schema_cn, "objectclass=*", ['*', 'objectclasses','attributetypes','matchingrules'], opts) return schema Ruby from fedora packages causes some compatibility troubles : /usr/bin/rake db:migrate (modules/ovirt/manifests/ovirt.pp) crash and a lot of compatibility errors raise when mongrel and other ruby dependances try to start. 4. Change ruby environment to 2.3.4 vim /usr/share/ovirt-server/config/environment.rb Line 23 RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION 5. Patch ruby initializers http://webtips-seja.blogspot.com/2009/10/undefined-method-quoteident-for.html vim /usr/share/ovirt-server/config/initializers/new_rails_defaults.rb Add : def PGconn.quote_ident(name) %("#{name}") end 6. Adapt ruby gems You must have : *** LOCAL GEMS *** actionmailer (2.3.4) actionpack (2.3.4) activeldap (1.2.0) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) cgi_multipart_eof_fix (2.5.0) cobbler (1.6.1) columnize (0.3.1) daemons (1.0.10) fastthread (1.0.7) flexmock (0.8.6) gem_plugin (0.2.3) gettext (2.0.4) gettext_activerecord (2.0.4) gettext_rails (2.0.4) highline (1.5.1) hoe (2.3.3) krb5-auth (0.7) linecache (0.43) locale (2.0.4) locale_rails (2.0.4) mongrel (1.1.5) postgres (0.7.9.2008.01.28) rack (1.0.1) rails (2.3.4) rake (0.8.7) ruby-debug (0.10.3) ruby-debug-base (0.10.3) rubyforge (1.0.5) gem uninstall rack -v 1.0.0 gem install columnize -v 0.3.1 gem install gettext gettext_activerecord gettext_rails -v 2.0.4 gem install rubydebug -v 0.10.3 gem install ruby-debug -v 0.10.3 gem install locale locale_rails -v 2.0.4 gem uninstall actionmailer actionpack activerecord activeresource activesupport -v 2.3.5 gem uninstall locale locale_rails -v 2.0.5 gem uninstall gettext -v 2.1.0 gem uninstall gettext gettext_activerecord gettext_rails -v 2.1.0 gem uninstall locale locale_rails -v 2.0.5 7. Launch ovirt-installer ovirt-installer ace -d -l logfile install ovirt 8. Fix bug in /etc/httpd/aliases libnssckbi.so -> ../../../lib64/libnssckbi.so to libnssckbi.so -> ../../../usr/lib64/libnssckbi.so I had some troubles to make the proxy and ssl working but the problem solved itself after a while... For more information, me (arthurc) and my colleague (pierre-gilles) are available on #ovirt at freenode. From jboggs at redhat.com Fri Jan 22 03:05:49 2010 From: jboggs at redhat.com (Joey Boggs) Date: Thu, 21 Jan 2010 22:05:49 -0500 Subject: [Ovirt-devel] [PATCH node] Enables ability to have a common shared root Message-ID: <1264129549-9107-1-git-send-email-jboggs@redhat.com> Nodes can now have a unique HostVG and share a common root. The nodes must use lun masking or similar to hide other HostVG volume groups from other nodes. --- scripts/ovirt-config-boot | 12 +++++++- scripts/ovirt-config-storage | 67 +++++++++++++++++++++++++++-------------- 2 files changed, 55 insertions(+), 24 deletions(-) diff --git a/scripts/ovirt-config-boot b/scripts/ovirt-config-boot index fb956f3..d64f683 100755 --- a/scripts/ovirt-config-boot +++ b/scripts/ovirt-config-boot @@ -29,6 +29,11 @@ ovirt_boot_setup() { local disk2 local partN=-1 log "installing the image." + + if [ "$OVIRT_ROOT_INSTALL" == "n" ]; then + log "done." + return + fi if [ -h /dev/disk/by-label/Boot ]; then mount_boot mountpoint /boot @@ -261,7 +266,12 @@ if [ -z "$doreboot" ]; then fi start_log -ovirt_boot_setup "$live" "$bootparams" +if [ "$OVIRT_ROOT_INSTALL" =="n" ]; then + log "done." + return +else + ovirt_boot_setup "$live" "$bootparams" +fi rc=$? if [ $rc -eq 0 -a "$doreboot" = "yes" ]; then disable_firstboot diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index 2ffcaa4..17938ec 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -226,6 +226,22 @@ do_configure() ROOTDRIVE=$(get_dev_name) || return 0 get_drive_size $ROOTDRIVE ROOTDRIVESPACE + if ask_yes_or_no "Will Root be shared with other nodes ([Y]es/[N]o)?"; then + OVIRT_SHARED_ROOT="y" + if ask_yes_or_no "Partition and install Root?"; then + OVIRT_ROOT_INSTALL="y" + else + OVIRT_ROOT_INSTALL="n" + fi + else + OVIRT_SHARED_ROOT="n" + OVIRT_ROOT_INSTALL="y" + fi + + augtool < /dev/null || udevsettle # sync GPT to the legacy MBR partitions - if [ "gpt" == "$LABEL_TYPE" ]; then - log "Running gptsync to create legacy mbr" - gptsync $ROOTDRIVE + if [ "$OVIRT_ROOT_INSTALL" == "y" ]; then + if [ "gpt" == "$LABEL_TYPE" ]; then + log "Running gptsync to create legacy mbr" + gptsync $ROOTDRIVE + fi fi partpv=${HOSTVGDRIVE}${hostvgpart} -- 1.6.6 From dpierce at redhat.com Thu Jan 28 15:56:07 2010 From: dpierce at redhat.com (Darryl L. Pierce) Date: Thu, 28 Jan 2010 10:56:07 -0500 Subject: [Ovirt-devel] Moving the IRC channel to oftc.net... Message-ID: <20100128155607.GW12101@mcpierce-desktop.usersys.redhat.com> Due to some issues around channel ownership and spamming, we've decided to move the IRC channel for discussing issues over to the OFTC IRC network[1]. I'll continue to be available in the channel on freenode for a while, but I'll be redirecting people to our new channel. Thanks for your understanding. Any questions, please feel free to ask. [1] - http://www.oftc.net/oftc/ -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Delivering value year after year. Red Hat ranks #1 in value among software vendors. http://www.redhat.com/promo/vendor/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: not available URL: From mburns at redhat.com Fri Jan 29 03:58:41 2010 From: mburns at redhat.com (Mike Burns) Date: Thu, 28 Jan 2010 22:58:41 -0500 Subject: [Ovirt-devel] Moving the IRC channel to oftc.net... In-Reply-To: <20100128155607.GW12101@mcpierce-desktop.usersys.redhat.com> References: <20100128155607.GW12101@mcpierce-desktop.usersys.redhat.com> Message-ID: <1264737521.2978.28.camel@localhost.localdomain> The channel name on OFTC is #ovirt. Someone mentioned it wasn't explicitly mentioned, so I wanted to be sure Mike On Thu, 2010-01-28 at 10:56 -0500, Darryl L. Pierce wrote: > Due to some issues around channel ownership and spamming, we've decided > to move the IRC channel for discussing issues over to the OFTC IRC > network[1]. I'll continue to be available in the channel on freenode for > a while, but I'll be redirecting people to our new channel. > > Thanks for your understanding. Any questions, please feel free to ask. > > [1] - http://www.oftc.net/oftc/ > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-devel From jboggs at redhat.com Fri Jan 29 21:34:09 2010 From: jboggs at redhat.com (Joey Boggs) Date: Fri, 29 Jan 2010 16:34:09 -0500 Subject: [Ovirt-devel] [PATCH node] prevent hostvg and sharedroot from accepting same drive input Message-ID: <1264800849-25108-1-git-send-email-jboggs@redhat.com> --- scripts/ovirt-config-storage | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index 17938ec..460588b 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -243,8 +243,19 @@ do_configure() set /files$OVIRT_DEFAULTS/OVIRT_ROOT_INSTALL $OVIRT_ROOT_INSTALL EOF printf "\n\nPlease select the disk to use for the HostVG.\n\n" - HOSTVGDRIVE=$(get_dev_name) || return 0 - get_drive_size $HOSTVGDRIVE HOSTVGDRIVESPACE + while true; do + HOSTVGDRIVE=$(get_dev_name) || return 0 + get_drive_size $HOSTVGDRIVE HOSTVGDRIVESPACE + if [ $OVIRT_SHARED_ROOT == "y" ]; then + if [ $ROOTDRIVE == $HOSTVGDRIVE ]; then + printf "\n\nRoot Drive and HostVG drive must be different when shared\n\n" + return 1 + else + break; + fi + fi + break; + done echo $HOSTVGDRIVESPACE fi printf "\n\nPlease configure storage partitions.\n\n" -- 1.6.6