Public bug reported:

Corosync's init script properly fails to start by default to protect us.
I get that, but the wild goose chase that a new user ends up on is a UX
bug and in at least one case, I saw a user who simply changed distros
because he couldn't figure it out claiming Ubuntu wasn't ready for
business. (Yeah, I know that's nonsense but his complaint on spiceworks
forums is among the top links on google for 'ubuntu corosync'. )

The puppet daemon does the same thing, but it has a bit of logic that
when someone tries to start it and this file overrides them, it simply
tells the user and tells them where to change the variable.

Here is the code they use in their init.

start_puppet_agent() {
    if is_true "$START" ; then
        start-stop-daemon --start --quiet --pidfile $PIDFILE \
          --startas $DAEMON -- $NAME $DAEMON_OPTS
    else
        echo ""
        echo "puppet not configured to start, please edit /etc/default/puppet 
to enable"
    fi
}

Here is the equivalent code in corosync's init.

do_start()
{
        # Return
        #   0 if daemon has been started
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
                || return 1
        start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_ARGS \
                || return 2
        # Add code here, if necessary, that waits for the process to be ready
        # to handle requests from services started subsequently which depend
        # on this one.  As a last resort, sleep for some time.
        pidof corosync > $PIDFILE
}

I won't bother combining it as I find each item I try that the devs
usually find my solution rather overly complicated. I'm sure you can
handle it better than I.

** Affects: corosync (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to corosync in Ubuntu.
https://bugs.launchpad.net/bugs/1239734

Title:
  corosync sends first time users on a hunt, simple fix

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/corosync/+bug/1239734/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to