All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 9557e284 authored by Leigh B Stoller's avatar Leigh B Stoller

Checkpoint working osload/ossetup for dell switches ualloc switches.

Swapin works at this point.
parent aacb61a1
<descriptors>
<osid>
<attribute name="OS"><value>Linux</value></attribute>
<attribute name="description"><value>ONIE Switch Loader</value></attribute>
<attribute name="features"><value>ping,ssh,isup</value></attribute>
<attribute name="mfs"><value>1</value></attribute>
<attribute name="mustclean"><value>0</value></attribute>
<attribute name="op_mode"><value>RELOAD</value></attribute>
<attribute name="osname"><value>ONIE-RELOAD</value></attribute>
<attribute name="path"><value>/tftpboot/onie_reload</value></attribute>
<attribute name="pid"><value>emulab-ops</value></attribute>
<attribute name="reboot_waittime"><value>150</value></attribute>
<attribute name="shared"><value>1</value></attribute>
<attribute name="version"><value>40b7011fe</value></attribute>
</osid>
<osid>
<attribute name="OS"><value>Linux</value></attribute>
<attribute name="description"><value>ONIE Admin</value></attribute>
<attribute name="features"><value>ping,ssh,isup</value></attribute>
<attribute name="mfs"><value>1</value></attribute>
<attribute name="mustclean"><value>0</value></attribute>
<attribute name="op_mode"><value>MINIMAL</value></attribute>
<attribute name="osname"><value>ONIE-ADMIN</value></attribute>
<attribute name="path"><value>/tftpboot/onie_admin</value></attribute>
<attribute name="pid"><value>emulab-ops</value></attribute>
<attribute name="reboot_waittime"><value>150</value></attribute>
<attribute name="shared"><value>1</value></attribute>
<attribute name="version"><value>40b7011fe</value></attribute>
</osid>
</descriptors>
......@@ -356,6 +356,9 @@ REPLACE INTO mode_transitions VALUES ('ALWAYSUP','SHUTDOWN','RELOAD-UE','SHUTDOW
REPLACE INTO mode_transitions VALUES ('ALWAYSUP','ISUP','RELOAD-UE','SHUTDOWN','ReloadStart');
REPLACE INTO mode_transitions VALUES ('ALWAYSUP','ISUP','RELOAD-UE','ISUP','ReloadStart');
REPLACE INTO mode_transitions VALUES ('RELOAD-UE','SHUTDOWN','ALWAYSUP','ISUP','ReloadDone');
REPLACE INTO mode_transitions VALUES ('ALWAYSUP','SHUTDOWN','RELOAD','SHUTDOWN','');
REPLACE INTO mode_transitions VALUES ('RELOAD','SHUTDOWN','ALWAYSUP','SHUTDOWN','');
REPLACE INTO mode_transitions VALUES ('RELOAD','RELOADDONE','ALWAYSUP','SHUTDOWN','');
--
-- Dumping data for table `priorities`
......
......@@ -4,6 +4,7 @@ use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
my $svar = 'reservations/approval_threshold';
DBQueryFatal("INSERT INTO `sitevariables` VALUES ".
......
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -115,7 +115,10 @@ LIB_STUFF = libtbsetup.pm exitonwarn.pm libtestbed.pm \
libossetup.pm \
power_ipmi.pm libosload_new.pm libosload_switch.pm \
libosload_ue.pm libossetup_switch.pm power_icebox.pm \
libvtop_stable.pm libvtop_test.pm
libvtop_stable.pm libvtop_test.pm \
libosload_dell_s3048.pm libosload_dell_s4048.pm \
libosload_mlnx_sn2410.pm libosload_dell.pm \
libosload_hp5406.pm
# These scripts installed setuid, with sudo.
......
This diff is collapsed.
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
package libosload_dell_s3048;
use strict;
use English;
use Data::Dumper;
#
# Configure stuff
#
my $TB = "@prefix@";
my $TESTMODE = @TESTMODE@;
use libosload_dell;
use base qw(libosload_dell);
sub New($$$)
{
my ($class, $parent, $type) = @_;
my $self = $class->SUPER::New($parent, $type);
bless($self, $class);
return $self;
}
1;
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
# Osload library. Basically the backend to the osload script, but also used
# where we need finer control of loading of nodes.
#
package libosload_dell_s4048;
use strict;
use English;
use Data::Dumper;
#
# Configure stuff
#
my $TB = "@prefix@";
my $TESTMODE = @TESTMODE@;
use libosload_dell;
use base qw(libosload_dell);
sub New($$$)
{
my ($class, $parent, $type) = @_;
my $self = $class->SUPER::New($parent, $type);
bless($self, $class);
return $self;
}
1;
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/perl -wT
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
......@@ -285,9 +285,11 @@ sub NewType($$)
my ($self, $type) = @_;
$self->dprint(2,"NewType($type): trying to create type object");
# Dashes in type names are bad in this code.
$type =~ s/\-/\_/g;
my $packname = "libosload_${type}";
my $newtype = eval { $packname->New($self); };
my $newtype = eval { $packname->New($self, $type); };
# Not loaded?
if ($@) {
$self->dprint(2,"NewType($type): simple module load failed: " . $@);
......@@ -298,7 +300,7 @@ sub NewType($$)
}
return undef;
}
$newtype = eval { $packname->New($self); };
$newtype = eval { $packname->New($self, $type); };
if ($@) {
$self->dprint(1,"$self NewType($type): New() failed: " . $@);
return undef;
......@@ -2727,7 +2729,7 @@ use English;
use Data::Dumper;
use overload ('""' => 'Stringify');
sub New($$)
sub New($$;$)
{
my ($class, $parent, $type) = @_;
......
This diff is collapsed.
......@@ -981,7 +981,17 @@ sub NewType($$)
#
my $typeinfo = NodeType->Lookup($type);
if ($type eq "pcfedphys" || $type eq "pcfed") {
# Switches are special.
if (defined($typeinfo) && $typeinfo->isswitch()) {
eval "require libossetup_switch";
if ($@) {
print STDERR "$self libossetup_switch load failed: " . $@;
return undef;
}
# Dashes in type names are bad in this code.
$type =~ s/\-/\_/g;
}
elsif ($type eq "pcfedphys" || $type eq "pcfed") {
$type = "protogeni";
}
elsif (defined($typeinfo) && $typeinfo->issubnode()) {
......@@ -1198,7 +1208,7 @@ sub Stringify($)
my $type = $self->type();
return "[$type]";
return "libossetup_$type";
}
#####################################################################
......
......@@ -38,7 +38,6 @@ use libtestbed;
use libossetup;
# XXX only works with newer version of libosload!
use libosload_new;
use libosload_switch;
use libtblog_simple;
use Node;
use English;
......@@ -48,20 +47,16 @@ use overload ('""' => 'Stringify');
#
# A constructor for an object to handle all nodes of this type.
#
sub New($$) {
my ($class, $parent) = @_;
my $self = $class->SUPER::New("switch", $parent);
sub New($$$) {
my ($class, $type, $parent) = @_;
my $self = $class->SUPER::New($type, $parent);
$self->{'OPLIST'} = {};
bless($self, $class);
my $switchobj = libosload_switch->New();
$self->switchobj($switchobj);
$switchobj->debug(($self->parent())->debug());
print STDERR "$self: new object \n";# . Dumper($self) . "\n";
print STDERR "$self: new object for $type\n";
return $self;
}
......@@ -527,4 +522,80 @@ sub Retry($$)
return -1;
}
package libossetup_hp5406;
use base qw(libossetup_switch);
sub New($$)
{
my ($class, $parent) = @_;
my $type = "hp5406";
require libosload_hp5406;
my $self = $class->SUPER::New($type, $parent);
bless($self, $class);
my $switchobj = libosload_hp5406->New(undef, $type);
$self->switchobj($switchobj);
$switchobj->debug(($self->parent())->debug());
return $self;
}
package libossetup_mlnx_sn2410;
use base qw(libossetup_switch);
sub New($$)
{
my ($class, $parent) = @_;
my $type = "mlnx_sn2410";
require libosload_mlnx_sn2410;
my $self = $class->SUPER::New($type, $parent);
bless($self, $class);
my $switchobj = libosload_mlnx_sn2410->New(undef, $type);
$self->switchobj($switchobj);
$switchobj->debug(($self->parent())->debug());
return $self;
}
package libossetup_dell_s3048;
use base qw(libossetup_switch);
sub New($$)
{
my ($class, $parent) = @_;
my $type = "dell_s3048";
require libosload_dell_s3048;
my $self = $class->SUPER::New($type, $parent);
bless($self, $class);
my $switchobj = libosload_dell_s3048->New(undef, $type);
$self->switchobj($switchobj);
$switchobj->debug(($self->parent())->debug());
return $self;
}
package libossetup_dell_s4048;
use base qw(libossetup_switch);
sub New($$)
{
my ($class, $parent) = @_;
my $type = "dell_s4048";
require libosload_dell_s4048;
my $self = $class->SUPER::New($type, $parent);
bless($self, $class);
my $switchobj = libosload_dell_s4048->New(undef, $type);
$self->switchobj($switchobj);
$switchobj->debug(($self->parent())->debug());
return $self;
}
1;
......@@ -873,6 +873,14 @@ sub RebootNode {
exit(0);
}
#
# Switches do not do ipod, so jump to powercycle.
#
if ($nodeobject->isswitch()) {
info("$pc: is a switch, skipping ipod, power cycling");
exit(2);
}
#
# Haven't yet tried an ipod, try that and wait again.
# This further slows down reboot but is probably worth it
......
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