Check for a default site before disabling it. #12

Merged
merged 1 commit into from Feb 13, 2013

Conversation

Projects
None yet
2 participants
@dkinzer
Contributor

dkinzer commented Feb 13, 2013

The build fails on our centos63 platform because the default site is not
enabled and the a2dissite command throws an error when it does not find it.
This commit corrects this issue by making sure this command is only invoked
when a default site is present.

Note that in the current apache2 cookbook default['apache']['default_site_enabled']
is set to false for all platforms.

The following is the error thrown on failure prior to this patch:

[2013-02-13T04:39:14+00:00] ERROR: Running exception handlers
[2013-02-13T04:39:14+00:00] ERROR: Exception handlers complete
Chef Client failed. 117 resources updated?[0m
[2013-02-13T04:39:14+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-
stacktrace.out
[2013-02-13T04:39:14+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed:
execute[disable-default-site] (drupal::default line 108) had an error: Mixlib:: ShellOut::ShellCommandFailed: Expected
 process to exit with [0], but received '1'
---- Begin output of sudo a2dissite default ----
STDOUT: This site is already disabled, or does not exist!
STDERR:
---- End output of sudo a2dissite default ----
Ran sudo a2dissite default returned 1
ERROR: RuntimeError: chef-solo failed. See output above.
Check for a default site before disabling it.
The build fails on our centos63 platform because the default site is not
enabled and the `a2dissite` command throws an error when it does not find it.
This commit corrects this issue by making sure that command is only envoked
when a default site is present.

Note that in the current apache2 cookbook `default['apache']['default_site_enabled']`
is set to `false` for all platforms.

mdxp added a commit that referenced this pull request Feb 13, 2013

Merge pull request #12 from jenkinslaw/check-default-site
Check for a default site before disabling it.

@mdxp mdxp merged commit b446aea into promet:master Feb 13, 2013

1 check passed

default The Travis build passed
Details

@dkinzer dkinzer deleted the jenkinslaw:check-default-site branch Feb 13, 2013

@dkinzer

This comment has been minimized.

Show comment Hide comment
@dkinzer

dkinzer Feb 13, 2013

Contributor

Thanks! BTW I think this builds on CentOS63 now.

Contributor

dkinzer commented Feb 13, 2013

Thanks! BTW I think this builds on CentOS63 now.

@mdxp

This comment has been minimized.

Show comment Hide comment
@mdxp

mdxp Feb 13, 2013

Contributor

Awesome! Thanks.

Contributor

mdxp commented Feb 13, 2013

Awesome! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment