Bug 1403795 - DHCP template interfaces are in error during OSP10 deployment.
Summary: DHCP template interfaces are in error during OSP10 deployment.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: diskimage-builder
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: 11.0 (Ocata)
Assignee: Ben Nemec
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks: 1937624
TreeView+ depends on / blocked
 
Reported: 2016-12-12 11:38 UTC by Sofer Athlan-Guyot
Modified: 2021-03-11 07:45 UTC (History)
11 users (show)

Fixed In Version: diskimage-builder-1.28.0-1.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1937624 (view as bug list)
Environment:
Last Closed: 2017-08-11 16:38:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 409947 0 None MERGED Use %i instead of %I in dhcp-interface@.service 2021-02-03 15:02:05 UTC
Red Hat Product Errata RHEA-2017:1245 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC

Description Sofer Athlan-Guyot 2016-12-12 11:38:52 UTC
Description of problem: The system for making udev wanting dhcp interface is not working.

The intended purpose in this review is non-working, so the associated race described in https://bugs.launchpad.net/diskimage-builder/+bug/1294803 may still be there.

Version-Release number of selected component (if applicable): OSP10


Steps to Reproduce:
1. Runing an upgrade from OSP9 to OSP10
2. Inspect all the services using systemctl list-units

Some are in errors:

    ● dhcp-interface       loaded    failed     failed DHCP interface br-ex
    ● dhcp-interface loaded    failed     failed DHCP interface br-isolated
    ● dhcp-interface  loaded    failed     failed DHCP interface ovs-system

Doing a status of one of the script gives us this:

    sudo systemctl status dhcp-interface

    Dec 08 17:24:20 controller-0.localdomain dhcp-all-interfaces.sh[9124]: cat: /sys/class/net/br/isolated/addr_assign_type: No such file or directory

    The parameter br-isolated has been splited in two to become
    /br/isolated/ which doesn't exists.

Modifying /usr/lib/systemd/system/dhcp-interface\@.service like this
(notice that %I becomes %i)

    diff -ruN ~/dhcp-interface\@.service /usr/lib/systemd/system/dhcp-interface\@.service
    --- /home/heat-admin/dhcp-interface@.service    2016-12-09 12:26:54.017068606 +0000
    +++ /usr/lib/systemd/system/dhcp-interface@.service     2016-12-09 12:27:10.827669175 +0000
    @@ -1,14 +1,14 @@
     [Unit]
    -Description=DHCP interface %I
    +Description=DHCP interface %i
     After=network.service network.target

    -ConditionPathExists=!/etc/sysconfig/network-scripts/ifcfg-%I
    +ConditionPathExists=!/etc/sysconfig/network-scripts/ifcfg-%i

     [Service]
     Type=oneshot
     User=root
    -ExecStartPre=/usr/local/sbin/dhcp-all-interfaces.sh %I
    -ExecStart=/sbin/ifup %I
    +ExecStartPre=/usr/local/sbin/dhcp-all-interfaces.sh %i
    +ExecStart=/sbin/ifup %i
     RemainAfterExit=true

     [Install]

Make the script run properly.

This has been seen debugging this bug
https://bugzilla.redhat.com/show_bug.cgi?id=1403080#c4

Actual results: No error on the dhcp interface using the template
system.

Additional info:

As described there
https://www.freedesktop.org/software/systemd/man/systemd.unit.html the
'%I' specifier should be the unescaped name. But it looks like '-' are
replaced by '/' to make a path. This replacement doesn't happen when
using '%i'.

Comment 1 Ben Nemec 2016-12-12 21:50:15 UTC
Fix proposed upstream.

Comment 2 Ben Nemec 2016-12-14 17:49:53 UTC
Sofer, could you take a look at Ian's comments on the upstream review?  https://review.openstack.org/#/c/409947/  I'm hoping that since you investigated this originally maybe you can give him a more intelligent response than I can (my inclination is to say "because systemd", which is less than helpful ;-).

Comment 3 Bob Fournier 2016-12-14 23:02:42 UTC
Ben - I think the fix you made is correct and have updated the upstream review but Sofer may have more to add.

Comment 4 Sofer Athlan-Guyot 2017-03-20 13:36:16 UTC
Hi Bob,

was certain to have replied to this one.  As I put in the upstream review everything is fine with the latest version of the review.

Merged upstream, moving to post.

Comment 5 Ben Nemec 2017-03-20 14:52:06 UTC
Since the fix merged almost two months ago it should be in the downstream puddles at this point.  This should be available for QA to test now.

However, I'm not sure how it will work in an upgrade context.  The previously deployed image isn't going to have the fix, and because this file is provided by an element there's no good way to update it.  We may only be able to fix it for new deployments.

Comment 8 Amit Ugol 2017-05-15 05:06:12 UTC
Hi,
only issue is the following one on the controller node:

● dhcp-interface                                              loaded failed failed    DHCP interface ovs-system

Is it related to the original bug or is it a new thing?

Comment 9 errata-xmlrpc 2017-05-17 19:50:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1245

Comment 10 Ben Nemec 2017-05-18 17:18:17 UTC
I'm inclined to say that's okay.  I wouldn't expect DHCP on the ovs-system interface to work.  If br-ex (or any other bridge interface with a - in the name) is working then the problem this bug was opened for is fixed.

Comment 13 Jon Schlueter 2017-08-11 16:38:53 UTC
moving bug state back to CLOSED ERRATA, if a backport to OSP 10 is desired for this issue please clone this bug and target it for OSP 10 release.


Note You need to log in before you can comment on or make changes to this bug.