[library][idempotency] neutron-server is managed at least by two tasks

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

Bug Description

Service "neutron-server" defined in two tasks:
- openstack-network/plugins/ml2.pp
- openstack-network/server-config.pp

Which leads to idempotency problem in "openstack-network/server-config.pp".

This task tries to stop already started "neutron-server".

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

Steps to reproduce:
1) Deploy MOS 8.0 with Neutron+VxLAN
2) On controller execute:
puppet apply --noop /etc/puppet/modules/osnailyfacter/modular/openstack-network/server-config.pp

Expected result:
Neutron-server is still running

Actual result:
Neutron-server has been stopped

Logs:
root@node-1:~/lcm# puppet apply /etc/puppet/modules/osnailyfacter/modular/openstack-network/server-config.pp
Notice: Scope(Class[main]): MODULAR: openstack-network/server-config.pp
Warning: Scope(Class[Neutron::Server]): Could not look up qualified variable '::neutron::params::server_service'; class ::neutron::params has not been evaluated
Notice: Compiled catalog for node-1.domain.tld in environment production in 1.19 seconds
Notice: /Stage[main]/Main/Tweaks::Ubuntu_service_override[neutron-server]/File[create_neutron-server_override]/content: content changed '{md5}d41d8cd98f00b204e9800998ecf8427e' to '{md5}3c78b35502b2693fefdfc51cba3a53a5'
Notice: /Stage[main]/Main/Tweaks::Ubuntu_service_override[neutron-server]/Exec[remove_neutron-server_override]/returns: executed successfully
Notice: /Stage[main]/Neutron::Server/Service[neutron-server]/ensure: ensure changed 'running' to 'stopped'
Notice: Finished catalog run in 3.49 seconds

Ilya Kutukov (ikutukov)
Changed in fuel:
assignee: nobody → Fuel Library Team (fuel-library)
milestone: none → 8.0
importance: Undecided → High
status: New → Confirmed
tags: added: area-library
tags: added: neutron
Revision history for this message
Roman Sokolkov (rsokolkov) wrote :

Also Exec[waiting-for-neutron-api] should be run only on refresh.

tags: added: team-bugfix
Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Dmitry Bilunov (dbilunov)
Revision history for this message
Sergey Vasilenko (xenolog) wrote :

> Which leads to idempotency problem in "openstack-network/server-config.pp".
> This task tries to stop already started "neutron-server".

This is not a problem in a real life, because neutron-server will be started an the next (plugin) task.

Revision history for this message
Sergey Vasilenko (xenolog) wrote :

> Steps to reproduce:
> 1) Deploy MOS 8.0 with Neutron+VxLAN
> 2) On controller execute:
> puppet apply --noop /etc/puppet/modules/osnailyfacter/modular/openstack-network/server-config.pp
>
> Expected result:
> Neutron-server is still running
>
> Actual result:
> Neutron-server has been stopped

I does not agree with provided "expected result"
Task Neutron-server-config NEVER run without plugin task directly after one.
Full dependency graph You can see at
https://specs.openstack.org/openstack/fuel-specs/specs/8.0/make-neutron-deployment-task-more-granular.html

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

Changed in fuel:
status: Confirmed → In Progress
Changed in fuel:
assignee: Dmitry Bilunov (dbilunov) → Stanislav Makar (smakar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

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

commit 2cb45f0ed5b1eac8e164ae73f49876f2a6a62d7b
Author: Dmitry Bilunov <email address hidden>
Date: Mon Dec 28 10:49:07 2015 +0300

    Refactor openstack-network: move ml2 plugin into server-config.pp

    Currently openstack-network-server-config task is not idempotent - it
    unconditionally stops the neutron-server service upon invocation relying
    on plugins/ml2.pp to bring it up once the plugin config is materialized.

    This patch refactors openstack-network/{server-config,plugins/ml2}.pp so
    the plugin configuration is now an essential part of server-config.pp.
    It should make sense - anyway, you can't start neutron without a plugin

    Change-Id: I02ab01ea32b15cbe8139aad0939c969e8a97bd09
    Closes-Bug: 1526677

Changed in fuel:
status: In Progress → Fix Committed
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/266334

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-library (master)

Change abandoned by Dmitry Bilunov (<email address hidden>) on branch: master
Review: https://review.openstack.org/266334
Reason: wrong branch

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

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/266732

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-library (stable/8.0)

Change abandoned by Dmitry Bilunov (<email address hidden>) on branch: stable/8.0
Review: https://review.openstack.org/266732
Reason: duplicate of 261461

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

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/267483

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

Reviewed: https://review.openstack.org/267483
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=ea69a7adb54426a9636c488201d826873bef8648
Submitter: Jenkins
Branch: stable/8.0

commit ea69a7adb54426a9636c488201d826873bef8648
Author: Dmitry Bilunov <email address hidden>
Date: Thu Jan 14 14:33:47 2016 +0300

    Refactor openstack-network: move ml2 plugin into server-config.pp

    Currently openstack-network-server-config task is not idempotent - it
    unconditionally stops the neutron-server service upon invocation relying
    on plugins/ml2.pp to bring it up once the plugin config is materialized.

    This patch refactors openstack-network/{server-config,plugins/ml2}.pp so
    the plugin configuration is now an essential part of server-config.pp.
    It should make sense - anyway, you can't start neutron without a plugin

    Change-Id: I02ab01ea32b15cbe8139aad0939c969e8a97bd09
    Closes-Bug: 1526677

tags: added: on-verification
Revision history for this message
Dmitriy Kruglov (dkruglov) wrote :

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

ISO details:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "496"
  build_id: "496"
  fuel-nailgun_sha: "934c2d11b234193c6ac8e41cd1388df0ed3583e0"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "e40bcfbb1f5518d7a464cc330909cf09b84e7c20"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "b91e96e848057be4acadd10c2b55a6529387fe51"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "351d568fa3b3e4dd062054b91d766aa54d379867"
  fuelmenu_sha: "234cb4cbb30fbd2df00f388c28f31606d9cae15f"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "6b993b3004e8d97d840b672d6c1d44c320975cd9"

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.