Commit 956d8769 authored by Leigh B Stoller's avatar Leigh B Stoller

Tainted images cannot do tarballs, which breaks my recent cleanup of

execute services. So for tainted images use the older method.
parent 4c670299
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# Copyright (c) 2008-2018 University of Utah and the Flux Group. # Copyright (c) 2008-2019 University of Utah and the Flux Group.
# #
# {{{GENIPUBLIC-LICENSE # {{{GENIPUBLIC-LICENSE
# #
...@@ -1749,13 +1749,13 @@ sub GetTicketAuxAux($) ...@@ -1749,13 +1749,13 @@ sub GetTicketAuxAux($)
"default_osid defined for it.\n"; "default_osid defined for it.\n";
} }
else { else {
my $default_osinfo = OSImage->Lookup($default_osid); $osinfo = OSImage->Lookup($default_osid);
if (!defined($default_osinfo)) { if (!defined($osinfo)) {
print STDERR "Blackbox node type $pctype but cannot ". print STDERR "Blackbox node type $pctype but cannot ".
"lookup default_osid defined for it.\n"; "lookup default_osid defined for it.\n";
} }
else { else {
$osname = $default_osinfo->osname() $osname = $osinfo->osname()
} }
} }
if (!defined($osname)) { if (!defined($osname)) {
...@@ -1783,9 +1783,9 @@ sub GetTicketAuxAux($) ...@@ -1783,9 +1783,9 @@ sub GetTicketAuxAux($)
# #
if (defined($node) && !defined($osname) && !$isbridge && !$isvhost) { if (defined($node) && !defined($osname) && !$isbridge && !$isvhost) {
if (defined($node->default_osid())) { if (defined($node->default_osid())) {
my $default_osinfo = OSImage->Lookup($node->default_osid()); $osinfo = OSImage->Lookup($node->default_osid());
$osname = $default_osinfo->osname() $osname = $osinfo->osname()
if (defined($default_osinfo)); if (defined($osinfo));
} }
} }
# The slot does not like to be NULL. # The slot does not like to be NULL.
...@@ -2009,9 +2009,18 @@ sub GetTicketAuxAux($) ...@@ -2009,9 +2009,18 @@ sub GetTicketAuxAux($)
# We cannot depend on NFS anymore, so package the startfile # We cannot depend on NFS anymore, so package the startfile
# into a little tarball and add to the tarfiles list. # into a little tarball and add to the tarfiles list.
# #
# OK, a tainted disk image is not allowed to download tarballs
# at least until the client side is fixed (perhaps to make root
# unpacking an option). So if tainted we have to use NFS.
#
if (defined($osinfo) &&
!$osinfo->isImageAlias() && $osinfo->IsTainted()) {
$nodeblob->{'startupcmd'} = "$startfile";
}
else {
system("$TAR cf $tarfile -C $userdir $startname"); system("$TAR cf $tarfile -C $userdir $startname");
if ($?) { if ($?) {
$response = GeniResponse->Create(GENIRESPONSE_ERROR, undef, $response = GeniResponse->Create(GENIRESPONSE_ERROR,undef,
"Could not create startup tarfile for $node_nickname"); "Could not create startup tarfile for $node_nickname");
goto bad; goto bad;
} }
...@@ -2023,6 +2032,7 @@ sub GetTicketAuxAux($) ...@@ -2023,6 +2032,7 @@ sub GetTicketAuxAux($)
} }
$nodeblob->{'startupcmd'} = "/var/tmp/$startname"; $nodeblob->{'startupcmd'} = "/var/tmp/$startname";
} }
}
my $elabsettings = GeniXML::GetElabInElabSettings($ref); my $elabsettings = GeniXML::GetElabInElabSettings($ref);
if (defined($elabsettings)) { if (defined($elabsettings)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment