cobbler does not properly configure dhcp_gateway

Bug #1512721 reported by Vladimir Khlyunev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Critical
Matthew Mosesohn
7.0.x
Won't Fix
Critical
Matthew Mosesohn
8.0.x
Fix Released
Critical
Matthew Mosesohn
Mitaka
Invalid
Critical
Matthew Mosesohn

Bug Description

ISO 7.0-301 + MU1

Steps to reproduce:
1) Deploy 7.0 fuel
2) Change dhcp_gateway property in fuelmenu AFTER deployment
3) dockerctl shell cobbler cat /etc/dnsmasq.conf
OR
3) boot a slave and look at default_gw received by dhcp

Expected result:
New gateway passed to the slave/dnsmasq config was changed

Actual result:
Nothing changed, slave got old gateway.

Root cause:
cobbler::server doesn't have a dhcp_gateway parameter in its class definition

Revision history for this message
Vladimir Khlyunev (vkhlyunev) wrote :

I marked this bug as critical because for some reason dhcp_gateway was changed after rebuilding dockers - I will file a bug for it a little later.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Changed in fuel:
assignee: nobody → Matthew Mosesohn (raytrac3r)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/7.0)

Fix proposed to branch: stable/7.0
Review: https://review.openstack.org/241304

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/241225
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=ec7b42d703c6c850236d36b9f8f815a4e9db887a
Submitter: Jenkins
Branch: master

commit ec7b42d703c6c850236d36b9f8f815a4e9db887a
Author: Matthew Mosesohn <email address hidden>
Date: Tue Nov 3 17:34:22 2015 +0300

    Pass dhcp_gateway to cobbler::server class

    dhcp_gateway was somehow defaulting back to $::ipaddress
    instead of matching the values from fuel_settings.

    This corrects the scenario where a custom dhcp_gateway
    is configured, but not used.

    Change-Id: I3d2bb485f30e6c7b8e103181b98b5139cc651ff0
    Closes-Bug: #1512721

Dmitry Pyzhov (dpyzhov)
tags: added: area-library
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

There's a related issue in fuelmenu in --save-only mode where it resets ADMIN_NETWORK section configuration. I'll create a separate bug to handle that.

Revision history for this message
Vasily Gorin (vgorin) wrote :
Revision history for this message
Alexey Stupnikov (astupnikov) wrote :

Change to Fixed Commited for 7.0-MU2, since Matthew Mosesohn told me that patch is there and waiting for a merge.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/7.0)

Reviewed: https://review.openstack.org/241304
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=4d0222f905894f16948d27a32633ba9bd9ffe2c2
Submitter: Jenkins
Branch: stable/7.0

commit 4d0222f905894f16948d27a32633ba9bd9ffe2c2
Author: Matthew Mosesohn <email address hidden>
Date: Tue Nov 3 17:34:22 2015 +0300

    Pass dhcp_gateway to cobbler::server class

    dhcp_gateway was somehow defaulting back to $::ipaddress
    instead of matching the values from fuel_settings.

    This corrects the scenario where a custom dhcp_gateway
    is configured, but not used.

    Change-Id: I3d2bb485f30e6c7b8e103181b98b5139cc651ff0
    Closes-Bug: #1512721

Denis Puchkin (dpuchkin)
tags: added: on-verification
Revision history for this message
Denis Puchkin (dpuchkin) wrote :

reproduced on 7.0 with the https://review.openstack.org/241304 patch

# dockerctl shell cobbler grep dhcp_gateway /etc/fuel/astute.yaml
  "dhcp_gateway": "10.20.0.2"
# dockerctl shell cobbler grep router /etc/dnsmasq.conf
dhcp-option=net:internal,option:router,10.20.0.2
# fuelmenu (change dhcp_gateway to 10.20.0.222)
# dockerctl shell cobbler grep router /etc/dnsmasq.conf
dhcp-option=net:internal,option:router,10.20.0.2
# dockerctl shell cobbler grep dhcp_gateway /etc/fuel/astute.yaml
  "dhcp_gateway": "10.20.0.222"

slave got 10.20.0.2 gateway

after stop-start cobbler contaner, /etc/dnsmasq.conf was re-generated and contain the correct dhcp_gateway

Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Reverting the fix for 7.0 because it doesn't fix the issue and causes https://bugs.launchpad.net/fuel/7.0.x/+bug/1529663

Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

The fix is reverted - https://review.openstack.org/#/c/267658/2, the bug is retargeted to 7.0-mu-3

Revision history for this message
Maksym Strukov (unbelll) wrote :

Not fixed in 8.0-493

Steps:
1. Install Fuel
2. Execute `fuelmenu` and change dhcp_gw
3. Save and Quit
4. Check `dockerctl shell cobbler cat /etc/dnsmasq.d/default.conf | grep router`

Actual:
dhcp gw was not changed

5. Execute `dockerctl shell cobbler cobbler sync`
6. Check `dockerctl shell cobbler cat /etc/dnsmasq.d/default.conf | grep router`
Actual:
dhcp_gw was not changed

7. Execute `dockerctl restart cobbler
8. Check `dockerctl shell cobbler cat /etc/dnsmasq.d/default.conf | grep router`

Actual:
dhcp_gw was changed

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Confirmed
milestone: 8.0 → none
Changed in fuel:
milestone: none → 9.0
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

http://paste.openstack.org/show/wTTOQi8oXwy016WL1GAp/ on 9.0 is good. I'll try to reproduce on 8.0.

Changed in fuel:
status: Confirmed → Invalid
Revision history for this message
Vladimir Khlyunev (vkhlyunev) wrote :

@Matt: Did you used fuelmenu for changing dhcp-gateway >>>without any manual restarts<<<? The bug is about applying changed configuration without restarts, not about applying config at all? (I just not able to check 9.0)

tags: added: team-bugfix
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

This is not broke in Fuel 8.0 either: http://paste.openstack.org/show/485625/

Vladimir simply didn't restart cobbler container. You cannot apply any config changes within containers without restarting them.

tags: added: on-verification
Revision history for this message
Andrey Sledzinskiy (asledzinskiy) wrote :

verified on 8.0-506

Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Won't Fix for 7.0-updates - there is good workaround for this issue - just to restart container to get the new config setting working. We will document it as known issue in 7.0 MU release notes.

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.