From e300b6795e56b6a0f95c5bf38957362e3c40374b Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 16 Mar 2009 17:31:15 +0000 Subject: [PATCH] -Avoid switch searches for virtual nics for now -Fix wvid title for supported IPMI devices -Have nbfs provide clue to xCATd that a virtual guest is booted git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2916 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot/overlay/bin/dodestiny | 6 ++++++ xCAT-server/lib/xcat/plugins/ipmi.pm | 2 +- xCAT-server/lib/xcat/plugins/switch.pm | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/xCAT-nbroot/overlay/bin/dodestiny b/xCAT-nbroot/overlay/bin/dodestiny index f6da62be5..105ce51c2 100755 --- a/xCAT-nbroot/overlay/bin/dodestiny +++ b/xCAT-nbroot/overlay/bin/dodestiny @@ -1,5 +1,8 @@ #!/bin/sh # IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html +if dmidecode|grep Vendor|grep QEMU; then #for now, reboot + IAMAVM=1 +fi for parm in `cat /proc/cmdline`; do key=`echo $parm|awk -F= '{print $1}'` if [ "$key" == "xcatd" ]; then @@ -70,6 +73,9 @@ while :; do echo "" echo "findme" echo "$ARCH" + if [ ! -z "$IAMAVM" ]; then + echo "virtual" + fi for i in `ifconfig -a|grep HWaddr|grep -v sit|awk '{print $1 "|" $5}'`; do IFACE=`echo $i|awk -F'|' '{print $1}'` DRIVER=`ethtool -i $IFACE|grep ^driver|awk '{print $2}'` diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 1b88f0fb1..a9d4871c1 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -1330,7 +1330,7 @@ sub getrvidparms { if ($jnlp =~ /This advanced option requires the purchase and installation/) { return (1,"Node does not have feature key for remote video"); } - $jnlp =~ s!argument>title=.*Video Viewer!argument>title=$currnode wvid/argument>!; + $jnlp =~ s!argument>title=.*Video Viewer!argument>title=$currnode wvid!; my @return=("method:imm","jnlp:$jnlp"); if (grep /-m/,@cmdargv) { $response = $browser->request(GET $baseurl."/kvm/vm/jnlp"); diff --git a/xCAT-server/lib/xcat/plugins/switch.pm b/xCAT-server/lib/xcat/plugins/switch.pm index 15b0d2233..fd5f29506 100644 --- a/xCAT-server/lib/xcat/plugins/switch.pm +++ b/xCAT-server/lib/xcat/plugins/switch.pm @@ -19,6 +19,15 @@ sub process_request { my $cb = shift; my $doreq = shift; my $ip = $req->{'_xcat_clientip'}; + if (defined $req->{nodetype} and $req->{nodetype}->[0] eq 'virtual') { + #Don't attempt switch discovery of a VM Guest + #TODO: in this case, we could/should find the host system + #and then ask it what node is associated with the mac + #Either way, it would be kinda weird since xCAT probably made up the mac addy + #anyway, however, complex network topology function may be aided by + #discovery working. Food for thought. + return; + } my $mac = ''; my $arptable = `/sbin/arp -n`; my @arpents = split /\n/,$arptable;