[MDEV-29884] Ctrl-Cing out of galera_new_cluster doesn't reset systemd environment Created: 2022-10-26  Updated: 2022-10-31

Status: Open
Project: MariaDB Server
Component/s: Platform RedHat, Server
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Eugene Pankov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-19210 use environment file in systemd units... In Testing

 Description   

Excerpt from /bin/galera_new_cluster:

systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster' && \
    systemctl start ${1:-mariadb}
 
systemctl set-environment _WSREP_NEW_CLUSTER=''

If the service start takes too long and the user aborts the script, the environment never gets reset and subsequent attempt to join this node to another primary component via `systemctl start mariadb` will instead bootstrap it.



 Comments   
Comment by Daniel Black [ 2022-10-26 ]

The solution https://github.com/MariaDB/server/pull/1143 in MDEV-19210 might resolve this as well, with a little improvements in the handling of the file in galera_new_cluster.

Comment by Eugene Pankov [ 2022-10-26 ]

You'd still need to trap SIGINT in galera_new_cluster, otherwise the cleanup will not happen if the user aborts the script and service fails (and `ExecStartPost` won't get called)

Comment by Daniel Black [ 2022-10-31 ]

Yep, was thinking along those lines too.

Generated at Thu Feb 08 10:12:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.