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

Fail to restore list owners if list in error_config #1524

Closed
salaun-urennes1 opened this issue Nov 18, 2022 · 4 comments
Closed

Fail to restore list owners if list in error_config #1524

salaun-urennes1 opened this issue Nov 18, 2022 · 4 comments

Comments

@salaun-urennes1
Copy link
Collaborator

I am transferring mailing lists from another Sympa server. Because these lists are in error_config (no owner defined), I can't run the restore_users command to load these owners and fix the list. It seems that the restore_users code should be adapted.


6.2.48

Installation method

from source

Expected behavior

Sympa.pl should let me run restore_users even if the liste is in error_config

Actual behavior

sympa.pl --restore_users fails with error List is not open

Steps to reproduce

For each list, the other listmaster provided the list_data directory including config, editor.dump, member.dump and owner.dump.
I first installed the list directory into our server's list_data/ and then ran sympa.pl --reload_list_config.
At that stage the list is in error_config status because no owner is defined.
I then tried running sympa.pl --restore_users --role=member,editor,owner for the list, but if failed with following logs:

Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: notice main:: Sympa 6.2.48 Started
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: debug2 Sympa::List::new(xx@listes.univ-rennes1.fr, , )
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: debug2 Sympa::List::load(Sympa::List <>, xx, listes.univ-rennes1.fr, ...)
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: debug2 Sympa::List::sync_include_admin(Sympa::List <xx@listes.univ-rennes1.fr>)
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: debug2 Sympa::List::get_admins(Sympa::List <xx@listes.univ-rennes1.fr>, owner,  => )
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: err main::#372 > Sympa::List::new#418 The list "xx" has got no owner defined
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: debug2 Sympa::List::set_status_error_config(Sympa::List <xx@listes.univ-rennes1.fr>, no_owner_defined, ...)
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: err main::#372 > Sympa::List::new#420 > Sympa::List::set_status_error_config#462 The list Sympa::List <xx@listes.univ-rennes1.fr> is set in status error_config: no_owner_defined()
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: debug2 Sympa::send_notify_to_listmaster(Sympa::List <xx@listes.univ-rennes1.fr>, no_owner_defined, ARRAY)
			...
Nov 18 08:56:42 vmperl-psympa1 sympa[13372]: err main::#378 List is not open: Sympa::List <xx@listes.univ-rennes1.fr>

Additional information

I checked the latest code from github and I suspect the behavior is still the same with latest code

unless ($list->{'admin'}{'status'} eq 'open') {
$log->syslog('err', 'List is not open: %s', $list);
next;

I suggest removing this condition

@ikedas
Copy link
Member

ikedas commented Nov 18, 2022

As of 6.2.58, the list without defined owner is no longer erroneous: See also #955.

@salaun-urennes1
Copy link
Collaborator Author

Thanks for the quick response, Soji.
I should have remembered that change, since I was involved, sorry.
Then with 6.2.58 it should be fine for me.
Would it still make sense to allow restore_users to be run if list is not open...I don't known?

@ikedas
Copy link
Member

ikedas commented Nov 18, 2022

Would it still make sense to allow restore_users to be run if list is not open...I don't known?

I can't say for sure. One possible reason might be that owner.dump etc are also used to save user information when the list is closed, so that users cannot be changed while the list is closed.

Please check the current behaviour and give your suggestion.

@salaun-urennes1
Copy link
Collaborator Author

I'd say that it is acceptable that we expect a list to be reopened first before users get restored.
So I close the issue.

Thanks

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

2 participants