From 6bc5c3fbf3562c8d35d62cb92b92026ada749e9a Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Mon, 9 Sep 2013 14:57:38 -0600 Subject: [PATCH] Turn off NFS mounts (via nodes table) for xen shared VMs in Utah. (Do not work cause of firewalling, and they timeout, which takes too long). --- db/Node.pm.in | 21 ++++++++++++++++++++- protogeni/lib/GeniCM.pm.in | 10 ++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/db/Node.pm.in b/db/Node.pm.in index bf0e2b12a..927c7dc06 100755 --- a/db/Node.pm.in +++ b/db/Node.pm.in @@ -1660,7 +1660,8 @@ sub ClearBootAttributes($) "update_accounts=0,ipport_next=ipport_low,rtabid=0, ". "sfshostid=NULL,allocstate='$allocFreeState',boot_errno=0, ". "destination_x=NULL,destination_y=NULL, ". - "destination_orientation=NULL,reserved_memory=0 ". + "destination_orientation=NULL,reserved_memory=0,". + "nonfsmounts=0 ". "where node_id='$node_id'") or return -1; @@ -3234,6 +3235,24 @@ sub Setrtabid($$) return Refresh($self); } +# +# Set nonfsmounts for a node. +# +sub NoNFSMounts($) +{ + my ($self) = @_; + + return -1 + if (! (ref($self))); + + my $node_id = $self->node_id(); + + DBQueryWarn("update nodes set nonfsmounts='1' where node_id='$node_id'") + or return -1; + + return 0; +} + # # Get the max share count for a node. This is actually the pcvm count # from the aux table, but might change someday, I hope. diff --git a/protogeni/lib/GeniCM.pm.in b/protogeni/lib/GeniCM.pm.in index a3365fc66..8b27fb8f3 100644 --- a/protogeni/lib/GeniCM.pm.in +++ b/protogeni/lib/GeniCM.pm.in @@ -3210,6 +3210,16 @@ sub SliverWorkAux($$$$$$$$) # Must do this after mapper has run $node->Refresh(); + if ($MAINSITE && $node->sharing_mode()) { + my $physhost = $node->GetPhysHost(); + if (defined($physhost)) { + my ($osinfo) = $physhost->RunningOsImage(); + if (defined($osinfo) && $osinfo->FeatureSupported("xen-host")){ + $node->NoNFSMounts(); + } + } + } + if (grep {$_ eq $virtual_id} keys(%nodemap)) { # # Already in the aggregate, so reuse sliver. -- GitLab