summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/debug.sh9
-rwxr-xr-xbin/node_init15
-rwxr-xr-xbin/run_tests2
3 files changed, 17 insertions, 9 deletions
diff --git a/bin/debug.sh b/bin/debug.sh
index d6f37542..4f29f300 100755
--- a/bin/debug.sh
+++ b/bin/debug.sh
@@ -2,7 +2,7 @@
# debug script to be run on remote servers
# called from leap_cli with the 'leap debug' cmd
-apps='(leap|pixelated|stunnel|couch|soledad|haproxy)'
+apps='(leap|pixelated|stunnel|couch|soledad)'
facts='(apt_running |^architecture |^augeasversion |^couchdb_.* |^debian_.* |^dhcp_enabled |^domain |^facterversion |^filesystems |^fqdn |^hardwaremodel |^hostname |^interface.* |^ipaddress.* |^is_pe |^is_virtual |^kernel.* |^lib |^lsb.* |^memory.* |^mtu_.* |^netmask.* |^network_.* |^operatingsystem |^os.* |^path |^physicalprocessorcount |^processor.* |^ps |^puppetversion |^root_home |^rsyslog_version |^rubysitedir |^rubyversion |^selinux |^ssh_version |^swapfree.* |^swapsize.* |^type |^virtual)'
@@ -12,6 +12,10 @@ export FACTERLIB="/srv/leap/puppet/modules/apache/lib/facter:/srv/leap/puppet/mo
facter 2>/dev/null | egrep -i "$facts"
+# show leap debian repo used
+echo -e '\n\n'
+cat /etc/apt/sources.list.d/leap*.list
+
# query installed versions
echo -e '\n\n'
dpkg -l | egrep "$apps"
@@ -24,6 +28,3 @@ ps aux|egrep "$apps"
echo -e '\n\n'
echo -e "Last deploy:\n"
tail -2 /var/log/leap/deploy-summary.log
-
-
-
diff --git a/bin/node_init b/bin/node_init
index b55cfed3..24345b47 100755
--- a/bin/node_init
+++ b/bin/node_init
@@ -22,10 +22,6 @@ if ! egrep -q "$DEBIAN_VERSION" /etc/debian_version; then
exit 1
fi
mkdir -p $LEAP_DIR
-if ! grep -q -e '^en_US.UTF-8' /etc/locale.gen; then
- echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
- /usr/sbin/locale-gen
-fi
#
# UPDATE PACKAGES
@@ -83,9 +79,20 @@ if [[ $exit_code -ne 0 ]]; then
exit $exit_code
fi
+# need to have the locales package from above
+if ! grep -q -e '^en_US.UTF-8' /etc/locale.gen 2> /dev/null; then
+ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+ /usr/sbin/locale-gen
+fi
+
#
# FINALIZE
#
mkdir -p $HIERA_DIR
chmod 0755 $HIERA_DIR
touch $INIT_FILE
+
+# Sometimes not all keys are already generated, happens more often
+# with VMs
+# that would give us errors in the get_ssh_keys_cmd during node init
+/usr/bin/ssh-keygen -A
diff --git a/bin/run_tests b/bin/run_tests
index 8450a9bf..241a3fa2 100755
--- a/bin/run_tests
+++ b/bin/run_tests
@@ -507,7 +507,7 @@ end
if ARGV.include?('--debug') || ARGV.include?('-d')
DEBUG=true
- require 'debugger'
+ require 'byebug'
else
DEBUG=false
end