...
 
Commits (661)
#!/usr/bin/perl -w
#
# Copyright (c) 2010-2013 University of Utah and the Flux Group.
# Copyright (c) 2010-2013, 2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -128,7 +128,7 @@ sub DumpUser($)
"URL" => {"tag" => "URL",
"optional" => 1 },
"addr" => {"tag" => "address",
"optional" => 0 },
"optional" => 1 },
"addr2" => {"tag" => "address2",
"optional" => 1 },
"city" => {"tag" => "city",
......@@ -136,13 +136,13 @@ sub DumpUser($)
"state" => {"tag" => "state",
"optional" => 0 },
"zip" => {"tag" => "zip",
"optional" => 0 },
"optional" => 1 },
"country" => {"tag" => "country",
"optional" => 0 },
"phone" => {"tag" => "phone",
"optional" => 0 },
"optional" => 1 },
"title" => {"tag" => "title",
"optional" => 0 },
"optional" => 1 },
"affil" => {"tag" => "affiliation",
"optional" => 0 },
"shell" => {"tag" => "shell",
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -25,6 +25,7 @@ use strict;
use English;
use Getopt::Long qw(:config no_ignore_case);
use POSIX qw(strftime);
use Date::Parse;
#
# Load the Testbed support stuff.
......@@ -54,6 +55,7 @@ my $urn;
my $oldkeyfile;
my $authority;
my $notca = 0;
my $days = 2000;
my $include_uuid = 0;
my %optlist = ( "debug" => \$debug,
"password=s" => \$password,
......@@ -312,8 +314,45 @@ if( defined( $oldkeyfile ) ) {
#
my $startdate = POSIX::strftime("%y%m%d%H%M%SZ", gmtime(time() - 3600));
#
# Check the expiration on the CA cert, we do not want the new
# certificate to expire after the CA (signer) cert expires.
#
$UID = 0;
my $expires = `$OPENSSL x509 -enddate -noout -in $certfile`;
if ($?) {
fatal("Could not get expiration from $certfile");
}
if ($expires =~ /^notAfter=(.*)$/i) {
my $tmp = str2time($1);
if (!defined($tmp)) {
fatal("Could not convert $certfile expiration to time: $1");
}
$expires = $tmp;
}
else {
fatal("Could not parse $certfile expiration: $expires");
}
if ($expires < time()) {
fatal("$certfile certificate has expired!");
}
# If the CA expires in less then 30 days, grind to a halt.
my $daystoexpire = int(($expires - time()) / (3600 * 24));
if ($daystoexpire <= 30) {
fatal("Refusing to sign new certificate; the $certfile expires in less ".
"then 30 days!");
}
if ($debug) {
print "CA certificate expires in $daystoexpire days.\n";
}
if ($days > $daystoexpire) {
$days = $daystoexpire - 1;
print "Shortening certificate expiration to $days\n";
}
system("$OPENSSL ca -batch -policy policy_sslxmlrpc -startdate $startdate ".
" -days $days ".
" -name CA_syscerts -config $CACONFIG ".
" -out syscert_cert.pem -cert $certfile -keyfile $keyfile ".
" -infiles syscert_req.pem $outline") == 0
......
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -24,6 +24,7 @@
use strict;
use English;
use Getopt::Std;
use Date::Parse;
#
# Load the Testbed support stuff.
......@@ -408,11 +409,47 @@ sub CreateNewCert() {
system("$OPENSSL req $reqopts -new -config usercert.cnf ".
"-key usercert_key.pem -out usercert_req.pem")
== 0 or fatal("Could not create certificate request");
#
# Check the expiration on the CA cert, we do not want the new
# certificate to expire after the CA (signer) cert expires.
#
$UID = 0;
my $expires = `$OPENSSL x509 -enddate -noout -in $EMULAB_CERT`;
if ($?) {
fatal("Could not get expiration from $EMULAB_CERT");
}
if ($expires =~ /^notAfter=(.*)$/i) {
my $tmp = str2time($1);
if (!defined($tmp)) {
fatal("Could not convert CA expiration to time: $1");
}
$expires = $tmp;
}
else {
fatal("Could not parse CA expiration: $expires");
}
if ($expires < time()) {
fatal("CA certificate has expired!");
}
# If the CA expires in less then 30 days, grind to a halt.
my $daystoexpire = int(($expires - time()) / (3600 * 24));
if ($daystoexpire <= 30) {
fatal("Refusing to sign new certificate; the CA expires in less ".
"then 30 days!");
}
if ($debug) {
print "CA certificate expires in $daystoexpire days.\n";
}
if ($days > $daystoexpire) {
$days = $daystoexpire - 1;
print "Shortening certificate expiration to $days\n";
}
#
# Sign the client cert request, creating a client certificate.
#
$UID = 0;
system("$OPENSSL ca -batch -policy policy_sslxmlrpc -days $days ".
" -name CA_usercerts -config $CACONFIG ".
" -out usercert_cert.pem -cert $EMULAB_CERT -keyfile $EMULAB_KEY ".
......
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2011, 2014, 2016 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -82,6 +82,7 @@ use libdb;
use libtestbed;
use Project;
use User;
use Brand;
# Protos
sub fatal($);
......@@ -227,8 +228,8 @@ fatal($@)
if (exists($xmlparse->{'attribute'}->{"portal"})) {
$portal = $xmlparse->{'attribute'}->{"portal"}->{'value'};
delete($xmlparse->{'attribute'}->{"portal"});
if (! ($portal eq "aptlab" || $portal eq "cloudlab" ||
$portal eq "phantomnet" || $portal eq "emulab")) {
my $brand = Brand->Create($portal);
if (!defined($brand)) {
fatal("Bad portal: $portal");
}
}
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2016 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -36,12 +36,15 @@ sub usage()
print("Usage: newuser [-s] -t <type> <xmlfile>\n");
exit(-1);
}
my $optlist = "dt:nsp";
my $optlist = "dt:nsprP";
my $debug = 0;
my $impotent= 0;
my $type = "";
my $silent = 0;
my $relaxed = 0;
my $dopass = 0;
my $portal;
my $passhash;
my @keyfiles = ();
#
......@@ -87,6 +90,7 @@ use libtestbed;
use User;
use EmulabConstants();
use emutil;
use Brand;
# Protos
sub fatal($);
......@@ -116,6 +120,12 @@ if (defined($options{"s"})) {
if (defined($options{"t"})) {
$type = $options{"t"};
}
if (defined($options{"r"})) {
$relaxed = 1;
}
if (defined($options{"P"})) {
$dopass = 1;
}
if (@ARGV != 1) {
usage();
}
......@@ -175,6 +185,13 @@ my %optional = ("uid" => "uid",
"pubkey" => undef,
"pubkeys" => undef);
my %relaxed_fields = ("affiliation_abbreviation" => 1,
"phone" => 1,
"title" => 1,
"address" => 1,
"zip" => 1,
"wikiname" => 1);
#
# These are required for most users, but are optional for wiki-only users
#
......@@ -214,32 +231,33 @@ print STDERR Dumper($xmlparse)
if (exists($xmlparse->{'attribute'}->{"portal"})) {
$portal = $xmlparse->{'attribute'}->{"portal"}->{'value'};
delete($xmlparse->{'attribute'}->{"portal"});
if (! ($portal eq "aptlab" || $portal eq "cloudlab" ||
$portal eq "phantomnet" || $portal eq "emulab")) {
my $brand = Brand->Create($portal);
if (!defined($brand)) {
fatal("Bad portal: $portal");
}
# Remove these, we do not require them on the APT path.
delete($required{"affiliation_abbreviation"});
delete($required{"phone"});
delete($required{"title"});
delete($required{"address"});
delete($required{"zip"});
delete($required{"wikiname"});
$relaxed = 1;
}
#
# Make sure all the required arguments were provided.
#
foreach my $key (keys(%required)) {
next
if ($relaxed && exists($relaxed_fields{$key}));
fatal("Missing required attribute '$key'")
if (! exists($xmlparse->{'attribute'}->{"$key"}));
}
#
# Always delete this. Used by the portal code but we ignore it.
# Used by the portal code but we ignore it unless explicitly told
# not to.
#
delete($xmlparse->{'attribute'}->{"passhash"})
if (exists($xmlparse->{'attribute'}->{"passhash"}));
if (exists($xmlparse->{'attribute'}->{"passhash"})) {
if ($dopass) {
$passhash = $xmlparse->{'attribute'}->{"passhash"}->{'value'};
}
delete($xmlparse->{'attribute'}->{"passhash"});
}
#
# We build up an array of arguments to pass to User->Create() as we check
......@@ -463,6 +481,9 @@ if (!defined($newuser)) {
if (defined($portal)) {
$newuser->SetStatus(USERSTATUS_UNAPPROVED());
}
if (defined($passhash)) {
$newuser->SetPassword($passhash);
}
my $key = $newuser->verify_key();
my $usr_uid = $newuser->uid();
my $usr_idx = $newuser->uid_idx();
......
......@@ -60,6 +60,7 @@ my $silent = 0;
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $MAINSITE = @TBMAINSITE@;
my $TBAUDIT = "@TBAUDITEMAIL@";
my $CONTROL = "@USERNODE@";
my $BOSSNODE = "@BOSSNODE@";
......@@ -77,7 +78,7 @@ my $THISHOMEBASE= "@THISHOMEBASE@";
my $PROTOUSER = 'elabman';
my $ELABINELAB = @ELABINELAB@;
my $PGENISUPPORT= @PROTOGENI_SUPPORT@;
my $GENIRACK = @PROTOGENI_GENIRACK@;
my $CONFIG_TARGETSYS = @CONFIG_TARGETSYS@;
my $SAMBANODE = "fs"; # DNS makes this do the right thing in E-in-E.
my $SMBPASSWD = "/usr/local/bin/smbpasswd";
......@@ -295,6 +296,7 @@ my $status = $target_user->status();
my $webonly = $target_user->webonly();
my $usr_shell = $target_user->shell();
my $usr_admin = $target_user->admin();
my $usr_uid = $target_user->uid();
my $wpswd = $target_user->w_pswd();
my $wikionly = $target_user->wikionly();
my $isnonlocal = $target_user->IsNonLocal();
......@@ -470,7 +472,7 @@ sub AddUser()
#
# Leave the password "starred" on elabinelab; safer.
#
if (!$ELABINELAB || $GENIRACK) {
if (!$ELABINELAB && !$CONFIG_TARGETSYS) {
# shell escape.
$pswd =~ s/\$/\\\$/g;
$pswd =~ s/\*/\\\*/g;
......@@ -748,7 +750,7 @@ sub UpdatePassword()
# Change on ops only if there is a real account there.
# For ELABINELAB, safer to leave the password "starred".
#
if (!$wikionly && (!$ELABINELAB || $GENIRACK)) {
if (!$wikionly && !$ELABINELAB && !$CONFIG_TARGETSYS) {
#
# Grab from the DB to avoid taint checking sillyness.
#
......@@ -901,9 +903,21 @@ sub UpdateUser(;$)
# Admin users get a local shell.
if ($usr_admin) {
$locshellarg = "-s " . $shellpaths{"tcsh"};
if ($MAINSITE) {
$locshellarg .= " -d /home/$usr_uid";
if (! -e "/home/$usr_uid") {
$locshellarg .= " -m";
}
}
}
else {
$locshellarg = "-s $PBAG"
$locshellarg = "-s $PBAG";
if ($MAINSITE) {
my $homedir = (getpwnam($usr_uid))[7];
if ($homedir eq "/home/$usr_uid") {
$locshellarg .= " -d $HOMEDIR/$usr_uid";
}
}
}
if (!defined($usr_shell) ||
!exists($shellpaths{$usr_shell})) {
......
#
# Copyright (c) 2002-2015 University of Utah and the Flux Group.
# Copyright (c) 2002-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -47,9 +47,11 @@ CONFIG_GENI = httpd-geni.conf
CONFIG_FILES += $(CONFIG_GENI)
endif
#
# Move to Apache 22 ...
#
ifeq ($(APACHE_VERSION),24)
# For VPATH.
MOSTLY_SRCDIRS = ${SRCDIR}/v24
SCRIPT_HACK = 0
else
ifeq ($(APACHE_VERSION),22)
# For VPATH.
MOSTLY_SRCDIRS = ${SRCDIR}/v2
......@@ -57,6 +59,7 @@ SCRIPT_HACK = 0
else
MOSTLY_SRCDIRS = ${SRCDIR}/v1
endif
endif
INSTALL_PHP_CONFIG = /usr/local/etc
#
......@@ -140,7 +143,13 @@ ifeq ($(SCRIPT_HACK),1)
$(INSTALL) -m 755 $(SRCDIR)/apache-emulab /usr/local/etc/rc.d/apache.sh
endif
ifeq ($(APACHE_VERSION),22)
ifeq ($(APACHE_VERSION),1.3)
install: install-dirs install-scripts httpd.conf.fixed
$(INSTALL_DATA) httpd.conf.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
control-install: install-dirs install-scripts httpd.conf-ops.fixed
$(INSTALL_DATA) httpd.conf-ops.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
else
install: install-dirs install-scripts httpd.conf pgeni-install
$(INSTALL_DATA) httpd.conf $(INSTALL_APACHE_CONFIG)/httpd.conf
......@@ -153,12 +162,6 @@ ifeq ($(PGENISUPPORT),1)
endif
utah: httpd.conf.utah httpd.conf-ops.utah
else
install: install-dirs install-scripts httpd.conf.fixed
$(INSTALL_DATA) httpd.conf.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
control-install: install-dirs install-scripts httpd.conf-ops.fixed
$(INSTALL_DATA) httpd.conf-ops.fixed $(INSTALL_APACHE_CONFIG)/httpd.conf
endif
install-php-ini: php.ini
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -43,6 +43,7 @@ use overload ('""' => 'Stringify');
my $TB = "@prefix@";
my $TBOPS = "@TBOPSEMAIL@";
my $OURDOMAIN = "@OURDOMAIN@";
my $MYURN = "urn:publicid:IDN+${OURDOMAIN}+authority+cm";
# Protos
sub STATUS($$;$);
......@@ -124,6 +125,13 @@ sub DESTROY {
$self->{'AGGREGATE'} = undef;
}
sub IsLocalCluster($)
{
my ($self) = @_;
return ($self->urn() eq $MYURN ? 1 : 0);
}
#
# Refresh a class instance by reloading from the DB.
#
......@@ -199,6 +207,21 @@ sub STATUS($$;$)
return $self->{'STATUS'}->{$name};
}
#
# Insert a status (change) event.
#
sub StatusEvent($$)
{
my ($self, $event) = @_;
my $urn = $self->urn();
DBQueryWarn("insert into apt_aggregate_events set ".
" urn='$urn', event='$event', stamp=now()")
or return -1;
return 0;
}
#
# Lookup all aggregates for a portal.
#
......@@ -278,7 +301,7 @@ sub CheckStatus($$;$)
my ($self, $perrmsg, $portalrpc) = @_;
require APT_Geni;
if (0 || $self->disabled()) {
if ($self->disabled()) {
$$perrmsg = "The " . $self->name() . " cluster ".
"is currently offline, please try again later.";
return 1;
......
......@@ -42,6 +42,7 @@ use GeniCertificate;
use GeniCredential;
use GeniAuthority;
use GeniResponse;
use Genixmlrpc;
# Configure variables
my $TB = "@prefix@";
......@@ -225,6 +226,15 @@ sub GenCredentials($$;$$)
$gensacert = 1;
}
# Another case to watch for; the certificate chain is bad cause
# the signer (say, the Geni Portal) is expired.
if ($certificate->VerifySSLChain()) {
print STDERR "certificate for $geniuser has a bad chain\n";
goto bad
if (!$allowexpired);
$gensacert = 1;
}
if ($gensacert) {
# Be careful not to return this.
$speaksfor = undef;
......@@ -316,15 +326,27 @@ sub GenCredentials($$;$$)
sub GetAuthority($)
{
my ($urn) = @_;
my $context = Genixmlrpc->GetContext();
if (!defined($context)) {
my $tmp = GeniContext();
return undef
if (!defined($tmp));
Genixmlrpc->SetContext($tmp);
}
my $cm_authority = GeniAuthority->Lookup($urn);
if (!defined($cm_authority)) {
$cm_authority = GeniAuthority->CreateFromRegistry("cm", $urn);
if (!defined($cm_authority)) {
print STDERR "Could not load CM authority object\n";
Genixmlrpc->SetContext(undef)
if (!defined($context));
return undef;
}
}
Genixmlrpc->SetContext(undef)
if (!defined($context));
return $cm_authority;
}
......@@ -545,11 +567,12 @@ sub PortalRPC($$$@)
#
# Ping an aggregate to see if its alive, using getversion.
#
sub PingAggregate($$;$)
sub PingAggregate($$;$$)
{
my ($aggregate, $perrmsg, $portalrpc) = @_;
my ($aggregate, $perrmsg, $portalrpc, $timeout) = @_;
my $authority = GetAuthority($aggregate->urn());
my $context = RootContext();
$timeout = 10 if (!defined($timeout));
if (!defined($authority)) {
$$perrmsg = "Could not lookup authority for $aggregate!";
......@@ -566,7 +589,7 @@ sub PingAggregate($$;$)
if ($usemydevtree) {
$cmurl =~ s/protogeni/protogeni\/stoller/;
}
my $oldto = Genixmlrpc->SetTimeout(10);
my $oldto = Genixmlrpc->SetTimeout($timeout);
my $response = Genixmlrpc::CallMethod($cmurl, $context, "GetVersion");
Genixmlrpc->SetTimeout($oldto);
......
This diff is collapsed.
#!/usr/bin/perl -wT
#
# Copyright (c) 2007-2017 University of Utah and the Flux Group.
# Copyright (c) 2007-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -860,8 +860,9 @@ sub CheckFirewall($$)
# and closed.
#
my $style = "closed";
if (defined($virtualization_type) &&
$virtualization_type eq "emulab-xen" && !@routable_control_ip) {
if (defined($virtualization_type) && !@routable_control_ip &&
($virtualization_type eq "emulab-xen"
|| $virtualization_type eq "emulab-docker")) {
$style = "basic";
}
......@@ -1356,8 +1357,17 @@ sub SetSites($$$$$$)
return 1;
}
# if more then one site for a link, must use the stitcher.
$$pneedstitcher = 1
if (keys(%linksites) > 1);
if (keys(%linksites) > 1) {
$$pneedstitcher = 1;
#
# Oh, ugly. The stitcher will not accept the link if its
# link_type is set to "lan", which is what happens when
# use create a LAN() in geni-lib. So reset the link type
# to vlan since that is what the stitcher wants to see.
#
GeniXML::SetLinkType($ref, "vlan");
}
}
foreach my $ref (GeniXML::FindNodesNS("n:routable_pool", $rspec,
$GeniXML::EMULAB_NS)->get_nodelist()) {
......@@ -1401,6 +1411,40 @@ sub SetSites($$$$$$)
return 0;
}
#
# Does the rspec reference more then one manager in any of the links.
# If so, we need the stitcher.
#
sub NeedStitcher($$)
{
my ($rspecstr, $perrmsg) = @_;
my $rspec = GeniXML::Parse($rspecstr);
if (! defined($rspec)) {
$$perrmsg = "Could not parse rspec\n";
return -1;
}
my %linksites = ();
foreach my $ref (GeniXML::FindNodes("n:link", $rspec)->get_nodelist()) {
my $client_id = GetVirtualId($ref);
my $manager_urn = GetManagerId($ref);
if (!exists($linksites{$client_id})) {
$linksites{$client_id} = {};
}
next
if (!defined($manager_urn));
$linksites{$client_id}->{$manager_urn} = 1;
}
foreach my $ref (values(%linksites)) {
return 1
if (keys(%{$ref}) > 1);
}
return 0;
}
#
# Set the repository for the rspec. This is a top level element. At
# some point we can think about per-node repos.
......@@ -1429,6 +1473,7 @@ sub SetRepo($$$$$$)
#
my $owner = $geniuser->uid();
my $command = "cd /local && sudo chmod 777 . && umask 002 && ".
"rm -rf repository && ".
"git clone -n '$repourl' repository && " .
"cd repository && " .
"git config --add core.sharedRepository group && ".
......@@ -1531,16 +1576,16 @@ sub EncryptBlocks($$$)
#
# Add a portal element.
#
sub AddPortalTag($$$)
sub AddPortalTag($$$$)
{
my ($pxml, $tag, $pmsg) = @_;
my ($pxml, $tag, $url, $pmsg) = @_;
my $rspec = GeniXML::Parse($$pxml);
if (! defined($rspec)) {
$$pmsg = "AddPortalTag: Could not parse rspec";
return -1;
}
GeniXML::SetPortal($rspec, $tag);
GeniXML::SetPortal($rspec, $tag, $url);
$$pxml = GeniXML::Serialize($rspec);
return 0;
}
......
#!/usr/bin/perl -wT
#
# Copyright (c) 2007-2017 University of Utah and the Flux Group.
# Copyright (c) 2007-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -831,6 +831,8 @@ sub new($$$$$)
"jacks_site" => undef,
"xen_settings" => undef,
"xen_ptype" => undef,
"docker_settings" => undef,
"docker_ptype" => undef,
"instantiate_on" => undef,
"services" => [],
"statements" => [],
......@@ -1101,6 +1103,18 @@ sub addNode($$$)
$node->{"xen_settings"} = $settings;
last SWITCH;
};
# Docker settings
/^docker$/i && do {
my $settings = GeniXML::GetDockerSettings($ref->parentNode);
fatal("Failed to get docker settings")
if (!defined($settings));
$node->{"docker_settings"} = $settings;
last SWITCH;
};
/^docker_ptype$/i && do {
$node->{"docker_ptype"} = GetTextOrFail("name", $child);
last SWITCH;
};
/^(sliver_type_shaping|firewall_config)$/i && do {
# We handled this above.
last SWITCH;
......@@ -1291,7 +1305,7 @@ sub Compare($$)
last SWITCH;
};
(/^(component_id|component_manager_id|disk_image)$/i ||
/^(hardware_type|jacks_site|xen_ptype|instantiate_on)$/i ||
/^(hardware_type|jacks_site|xen_ptype|docker_ptype|instantiate_on)$/i ||
/^(adb_target|failure_action)$/i ||
/^(isexptfirewall|firewall_style)$/i ||
/^(use_type_default_image|routable_control_ip)$/i) && do {
......@@ -1304,7 +1318,7 @@ sub Compare($$)
# Handled up above in CompareNodes.
last SWITCH;
};
/^(xen_settings|desires|pipes|blockstores|attributes)$/i && do {
/^(xen_settings|docker_settings|desires|pipes|blockstores|attributes)$/i && do {
return 1
if (APT_Rspec::CompareHashes("Node: $client_id: $key",
$val1, $val2));
......
This diff is collapsed.
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -33,15 +33,16 @@ SUBDIRS =
BIN_SCRIPTS = manage_profile manage_instance manage_dataset \
create_instance rungenilib ns2rspec nsgenilib.py \
rspec2genilib ns2genilib manage_reservations manage_gitrepo \
manage_images rtecheck checkprofile manage_extensions
manage_images rtecheck checkprofile manage_extensions \
create_slivers searchip
SBIN_SCRIPTS = apt_daemon aptevent_daemon portal_xmlrpc apt_checkup \
portal_monitor
portal_monitor apt_scheduler portal_resources
LIB_SCRIPTS = APT_Profile.pm APT_Instance.pm APT_Dataset.pm APT_Geni.pm \
APT_Aggregate.pm APT_Utility.pm APT_Rspec.pm
WEB_BIN_SCRIPTS = webmanage_profile webmanage_instance webmanage_dataset \
webcreate_instance webrungenilib webns2rspec webns2genilib \
webrspec2genilib webmanage_reservations webmanage_gitrepo \
webmanage_images webrtecheck
webmanage_images webrtecheck websearchip
APACHEHOOKS = apt_gitrepo.hook
WEB_SBIN_SCRIPTS= webportal_xmlrpc
LIBEXEC_SCRIPTS = $(WEB_BIN_SCRIPTS) $(WEB_SBIN_SCRIPTS)
......
......@@ -154,7 +154,9 @@ sub KillInstances()
"where (a.canceled!=0 or ".
" (a.status='failed' and ".
" (UNIX_TIMESTAMP(now()) - ".
" UNIX_TIMESTAMP(a.created) > 7200))) and ".
" UNIX_TIMESTAMP(IF(a.started is null, ".
" a.created, a.started)) ".
" > 7200))) and ".
# Not locked or corresponding slice does not exist.
" (s.locked is null or s.idx is null)");
return
......
#!/usr/bin/perl -w
#
# Copyright (c) 2008-2017 University of Utah and the Flux Group.
# Copyright (c) 2008-2018 University of Utah and the Flux Group.
#
# {{{GENIPUBLIC-LICENSE
#
......@@ -38,6 +38,7 @@ use CGI;
my $TB = "@prefix@";
my $MAINSITE = @TBMAINSITE@;
my $TBOPS = "@TBOPSEMAIL@";
my $TBLOGS = "@TBLOGSEMAIL@";
my $MANAGEPROFILE = "$TB/bin/manage_profile";
# Locals
......@@ -86,9 +87,10 @@ sub SendStatus($)
}
#
# Send logs to tblogs
# Send logs to tblogs (only)
#
LogStart(0, undef, LIBAUDIT_LOGTBLOGS());
LogStart(0, undef, LIBAUDIT_LOGONLY() | LIBAUDIT_LOGTBLOGS());
AddAuditInfo("to", $TBLOGS);
# The query holds the token we need to find the profile.
my $query = new CGI();
......
This diff is collapsed.
......@@ -8,7 +8,8 @@
"size": 315,
"howfull": 315,
"children": [ { "name": "m400", "size": 315, "howfull": 200, "url": "http://docs.cloudlab.us/hardware.html#%28part._cloudlab-utah%29" },
{ "name": "m510", "size": 270, "howfull": 200, "url": "http://docs.cloudlab.us/hardware.html#%28part._cloudlab-utah%29" } ],
{ "name": "m510", "size": 270, "howfull": 200, "url": "http://docs.cloudlab.us/hardware.html#%28part._cloudlab-utah%29" },
{ "name": "xl17