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

How to update multiple list configurations at once? #1576

Closed
Ygreneb opened this issue Jan 11, 2023 · 2 comments
Closed

How to update multiple list configurations at once? #1576

Ygreneb opened this issue Jan 11, 2023 · 2 comments
Labels

Comments

@Ygreneb
Copy link

Ygreneb commented Jan 11, 2023

Version

Sympa 6,2.60 via Debian 11 repository

Question

We have a large amount of lists and recently the address of our LDAP server changed. So we needed to change this setting in each list config. We wrote a small script that simply replaced the string in each list config file, restarted Sympa and it worked. But we wondered about three things:

  1. Can you change/add/delete each settings from https://www.sympa.community/gpldoc/man/sympa_config.5.html in the list config files without breaking Sympa? (Except deleting mandatory settings)
  2. Do you have to rotate the config files and have to update the update paragraph? If not, is there a downside in not doing so?
  3. Is there a more convenient way to do it, like a special CLI offered by Sympa? Changing the address of an LDAP server was a simple replacement, but what about replacing whole deprecated paragraphs with new settings based on the deprecated ones? Definitely doable with scripting, but quite complex.
@ikedas
Copy link
Member

ikedas commented Jan 12, 2023

Hi @Ygreneb ,

  1. Can you change/add/delete each settings from https://www.sympa.community/gpldoc/man/sympa_config.5.html in the list config files without breaking Sympa? (Except deleting mandatory settings)

When a config file of each list is changed, it is reloaded automatically (sympa.conf and robot.conf aren't: When these files are changed, you have to restart the services).

Logically, a process could read config file while it is being rewritten with the changes. To avoid this, the following operation is recommended:

# cp -p config config.NEW
(edit config.NEW)
# mv config.NEW config
  1. Do you have to rotate the config files and have to update the update paragraph? If not, is there a downside in not doing so?

Currently, rotated files and update paragraph are never used by Sympa (Sympa determines updates of config file by timestamp of it). They are only for convenience of human.

Conversely, without these, it is impossible to know what the settings were before the change and when the settings were changed.

  1. Is there a more convenient way to do it, like a special CLI offered by Sympa? Changing the address of an LDAP server was a simple replacement, but what about replacing whole deprecated paragraphs with new settings based on the deprecated ones? Definitely doable with scripting, but quite complex.

Unfortunately, currently there is no CLI yet to update the config file for each list. But it sounds a promising idea for me.

@ikedas
Copy link
Member

ikedas commented Jun 14, 2023

As of Sympa 6.2.70, sympa config command has been added. So we may finally close this question.

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

No branches or pull requests

2 participants