Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
87c044fe
Commit
87c044fe
authored
Feb 05, 2016
by
Leigh B Stoller
Browse files
Check for lockdown that spans AL2S and send email warning about it.
parent
260b37b7
Changes
1
Show whitespace changes
Inline
Side-by-side
apt/manage_instance.in
View file @
87c044fe
...
...
@@ -1789,6 +1789,12 @@ sub DoLockdownInternal($$)
{
my ($setclr,$which) = @_;
# The web interface (and in the future the xmlrpc interface) sets this.
my $this_user = User->ImpliedUser();
if (! defined($this_user)) {
$this_user = User->ThisUser();
}
my $slice = $instance->GetGeniSlice();
if (!defined($slice)) {
fatal("No slice for instance");
...
...
@@ -1820,6 +1826,24 @@ sub DoLockdownInternal($$)
my $coderef = sub {
my ($sliver) = @_;
#
# We cannot do lockdown at AL2S. More generally, it only works at
# Emulab based aggregates, but we do not talk to other aggregates.
#
if ($sliver->ISAL2S()) {
return 0
if ($clear);
my $project = $instance->GetProject();
$project->SendEmail($this_user->email(),
"Failed to completely lock down APT Instance",
"Failed to completely lock down $instance,\n".
"cause it crosses AL2S.\n\n".
$instance->webURL() . "\n",
$project->OpsEmailAddress(),
"CC: " . $project->OpsEmailAddress());
return 0;
}
my $response = $sliver->Lockdown($clear);
if (!defined($response)) {
print STDERR "RPC Error calling Lockdown\n";
...
...
Write
Preview
Supports
Markdown
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