Dear Maintainer, I upgraded a computer from bullseye to bookwork. tango-db was installed with the bulleyes version before the upgrade. The upgrade went fine, so I installed the tango-starter (bookworm version). BUT the tango-starter could not register in the database. So I wipeout all of tango-xxx, remove the sql database. then I re-installed the tango-db and tango-starter. This time the starter worked out of the box. In fact I was affected by this https://gitlab.com/tango-controls/TangoDatabase/-/issues/69 the fresh install script of the sql databse and the upgrade scripts used by dbconfig-common, does not produce the same sql database at the end. the new create_db_tables was modified like this https://gitlab.com/tango-controls/TangoDatabase/-/merge_requests/82/diffs So during the upgrade the tables should be alter to take into account this modification. https://gitlab.com/tango-controls/TangoDatabase/-/issues/26 the bug is triggered only because mariadb changed it's behaviour between bullseye and bookworm. It would be great to fix bookworm. thanks Frederic
El 04/02/24 a las 10:24, Picca Frédéric-Emmanuel escribió: Hi Frédéric, I am unable to reproduce the issue. I have followed these steps: 1. Create a bullseye container, apt install mariadb-server tango-db 2. Upgrade to bookworm 3. apt install tango-starter Maybe I am missing something, but AFAICS, tango starter was registered in the database: tango_admin --ping-device dserver/Starter/bullseye-tango-db ; echo $? 0 The current mariadb-server installed is 1:10.11.6-0+deb12u1. Do you have more information that could help to reproduce the issue? Cheers,
Hi, (CCing Thomas). El 25/10/24 a las 13:25, Santiago Ruano Rincón escribió: I have tried the above mentioned steps upgrading from bookworm to testing, and tango-starter is unable to start: Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Tango exception Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Severity = ERROR Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Error reason = DB_SQLError Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Desc : Failed to query TANGO database (error=Field 'date' doesn't have a default value) Oct 25 14:40:32 bookworm-tango-db Starter[11770]: .The query was: INSERT INTO property_device_hist SET device='tango/admin/bookworm-tango-db',id='43',name='polled_attr',count='1',value='hoststate' Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Origin : DataBase::db_put_device_property Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Tango exception Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Severity = ERROR Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Error reason = API_CommandFailed Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Desc : Failed to execute command_inout on device sys/database/2, command DbPutDeviceProperty Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Origin : virtual CORBA::Any_var Tango::Connection::command_inout(const std::string&, const CORBA::Any&) at (./lib/cpp/src/client/devapi_base.cpp:1531) Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Received a CORBA_Exception Oct 25 14:40:32 bookworm-tango-db Starter[11770]: Exiting Oct 25 14:40:32 bookworm-tango-db systemd[1]: tango-starter.service: Deactivated successfully. Frédéric, would you mind confirming this? Cheers,
El 25/10/24 a las 14:44, Santiago Ruano Rincón escribió: [snip] Sorry for the noise. I can confirm there is an issue in bookworm, and it is present even without upgrading from bullseye. Which makes sense with https://gitlab.com/tango-controls/TangoDatabase/-/issues/69 I will propose a bookworm update soon. Have a nice week-end,
Yes, this is indeed an issue on bookworm as well. But the problem only occurs if you use the table and not when you create them. Based on Santiago's MR https://gitlab.com/tango-controls/TangoDatabase/-/merge_requests/82 I've created a new one with a test and an upgrade script, see https://gitlab.com/tango-controls/TangoDatabase/-/merge_requests/95. Please test. Thomas
El 27/10/24 a las 12:28, Thomas Braun escribió: I believe that the above matches my understanding. And that is why I am surprised of not being able to find (reproduce) the issue described by Frédéric when using the table (created in bullseye) to add the starter server in bookworm. I gave the steps described by Frédéric another try, but I still cannot reproduce it. More info is welcome. Thomas, other than registering a Starter in the database, do you have examples of other use cases that use the table and that would be affected by the bug? unstable, dropping my patch that was included in 9.4.2+dfsg1-1. According to the CI and the autopkgtest: https://salsa.debian.org/science-team/tango/-/jobs/6552116 the Starter is successfully registered (and started). I will backport your patch to bookworm afterwards. Sorry for the delay, I was planing to work on bookworm earlier, but I should have mentioned that it is good to expose the changes in unstable first. And for including them into unstable, I needed to fix some issues I found (and had overlooked) with opentelemetry-cpp so I can upload tango 10.0. Cheers,
Am Freitag, dem 08.11.2024 um 10:46 -0300 schrieb Santiago Ruano Rincón: [resending to bug, as the original mail only went to Santiago] Defining a device server is not enough to trigger the bug. You need to write into the property history tables. You can do that by adding a property, something like tango_admin --add-property sys/tg_test/1 key value triggers the bug here 2024-11-10T17:13:30,966685+0100 DEBUG (DataBase.cpp:6678) sys/database/2 DataBase::PutDeviceProperty(): sql_query INSERT INTO property_device_hist SET device='sys/tg_test/1',id='1',name='key',count='1',value='value' 2024-11-10T17:13:30,966716+0100 WARN (DataBaseUtils.cpp:463) sys/database/2 DataBase::db_put_device_property failed to query TANGO database: 2024-11-10T17:13:30,966721+0100 WARN (DataBaseUtils.cpp:464) sys/database/2 query = INSERT INTO property_device_hist SET device='sys/tg_test/1',id='1',name='key',count='1',value='value' 2024-11-10T17:13:30,966725+0100 WARN (DataBaseUtils.cpp:465) sys/database/2 (SQL error=Field 'date' doesn't have a default value) Yes, definitly let it ripen a bit in unstable. Thomas
We believe that the bug you reported is fixed in the latest version of
tango, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1062979@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Santiago Ruano Rincón <santiago@freexian.com> (supplier of updated tango package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 04 Dec 2024 23:30:01 -0300
Source: tango
Architecture: source
Version: 9.3.4+dfsg1-2+deb12u1
Distribution: bookworm
Urgency: medium
Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Santiago Ruano Rincón <santiago@freexian.com>
Closes: 1062979
Changes:
tango (9.3.4+dfsg1-2+deb12u1) bookworm; urgency=medium
.
* Team upload
* Make the property_* tables compatible with MariaDB 10.11 at install time.
Thanks to Thomas Braun. Also update table modifications accordingly in
dbconfig-common when upgrading from 9.3.4 (Closes: #1062979).
* Add d/tests/starter-basic, including a test for #1062979.
* Switch Salsa CI RELEASE variable from experimental to bookworm. Otherwise,
Salsa CI runs the pipeline on experimental, and it has to be manually
overriden.
Checksums-Sha1:
f2ede18e8b89e4969e7fbb2400fd61d37379b197 2275 tango_9.3.4+dfsg1-2+deb12u1.dsc
f26e51b26404d5148cb7653e068f456fbed835e4 31612 tango_9.3.4+dfsg1-2+deb12u1.debian.tar.xz
ce5929deb96b9ad322e469565c2ac3d51cf1954f 14908 tango_9.3.4+dfsg1-2+deb12u1_amd64.buildinfo
Checksums-Sha256:
1291a33c56afa2d6a321a5ee689f9320a8ec4d1dc62f5a70df65183318141b8d 2275 tango_9.3.4+dfsg1-2+deb12u1.dsc
b6af01424b79704b8656acd93ccd318799d198b3fe10f75f077883d9e5635746 31612 tango_9.3.4+dfsg1-2+deb12u1.debian.tar.xz
6690c28cbfb652d0858c7d025cca8dd4cdccc3f5bc8b429bb681be78c0534d54 14908 tango_9.3.4+dfsg1-2+deb12u1_amd64.buildinfo
Files:
5591875d2afede41e17752990dd5095d 2275 science optional tango_9.3.4+dfsg1-2+deb12u1.dsc
b2e2a5b4543cfbc12433e5363896fb82 31612 science optional tango_9.3.4+dfsg1-2+deb12u1.debian.tar.xz
8f67d1c52101f104810cbf06ccb4aae9 14908 science optional tango_9.3.4+dfsg1-2+deb12u1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iIwEARYIADQWIQR+lHTq7mkJOyB6t2Un3j1FEEiG7wUCZ1L+3xYcc2FudGlhZ29A
ZnJlZXhpYW4uY29tAAoJECfePUUQSIbv8ZcA/jtjIJ7AE2dGEX1Asf/bEHNsAwHq
www1zn8fqeo/vW0DAP9AIr8vhMyls8xuq3LaYWn/QlXrWWo4pnx8wFBdhvLpAQ==
=fG7v
-----END PGP SIGNATURE-----