Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29884

Ctrl-Cing out of galera_new_cluster doesn't reset systemd environment

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Platform RedHat, Server
    • None

    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.

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            Yep, was thinking along those lines too.

            danblack Daniel Black added a comment - Yep, was thinking along those lines too.
            eugeny Eugene Pankov added a comment -

            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)

            eugeny Eugene Pankov added a comment - 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)
            danblack Daniel Black added a comment -

            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.

            danblack Daniel Black added a comment - 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.

            People

              Unassigned Unassigned
              eugeny Eugene Pankov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.