Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
a4a93c81
Commit
a4a93c81
authored
Aug 09, 2011
by
Jonathon Duerig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print out vhostname, not just physical hostname
parent
5225d513
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
protogeni/lib/GeniSliver.pm.in
protogeni/lib/GeniSliver.pm.in
+11
-0
protogeni/lib/GeniUtil.pm.in
protogeni/lib/GeniUtil.pm.in
+13
-1
No files found.
protogeni/lib/GeniSliver.pm.in
View file @
a4a93c81
...
...
@@ -727,10 +727,16 @@ sub AnnotateManifest($)
print STDERR "Could not map sliver $self to its creator\n";
return undef;
}
my $experiment = $self->GetExperiment();
if (!defined($experiment)) {
print STDERR "Could not lookup experiment for sliver $self\n";
return undef;
}
my $sshdport = 22;
my $hostname = GeniUtil::FindHostname($node->node_id());
my $phostname = $hostname;
my $vhostname = GeniUtil::FindVHostname($experiment, $node);
if ($node->isvirtnode()) {
$sshdport = $node->sshdport();
...
...
@@ -750,6 +756,11 @@ sub AnnotateManifest($)
} else {
GeniXML::SetText("sliver_id", $rspec, $self->sliver_urn());
GeniXML::SetText("component_id", $rspec, $self->component_urn());
my $host = GeniXML::FindFirst("n:host", $rspec);
if (! defined($host)) {
$host = GeniXML::AddElement("host", $rspec);
}
GeniXML::SetText("name", $host, $vhostname);
}
my $services = GeniXML::FindFirst("n:services", $rspec);
...
...
protogeni/lib/GeniUtil.pm.in
View file @
a4a93c81
...
...
@@ -11,7 +11,7 @@ use Exporter;
use
vars
qw
(@
ISA
@
EXPORT
);
@
ISA
=
"Exporter"
;
@
EXPORT
=
qw
(
GENI_PURGEFLAG
FindHostname
);
@
EXPORT
=
qw
(
GENI_PURGEFLAG
FindHostname
FindVHostname
);
use
English
;
use
Data
::
Dumper
;
...
...
@@ -157,6 +157,18 @@ sub FindHostname($)
return $nodeid . "." . $prefix;
}
sub FindVHostname($$)
{
my ($exp, $node) = @_;
my $prefix = $OURDOMAIN;
if ($ELABINELAB == 1) {
$OUTERBOSS_NODENAME =~ /^[^.]+\.(.*)$/;
$prefix = $1;
}
return $node->vname() . "." . $exp->eid() . "." . $exp->pid() . "."
. $prefix;
}
#
# Run a command, being sure to capture all output.
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment