Bug#848137: [Dbconfig-common-devel] Bug#848137: RE:Bug#848137: Info received (problem with the upgrade of tango-db)
Hello, > I am suspecting that this commit may be related to the current behavior: > https://anonscm.debian.org/cgit/collab-maint/dbconfig-common.git/commit/?id=acdb99d61abfff54630c4cfba6e4452357a83fb9 > I believe I implemented there that the drop of the database is performed > with the user privileges instead of the dbadmin privileges because I > believed one should always have the rights to drop the db. Apparently I > was wrong. We may need to clone or reassign this bug to dbconfig, but > I'm not sure yet if there aren't more things, or if tango-db should work > around the issue (which may be created by buggy dbconfig-common behavior > of the past). I can not give an educated guess if the current logic of dbconfig-common is good or not. I do not have enough knowledge of SQL/MySQL/Postsgresq etc... This problem could affect other package using dbconfig-common. I agreed also that I must fix the wrongly created procedure/tables due to the previous dbconfig-common behaviour. Can you help me in this proces in order to produce the right snopset to put in my package (preinst ?) script. I need to change the owner of the procedure from root @ localhost -> tango @ locahost Which kind of script should I add in my debian scripts ? thansk for your help Frederic
Bug#848137: RE:Bug#848137: Info received (problem with the upgrade of tango-db)
Hmmm, On 03-01-17 22:07, Paul Gevers wrote: > On 03-01-17 21:21, PICCA Frederic-Emmanuel wrote: >> I just try to use dbconfig-common like I did before, >> (create the tango database, populate it with a few values and create some >> procedures.) >> >> What is strange to me is that with dbconfig-common (jessie version), I end >> up with procedure owned by >> root @ localhost >> >> but when I use the dbconfig-common of stretch, the procedure are owned by >> tango @ localhost 5which is right) >> >> I always used the non dbadmin script in order to configure my database. >> This is why I do not understand why the mysqldump does not work anymore. >> Does the dump changed between the jessie and strecth dbconfig-common ? >> >> By change I mean. >> >> In jessie it is run as root, but on stretch it is run as tango ? > > Let me check the (huge) delta between jessie and stretch (hopefully > tomorrow). I made major improvements in the code, but I don't > specifically remember anything related to this issue. Furthermore, I > don't rule out that this is indeed MySQL/MariaDB related. We/you could > also ask the maintainers list of those packages if the current behavior > rings a bell. Additionally, trying to do the tests as you did so far but > sticking to MySQL instead of moving over to MariaDB would be an > interesting and insightful exercise. I am suspecting that this commit may be related to the current behavior: https://anonscm.debian.org/cgit/collab-maint/dbconfig-common.git/commit/?id=acdb99d61abfff54630c4cfba6e4452357a83fb9 I believe I implemented there that the drop of the database is performed with the user privileges instead of the dbadmin privileges because I believed one should always have the rights to drop the db. Apparently I was wrong. We may need to clone or reassign this bug to dbconfig, but I'm not sure yet if there aren't more things, or if tango-db should work around the issue (which may be created by buggy dbconfig-common behavior of the past). Out of time now. Paul signature.asc Description: OpenPGP digital signature
Bug#848137: RE:Bug#848137: Info received (problem with the upgrade of tango-db)
Hi Frederic-Emmanuel, On 03-01-17 21:21, PICCA Frederic-Emmanuel wrote: > I just try to use dbconfig-common like I did before, > (create the tango database, populate it with a few values and create some > procedures.) > > What is strange to me is that with dbconfig-common (jessie version), I end up > with procedure owned by > root @ localhost > > but when I use the dbconfig-common of stretch, the procedure are owned by > tango @ localhost 5which is right) > > I always used the non dbadmin script in order to configure my database. > This is why I do not understand why the mysqldump does not work anymore. > Does the dump changed between the jessie and strecth dbconfig-common ? > > By change I mean. > > In jessie it is run as root, but on stretch it is run as tango ? Let me check the (huge) delta between jessie and stretch (hopefully tomorrow). I made major improvements in the code, but I don't specifically remember anything related to this issue. Furthermore, I don't rule out that this is indeed MySQL/MariaDB related. We/you could also ask the maintainers list of those packages if the current behavior rings a bell. Additionally, trying to do the tests as you did so far but sticking to MySQL instead of moving over to MariaDB would be an interesting and insightful exercise. Paul signature.asc Description: OpenPGP digital signature
Bug#848137: RE:Bug#848137: Info received (problem with the upgrade of tango-db)
> I am not sure that I follow what you are doing, but if you need the code > to be run with the dbadmin privileges, you should put the code in: >/usr/share/dbconfig-common/data/PACKAGE/upgrade-dbadmin/DBTYPE/VERSION > instead of in: >/usr/share/dbconfig-common/data/PACKAGE/upgrade/DBTYPE/VERSION Hello Paul I just try to use dbconfig-common like I did before, (create the tango database, populate it with a few values and create some procedures.) What is strange to me is that with dbconfig-common (jessie version), I end up with procedure owned by root @ localhost but when I use the dbconfig-common of stretch, the procedure are owned by tango @ localhost 5which is right) I always used the non dbadmin script in order to configure my database. This is why I do not understand why the mysqldump does not work anymore. Does the dump changed between the jessie and strecth dbconfig-common ? By change I mean. In jessie it is run as root, but on stretch it is run as tango ? Cheers Fred
Bug#848137: RE:Bug#848137: Info received (problem with the upgrade of tango-db)
Hi Frederic-Emmanuel, On Tue, 3 Jan 2017 15:02:08 + PICCA Frederic-Emmanuelwrote: > 1) On Jessie > > with the tango account > > mysql> use tango; > mysql> show create procedure class_att_prop\G > > I got "Create Procedure": NULL > > But If I use the root account (mysqladmin) > > CREATE DEFINER=`root`@`localhost` PROCEDURE `class_att_prop` (IN class_name > VARCHAR(255), INOUT res_str BLOB) > > which shows clearly that on jessie the procédure where created with the admin > account > > 2) On stretch > > with the tango account > > > CREATE DEFINER=`tango`@`localhost` PROCEDURE `class_att_prop` (IN > > class_name VARCHAR(255), INOUT res_str MEDIUMBLOB) > > Which shows that the procedures were created with the right tango account. > > Now the question is how can we fix this ? I am not sure that I follow what you are doing, but if you need the code to be run with the dbadmin privileges, you should put the code in: /usr/share/dbconfig-common/data/PACKAGE/upgrade-dbadmin/DBTYPE/VERSION instead of in: /usr/share/dbconfig-common/data/PACKAGE/upgrade/DBTYPE/VERSION Please consult the documentation here: https://www.debian.org/doc/manuals/dbconfig-common/ch-develguide.html#s-updates and (describing the difference): https://www.debian.org/doc/manuals/dbconfig-common/ch-develguide.html#s-bootstrap Paul signature.asc Description: OpenPGP digital signature