Use str_replace for etc/hosts

Bug #1772673 reported by Oliver Walsh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Natal Ngétal

Bug Description

Similiar to https://bugs.launchpad.net/tripleo/+bug/1772071.

The script that writes /etc/hosts relies on environment variables to pass the list of host entries: http://git.openstack.org/cgit/openstack/tripleo-heat-templates/tree/scripts/hosts-config.sh?id=1eaa019a1f1fbf126c8d9cbffdb608a02d96f3f7#n38

On large scale deployments this could exceed the maximum environment block size. Refactoring this to use str_replace in heat should avoid the limit.

Oliver Walsh (owalsh)
tags: added: ocata-backport-potential pike-backport-potential
Steven Hardy (shardy)
Changed in tripleo:
importance: Undecided → High
milestone: none → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-2
Oliver Walsh (owalsh)
description: updated
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Kamil Sambor (ksambor)
Changed in tripleo:
assignee: nobody → Kamil Sambor (ksambor)
Changed in tripleo:
milestone: stein-1 → stein-2
Revision history for this message
Jiří Stránský (jistr) wrote :

This seems to have been solved by https://review.openstack.org/#/c/569550

Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
Oliver Walsh (owalsh) wrote :

That was ssh_known_hosts. /etc/hosts needs a similar fix.

Changed in tripleo:
status: Fix Released → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/616157

Changed in tripleo:
assignee: Kamil Sambor (ksambor) → Natal Ngétal (hobbestigrou)
status: Triaged → In Progress
Revision history for this message
Natal Ngétal (hobbestigrou) wrote :

A patch is ready to be review:

https://review.openstack.org/#/c/616157/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/616157
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=6e901b3d6b9dd6f97e4ed8ad49ebd023ec5ca1fc
Submitter: Zuul
Branch: master

commit 6e901b3d6b9dd6f97e4ed8ad49ebd023ec5ca1fc
Author: Natal Ngétal <email address hidden>
Date: Wed Nov 7 11:52:36 2018 +0100

    [Templates] Use str_replace for hosts.

    There is a limit to how long input data can be for the heat script hook.

    Change-Id: I48286e300874d7d8311d2ef14f95b6fc87ed579c
    Closes-Bug: #1772673

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/618106

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/618107

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/618108

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/618109

Revision history for this message
Natal Ngétal (hobbestigrou) wrote :

I have also cherry-pick this patch in all stables branches.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/rocky)

Reviewed: https://review.openstack.org/618109
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=bc8cb172933c673064225bf7da6f0f73ea32ca52
Submitter: Zuul
Branch: stable/rocky

commit bc8cb172933c673064225bf7da6f0f73ea32ca52
Author: Natal Ngétal <email address hidden>
Date: Wed Nov 7 11:52:36 2018 +0100

    [Templates] Use str_replace for hosts.

    There is a limit to how long input data can be for the heat script hook.

    Change-Id: I48286e300874d7d8311d2ef14f95b6fc87ed579c
    Closes-Bug: #1772673
    (cherry picked from commit 6e901b3d6b9dd6f97e4ed8ad49ebd023ec5ca1fc)

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

Reviewed: https://review.openstack.org/618108
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=cb8bfdfc9060022dfc72c24e16a037a091506594
Submitter: Zuul
Branch: stable/queens

commit cb8bfdfc9060022dfc72c24e16a037a091506594
Author: Natal Ngétal <email address hidden>
Date: Wed Nov 7 11:52:36 2018 +0100

    [Templates] Use str_replace for hosts.

    There is a limit to how long input data can be for the heat script hook.

    Change-Id: I48286e300874d7d8311d2ef14f95b6fc87ed579c
    Closes-Bug: #1772673
    (cherry picked from commit 6e901b3d6b9dd6f97e4ed8ad49ebd023ec5ca1fc)

tags: added: in-stable-queens
tags: added: edge
tags: added: rocky-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/pike)

Reviewed: https://review.openstack.org/618107
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=2ef90c3ef0eea03a7d0cc3acc9f2bec49cca7ae6
Submitter: Zuul
Branch: stable/pike

commit 2ef90c3ef0eea03a7d0cc3acc9f2bec49cca7ae6
Author: Natal Ngétal <email address hidden>
Date: Wed Nov 7 11:52:36 2018 +0100

    [Templates] Use str_replace for hosts.

    There is a limit to how long input data can be for the heat script hook.

    Change-Id: I48286e300874d7d8311d2ef14f95b6fc87ed579c
    Closes-Bug: #1772673
    (cherry picked from commit 6e901b3d6b9dd6f97e4ed8ad49ebd023ec5ca1fc)

tags: added: in-stable-pike
Revision history for this message
Natal Ngétal (hobbestigrou) wrote :

I have made also a backport for ocata:

https://review.openstack.org/#/c/618106/

Please can you review this also? I don't know if it's necessary also for ocata.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.2.0

This issue was fixed in the openstack/tripleo-heat-templates 10.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.1.0

This issue was fixed in the openstack/tripleo-heat-templates 8.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (stable/ocata)

Change abandoned by Natal Ngétal (<email address hidden>) on branch: stable/ocata
Review: https://review.openstack.org/618106
Reason: The ocata version is not maintained it's extended maintenance.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.1.0

This issue was fixed in the openstack/tripleo-heat-templates 9.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 7.0.18

This issue was fixed in the openstack/tripleo-heat-templates 7.0.18 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.