crush-initial-weight config option does not work when set to 0

Bug #1764077 reported by Sandor Zeestraten on 2018-04-15
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack ceph-osd charm
Medium
Sandor Zeestraten

Bug Description

# Versions
juju 2.3.4
ceph-osd rev. 259

# Issue
The crush-initial-weight config option does not work when set to 0 even though 0 is a valid value.

Example: `juju config ceph-osd crush-initial-weight=0`

# Cause
The Jinja template for ceph.conf only renders the config flag when it is non-zero.

https://github.com/openstack/charm-ceph-osd/blob/189e7620c07d81c5fdaa2c680c51ffd2d29f168b/templates/ceph.conf#L36

{%- if crush_initial_weight %}
osd crush initial weight = {{ crush_initial_weight }}
{%- endif %}

Xav Paice (xavpaice) on 2018-04-16
tags: added: canonical-bootstack
Frode Nordahl (fnordahl) wrote :
Changed in charm-ceph-osd:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Sandor Zeestraten (szeestraten)
milestone: none → 18.05

Reviewed: https://review.openstack.org/561456
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-osd/commit/?id=5ea1973062a55af4d5c41da226d3d110b2b85ff6
Submitter: Zuul
Branch: master

commit 5ea1973062a55af4d5c41da226d3d110b2b85ff6
Author: Sandor Zeestraten <email address hidden>
Date: Sun Apr 15 13:13:22 2018 +0200

    Render crush-initial-weight option if set to 0

    Fixes the conditional in the ceph.conf template so it renders the
    crush-initial-weight config option if set to 0.

    Change-Id: Iaecbdf52bd3731effa3132e61364918407116dbe
    Closes-Bug: 1764077

Changed in charm-ceph-osd:
status: In Progress → Fix Committed
Frode Nordahl (fnordahl) on 2018-04-16
tags: added: stable-backport

Reviewed: https://review.openstack.org/561565
Committed: https://git.openstack.org/cgit/openstack/charm-ceph-osd/commit/?id=63a1fe3ac79311be35783e5dd32ad59c87cc4d1d
Submitter: Zuul
Branch: stable/18.02

commit 63a1fe3ac79311be35783e5dd32ad59c87cc4d1d
Author: Sandor Zeestraten <email address hidden>
Date: Sun Apr 15 13:13:22 2018 +0200

    Render crush-initial-weight option if set to 0

    Fixes the conditional in the ceph.conf template so it renders the
    crush-initial-weight config option if set to 0.

    Change-Id: Iaecbdf52bd3731effa3132e61364918407116dbe
    Closes-Bug: 1764077
    (cherry picked from commit 5ea1973062a55af4d5c41da226d3d110b2b85ff6)

Frode Nordahl (fnordahl) on 2018-04-20
Changed in charm-ceph-osd:
milestone: 18.05 → 18.02
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers