[Spce-user] Upgrade from 6.5.12 to 7.5.9 fails
Henk
henkpls at hotmail.com
Mon Oct 25 06:00:54 EDT 2021
Hello,
I did some more testing and the problem is not in the code below.
The error is caused by inserting the value 15436.up in an unsigned
column of the database. I tested the same command on the VMWare image
and there it's accepted:
mysql -usipwise -p"${SIPWISE_DB_PASSWORD}" ngcp -e 'insert into
db_schema values (0, '\''15436.up'\'', '\''spce'\'', CURRENT_TIMESTAMP);'
So my database seems to be a bit more restricted. I still don't
understand why it's designed this way.
Does anyone know if there is a DB-setting for this?
Regards,
Henk
On 23-Oct-21 18:17, Henk wrote:
> Hello,
>
> I'm trying to upgrade to mr7.5.9 and it fails with this message:
>
> Applying revision script
> /usr/share/ngcp-db-schema/db_scripts/diff/15436.up: done
> ERROR 1265 (01000) at line 1: Data truncated for column 'revision' at
> row 1
>
> Following the error I find something goes wrong with
> /usr/sbin/ngcp-update-db-schema around here:
>
> rev="$1"
> revname="$(basename "$rev")"
>
> printf "Applying revision script %s: " "$rev"
> if mysql -usipwise -p"${SIPWISE_DB_PASSWORD}" < "$rev" ; then
> echo "done"
> else
> echo "failed. :(" >&2
> echo "Please resolve the problem and run ngcp-update-db-schema
> again." >&2
> exit 1
> fi
>
> I don't understand what happens on line 131 where the mysql output is
> compared with the full path and filename ($rev), it seems to me this
> will always fail. When I check the db_schema values it reads:
>
>
> MariaDB [provisioning]> select * from ngcp.db_schema order by id desc
> limit 1;
> +-----+----------+------+---------------------+
> | id | revision | node | applied_at |
> +-----+----------+------+---------------------+
> | 812 | 15580 | spce | 2020-06-01 09:28:28 |
> +-----+----------+------+---------------------+
>
> Can someone explain how this is supposed to work and why it's failing?
>
> Henk
>
More information about the Spce-user
mailing list