Spaces in zookeeper configuration files prevent zkCleanup.sh from working

Bug #1917490 reported by Pierre Riteau
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla-ansible
Triaged
Medium
Unassigned
Wallaby
Triaged
Medium
Unassigned

Bug Description

Running zkCleanup.sh fails:

$ ZOOCFGDIR=/etc/zookeeper/conf /opt/zookeeper/bin/zkCleanup.sh -n 10
Path '/' does not exist.
Usage:
PurgeTxnLog dataLogDir [snapDir] -n count
 dataLogDir -- path to the txn log directory
 snapDir -- path to the snapshot directory
 count -- the number of old snaps/logs you want to keep, value should be greater than or equal to 3

This is because it fails to parse the dataDir entry from zoo.cfg:

++ grep '^[[:space:]]*dataDir=' /etc/zookeeper/conf/zoo.cfg
++ sed -e 's/.*=//'
+ ZOODATADIR=

zkCleanup.sh needs the = character to be directly next to dataDir, without space: https://github.com/apache/zookeeper/blob/release-3.4.13/bin/zkCleanup.sh#L39-L40

The template zookeeper.cfg.j2 is already written this way, but I expect merge_config is adding the extra spaces. We may need a new option to merge_config to tell it to avoid using spaces.

Revision history for this message
Pierre Riteau (priteau) wrote :
Mark Goddard (mgoddard)
Changed in kolla-ansible:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 12.0.0.0rc1

This issue was fixed in the openstack/kolla-ansible 12.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 9.3.2

This issue was fixed in the openstack/kolla-ansible 9.3.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 11.1.0

This issue was fixed in the openstack/kolla-ansible 11.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 10.3.0

This issue was fixed in the openstack/kolla-ansible 10.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.