Fix whitespace for interfaces file with two interfaces and IPv6

Bug #1339888 reported by Rick Harris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Rick Harris

Bug Description

If you have more than one interface and IPv6 is enabled, then the interfaces file will be broken: the 'auto` line will be on the same line as the previous stanza's gateway:

auto eth0
iface eth0 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    gateway 192.168.0.1 auto eth1
iface eth1 inet static
    ...

vs

auto eth0
iface eth0 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    gateway 192.168.0.1
auto eth1
iface eth1 inet static
    ...

The solution is fix the Jinja whitespace control in the template.

Changed in nova:
assignee: nobody → Rick Harris (rconradharris)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/105881
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=383d0c945e4874d7e66ad8ed03fe6556ac7c03d8
Submitter: Jenkins
Branch: master

commit 383d0c945e4874d7e66ad8ed03fe6556ac7c03d8
Author: Rick Harris <email address hidden>
Date: Tue May 27 16:09:40 2014 -0500

    Fix interfaces template for two interfaces and IPv6

    If you have more than one interface and IPv6 enabled, then the interfaces file
    emitted would have the incorrect syntax: the `auto eth1` line would be
    appended to the end of the `gateway` line of the previous stanza.

    This was a result of improper whitespace control in the Jinja template which
    this patch fixes.

    In order to prevent regressions, this patch swaps out the existing tests with
    corresponding tests that are whitespace sensitive. This is important because
    it's difficult to tweak Jinja templates in a way that fixes the whitespace
    for one scenario while not breaking another.

    Closes-Bug: 1339888

    Change-Id: Id5566ea2f93ee1a6b8bc42e83bc64a1c6a09e680

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-2 → 2014.2
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.