Skip to Content.
Sympa Menu

en - Re: [sympa-users] Installation Problem

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: David Verdin <address@concealed>
  • To: Jobst Schmalenbach <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] Installation Problem
  • Date: Wed, 02 Apr 2008 16:09:13 +0200

Jobst,

Jobst Schmalenbach a écrit :
I just got hold of a latest version 5.4.1

Compiling is fine (albeit a language warning).
Good!
make install works too, no problem.
Good too!
sympa.pl --upgrade is a problem and I do not know how to get out of this.
Bad... This shouldn't happen.
[root@moya /] sympa.pl --upgrade
Configuration file read, default log level 0 Upgrade::probe_db() Table session_table created in database sympa Upgrade::probe_db() Field 'visibility_admin' (table 'admin_table' ; database 'sympa') was NOT found. Attempting to add it... Upgrade::probe_db() Missing expected primary key : list_admin Upgrade::probe_db() Missing expected primary key : role_admin Upgrade::probe_db() Missing expected primary key : user_admin Upgrade::probe_db() Missing expected primary key : robot_admin Upgrade::probe_db() ALTER TABLE admin_table ADD PRIMARY KEY (robot_admin,list_admin,role_admin,user_admin) Upgrade::probe_db() Could not set field 'robot_admin,list_admin,role_admin,user_admin' as PRIMARY KEY, table'admin_table'.
Database sympa defined in sympa.conf has not the right structure or is unreachable. If you don't use any database, comment db_xxx parameters in sympa.conf Exiting.
Here, Sympa tries to add this primary key: (robot_admin,list_admin,role_admin,user_admin)
For some reasons it failed. What were the logs of mysql when you ran the upgrade?
[snip/]

If you want to
ALTER TABLE admin_table ADD PRIMARY KEY
(robot_admin,list_admin,role_admin,user_admin)

that will refuse to run because there are two entries (rightly so) in the
table

| barrett-internal | address@concealed |
| barrett-internal | address@concealed |
There is no duplicate entries because what is considered for this key is the 4-uplet robot_admin,list_admin,role_admin,user_admin, not just list_admin alone.
so I took that code out in Upgrade.pm (I would not be able to install SYMPA
if I do not tak it out).

## Add primary key
# if ( $primaryKeyDropped || !$primaryKeyFound ) {
# ($Log::log_level >= 1) && &do_log('debug', "ALTER TABLE $t ADD PRIMARY KEY
($fields)");
# unless ($dbh->do("ALTER TABLE $t ADD PRIMARY KEY ($fields)")) {
# ($Log::log_level >= 0) && &do_log('err', 'Could not set field
\'%s\' as PRIMARY KEY, table\'%s\'.', $fields, $t);
# return undef;
# }
# push @report, sprintf('Table %s, PRIMARY KEY set on %s', $t, $fields);
# ($Log::log_level >= 0) && &do_log('info', 'Table %s, PRIMARY KEY set on
%s', $t, $fields);
# }


which will get through the the UPGRADING of the database, but as soon as I
start sympa after the upgrade:

Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected primary key : list_admin Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected primary key : role_admin Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected primary key : user_admin Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected primary key : robot_admin Apr 2 20:42:31 moya sympa[15902]: Upgrade::probe_db() Missing expected primary key : id_session


It seems to run ... as the webinterface response and I can subscribe.

Does this matter?
You have no control of duplicate entries in admin_table and session_table.
Not a drama for admin_table, which is only a cache of configuration files anyway.
However, for the sessions. I don't what would happen if you created two times the same session_id.
Something weird, for sure.
Why defining the "list_admin" as a primary when that leads to "duplicate key for
XYZ"?
"list_admin" is not the primary key. (robot_admin,list_admin,role_admin,user_admin) is.

We must know why Sympa could not update your database. What are the privileges for Sympa in the Sympa database?
See https://www.sympa.org/manual/database#setting_database_privileges for recommandations about Sympa database privileges.

Regards,

Jobst








--
David Verdin
Comité réseau des universités




Archive powered by MHonArc 2.6.19+.

Top of Page