Update Failed from 1.69-170 - ./daily.sh -

Hi

When trying to update from 1.69 - 1.70 the following error is shown

Version 1.69-56-g305f97161 - Tue Nov 24 2020 01:16:41 GMT+0200
Database Schema 2020_10_12_095504_mempools_add_oids (191)
Web Server nginx/1.18.0
PHP 7.4.3
Python 3.8.5
MySQL 10.3.25-MariaDB-0ubuntu0.20.04.1
Laravel 8.11.2
RRDtool 1.7.2

./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Fetching new release information OK
/opt/librenms/daily.sh: line 229: ((: 10#1.69 > 10#1.70.0: syntax error: invalid arithmetic operator (error token is β€œ.69 > 10#1.70.0”)
/opt/librenms/daily.sh: line 232: ((: 10#1.69 < 10#1.70.0: syntax error: invalid arithmetic operator (error token is β€œ.69 < 10#1.70.0”)
Between releases, waiting for newer release
Updating Composer packages OK
Updated from unset to OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK

Any ideas

Oh no, daily.sh does not like the .0 somehow.

@robje Your bash changes seem to have broken the version_compare function :frowning:

1.70.1 is released now containing a fix for this.

1 Like

I see what I missed here. sorry for that.

No worries, it is resolved.

Hi

I get this error now

root@assa-monitoring:~# cd /opt/librenms/
root@assa-monitoring:/opt/librenms# ./daily.sh
Re-running /opt/librenms/daily.sh as librenms user
Fetching new release information OK
/opt/librenms/daily.sh: line 229: ((: 10#1.69 > 10#1.70.1: syntax error: invalid arithmetic operator (error token is β€œ.69 > 10#1.70.1”)
/opt/librenms/daily.sh: line 232: ((: 10#1.69 < 10#1.70.1: syntax error: invalid arithmetic operator (error token is β€œ.69 < 10#1.70.1”)

Thanks

what bash version? also, don’t run that as root please.

bash -version
GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu)
Copyright Β© 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
assa-netops@assa-monitoring:~$

if you run ./daily.sh again do you still get the error?

Same error even when I run as librenms

assa-netops@assa-monitoring:/opt/librenms$ su - librenms
Password:
librenms@assa-monitoring:~$ cd /opt/librenms/
librenms@assa-monitoring:~$ ./daily.sh
Fetching new release information OK
./daily.sh: line 229: ((: 10#1.69 > 10#1.70.1: syntax error: invalid arithmetic operator (error token is β€œ.69 > 10#1.70.1”)
./daily.sh: line 232: ((: 10#1.69 < 10#1.70.1: syntax error: invalid arithmetic operator (error token is β€œ.69 < 10#1.70.1”)
Between releases, waiting for newer release
Updating Composer packages OK
Updated from unset to OK
Updating SQL-Schema OK
Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
librenms@assa-monitoring:~$

What do you get when you run this command?
IFS=. read -ra ver <<< "1.70.1"; echo ${ver[1]}

I will check tomorrow and let you know

librenms@assa-monitoring:~$ IFS=. read -ra ver <<< β€œ1.70.1”; echo ${ver[1]}
70

So, the new code works correctly on your device… Why are you getting an error still?
Run git status

Hi

git status
HEAD detached at e2fb7ba63
nothing to commit, working tree clean

Thanks

I have no idea what this means

Hi Can anyone assist me please.

Thanks

e2fb7ba63 is the 1.70.1 release, which fixes the bug causing these errors.
Do you still have the errors?

Hi

Still getting the error

/opt/librenms/daily.sh: line 229: ((: 10#1.69 > 10#1.70.1: syntax error: invalid arithmetic operator (error token is β€œ.69 > 10#1.70.1”)
/opt/librenms/daily.sh: line 232: ((: 10#1.69 < 10#1.70.1: syntax error: invalid arithmetic operator (error token is β€œ.69 < 10#1.70.1”)

Thanks