Zuul's Apache mod setups should have defined() guards

Bug #1281676 reported by Jay Pipes on 2014-02-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Released
Undecided
Jay Pipes

Bug Description

It is not possible to use the upstream Zuul and Jenkins master puppet modules in the same manifest. If you try this, you get something like this:

Duplicate declaration: A2mod[rewrite] is already declared in file /home/ubuntu/os-ext-testing/puppet/modules/os_ext_testing/manifests/master.pp at line 30; cannot redeclare at /root/config/modules/zuul/manifests/init.pp:236 on node undef

The solution is to put if not defined() guards around the A2mod declarations.

Jay Pipes (jaypipes) on 2014-02-18
Changed in openstack-ci:
assignee: nobody → Jay Pipes (jaypipes)

Fix proposed to branch: master
Review: https://review.openstack.org/74443

Changed in openstack-ci:
status: New → In Progress

Reviewed: https://review.openstack.org/74443
Committed: https://git.openstack.org/cgit/openstack-infra/config/commit/?id=be09d2bcda06604d6792d4b3221a4350b0b22d22
Submitter: Jenkins
Branch: master

commit be09d2bcda06604d6792d4b3221a4350b0b22d22
Author: Jay Pipes <email address hidden>
Date: Tue Feb 18 12:11:48 2014 -0500

    Adds ! defined() guards around a2mod declarations

    If you attempt to include both Zuul and Jenkins master modules in a
    single manifest, you will get an error about A2mod[rewrite] resource
    already being declared, like so:

    Duplicate declaration: A2mod[rewrite] is already declared in file
    /home/ubuntu/os-ext-testing/puppet/modules/os_ext_testing/manifests/master.pp
    at line 30; cannot redeclare at
    /root/config/modules/zuul/manifests/init.pp:236 on node undef

    This isn't noticed by upstream, because no server runs both a Jenkins
    master and a Zuul server. However, in smaller systems, where both
    Jenkins and Zuul can be installed on the same host, the problem becomes
    apparent.

    This patch fixes that issue by adding guards around the a2mod
    declarations in the Zuul init.pp and Jenkins master.pp manifests.

    Change-Id: I2a298eb09ec8da33caed9349f465b2d163e2c299
    Closes-bug: #1281676

Changed in openstack-ci:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers