[library] neutron_network provider is not idempotent

Bug #1526772 reported by Roman Sokolkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Sergey Kolekonov

Bug Description

Looks like neutron_network and neutron_subnet providers work improperly.

Getting following log messages:
Notice: /Stage[main]/Main/Neutron_network[admin_floating_net]/admin_state_up: current_value true, should be True (noop)

Environment:
- MOS 8.0 (fuel-8.0-284-2015-12-10_19-42-00.iso)
- Neutron+VxLAN

Steps to reproduce:
1) On deployed controller execute
puppet apply --noop /etc/puppet/modules/osnailyfacter/modular/openstack-network/networks.pp

Expected result:
No changes

Actual result:
Getting resource changes
Notice: /Stage[main]/Main/Neutron_network[admin_floating_net]/admin_state_up: current_value true, should be True (noop)

Full log:
root@node-1:~/lcm# puppet apply --noop /etc/puppet/modules/osnailyfacter/modular/openstack-network/networks.pp
Notice: Scope(Class[main]): MODULAR: openstack-network/networks.pp
Notice: Compiled catalog for node-1.domain.tld in environment production in 0.63 seconds
Notice: /Stage[main]/Main/Neutron_network[admin_floating_net]/admin_state_up: current_value true, should be True (noop)
Notice: /Stage[main]/Main/Neutron_network[admin_floating_net]/shared: current_value false, should be False (noop)
Notice: /Stage[main]/Main/Neutron_network[admin_floating_net]/router_external: current_value true, should be True (noop)
Notice: /Stage[main]/Main/Neutron_network[admin_internal_net]/admin_state_up: current_value true, should be True (noop)
Notice: /Stage[main]/Main/Neutron_network[admin_internal_net]/shared: current_value false, should be False (noop)
Notice: /Stage[main]/Main/Neutron_network[admin_internal_net]/router_external: current_value false, should be False (noop)
Notice: /Stage[main]/Main/Neutron_subnet[admin_internal_net__subnet]/enable_dhcp: current_value true, should be True (noop)
Notice: /Stage[main]/Main/Neutron_subnet[admin_floating_net__subnet]/enable_dhcp: current_value false, should be False (noop)
Notice: Class[Main]: Would have triggered 'refresh' from 8 events
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
Notice: Finished catalog run in 11.57 seconds

Ilya Kutukov (ikutukov)
tags: added: area-mos
tags: added: neutron
Changed in fuel:
milestone: none → 8.0
assignee: nobody → MOS Neutron (mos-neutron)
importance: Undecided → High
status: New → Confirmed
Changed in fuel:
assignee: MOS Neutron (mos-neutron) → Sergey Kolekonov (skolekonov)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix proposed to puppet-modules/puppet-neutron (mos-8.0)

Related fix proposed to branch: mos-8.0
Change author: Sergey Vasilenko <email address hidden>
Review: https://review.fuel-infra.org/14798

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Sergey Kolekonov (skolekonov) wrote :

This bug is fixed here https://review.openstack.org/#/c/238156, I will backport its latest version to MOS

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to puppet-modules/puppet-neutron (mos-8.0)

Reviewed: https://review.fuel-infra.org/14798
Submitter: Ivan Berezovskiy <email address hidden>
Branch: mos-8.0

Commit: 03c382df6a788271ea3c928d506cefdcff54576c
Author: Sergey Vasilenko <email address hidden>
Date: Thu Dec 17 16:41:02 2015

Use json output instead plain-text

Openstack CLI utilities can return warning messages while
run to stderr. It's a normal behavior for Openstack CLI.
But Puppet mixs stderr and stdout for commands.

For preventing parsing warning messages,
I propose got response from Neutron CLI as JSON if it required
and parse it by ruby JSON parser.

JSON is a more usable format for interprocess communication,
than plain-text or CSV.

Change-Id: Ibc1105bc119272715fa211ac129a366fe50cbf47
Closes-bug: #1508511
Related-bug: #1526772

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

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

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

commit f52e8280a1a5d328691d30982adc7b18c4ecd34d
Author: Sergey Kolekonov <email address hidden>
Date: Fri Dec 18 15:34:33 2015 +0300

    Fix idempotancy of neutron_network provider

    The provider was fixed in this patch Iba1105bc119272715fa211ac129a366fe50cbf47
    It's backported here https://review.fuel-infra.org/#/c/14798/

    It fixes the problem when the first letter of boolean values was changed from
    lowercase letter to capital letter and it broke idempotancy

    Change-Id: Ic41f61cce4d1dc6d0e18f20970b4fc0fdbda6640
    Closes-bug: #1526772

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Kristina Berezovskaia (kkuznetsova) wrote :

Verify on
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "429"
  build_id: "429"
  fuel-nailgun_sha: "12b15b2351e250af41cc0b10d63a50c198fe77d8"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "df16d41cd7a9445cf82ad9fd8f0d53824711fcd8"
  fuel-nailgun-agent_sha: "92ebd5ade6fab60897761bfa084aefc320bff246"
  astute_sha: "c7ca63a49216744e0bfdfff5cb527556aad2e2a5"
  fuel-library_sha: "3eaf4f4a9b88b287a10cc19e9ce6a62298cc4013"
  fuel-ostf_sha: "214e794835acc7aa0c1c5de936e93696a90bb57a"
  fuel-mirror_sha: "b62f3cce5321fd570c6589bc2684eab994c3f3f2"
  fuelmenu_sha: "85de57080a18fda18e5325f06eaf654b1b931592"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "9f0ba4577915ce1e77f5dc9c639a5ef66ca45896"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "e8e36cff332644576d7853c80b8a53d5b955420a"
(neutron+vxlan, 3 controller and 2 compute nodes)

On deployed controller execute
puppet apply --noop /etc/puppet/modules/osnailyfacter/modular/openstack-network/networks.pp
Result:
root@node-13:~# puppet apply --noop /etc/puppet/modules/osnailyfacter/modular/openstack-network/networks.pp
Notice: Scope(Class[main]): MODULAR: openstack-network/networks.pp
Notice: Compiled catalog for node-13.domain.tld in environment production in 0.37 seconds
Notice: Finished catalog run in 25.24 seconds

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