https://bugzilla.redhat.com/show_bug.cgi?id=1272694
Bug ID: 1272694 Summary: Zookeeper service file requires myid file despite the default install being standalone mode Product: Fedora Version: 22 Component: zookeeper Assignee: tstclair@redhat.com Reporter: KevinFarshaw@mailinator.com QA Contact: extras-qa@fedoraproject.org CC: ctubbsii-fedora@apache.org, ethan@ethantuttle.com, java-sig-commits@lists.fedoraproject.org, s@shk.io, tstclair@redhat.com
Split off from #1261458 https://bugzilla.redhat.com/show_bug.cgi?id=1261458
Starting the service with systemctl complains about missing precondition of file at /var/lib/zookeeper/data/myid. After creating the file (with a single line containing an id such as the digit '1'), zookeeper starts.
(In reply to KevinFarshaw from comment #9)
Thanks. I'll test and leave karma when you push. Did you get rid of the myid precondition in the service file too?
Christopher Tubbs Wrote: I did not. I'd rather investigate that separately from the classpath issue, because I'm not too sure about why that precondition was added. Like, is that > to ensure ZK doesn't accidentally join the wrong quorum?
(In reply to Christopher Tubbs from comment #10)
(In reply to KevinFarshaw from comment #9)
Thanks. I'll test and leave karma when you push. Did you get rid of the myid precondition in the service file too?
I did not. I'd rather investigate that separately from the classpath issue, because I'm not too sure about why that precondition was added. Like, is that to ensure ZK doesn't accidentally join the wrong quorum?
That means the server will still be unrunnable in the default install.
I've looked at the SRPM repo.
http://pkgs.fedoraproject.org/git/zookeeper.git
There's nothing in the spec file or git log that indicates this was a specific fix for a problem/race/danger. The commits adding the service files was
94aec27 Jul 18 2013 Add a server subpackage. Jeffrey C. Ollie
commited by tstclair. The relevent hunk in the diff for the service file was:
--- a/zookeeper.service +++ b/zookeeper.service @@ -1,14 +1,20 @@ [Unit] -Description=Zookeeper +Description=Apache ZooKeeper +After=network.target +ConditionPathExists=/etc/zookeeper/zoo.cfg +ConditionPathExists=/etc/zookeeper/log4j.properties +ConditionPathExists=/var/lib/zookeeper/data/myid
I am not an authority on zookeeper but, as I read the manual https://zookeeper.apache.org/doc/trunk/zookeeperStarted.html#sc_RunningRepli...
the myid file is only required when zookeeper is explicitly configured for quorum operation, in which case it should match one of the quorum member entries added to /etc/zookeeper/zoo.cfg.
on fedora (22): $ rpm -qlv zookeeper 0 Feb 16 2015 /etc/zookeeper 2161 Mar 12 2014 /etc/zookeeper/log4j.properties 0 Feb 16 2015 /etc/zookeeper/zoo.cfg 965 Feb 16 2015 /etc/zookeeper/zoo_sample.cfg
neither the empty default config, nor the sample config provided alongside it define a quorum, they are both geared for standalone operation. Since
1. myid is not needed in standalone operation. 2. the default install will always come up in standalone operation unless someone manually edits the configuration and adds quorum entries.
I think it is reasonable to remove that precondition and require that a person switching the daemon from standalone mode to quorum mode do that properly, following the procedure described in the zk documentation.
Christopher Tubbs 2015-10-17 08:44:57 EDT wrote:
I agree with your reasoning and will modify or remove that precondition. Let's proceed in a separate issue, only so we can track the history better > later if we need to.
This is a new issue to track this.
https://bugzilla.redhat.com/show_bug.cgi?id=1272694
KevinFarshaw@mailinator.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugzilla.redhat.com | |/show_bug.cgi?id=1261458
https://bugzilla.redhat.com/show_bug.cgi?id=1272694
Christopher Tubbs ctubbsii-fedora@apache.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|tstclair@redhat.com |ctubbsii-fedora@apache.org
https://bugzilla.redhat.com/show_bug.cgi?id=1272694
--- Comment #1 from Fedora Update System updates@fedoraproject.org --- zookeeper-3.4.6-12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3467dc710b
https://bugzilla.redhat.com/show_bug.cgi?id=1272694
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=1272694
--- Comment #2 from Fedora Update System updates@fedoraproject.org --- zookeeper-3.4.6-12.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-93bded3672
https://bugzilla.redhat.com/show_bug.cgi?id=1272694
--- Comment #3 from Fedora Update System updates@fedoraproject.org --- zookeeper-3.4.6-12.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-2dc6711b15
https://bugzilla.redhat.com/show_bug.cgi?id=1272694
Fedora Java SIG java-sig-commits@lists.fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|java-sig-commits@lists.fedo | |raproject.org |
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #4 from Fedora Update System updates@fedoraproject.org --- zookeeper-3.4.6-12.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update zookeeper' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-3467dc710b
java-sig-commits@lists.fedoraproject.org