File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -636,6 +636,25 @@ echo "sudo restart -q memcached 2>/dev/null || true" |
636
636
ghe-ssh " $GHE_HOSTNAME " -- /bin/sh
637
637
bm_end " $( basename $0 ) - Restarting memcached"
638
638
639
+ # Restart redis before updating keys
640
+ # It's possible that redis hcl is not rendered on an unconfigured system
641
+ # so check first
642
+ if $instance_configured ; then
643
+ log_info " Getting redis status before restart..." 1>&3
644
+ echo " nomad status redis" |
645
+ ghe-ssh " $GHE_HOSTNAME " -- /bin/sh 1>&3
646
+ log_info " Restarting redis" 1>&3
647
+ echo " nomad stop redis" |
648
+ ghe-ssh " $GHE_HOSTNAME " -- /bin/sh 1>&3 2>&3
649
+ ghe-ssh " $GHE_HOSTNAME " -- " /usr/local/share/enterprise/ghe-nomad-jobs queue /etc/nomad-jobs/redis/redis.hcl" 1>&3 2>&3
650
+ if $? -gt 0; then
651
+ log_error " Unable to restart redis"
652
+ fi
653
+ log_info " Getting redis status after restart..." 1>&3
654
+ echo " nomad status redis" |
655
+ ghe-ssh " $GHE_HOSTNAME " -- /bin/sh 1>&3
656
+ fi
657
+
639
658
# Prevent GitHub Connect jobs running before we've had a chance to reset
640
659
# the configuration by setting the last run date to now.
641
660
if ! $RESTORE_SETTINGS ; then
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Usage: ghe-nomad-jobs
3
+ # Emulates the remote GitHub ghe-nomad-jobs command. Tests use this
4
+ # to assert that the command was executed.
5
+ set -e
6
+ echo " $( basename $0 ) " " '$( cat) '" " OK"
7
+
You can’t perform that action at this time.
0 commit comments