Skip to content

Commit

Permalink
* Changed the call to 'anvil-safe-stop' to have a timeout of 20 minut…
Browse files Browse the repository at this point in the history
…es instead of 2 minutes, which will hopefully fix the occassional failure of "Cold Stop" to complete.

* Updated the boot menu titles to be a bit more clear when running a USB-based install.
* Finished updating anvil-safe-start to use '@reboot' in crontab, removing the need for the convoluted rc3.d hack. Added a check to see if the old config style exists and update it if needed.
* Added a bunch of missing RPMs to the generated ISO repository (how did this ever work?!).
* Updated striker-installer to call 'lsusb -v' and look for D-Link when deciding if an ASIX-based USB adapter is present.

Signed-off-by: Digimer <[email protected]>
  • Loading branch information
Digimer committed Dec 20, 2016
1 parent ac6069f commit 5561014
Show file tree
Hide file tree
Showing 8 changed files with 179 additions and 130 deletions.
5 changes: 3 additions & 2 deletions AN/Tools/Striker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ sub mark_node_as_clean_off
name1 => "stop_reason", value1 => $stop_reason,
}, file => $THIS_FILE, line => __LINE__});

### TODO: Is this where shutdown is failing?
my $query = "
UPDATE
hosts
Expand Down Expand Up @@ -3760,10 +3759,12 @@ sub _cold_stop_anvil

if ($online)
{
### NOTE: Madi: I think the occassional failure to stop node 2 was caused by
### the timeout being only 120. Trying 1200 now.
# We'll shut down with 'anvil-safe-stop'. No servers should be running, but
# just in case we oopsed and left one up, set the stop reason.
my $shell_output = "";
my $shell_call = $an->data->{path}{timeout}." 120 ".$an->data->{path}{'anvil-safe-stop'}." --local --reason cold_stop; ".$an->data->{path}{echo}." rc:\$?";
my $shell_call = $an->data->{path}{timeout}." 1200 ".$an->data->{path}{'anvil-safe-stop'}." --local --reason cold_stop; ".$an->data->{path}{echo}." rc:\$?";
$an->Log->entry({log_level => 2, message_key => "an_variables_0002", message_variables => {
name1 => "target", value1 => $target,
name2 => "shell_call", value2 => $shell_call,
Expand Down
8 changes: 4 additions & 4 deletions ISO/CentOS/6/Anvil/syslinux/syslinux.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ LABEL next
localboot -1

LABEL usb-new-striker01-sdb
MENU LABEL ^1) New Striker Dashboard 01 - CentOS 6 - USB on sdb - Deletes All Existing Data!
MENU LABEL ^1) New Striker Dashboard 01 - CentOS 6 - USB on sdb (Standard) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 01 using CentOS 6 where the USB drive
Expand All @@ -70,7 +70,7 @@ LABEL usb-new-striker01-sdb
APPEND initrd=initrd.img repo=hd:sdb1:/ ks=hd:sdb1:ks/usb-new-striker01.ks

LABEL usb-new-striker02-sdb
MENU LABEL ^2) New Striker Dashboard 02 - CentOS 6 - USB on sdb - Deletes All Existing Data!
MENU LABEL ^2) New Striker Dashboard 02 - CentOS 6 - USB on sdb (Standard) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 02 using CentOS 6 where the USB drive
Expand All @@ -82,7 +82,7 @@ LABEL usb-new-striker02-sdb
APPEND initrd=initrd.img repo=hd:sdb1:/ ks=hd:sdb1:ks/usb-new-striker02.ks

LABEL usb-new-striker01-sda
MENU LABEL ^3) New Striker Dashboard 01 - CentOS 6 - USB on sda - Deletes All Existing Data!
MENU LABEL ^3) New Striker Dashboard 01 - CentOS 6 - USB on sda (NVMe) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 01 using CentOS 6 where the USB drive
Expand All @@ -94,7 +94,7 @@ LABEL usb-new-striker01-sda
APPEND initrd=initrd.img repo=hd:sda1:/ ks=hd:sda1:ks/usb-new-striker01.ks

LABEL usb-new-striker02-sda
MENU LABEL ^4) New Striker Dashboard 02 - CentOS 6 - USB on sda - Deletes All Existing Data!
MENU LABEL ^4) New Striker Dashboard 02 - CentOS 6 - USB on sda (NVMe) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 02 using CentOS 6 where the USB drive
Expand Down
8 changes: 4 additions & 4 deletions ISO/RHEL/6/Anvil/syslinux/syslinux.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ LABEL next
localboot -1

