Quellcode durchsuchen

fix bug with unattended upgrades causing algo install to fail

tags/v0.12.8
Jonathan Cobb vor 4 Jahren
Ursprung
Commit
2b048cf4eb
4 geänderte Dateien mit 22 neuen und 11 gelöschten Zeilen
  1. +18
    -6
      bubble-server/src/main/resources/ansible/install_local.sh.hbs
  2. +3
    -0
      bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties
  3. +0
    -4
      bubble-server/src/main/resources/packer/roles/common/tasks/main.yml
  4. +1
    -1
      bubble-web

+ 18
- 6
bubble-server/src/main/resources/ansible/install_local.sh.hbs Datei anzeigen

@@ -4,6 +4,10 @@ ANSIBLE_USER="{{node.user}}"
ANSIBLE_HOME="$(cd ~{{node.user}} && pwd)"
LOG="${ANSIBLE_HOME}/.ansible.log"

# Stop unattended upgrades so that apt installs will work
# unattended upgrades are re-enabled at the end of the ansible run
systemctl stop unattended-upgrades

{{#if isNode}}
# touch algo log and start tailing it
set -m
@@ -11,6 +15,15 @@ ALGO_LOG=/tmp/install_algo.log
touch ${ALGO_LOG} && tail -f ${ALGO_LOG} &
{{/if}}

function kill_bg_jobs {
for j in $(jobs -lr | tr '[]' ' ' | awk '{print $1}') ; do
kill %${j}
done
if [[ ! -z "${ALGO_LOG}" && -f "${ALGO_LOG}" ]] ; then
rm -f ${ALGO_LOG}
fi
}

function log {
echo "${1}" >> ${LOG}
}
@@ -20,8 +33,7 @@ function die {
log "install_local: fatal error: ${1}"
{{#if isNode}}
# stop ALGO_LOG tail job and remove log
kill %1
rm -f ${ALGO_LOG}
kill_bg_jobs
{{/if}}
exit 1
}
@@ -82,10 +94,10 @@ fi

{{#if isNode}}
# stop ALGO_LOG tail job and remove log
for j in $(jobs -lr | tr '[]' ' ' | awk '{print $1}') ; do
kill %${j}
done
rm -f ${ALGO_LOG}
kill_bg_jobs
{{/if}}

# ansible should have already restarted unattended-upgrades, but just in case
systemctl start unattended-upgrades

exit 0

+ 3
- 0
bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties Datei anzeigen

@@ -223,6 +223,9 @@ button_label_create_new_network=Launch Your Bubble!
message_plan_fork_apps=All app templates will be copied to fork
message_plan_node_apps=Your Bubble will include these apps:

# Network Page - Connect
message_network_connect=Connect to {{bubbleName}}

# Network Page - Restore Keys
link_network_action_request_keys=Request Bubble Restore Key
message_network_action_keys_requested=Bubble Restore Key requested


+ 0
- 4
bubble-server/src/main/resources/packer/roles/common/tasks/main.yml Datei anzeigen

@@ -1,10 +1,6 @@
#
# Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
#
- name: Disable unattended upgrades (ansible will re-enable them)
shell: systemctl stop unattended-upgrades
become: yes

- name: Update packages
apt:
update_cache: yes


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit 411b27f6bae26f9ab4eaaf6bf9c6b60581fd09ed
Subproject commit a82e49035ae54c582f0932b8fabad84d6c45ed4d

Laden…
Abbrechen
Speichern