Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

owner and moderator info lost on upgrade to 6.2.20 or 6.2.22 #71

Closed
pkissman opened this issue Oct 2, 2017 · 16 comments
Closed

owner and moderator info lost on upgrade to 6.2.20 or 6.2.22 #71

pkissman opened this issue Oct 2, 2017 · 16 comments
Assignees

Comments

@pkissman
Copy link

pkissman commented Oct 2, 2017

Having upgraded to either 6.2.20 or 6.2.22, neither sympa nor wwsympa can find existing list owners and moderators. One has to edit the list ownership info and save it again (edit_list_request) in order for list ownership to be found.

Log file example:

notice Sympa::Spindle::ToModeration::_send_confirm_to_editor() Warning: No owner and editor defined at all in list Sympa::List mylist@mydomain
err main::#243 > Sympa::Spindle::spin#92 > Sympa::Spindle::ToModeration::_twist#52 > Sympa::Spindle::ToModeration::_send_confirm_to_editor#147 Impossible to send the moderation request for message Sympa::Message
mylist@mydomain.1506099454.6074 to editors of list Sympa::List mylist@mydomain Neither editor nor owner defined!
Sep 22 12:57:35 mblc sympa_msg[5113]: err main::#243 > Sympa::Spindle::spin#92 > Sympa::Spindle::ToModeration::_twist#55 Failed to send moderation request of Sympa::Message mylist@mydomain.1506099454.6074 from paul.kissman@state.ma.us for list Sympa::List mylist@mydomainto editor(s)


@pkissman
Copy link
Author

pkissman commented Oct 2, 2017

I just realized that my whole admin_table had been wiped out by the sympa upgrade process, which is why no owners or moderators were found.

I restored from a backup and things look good.

This seems to happen due to the upgrade script:

Empty the admin_table entries and recreate them

$log->syslog('notice', 'Rebuilding the admin_table...');
Sympa::List::delete_all_list_admin();
foreach my $list (@$all_lists) {
    $list->sync_include_admin();

Not sure why the list doesn't get restored. My admins are not in a separate included source.

@racke
Copy link
Contributor

racke commented Oct 2, 2017

Really, we shouldn't delete a whole table without safety belt. At the very least, a dump should be stored in case it goes wrong.

Unclear why the rebuild doesn't work. @pkissman, what was the previous Sympa versions and which database system and version do you use?

Also can you check your log for messages related to the admin_table rebuild event?

@racke racke added the bug label Oct 2, 2017
@pkissman
Copy link
Author

pkissman commented Oct 2, 2017 via email

@ikedas
Copy link
Member

ikedas commented Oct 3, 2017

@pkissman , though i don't know why, list config files might be broken. Restore them by doing;

  1. Stop services, if possible.
  2. Go to list directory, and overwrite config file of each list with the recent version of unbroken backup files (named config.number and placed in the same directory as config).
  3. Remove config.bin, if any.
  4. Start services, if you have stopped.

Then see if owners/moderators are restored in configuration page.

@pkissman
Copy link
Author

pkissman commented Oct 3, 2017 via email

@racke
Copy link
Contributor

racke commented Oct 7, 2017

OK, I can confirm this problem. I'm working on a Sympa migration and it blew away my admin table as well. Too bad really 😠

@racke racke self-assigned this Oct 7, 2017
@racke
Copy link
Contributor

racke commented Oct 7, 2017

notice Sympa::Upgrade::upgrade() Rebuilding config.bin files for ALL lists...it may take a while...
notice Sympa::Upgrade::upgrade() Rebuilding the admin_table...
notice Sympa::Upgrade::upgrade() Number of lists: 0

Oh well, so it is just deleting and not adding it back (last log message added locally).
Will investigate further.

@racke
Copy link
Contributor

racke commented Oct 7, 2017

My analysis:

my $all_lists = Sympa::List::get_lists('*', 'reload_config' => 1);

With that call, Sympa doesn't consult the database but goes into the list_data directories of all the robots and searches for files named "config".

If it doesn't find these files, Sympa doesn't put back in the admins into the admin table.

Do you use robots in your setup, @pkissman ?

@ikedas
Copy link
Member

ikedas commented Oct 8, 2017

If it doesn't find these files, Sympa doesn't put back in the admins into the admin table.

I see, but why get_lists() omits existing lists? @racke, can you think of anything?

@racke
Copy link
Contributor

racke commented Oct 8, 2017

Hard to tell, insufficient permissions maybe.

@ikedas
Copy link
Member

ikedas commented Oct 8, 2017

Ok, I'll merge your PR. Let's wait for the next chance of upgrading.

@pkissman
Copy link
Author

pkissman commented Oct 8, 2017 via email

@ikedas
Copy link
Member

ikedas commented Nov 22, 2017

I encountered this bug upgrading 6.2.22 to 6.2.23b.1. Reloading httpd and sympa services seemed to restore owners/editors.
A commit above may avoid it.

ikedas added a commit that referenced this issue Nov 30, 2017
Before rebuilding admin_table, won't clear it #71 by ikedas
@ikedas
Copy link
Member

ikedas commented Nov 30, 2017

In my side, the bug was not reproduced upgrading 6.2.23b.1 to 6.2.23b.2.

@ikedas ikedas added this to the 6.2.32 milestone Mar 28, 2018
@ikedas
Copy link
Member

ikedas commented Mar 28, 2018

Fix to issue #11 will remove worry on synchronization between config and database (see also issue #49). When it is closed, this issue will be closed.

@ikedas ikedas removed this from the 6.2.32 milestone Mar 28, 2018
@ikedas
Copy link
Member

ikedas commented Apr 30, 2018

After a fix on #11, owners/moderators will no longer removed from database during upgrade. Therefore this issue is closed.

@ikedas ikedas closed this as completed Apr 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants