You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ml...@apache.org on 2012/10/31 16:02:13 UTC
git commit: Summary: Fix virtual router trying to resolve own host
name (v2)
Updated Branches:
refs/heads/master 95df86e1e -> 761b4f60a
Summary: Fix virtual router trying to resolve own host name (v2)
Detail: Make change in 95df86e1e030ab955ac09f145df37f3aef606c05 be specific
to VPC.
BUG-ID : NONE
Reviewed-by: Marcus Sorensen
Reported-by: Marcus Sorensen
Signed-off-by: Marcus Sorensen <ma...@betterservers.com> 1351695701 -0600
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/761b4f60
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/761b4f60
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/761b4f60
Branch: refs/heads/master
Commit: 761b4f60a10a49dc71c9aafabe4ed35e4694fd56
Parents: 95df86e
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Oct 31 09:01:41 2012 -0600
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Wed Oct 31 09:01:41 2012 -0600
----------------------------------------------------------------------
.../debian/config/etc/init.d/cloud-early-config | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/761b4f60/patches/systemvm/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
index d4af3a9..258e71e 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -597,6 +597,11 @@ setup_vpcrouter() {
setup_vmware_extra_nics
fi
+ if [ -f /etc/hosts ]; then
+ host=`hostname -s`;
+ grep -q $host /etc/hosts || echo "127.0.0.1 $host" >> /etc/hosts;
+ fi
+
cat > /etc/network/interfaces << EOF
auto lo $1
iface lo inet loopback
@@ -814,18 +819,9 @@ change_password() {
fi
}
-set_etc_hosts() {
- if [ -f /etc/hosts ]; then
- host=`hostname -s`;
- grep -q $host /etc/hosts || echo "127.0.0.1 $host" >> /etc/hosts;
- fi
-}
-
start() {
# Clear /tmp for file lock
rm -f /tmp/*.lock
- # fix lookups for our hostname (iptables, etc)
- set_etc_hosts
local hyp=$(hypervisor)
[ $? -ne 0 ] && log_it "Failed to detect hypervisor type, bailing out of early init" && exit 10
log_it "Detected that we are running inside $hyp guest"