[LCM][Task idempotency] Task "primary-swift-proxy" is not idempotent

Bug #1572789 reported by Sergey Novikov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Maciej Relewicz
Mitaka
Fix Released
High
Maciej Relewicz
Newton
Fix Committed
High
Maciej Relewicz

Bug Description

Steps to reproduce:
 1. deploy env with 1 comtroller + 1 compute + 1 cinder nodes
 2. Rerun task "primary-swift-proxy" against controller node
Expected results: No resource changes
Actual result: The following resources were changed
      - File[/var/lib/puppet/concat/_etc_rsyncd.conf/fragments/10_account_frag-account]
      - File[/var/lib/puppet/concat/_etc_rsyncd.conf/fragments/10_object_frag-object]
      - File[/var/lib/puppet/concat/_etc_rsyncd.conf/fragments/10_swift_server_frag-swift_server]
      - Exec[concat_/etc/rsyncd.conf]
      - File[/etc/rsyncd.conf]
      - File[/var/lib/puppet/concat/_etc_rsyncd.conf/fragments/10_container_frag-container]
      - File[/var/lib/puppet/concat/_etc_rsyncd.conf/fragments/10_swift_backups_frag-swift_backups]
      - Exec[swift-dispersion-populate]
Reproducibility:
 100%
Description of the environment:
env was built from ISO MOS 9.0 #225
Additional information:
puppet's output: http://paste.openstack.org/show/494903/

Changed in fuel:
importance: Undecided → High
assignee: nobody → Fuel Mixed (fuel-mixed-team)
milestone: none → 9.0
tags: added: feature-granular-task-lcm-readiness in-stable-mitaka
Maciej Relewicz (rlu)
Changed in fuel:
assignee: Fuel Mixed (fuel-mixed-team) → Maciej Relewicz (rlu)
status: New → Confirmed
tags: added: area-library
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/310285

Changed in fuel:
status: Confirmed → In Progress
Changed in fuel:
assignee: Maciej Relewicz (rlu) → Alex Schultz (alex-schultz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

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

commit 975d8ef0fb352f689f78ecb9c33e0aef4062d45e
Author: Maciej Relewicz <email address hidden>
Date: Tue Apr 26 19:59:21 2016 +0200

    Fix task 'primary-swift-proxy' idempotency.

    Due to issue in concat module, which is used by puppet rsync module, we
    have to merge swift/proxy.pp and swift/storage.pp tasks. Concat module
    have purge set by default to true. So each call rsync::server::module
    cleans settings set by previous call. In our case call in storage.pp
    cleans settings set call in proxy.pp. As workaround we need to merge all
    calls related with rsync module into one task.

    Change-Id: I49e946144df2f9913320fd996663f89926096907
    Closes-Bug: #1572789

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/316005

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

Reviewed: https://review.openstack.org/316005
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=2cfaf299bc8786d190dbff0bbc25add2f846d5ef
Submitter: Jenkins
Branch: stable/mitaka

commit 2cfaf299bc8786d190dbff0bbc25add2f846d5ef
Author: Maciej Relewicz <email address hidden>
Date: Tue Apr 26 19:59:21 2016 +0200

    Fix task 'primary-swift-proxy' idempotency.

    Due to issue in concat module, which is used by puppet rsync module, we
    have to merge swift/proxy.pp and swift/storage.pp tasks. Concat module
    have purge set by default to true. So each call rsync::server::module
    cleans settings set by previous call. In our case call in storage.pp
    cleans settings set call in proxy.pp. As workaround we need to merge all
    calls related with rsync module into one task.

    Change-Id: I49e946144df2f9913320fd996663f89926096907
    Closes-Bug: #1572789

Revision history for this message
Dmitry Nikishov (nikishov-da) wrote :

Is merging swift-proxy and swift-storage tasks is a good thing at all? It seems to make it harder for plugin authors to customize deployment graph.

I'd suggest making something along those lines:

$rsync_conf_name = '/etc/rsyncd.conf'
$rsync_conf_safe_name = regsubst($rsync_conf_name, '[/:]', '_', 'G')
$concatdir = $::concat_basedir
$fragdir = "${concatdir}/${rsync_conf_safe_name}"

File <| name == "${fragdir}/fragments" |> {
  purge => false,
}

in openstack_tasks/examples/swift/proxy.pp and openstack_tasks/examples/swift/storage.pp
This manifest snippet makes sure that the directory with concat fragments for rsyncd doesn't get purged on each puppet run. I guess, the bug in concat module should be filed as well.

Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

just ignore my previous comment #5

Revision history for this message
Sergey Novikov (snovikov) wrote :

Verified on 9.0 MOS iso #366

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.