LABEL usb-new-striker01-sdb
MENU LABEL ^1) New Striker Dashboard 01 - RHEL 6 - USB on sdb - Deletes All Existing Data!
MENU LABEL ^1) New Striker Dashboard 01 - RHEL 6 - USB on sdb (Standard) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 01 using RHEL 6 where the USB drive
Expand All @@ -70,7 +70,7 @@ LABEL usb-new-striker01-sdb
APPEND initrd=initrd.img repo=hd:sdb1:/ ks=hd:sdb1:ks/usb-new-striker01.ks

LABEL usb-new-striker02-sdb
MENU LABEL ^2) New Striker Dashboard 02 - RHEL 6 - USB on sdb - Deletes All Existing Data!
MENU LABEL ^2) New Striker Dashboard 02 - RHEL 6 - USB on sdb (Standard) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 02 using RHEL 6 where the USB drive
Expand All @@ -82,7 +82,7 @@ LABEL usb-new-striker02-sdb
APPEND initrd=initrd.img repo=hd:sdb1:/ ks=hd:sdb1:ks/usb-new-striker02.ks

LABEL usb-new-striker01-sda
MENU LABEL ^3) New Striker Dashboard 01 - RHEL 6 - USB on sda - Deletes All Existing Data!
MENU LABEL ^3) New Striker Dashboard 01 - RHEL 6 - USB on sda (NVMe) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 01 using RHEL 6 where the USB drive
Expand All @@ -94,7 +94,7 @@ LABEL usb-new-striker01-sda
APPEND initrd=initrd.img repo=hd:sda1:/ ks=hd:sda1:ks/usb-new-striker01.ks

LABEL usb-new-striker02-sda
MENU LABEL ^4) New Striker Dashboard 02 - RHEL 6 - USB on sda - Deletes All Existing Data!
MENU LABEL ^4) New Striker Dashboard 02 - RHEL 6 - USB on sda (NVMe) - Deletes All Existing Data!
TEXT HELP

Installs a new Striker Dashboard 02 using RHEL 6 where the USB drive
Expand Down
12 changes: 8 additions & 4 deletions cgi-bin/Data/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2742,11 +2742,15 @@ SUPPORT
#!string!brand_0001!#
]]>
</key>
<key name="asst_message_0016">#!variable!this_file!# has been called. It will run within a minute.</key>
<key name="asst_message_0017">#!variable!this_file!# has been turned off. No other instances will run until the next reboot, proceeding.</key>
<key name="asst_message_0018">#!variable!this_file!# had already been called, no changes made.</key>
<key name="asst_message_0019">#!variable!this_file!# had already been turned off, no changes made.</key>
<key name="asst_message_0016">#!variable!this_file!# has been enabled. It will run the next time the node boots.</key>
<key name="asst_message_0017">#!variable!this_file!# has been disabled. It will NOT run on the next boot</key>
<key name="asst_message_0018">#!variable!this_file!# was already enable, no changes made.</key>
<key name="asst_message_0019">#!variable!this_file!# was already disabled, no changes made.</key>
<key name="asst_message_0020">#!variable!this_file!#: [queued]</key>
<key name="asst_message_0021">Already in crontab</key>
<key name="asst_message_0022">Adding to crontab</key>
<key name="asst_message_0023">Disabled, exiting. Use '--force' to run.</key>
<key name="asst_message_0024">An old configuration style was found, reconfiguring now.</key>

