Merge branch 'feature/KASM-5240_verbose_logs_profilesync' into 'develop'

Resolve KASM-5240 "Feature/ verbose logs profilesync"

Closes KASM-5240

See merge request kasm-technologies/internal/workspaces-core-images!148
This commit is contained in:
Richard Koliser 2023-12-04 21:56:12 +00:00
commit b731518f9a
3 changed files with 17 additions and 10 deletions

View File

@ -1,5 +1,6 @@
files: &UNIVERSAL_CHANGE_FILES
- src/common/**
- src/common/startup_scripts/**
- src/ubuntu/install/audio/**
- src/ubuntu/install/audio_input/**
- src/ubuntu/install/cleanup/**

View File

@ -62,7 +62,11 @@ if [ ! -z "$KASM_PROFILE_LDR" ]; then
echo >&2 "Profile sync not available"
else
echo "Packing and uploading user profile to object storage."
http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --upload /home/kasm-user --insecure --filter "${KASM_PROFILE_FILTER}" --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT}
if [[ $DEBUG == true ]]; then
http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --upload /home/kasm-user --insecure --filter "${KASM_PROFILE_FILTER}" --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} --verbose
else
http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --upload /home/kasm-user --insecure --filter "${KASM_PROFILE_FILTER}" --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT}
fi
echo "Profile upload complete."
fi
fi

View File

@ -52,8 +52,6 @@ function help (){
-d, --debug enables more detailed startup output
e.g. 'docker run kasmweb/core --debug bash'
-h, --help print out this help
Fore more information see: https://github.com/ConSol/docker-headless-vnc-container
"
}
@ -70,7 +68,11 @@ function pull_profile (){
echo "Downloading and unpacking user profile from object storage."
set +e
http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --download /home/kasm-user --insecure --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT}
if [[ $DEBUG == true ]]; then
http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --download /home/kasm-user --insecure --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} --verbose
else
http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --download /home/kasm-user --insecure --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT}
fi
PROCESS_SYNC_EXIT_CODE=$?
set -e
if (( PROCESS_SYNC_EXIT_CODE > 1 )); then
@ -318,6 +320,12 @@ if [[ $1 =~ -h|--help ]]; then
exit 0
fi
if [[ ${KASM_DEBUG:-0} == 1 ]]; then
echo -e "\n\n------------------ DEBUG KASM STARTUP -----------------"
export DEBUG=true
set -x
fi
# Syncronize user-space loaded persistent profiles
pull_profile
@ -326,12 +334,6 @@ if [ -f $HOME/.bashrc ]; then
source $HOME/.bashrc
fi
if [[ ${KASM_DEBUG:-0} == 1 ]]; then
echo -e "\n\n------------------ DEBUG KASM STARTUP -----------------"
export DEBUG=true
set -x
fi
## resolve_vnc_connection
VNC_IP=$(hostname -i)
if [[ $DEBUG == true ]]; then