Bug 1272694 - Zookeeper service file requires myid file despite the default install being standalone mode
Summary: Zookeeper service file requires myid file despite the default install being s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: zookeeper
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christopher Tubbs
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-17 18:18 UTC by KevinFarshaw
Modified: 2015-11-24 22:49 UTC (History)
4 users (show)

Fixed In Version: zookeeper-3.4.6-13.fc23 zookeeper-3.4.6-13.fc21 zookeeper-3.4.6-13.fc22 zookeeper-3.4.6-14.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-24 22:49:46 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1261458 None None None Never

Internal Links: 1261458

Description KevinFarshaw 2015-10-17 18:18:45 UTC
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_RunningReplicatedZooKeeper

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.

Comment 1 Fedora Update System 2015-10-20 01:32:01 UTC
zookeeper-3.4.6-12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3467dc710b

Comment 2 Fedora Update System 2015-10-20 01:32:29 UTC
zookeeper-3.4.6-12.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-93bded3672

Comment 3 Fedora Update System 2015-10-20 01:32:58 UTC
zookeeper-3.4.6-12.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-2dc6711b15

Comment 4 Fedora Update System 2015-10-20 21:58:02 UTC
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

Comment 5 KevinFarshaw 2015-10-24 22:08:40 UTC
@ctubbsii, a week later the package is still not available in fc22 updates-testing. Is there something wrong with koji?

Comment 6 Christopher Tubbs 2015-10-24 22:27:37 UTC
That's weird. I'm not sure what happened. In the meantime, you can grab the rpm for f22 from http://koji.fedoraproject.org/koji/buildinfo?buildID=693049

Comment 7 KevinFarshaw 2015-10-24 22:46:22 UTC
Thanks, but I'm worried that unless it hits updates-testing it won't be automatically pushed to updates when the neutral karma period elapses. 
Is that right?

Comment 8 Fedora Update System 2015-10-26 10:29:23 UTC
zookeeper-3.4.6-12.fc21 has been pushed to the Fedora 21 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-2dc6711b15

Comment 9 Fedora Update System 2015-10-26 18:32:03 UTC
zookeeper-3.4.6-12.fc22 has been pushed to the Fedora 22 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-93bded3672

Comment 10 Fedora Update System 2015-11-03 22:29:50 UTC
zookeeper-3.4.6-13.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-45fe2ff2ac

Comment 11 Fedora Update System 2015-11-03 22:30:25 UTC
zookeeper-3.4.6-13.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-eef6ca6bf6

Comment 12 Fedora Update System 2015-11-03 22:31:00 UTC
zookeeper-3.4.6-13.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-ef5e68cbf8

Comment 13 Fedora Update System 2015-11-05 00:22:48 UTC
zookeeper-3.4.6-13.fc21 has been pushed to the Fedora 21 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-ef5e68cbf8

Comment 14 Fedora Update System 2015-11-05 01:28:35 UTC
zookeeper-3.4.6-13.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-45fe2ff2ac

Comment 15 Fedora Update System 2015-11-05 15:53:02 UTC
zookeeper-3.4.6-13.fc22 has been pushed to the Fedora 22 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-eef6ca6bf6

Comment 16 Fedora Update System 2015-11-13 22:55:19 UTC
zookeeper-3.4.6-13.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2015-11-14 01:51:30 UTC
zookeeper-3.4.6-13.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2015-11-14 01:53:03 UTC
zookeeper-3.4.6-13.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-11-15 08:36:53 UTC
zookeeper-3.4.6-12.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-2dc6711b15

Comment 20 Christopher Tubbs 2015-11-15 08:39:47 UTC
Ignore the messages for zookeeper-3.4.6-12.fc21 update. It's in a strange state in Bodhi.

Comment 21 Fedora Update System 2015-11-15 08:47:03 UTC
zookeeper-3.4.6-14.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-b1d473beb0

Comment 22 Fedora Update System 2015-11-16 06:52:14 UTC
zookeeper-3.4.6-14.fc21 has been pushed to the Fedora 21 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-b1d473beb0

Comment 23 Fedora Update System 2015-11-24 22:49:40 UTC
zookeeper-3.4.6-14.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.