Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always log xtrace to file #55

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Always log xtrace to file #55

wants to merge 15 commits into from

Conversation

m-iwanicki
Copy link
Contributor

@m-iwanicki m-iwanicki commented Dec 13, 2024

  • /tmp/dts.log

    [01:41:55]:  �[H�[J�[3J�c�[0m
    [01:41:55]:   Dasharo Tools Suite Script 2.1.0 �[0m
    [01:41:55]:  �[0m (c) Dasharo <[email protected]> �[0m
    [01:41:55]:  �[0m Report issues at: https://github.com/Dasharo/dasharo-issues �[0m
    [01:41:55]:  �[0;36m*********************************************************�[0m
    [01:41:55]:  �[0;36m**�[0m                HARDWARE INFORMATION �[0m
    [01:41:55]:  �[0;36m*********************************************************�[0m
    
  • /tmp/dts-verbose.log

    +[02:05:44.047]:/usr/sbin/dts-boot:29:main: source /usr/sbin/dts-environment.sh
    ++[02:05:44.048]:/usr/sbin/dts-environment.sh:9:main: source /usr/sbin/dts-hal.sh
    +++[02:05:44.049]:/usr/sbin/dts-hal.sh:25:main: source /usr/sbin/common-mock-func.sh
    ++++[02:05:44.050]:/usr/sbin/common-mock-func.sh:53:main: TEST_FLASH_LOCK=
    ++++[02:05:44.050]:/usr/sbin/common-mock-func.sh:54:main: TEST_BOARD_HAS_FD_REGION=true
    ++++[02:05:44.050]:/usr/sbin/common-mock-func.sh:55:main: TEST_BOARD_FD_REGION_RW=true
    ++++[02:05:44.051]:/usr/sbin/common-mock-func.sh:56:main: TEST_BOARD_HAS_ME_REGION=true
    ++++[02:05:44.051]:/usr/sbin/common-mock-func.sh:57:main: TEST_BOARD_ME_REGION_RW=true
    

When entering shell, logging to dts.log is disabled as redirecting output results in problems in interactive shell but verbose (xtrace) logs are still enabled just without timestamp:

+ echo /root/.vim/after/scripts.vim
+ shift
+ '[' 0 -ge 1 ']'
+ tail /tmp/dts-verbose.log
+ clear
+ ls
+ cp ../tmp/dts-verbose.log ../tmp/dts.log .

After returning to DTS UI by using exit normal logging is enabled again and verbose logs contain timestamp

There is one problem, trying to enter dts-boot second time from shell results in error

/usr/sbin/dts: line 41: read: error setting terminal attributes: Interrupted system call

after which we end up back in shell.

@PLangowski what do you think?

Signed-off-by: Michał Iwanicki <[email protected]>
@m-iwanicki m-iwanicki self-assigned this Dec 13, 2024
@m-iwanicki
Copy link
Contributor Author

And maybe write logs to permanent location so they aren't lost after reboot? This would probably require:

  • some kind of log truncating/rotating so we don't run out of space. Would be good idea to implement it even when saving to /tmp so we don't run out of RAM (not sure if it could happen in usual use cases)
  • if system is read-only (e.g. mounted in PiKVM) then maybe create tmpfs overlay so logs can still be written.

@DaniilKl
Copy link
Contributor

And maybe write logs to permanent location so they aren't lost after reboot?

Unfortunately, most use cases involve iPXE. Is these cases, DTS boots from RAM and does not use any persistent storage, having logs saved when booting from USB still good thought.

@m-iwanicki
Copy link
Contributor Author

I know but it'd still be useful. Added fix for error when entering dts-boot multiple times. Took a while.

There is also quite a slowdown at least on QEMU in one specific part:


 Dasharo Tools Suite Script 2.1.1
 (c) Dasharo <[email protected]>
 Report issues at: https://github.com/Dasharo/dasharo-issues
*********************************************************
**                HARDWARE INFORMATION
*********************************************************
**    System Inf.: QEMU Standard PC (i440FX + PIIX, 1996)
** Baseboard Inf.: QEMU
**       CPU Inf.: pc-i440fx-9.1

And it gets stuck here for maybe 0.65 second before printing rest i.e. ** RAM DIMM 0: Not Specified.
It's a problem because it happens on every menu refresh. Based on verbose logs:

  • starts:

    +[17:40:51.417]:/usr/sbin/dts-functions.sh:1235:show_ram_inf: data='# dmidecode 3.5
    
  • ends

    +[17:40:52.050]:/usr/sbin/dts-functions.sh:1273:show_ram_inf: echo -e '\033[0;36m**\033[0;33m    RAM DIMM 0: \033[0mNot Specified'
    

Adding stop_trace_logging/start_trace_logging at the start/end of this functions fixes this but I'm not sure if it's best way to do it, what's your opinion? I guess it's easiest to implement. Maybe we shouldn't run this function on every menu refresh but only once in e.g. dts-boot or use faster language (python)

diff --git a/include/dts-functions.sh b/include/dts-functions.sh
index a46d19b9f382..2b08bb9e5b3b 100644
--- a/include/dts-functions.sh
+++ b/include/dts-functions.sh
@@ -1230,6 +1230,7 @@ You can find more info about HCL in docs.dasharo.com/glossary\r"
 }
 
 show_ram_inf() {
+  stop_trace_logging
   # Get the data:
   local data=""
   data=$($DMIDECODE)
@@ -1272,6 +1273,7 @@ show_ram_inf() {
   for entry in "${memory_devices_array[@]}"; do
     echo -e "${BLUE}**${YELLOW}    RAM ${entry}"
   done
+  start_trace_logging "${DTS_LOG_FILE}"
 }
 
 show_header() {

@m-iwanicki
Copy link
Contributor Author

Slowdown is most likely due to printing timestamp.

@m-iwanicki m-iwanicki closed this Dec 13, 2024
@m-iwanicki m-iwanicki reopened this Dec 13, 2024
@PLangowski
Copy link
Contributor

If no other solution can be found for the slowdown, then I guess we can stick with your workaround.

Signed-off-by: Michał Iwanicki <[email protected]>
This function is called on each redraw of UI. Due to using external
command 'date' to create timestamp, trace logging noticeably slows down
UI draw time in the middle.

Another possible fixes:

- disable timestamp in trace logging
- generate RAM info only once before UI shows as it is unlikely RAM will
change while DTS is running

Signed-off-by: Michał Iwanicki <[email protected]>
Combined with trace timestamps it'll be easier to match error to command

Signed-off-by: Michał Iwanicki <[email protected]>
Signed-off-by: Michał Iwanicki <[email protected]>
@m-iwanicki
Copy link
Contributor Author

m-iwanicki commented Dec 18, 2024

Added 58de8df and 13b8a47 to deal with Dasharo/dasharo-issues#1165.
In case of failed deployment (if dasharo-deploy error_exits) it'll ask user whether to send logs (or if automatic logging was enabled then will send logs without asking)

Disabled trace logging in show_ram_inf to deal with slowdown: 6074d44

changed couple 2>/dev/null to ERR_LOG_FILE: 20819bc

Added timestamp prefix when logging to ERR_LOG_FILE as without it it's kinda hard to deduce where the error happened. Unfortunately I didn't manage to print script/function/line (doesn't work with exec {fd}> >(bash_function), stack trace shows only where logger was started not which line called i.e. stack trace always contains only dts-boot and logging files even if called from e.g. dts-functions.sh): 7dbdccf
Right now it's possible to compare timestamps in trace log to find which line/command does the error belong to.

I guess PR is ready for review, we could maybe move console logs to /var/local/ but we would probably need to enable truncating those files, or maybe rotating but that'd need to be done during system boot, before dts-boot starts as after that file descriptor for normal console logs are kept for the whole dts-boot lifetime and trace logs only closes fd when stopping trace logging (only done in show_ram_inf for split second) which would result in logs being written to old files instead of new ones.

@m-iwanicki m-iwanicki marked this pull request as ready for review December 18, 2024 17:49
@PLangowski
Copy link
Contributor

When using qemu with telnet I have 2 files for each log:

dts-verbose_tty1.log   dts_tty1.log
dts-verbose_ttyS0.log  dts_ttyS0.log

@m-iwanicki
Copy link
Contributor Author

Each tty starts it's own dts-boot (serial, graphical QEMU, ssh), that way we don't mix logs from different tty.
I could do this another way: add tty prefix to logs. Currently I only send logs from tty that requested those logs to be sent.

include/dts-functions.sh Outdated Show resolved Hide resolved
scripts/dts-boot Show resolved Hide resolved
@@ -888,7 +888,7 @@ check_blobs_in_binary() {

# If there is no descriptor, there is no ME as well, so skip the check
if [ $BOARD_HAS_FD_REGION -ne 0 ]; then
ME_OFFSET=$($IFDTOOL check_blobs_in_binary_mock -d $1 2> /dev/null | grep "Flash Region 2 (Intel ME):" | sed 's/Flash Region 2 (Intel ME)\://' | awk '{print $1;}')
ME_OFFSET=$($IFDTOOL check_blobs_in_binary_mock -d $1 2>>"$ERR_LOG_FILE" | grep "Flash Region 2 (Intel ME):" | sed 's/Flash Region 2 (Intel ME)\://' | awk '{print $1;}')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could redirect other STDERR too:

λ grep -rn "/dev/null"
include/hal/dts-hal.sh:106:  if ! echo "$_mock_func" | grep "_mock" &> /dev/null; then
include/hal/dts-hal.sh:122:    if [ -n "$_mock_func" ] && type $_mock_func &> /dev/null; then
include/hal/dts-hal.sh:124:    elif type ${_tool}_${_mock_func} &> /dev/null; then
include/hal/dts-hal.sh:126:    elif type ${_tool}_common_mock &> /dev/null; then
include/hal/dts-hal.sh:147:  $DASHARO_ECTOOL check_for_opensource_firm_mock info > /dev/null 2>&1
include/hal/dts-hal.sh:193:  _mode="$($SETPCI check_me_op_mode_mock -s 00:16.0 42.B 2> /dev/null | cut -c2-)"
include/dts-subscription.sh:42:      _check_dwn_req_resp_uefi=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:46:      _check_dwn_req_resp_uefi_cap=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_CAP" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:50:      _check_dwn_req_resp_heads=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$HEADS_LINK_DPP" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:54:      _check_dwn_req_resp_seabios=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_SEABIOS" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:57:    _check_logs_req_resp=$(curl -L -I -s -f -H "$CLOUD_REQUEST" "$TEST_LOGS_URL" -o /dev/null -w "%{http_code}")
include/dts-functions.sh:153:  if wget --spider cloud.3mdeb.com > /dev/null 2>&1; then
include/dts-functions.sh:326:          elif ! $DASHARO_ECTOOL check_for_opensource_firm_mock info 2>/dev/null; then
include/dts-functions.sh:693:    FLASH_CHIP_SIZE=$(($($FLASHROM flash_chip_size_mock -p "$PROGRAMMER_BIOS" --flash-size 2>> /dev/null | tail -n1) / 1024 / 1024))
include/dts-functions.sh:704:        FLASH_CHIP_SIZE=$(($($FLASHROM flash_chip_size_mock -p "$PROGRAMMER_BIOS" ${FLASH_CHIP_SELECT} --flash-size 2>> /dev/null | tail -n1) / 1024 / 1024))
include/dts-functions.sh:1003:  $FLASHROM read_flash_layout_mock -p "$PROGRAMMER_BIOS" ${FLASH_CHIP_SELECT} ${FLASHROM_ADD_OPT_UPDATE} -r $BIOS_DUMP_FILE > /dev/null 2>&1
include/dts-functions.sh:1007:    diff <(echo "$BOARD_FMAP_LAYOUT") <(echo "$BINARY_FMAP_LAYOUT") > /dev/null 2>&1
include/dts-functions.sh:1113:    curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$HEADS_LINK_DPP" -o /dev/null
include/dts-functions.sh:1210:  chronyc waitsync 10 0 0 5 >/dev/null 2>>ERR_LOG_FILE
include/dts-functions.sh:1316:  if systemctl is-active sshd.service &> /dev/null; then
include/dts-functions.sh:1506:  if systemctl is-active sshd.service &> /dev/null; then
include/dts-functions.sh:1526:      if systemctl is-active sshd.service> /dev/null 2>&1; then
reports/touchpad-info:13:if ! $DMESG i2c_hid_detect_mock | grep hid-multitouch | grep "I2C HID" > /dev/null; then
reports/dasharo-hcl-report:25:  ERR=$(stat -c%s "$ERRORFILE" 2> /dev/null)
reports/dasharo-hcl-report:26:  LOG=$(stat -c%s "$LOGFILE" 2> /dev/null)
reports/dasharo-hcl-report:222:if pushd logs/acpi &> /dev/null; then
reports/dasharo-hcl-report:223:  acpixtract -a ../acpidump.log >/dev/null 2>>"$ERR_LOG_FILE"
reports/dasharo-hcl-report:224:  iasl -d ./*.dat >/dev/null 2>>"$ERR_LOG_FILE"
reports/dasharo-hcl-report:225:  popd &> /dev/null || return 1
reports/dasharo-hcl-report:328:grep -rl "${MAC_ADDR}" logs > /dev/null && grep -rl "${MAC_ADDR}" logs | xargs sed -i 's/'${MAC_ADDR}'/MAC ADDRESS REMOVED/g'
scripts/local-deploy.sh:11:  -o UserKnownHostsFile=/dev/null \
scripts/dasharo-deploy:83:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP" -o /dev/null
scripts/dasharo-deploy:91:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_CAP" -o /dev/null
scripts/dasharo-deploy:99:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_SEABIOS" -o /dev/null
scripts/dasharo-deploy:107:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$HEADS_LINK_DPP" -o /dev/null
scripts/dasharo-deploy:520:      dd if=/tmp/rom.bin of=/tmp/romhole.bin skip=$((0x17C0000)) bs=128K count=1 iflag=skip_bytes > /dev/null 2>&1
scripts/dasharo-deploy:604:    $FLASHROM read_firm_mock -p "$PROGRAMMER_BIOS" ${FLASH_CHIP_SELECT} ${FLASHROM_ADD_OPT_READ} -r $BIOS_DUMP_FILE > /dev/null 2>/dev/null
scripts/dasharo-deploy:607:      diff <(echo "$BINARY_KEYS") <(echo "$FLASH_KEYS") > /dev/null 2>&1
tests/compare_version.sh:4:DTS_ENV=/dev/null source "$DTS_FUNCS"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of those are stdout to /dev/null or to completely get rid of output e.g. in if's where error is expected.
Some commands always output to stderr e.g. dd or flashrom:

bash-5.2# flashrom -p internal >/dev/null
Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.

Which ones do you want redirected? Remember that the only way to connect those errors to lines is searching timestamps in trace logs (which won't be 1-to-1)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logs from every command might be useful during debugging. For example these commands send their STDERR everywhere but error log file:

include/hal/dts-hal.sh:147:  $DASHARO_ECTOOL check_for_opensource_firm_mock info > /dev/null 2>&1
include/hal/dts-hal.sh:193:  _mode="$($SETPCI check_me_op_mode_mock -s 00:16.0 42.B 2> /dev/null | cut -c2-)"
include/dts-functions.sh:153:  if wget --spider cloud.3mdeb.com > /dev/null 2>&1; then
include/dts-functions.sh:326:          elif ! $DASHARO_ECTOOL check_for_opensource_firm_mock info 2>/dev/null; then
include/dts-functions.sh:693:    FLASH_CHIP_SIZE=$(($($FLASHROM flash_chip_size_mock -p "$PROGRAMMER_BIOS" --flash-size 2>> /dev/null | tail -n1) / 1024 / 1024))
include/dts-functions.sh:704:        FLASH_CHIP_SIZE=$(($($FLASHROM flash_chip_size_mock -p "$PROGRAMMER_BIOS" ${FLASH_CHIP_SELECT} --flash-size 2>> /dev/null | tail -n1) / 1024 / 1024))
include/dts-functions.sh:1003:  $FLASHROM read_flash_layout_mock -p "$PROGRAMMER_BIOS" ${FLASH_CHIP_SELECT} ${FLASHROM_ADD_OPT_UPDATE} -r $BIOS_DUMP_FILE > /dev/null 2>&1
include/dts-functions.sh:1316:  if systemctl is-active sshd.service &> /dev/null; then
include/dts-functions.sh:1506:  if systemctl is-active sshd.service &> /dev/null; then
include/dts-functions.sh:1526:      if systemctl is-active sshd.service> /dev/null 2>&1; then
reports/dasharo-hcl-report:222:if pushd logs/acpi &> /dev/null; then
reports/dasharo-hcl-report:225:  popd &> /dev/null || return 1
scripts/dasharo-deploy:520:      dd if=/tmp/rom.bin of=/tmp/romhole.bin skip=$((0x17C0000)) bs=128K count=1 iflag=skip_bytes > /dev/null 2>&1
scripts/dasharo-deploy:604:    $FLASHROM read_firm_mock -p "$PROGRAMMER_BIOS" ${FLASH_CHIP_SELECT} ${FLASHROM_ADD_OPT_READ} -r $BIOS_DUMP_FILE > /dev/null 2>/dev/null
scripts/dasharo-deploy:607:      diff <(echo "$BINARY_KEYS") <(echo "$FLASH_KEYS") > /dev/null 2>&1

Maybe you could as well dump some info from these curls:

include/dts-subscription.sh:42:      _check_dwn_req_resp_uefi=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:46:      _check_dwn_req_resp_uefi_cap=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_CAP" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:50:      _check_dwn_req_resp_heads=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$HEADS_LINK_DPP" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:54:      _check_dwn_req_resp_seabios=$(curl -L -I -s -f -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_SEABIOS" -o /dev/null -w "%{http_code}")
include/dts-subscription.sh:57:    _check_logs_req_resp=$(curl -L -I -s -f -H "$CLOUD_REQUEST" "$TEST_LOGS_URL" -o /dev/null -w "%{http_code}")
include/dts-functions.sh:1113:    curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$HEADS_LINK_DPP" -o /dev/null
scripts/dasharo-deploy:83:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP" -o /dev/null
scripts/dasharo-deploy:91:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_CAP" -o /dev/null
scripts/dasharo-deploy:99:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$BIOS_LINK_DPP_SEABIOS" -o /dev/null
scripts/dasharo-deploy:107:      curl -sfI -u "$USER_DETAILS" -H "$CLOUD_REQUEST" "$HEADS_LINK_DPP" -o /dev/null

Copy link
Contributor Author

@m-iwanicki m-iwanicki Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said, dd always prints to stderr (whether there is error or not)
Do you want each curl output in error logs (even though they are not errors)? Should I create new ones? Add to DTS_LOG_FILE? If to DTS_LOG_FILE then should I also add timestamps there?

Copy link
Contributor

@DaniilKl DaniilKl Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want each curl output in error logs (even though they are not errors)? Should I create new ones? Add to DTS_LOG_FILE? If to DTS_LOG_FILE then should I also add timestamps there?

You should redirect curl errors to the error log file if it is possible and not too hard to achieve (no need to waste too much time here). Let me know why otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was asking if you want curl output (-o /dev/null == >/dev/null) as in:

curl -L -I -f --silent -u 'abc:abc' 'https://cloud.3mdeb.com/public.php/webdav' -X PROPFIND -H "Depth: 5"
HTTP/1.1 401 Unauthorized
Server: nginx/1.22.1
Date: Fri, 20 Dec 2024 11:12:38 GMT
Content-Type: application/xml; charset=utf-8
Content-Length: 234
Connection: keep-alive
Strict-Transport-Security: max-age=15552000; includeSubDomains
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Robots-Tag: noindex, nofollow
X-XSS-Protection: 1; mode=block
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: 
 path=/; secure; HttpOnly; SameSite=Lax
Content-Security-Policy: default-src 'none';
Set-Cookie: __Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax
Set-Cookie: __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict
WWW-Authenticate: Basic realm="3mdeb", charset="UTF-8"
Strict-Transport-Security: max-age=31536000; includeSubDomains

It'll output this result whether it succeeds or not. Or do you want only errors?
As we are using --silent flag curl doesn't return errors. I guess I could also add -S flag so we can redirect:

curl: (22) The requested URL returned error: 401

Added -S flag and error redirection to curls: 104527a

include/dts-functions.sh Show resolved Hide resolved
scripts/dts-boot Outdated Show resolved Hide resolved
scripts/dts-boot Show resolved Hide resolved
start_trace_logging
start_logging
if [ -z "$ERR_LOG_FILE" ]; then
exec {ERR_LOG_FILE}> >(logger >> "$ERR_LOG_FILE_REALPATH")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could add some comments here. This is not a trivial code line.

Copy link
Contributor Author

@m-iwanicki m-iwanicki Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-iwanicki, wrong commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a90f235
Sometimes ctrl+c doesn't catch

scripts/logging Show resolved Hide resolved
scripts/logging Outdated Show resolved Hide resolved
@@ -1429,7 +1434,9 @@ main_menu_options(){
fi

# Use regular update process for everything else
${CMD_DASHARO_DEPLOY} update
if ! ${CMD_DASHARO_DEPLOY} update; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dasharo_deploy update will return 1 in case of platform does not have updates available, and will trigger your send_dts_logs ask:

Enter an option:
2
Waiting for network connection ...
Network connection have been established!
Checking if board is Dasharo compatible.
Waiting for system clock to be synced ...
Current Dasharo version: 0.2.0
Latest available Dasharo version for your subscribtion: 0.2.0
No update available for your machine
Do you want to send console logs to 3mdeb? [N/y]: 

This is counterintuitive, could you fix it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

85d646c

Whole PR will need to be thoroughly tested

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

force-pushed: 47c8d38, quick patch job, should probably think of something better. Maybe you have some ideas? If it works then I guess it could stay as is an be either fixed later on be made obsolete when we migrate to GO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants