In order to run the script directly in the test, the script needs to
have the executable bit set. Currently, the test is failing with a
"Permission denied" error when attempting to run the script.
We also need to run install_modules.sh in the logstash-filters test, so
move that invocation to the shared prep-apply.sh script.
The vcsrepo puppet define doesn't understand revisions of the form
"refs/zuul/foo", so instead parse the HEAD sha and pass that to vcsrepo.
Finally, we need to ensure that $elasticsearch_nodes is populated with
an array, otherwise the function @elasticsearch_nodes.map in the
output.conf template will fail.
Change-Id: Ic1ab6d04232abb3cf347f0d27afbf9172f62b0e4
We are seeing races in the puppet apply test to create
/opt/system-config/hieradata. Avoid this by running a simple hello world
puppet manifest prior to running all of our test manifests in parallel.
This should force the ansible puppet role to populate all the things on
disk first avoiding races.
Change-Id: If3946f561535ba315f018ab3122dcde56144240f
This is needed since the hiera configuration is in the ansible
role.
Have puppet append its output directly to our per-test output file.
Rename that file with a FAILED suffix for easy identification when
looking at the results in the published log directory.
Change-Id: Ie2a028b9e0179168d279bcf33de7f997cdfdbc8d
Depends-On: I0db01d128258f78e9b196354799a80774f6c6808
Add a script for integration testing with
openstack-infra/logstash-filters and refactor the apply-test script to
leverage much of the prep work done there.
Also add some needed parameters to install arbitrary versions of the
logstash-filters repo.
Change-Id: Ifcc7fb13c4fb21986e33327487c739966e4bb107
This removes centos6 support from install_puppet.sh because centos6 is
no longer supported so this code is dead.
Change-Id: If59f10a6a9c576b1299b0e49a2e82d2a1a1d7ecf
This is a partial revert of 05c16e2e that removes special casing around
the openstack-health/openstack_health repo.
Change-Id: I832f1b764a34c128d737a467fa568cc064226c5a
This commit adds the puppet config for running an openstack-health
api instance. It'll use the subunit2sql trove db node as a data
source. The puppet-openstack-health module is incorrectly named which
is causing issues, a workaround to rename the repo is added to
install_modules.sh. This is a temporary measure until the gerrit
rename is completed. There is also a workaround in the apply test.
Change-Id: I7e6d9664d087e7bdc21d92624991d0d5f86c0c99
Currently, all hiera calls need to have default values in order for the
apply test to work. This is done by using sed to replace the hiera call
with the default value in the call, i.e. 'hiera("foo", "bar")' is
replaced with '"bar"'.
This adds another sed command that replaces a hiera call that has no
default value specified with the name of the key appended with
NoDefault, i.e. 'hiera("foo")' will become '"fooNoDefault"'.
By making the hiera default values optional, we no longer need to pass
in a default value to every hiera call, and so we can remove the
placeholder XXX that were previously needed by the apply tests but not
by puppet itself.
Change-Id: Ibdeb0c2e49245ea05116e8043936d5b012f46666
The Infra Cloud project uses a different set of puppet modules than the
standard infra ones in order to avoid possible dependency conflicts[1].
Currently the puppet-apply test hard-codes the entry-point puppet
manifest and module list. This patch makes the manifest, currently
manifests/site.pp, and the module file, currently modules.env,
configurable, so that we can add a new job to test just these nodes
with the correct modules installed.
[1] https://review.openstack.org/#/c/209617/
Change-Id: I744123befef0bf27a1eb2a79f5d814e0cefe81f5
The test slaves that the apply tests run on have puppet modules
installed from the initial slave configuration. Delete the previously
installed modules before re-installing to ensure that the apply test
only uses the modules listed in the current change's modules.env.
Change-Id: Ie62b64133c480c05968ab554185527ac5e432858
It does not appear these jobs actually require the project-config repo
for anything. It was added in
I3a772e84a1bc6028caeabcc8e09a0942f44b8612 without a lot of
explaination of why, but as it stands I don't see the project-config
affects the outcome of these jobs?
Change-Id: I85111afbbce497c86f4f6d8dfe74944c32a77b80
Otherwise, there is a case where the results are not rendered properly
because the shell exits.
Change-Id: Ica05615cad4fcc15c9d941d16f74cb4f68bc5a99
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This makes it easier to tell which node definition is being evaluated
Because xargs -P doesn't do bash functions, some of the apply_test has
been moved into test_puppet_apply.sh. All the test snippets and test
output is being recorded in files in tools/opt, then catted for the
user.
Change-Id: I4fb77f93f9e9a7216b62634438a11d8d297bdefe
The apply test does some really simple string manipulation to generate
puppet manifests based on our site.pp on the fly. Unfortunately the old
code assumed there would be no blank lines within a node{} definition.
This assumption is breaking as we work to decouple the
openstack_project::server contents from within openstack_project
manifests and move that into site.pp.
This is a relatively simple fix where we csplit nodes based on the
previous /^}$/ which ends the last node{} definition instead of
splitting on blank lines. Added some comments to make what the parsing
does a bit more clear.
Change-Id: I2cc7317ed90423d6f923c4303a76e091a0bc2ebb
This reverts commit 3b563fb59e.
Do not approve until Ief6c8e9bf7d71ddc63dba484390124546f14b93a is
applied to new nodepool images.
Change-Id: Ia7422d4f8fe316cc37c1310def0e7a9e2f232d35
Make /etc/puppet/environments/production/environment.conf so that
the apply test will find a default directory environment.
Change-Id: I062949d6c23545c40690edc39302095b0dec3c84
This causes apply-test.sh to get the list of puppet modules to do
integration test with from modules.env. Modules.env has been
refactored to have three lists of modules: Package modules(MODULES),
SOURCE_MODULES, and INTEGRATION_MODULES.
When PUPPET_INTEGRATION_TEST is not set, INTEGRATION_MODULES is
folded into SOURCE_MODULES.
In apply-test.sh, INTEGRATION_MODULES is sourced from modules.env
and some string/array manipulation is performed to pass each entry
to zuul-cloner.
Change-Id: I47302c5c7e8c41b985f16a05c4e9b8078ea867a3
--color=false remove ansi escapes
cping /etc/hiera.yaml /etc/puppet/hiera.yaml shuts up puppet
complaining that it doesn't have hiera.yaml to read
Change-Id: Iea7222c66f2fcc1338bc7baffb572d1a1ab2ecd6
Part of an effort to split most of puppet modules out of system-config.
https://review.openstack.org/#/c/130619/ should land before this
commit can be merged.
Change-Id: I7720ad7d2b25816c63e971112a7a733bde52b7f3
Fix all of the bashate failures. Also, bashate will install its negative
tests in its virtualenv, so we need to generate a list of files to pass to
bashate that excludes .tox/
Change-Id: I55559bf6137f705aec9a7f277928ad8d4cadc2ca
The zuul cloner needs the ZUUL_* env vars when setting up projects
for the new apply integration test.
Also, add some more debugging to both versions of the test.
Change-Id: I486b19cecd034250068e4a59604e1e0ca90ed83d
Make module installation conditional in install_modules.sh so that
we can specify that we _do not_ want it to install the modules
that will be participating in the integration test.
Add a variant of the apply test script (currently test.sh) that
uses zuul-cloner to check out the appropriate versions of modules
that are participating in the integration test.
Add jobs that run this to the experimental pipeline.
Change-Id: I16055cdd45f6e05aa8ebceb500c5709f265268df