"null" inserted in config file when value is None

Bug #1830967 reported by Zane Bitter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-apply-config
Fix Released
Undecided
Zane Bitter

Bug Description

When rendering a config file, if a value supplied is None then the literal string "null" (JSON rendering of None) gets inserted into the config file. This is pretty much never what you want.

This was the cause of a regression when the heat-config agent started configuring a region_name in os-collect-config.conf: https://storyboard.openstack.org/#!/story/2005797

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-apply-config (master)

Fix proposed to branch: master
Review: https://review.opendev.org/662082

Changed in os-apply-config:
assignee: nobody → Zane Bitter (zaneb)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-apply-config (master)

Reviewed: https://review.opendev.org/662082
Committed: https://git.openstack.org/cgit/openstack/os-apply-config/commit/?id=75d527ab8fd13185f8db05ad69c43b3c89e06dc3
Submitter: Zuul
Branch: master

commit 75d527ab8fd13185f8db05ad69c43b3c89e06dc3
Author: Zane Bitter <email address hidden>
Date: Wed May 29 15:57:42 2019 -0400

    Don't render None as "null"

    In a config file you never want the string "null" in place of a null
    value. Just render an empty string instead.

    Change-Id: Ibe145c4929d4944cd8d51c07a64aee6fd5f831f2
    Closes-Bug: #1830967
    Story: 2005797

Changed in os-apply-config:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-apply-config (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/664747

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-apply-config (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/664748

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-apply-config (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/664749

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-apply-config (stable/stein)

Reviewed: https://review.opendev.org/664747
Committed: https://git.openstack.org/cgit/openstack/os-apply-config/commit/?id=e817b6d0ca8f3d767cf4978968056b53db621521
Submitter: Zuul
Branch: stable/stein

commit e817b6d0ca8f3d767cf4978968056b53db621521
Author: Zane Bitter <email address hidden>
Date: Wed May 29 15:57:42 2019 -0400

    Don't render None as "null"

    In a config file you never want the string "null" in place of a null
    value. Just render an empty string instead.

    Change-Id: Ibe145c4929d4944cd8d51c07a64aee6fd5f831f2
    Closes-Bug: #1830967
    Story: 2005797
    (cherry picked from commit 75d527ab8fd13185f8db05ad69c43b3c89e06dc3)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-apply-config (stable/rocky)

Reviewed: https://review.opendev.org/664748
Committed: https://git.openstack.org/cgit/openstack/os-apply-config/commit/?id=07165a907a01408485526950739183a6154f6515
Submitter: Zuul
Branch: stable/rocky

commit 07165a907a01408485526950739183a6154f6515
Author: Zane Bitter <email address hidden>
Date: Wed May 29 15:57:42 2019 -0400

    Don't render None as "null"

    In a config file you never want the string "null" in place of a null
    value. Just render an empty string instead.

    Change-Id: Ibe145c4929d4944cd8d51c07a64aee6fd5f831f2
    Closes-Bug: #1830967
    Story: 2005797

    (cherry picked from commit 75d527ab8fd13185f8db05ad69c43b3c89e06dc3)

tags: added: in-stable-rocky
tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-apply-config (stable/queens)

Reviewed: https://review.opendev.org/664749
Committed: https://git.openstack.org/cgit/openstack/os-apply-config/commit/?id=ad29f1d44923d12c8c91e6389fda6535653dac2c
Submitter: Zuul
Branch: stable/queens

commit ad29f1d44923d12c8c91e6389fda6535653dac2c
Author: Zane Bitter <email address hidden>
Date: Wed May 29 15:57:42 2019 -0400

    Don't render None as "null"

    In a config file you never want the string "null" in place of a null
    value. Just render an empty string instead.

    Change-Id: Ibe145c4929d4944cd8d51c07a64aee6fd5f831f2
    Closes-Bug: #1830967
    Story: 2005797
    (cherry picked from commit 75d527ab8fd13185f8db05ad69c43b3c89e06dc3)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-apply-config 9.1.2

This issue was fixed in the openstack/os-apply-config 9.1.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-apply-config 8.3.2

This issue was fixed in the openstack/os-apply-config 8.3.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-apply-config 10.4.0

This issue was fixed in the openstack/os-apply-config 10.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-apply-config stein-eol

This issue was fixed in the openstack/os-apply-config stein-eol 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.