Task "apache" is not idempotent. Breaks horizon and keystone

Bug #1522857 reported by Roman Sokolkov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Dmitry Bilunov

Bug Description

Task "apache" is not idempotent. For some reason it breaks Horizon and Keystone.

Environment:
- Fuel 7.0
- Controller+Compute

Steps to reproduce:
1) Deploy Controller+compute env
2) Exeucte "fuel node --node <controllers> --task apache"

Expected result:
Horizon and keystone work.

Actual result:
Horizon gives - Not Found The requested URL /horizon was not found on this server.
Keystone gives - Authorization Failed: Not Found (HTTP 404)

Changed in fuel:
milestone: none → 8.0
importance: Undecided → High
status: New → Confirmed
tags: added: area-library customer-found
Changed in fuel:
assignee: nobody → Fuel Library Team (fuel-library)
Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Dmitry Bilunov (dbilunov)
Revision history for this message
Dmitry Bilunov (dbilunov) wrote :

Horizon and Keystone stop working because deployment/puppet/osnailyfacter/modular/apache/apache.pp sets purge_configs to "true", which deletes everything inside /etc/apache2/sites-{enabled,available}/. puppet-keystone (keystone::wsgi::apache) and puppet-horizon (horizon::wsgi::apache) should be notified on purge and regenerate the config files.

Revision history for this message
Dmitry Bilunov (dbilunov) wrote :

vkuklin suggests to disable purge_configs

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

I didn't agree, task can be idempotent only if configs generated from scratch by puppet-apache module, so notify other resources is the right way and this technic should be implemented.

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

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

commit f0e5a407edc917fab2c23ac27438e96947933584
Author: Dmitry Bilunov <email address hidden>
Date: Mon Dec 14 11:57:06 2015 +0300

    Disable apache's purge_configs option

    Successive calls to "apache" fuel task results in a non-working Horizon
    and Keystone due to purge_configs option set to true which wipes the
    contents of several directories inside /etc/apache2/

    Fuel runs puppet independently for each "module" so it does not seem
    possible to utilize puppet's relationship metaparameters and other
    ordering manipulation tools to make sure that all config generators
    get reexecuted at this point.

    It seems reasonable just to disable `purge_configs' option since
    /etc/apache2/ directory structure already implements a framework
    for enabling/disabling entities such as virtual hosts, configuration
    snippets and modules.

    Manifests change the default distro's MPM configuration, so while
    the whole directory is not purge we still need to purge vanilla
    *mpm* files.

    Change-Id: I974ef1423187d908684fa213122e8ba314cac917
    Closes-Bug: 1522857

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

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

commit 356545e1a181302b3b18be52bd92e852cbd8fd16
Author: Maksim Malchuk <email address hidden>
Date: Thu Dec 17 20:21:02 2015 +0300

    Failed to call refresh Apache service

    Apache service should be refreshed only in correct order after tidying
    mods-enabled directory. In this case better to use the 'File' resource
    instead of 'Tidy' resource because last doesn't support notify mechanisms.
    Also, we need to remove only 'MPM event' configuration files wich enabled
    by default only on the Debian (Ubuntu) systems.

    Change-Id: I79f6a5409cd01135e703bca1ebc4d97b9e8f4628
    Closes-Bug: #1527256
    Closes-Bug: #1522857

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

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

ISO details:
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "367"
  build_id: "367"
  fuel-nailgun_sha: "20ff1666ea6171a085051ffd77444c52f972b7e7"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "1d2f6bc1123b9364ba65b41afcc0608662bb25b9"
  fuel-nailgun-agent_sha: "92ebd5ade6fab60897761bfa084aefc320bff246"
  astute_sha: "c7ca63a49216744e0bfdfff5cb527556aad2e2a5"
  fuel-library_sha: "6ec90013ed909997097563cddc762937dc873eb3"
  fuel-ostf_sha: "889ddb0f1a4fa5f839fd4ea0c0017a3c181aa0c1"
  fuel-mirror_sha: "8bb8c70efc61bcf633e02d6054dbf5ec8dcf6699"
  fuelmenu_sha: "824f6d3ebdc10daf2f7195c82a8ca66da5abee99"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "9f0ba4577915ce1e77f5dc9c639a5ef66ca45896"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "5dd650b541d40251e07afde4072d948be577dc0c"

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.