<!-- warning messages -->
<key name="asst_warning_0001">Failed to start 'clvmd'. With cman running, this will cause 'clvmd' to block on the peer. As such, 'cman' and 'drbd' will be stopped locally if they are running to avoid trouble.</key>
Expand Down
28 changes: 8 additions & 20 deletions striker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -168,26 +168,14 @@ sys::apc::reboot::sleep_time = 60
# stack and then boot servers on the preferred host if possible, or on the
# healthiest node when not.
#
# This variable controls when 'anvil-safe-start' runs. If set to '1', it will
# run within one minute and that run will reset this back to '0'. On node boot,
# an rc3.d script changes this value to '1' and exits (so that the run doesn't
# block the boot process). Once it runs, anvil-safe-start resets this to 0 so
# that it won't run again until the next reboot.
#
# If you want to disable anvil-safe-start entirely, please use:
#
# /sbin/striker/anvil-safe-start --disable
#
# To re-enable this feature later, use:
#
# /sbin/striker/anvil-safe-start --enable
#
# Note that servers set to 'Do Not Start' in Striker, or that were gracefully
# shut off in striker, will stay off. Servers stopped as part of a Cold
# Shutdown and any servers running after a total loss of power or an emergency
# shutdown will start.
#
# DO NOT CHANGE THIS VALUE MANUALLY.
# Set this to '1' to have the Anvil! start (or the node join) on boot. Set to
# '0' to disable this feature. If disabled, a node will not joing an Anvil!
# automatically. This can be useful when performing maintenance on a node.
#
# NOTE: Servers set to 'Do Not Start' in Striker, or that were gracefully shut
# off in striker, will stay off. Servers stopped as part of a Cold Shutdown and
# any servers running after a total loss of power or an emergency shutdown will
# start.
tools::anvil-safe-start::enabled = 0

# During anvil-safe-start, when it first connects the replicated storage layer,
Expand Down
13 changes: 13 additions & 0 deletions tools/anvil-generate-iso
Original file line number Diff line number Diff line change
Expand Up @@ -3625,6 +3625,7 @@ sub get_package_list
"cluster-cim.x86_64",
"clusterlib.x86_64",
"cman.x86_64",
"compat-xcb-util.x86_64",
"comps-extras.noarch",
"control-center-extra.x86_64",
"control-center-filesystem.x86_64",
Expand Down Expand Up @@ -3714,10 +3715,12 @@ sub get_package_list
"freeipmi-ipmidetectd.x86_64",
"freeipmi.x86_64",
"freetype.x86_64",
"ftp.x86_64",
"fuse-libs.x86_64",
"fuse.x86_64",
"gamin.x86_64",
"gawk.x86_64",
"gcalctool.x86_64",
"gcc-c++.x86_64",
"gcc.x86_64",
"gd.x86_64",
Expand Down Expand Up @@ -3913,11 +3916,13 @@ sub get_package_list
"libdrm.x86_64",
"libdv.x86_64",
"libedit.x86_64",
"libepoxy.x86_64",
"liberation-fonts-common.noarch",
"liberation-mono-fonts.noarch",
"liberation-sans-fonts.noarch",
"liberation-serif-fonts.noarch",
"libertas-usb8388-firmware.noarch",
"libevdev.x86_64",
"libevent.x86_64",
"libexif.x86_64",
"libffi.x86_64",
Expand Down Expand Up @@ -4008,6 +4013,7 @@ sub get_package_list
"libxklavier.x86_64",
"libxml2-python.x86_64",
"libxml2.x86_64",
"libxshmfence.x86_64",
"libxslt.x86_64",
"lklug-fonts.noarch",
"lm_sensors-libs.x86_64",
Expand Down Expand Up @@ -4043,6 +4049,7 @@ sub get_package_list
"mesa-libGL.x86_64",
"mesa-libGLU.x86_64",
"mesa-libgbm.x86_64",
"mesa-libxatracker.x86_64",
"mesa-private-llvm.x86_64",
"metacity.x86_64",
"mingetty.x86_64",
Expand All @@ -4056,6 +4063,7 @@ sub get_package_list
"mtools.x86_64",
"mtr.x86_64",
"mysql-libs.x86_64",
"nano.x86_64",
"nautilus-extensions.x86_64",
"nautilus-open-terminal.x86_64",
"nautilus.x86_64",
Expand Down Expand Up @@ -4287,6 +4295,7 @@ sub get_package_list
"tcp_wrappers-libs.x86_64",
"tcp_wrappers.x86_64",
"telnet.x86_64",
"tftp.x86_64",
"tftp-server.x86_64",
"thai-scalable-fonts-common.noarch",
"thai-scalable-waree-fonts.noarch",
Expand Down Expand Up @@ -4443,6 +4452,10 @@ sub get_package_list
"ntfsprogs.x86_64",
"perl-Mail-RFC822-Address.noarch",
"perl-Net-SSH2.x86_64",
"perl-XML-NamespaceSupport.noarch",
"perl-XML-SAX.noarch",
"perl-XML-SAX-Base.noarch",
"perl-XML-SAX-Expat.noarch",
"perl-XML-Simple.noarch",
"postgresql95.x86_64",
"postgresql95-contrib.x86_64",
Expand Down
Loading

0 comments on commit 5561014

Please sign in to comment.