update_dnsmasq task fails on duplcate/shared admin networks

Bug #1526360 reported by Aleksandr Didenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Aleksandr Didenko

Bug Description

After introducing the possibility to share L2/L3 parameters between networks it became possible to use the same admin network in different nodegroups. So if we use the same admin network parameters, then update_dnsmasq will fail:

 # fuel task | grep update_dnsmasq
 14 | error | update_dnsmasq | None | 100 | cf65a5ac-88c7-4c99-b3d9-9c6285d4585e

puppet.log in mcollective container:

 2015-12-15 14:27:16 +0000 Scope(Class[main]) (debug): Trying to create nailgun::dnsmasq::dhcp_range resource {"range_fa3d8bf8"=>{"file_header"=>"# Generated automatically by puppet\n# Environment: zzz\n# Nodegroup: t2\n# IP range: [\"9.9.9.2\", \"9.9.9.254\"]", "dhcp_start_address"=>"9.9.9.2", "dhcp_end_address"=>"9.9.9.254", "dhcp_netmask"=>"255.255.255.0", "dhcp_gateway"=>"9.9.9.1"}}
 2015-12-15 14:27:16 +0000 Puppet (err): Duplicate declaration: Nailgun::Dnsmasq::Dhcp_range[range_fa3d8bf8] is already declared; cannot redeclare at /etc/puppet/modules/nailgun/examples/dhcp-ranges.pp:18 on node fuel.domain.tld

Steps to reproduce:

1. Create new environment
2. Create 3 new node network groups
3. Delete one of newly created groups
4. Check "fuel task" on Fuel node

Expected result:
update_dnsmasq task is in "ready" state

Actual result:
update_dnsmasq task is in "error" state

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/257941

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

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

commit 8cfff4883c636a3259f120ae43bea49eb1707b93
Author: Aleksandr Didenko <email address hidden>
Date: Tue Dec 15 16:05:52 2015 +0100

    Do not create duplicate dnsmasq_dhcp_ranges

    After implementing the possibility to share L2/L3 parameters
    between networks it became possible to have duplicate DHCP ranges.
    So we need to check for already created resources in
    create_dnsmasq_dhcp_ranges function to not create duplicates.

    Change-Id: I5a48a8130bb63a77551ef06cb3bdf67c1bf203aa
    Closes-bug: #1526360

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Dmitriy Kruglov (dkruglov) wrote :

Verified on MOS 8.0, build 405. The issue is fixed.

ISO details:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "405"
  build_id: "405"
  fuel-nailgun_sha: "9ebbaa0473effafa5adee40270da96acf9c7d58a"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "df16d41cd7a9445cf82ad9fd8f0d53824711fcd8"
  fuel-nailgun-agent_sha: "92ebd5ade6fab60897761bfa084aefc320bff246"
  astute_sha: "c7ca63a49216744e0bfdfff5cb527556aad2e2a5"
  fuel-library_sha: "037ca95820aac8214fe65e7e0461074e1cf6891c"
  fuel-ostf_sha: "214e794835acc7aa0c1c5de936e93696a90bb57a"
  fuel-mirror_sha: "8bb8c70efc61bcf633e02d6054dbf5ec8dcf6699"
  fuelmenu_sha: "2a0def56276f0fc30fd949605eeefc43e5d7cc6c"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "9f0ba4577915ce1e77f5dc9c639a5ef66ca45896"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "62573cb2a8aa54845de9303b4a30935a90e1db61"

Changed in fuel:
status: Fix Committed → Fix Released
tags: removed: on-verification
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.