Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
<oo-diagnostics> test for clashing app frontends, bug 1031686
  • Loading branch information
sosiouxme committed Nov 19, 2013
1 parent 2c18eab commit d7c930b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions common/bin/oo-diagnostics
Expand Up @@ -1199,6 +1199,28 @@ class OODiag
ROGUES
end
end

def test_node_frontend_clash
skip_test unless @is_node
conflicts = %w[ rubygem-openshift-origin-frontend-apache-mod-rewrite
rubygem-openshift-origin-frontend-apache-vhost ]
if conflicts.all? {|rpm| @rpms[rpm]}
# these both provide a conf file in /etc/httpd/conf.d which conflict if both are installed.
config = OpenShift::Config.new
plugins = config.get('OPENSHIFT_FRONTEND_HTTP_PLUGINS').split(',').map {|it| "rubygem-" + it}
remove = conflicts - plugins
do_fail <<-CONFLICT
Conflicting RPMs are installed:
rubygem-openshift-origin-frontend-apache-mod-rewrite
rubygem-openshift-origin-frontend-apache-vhost
When both are present, apps are likely to be unreachable.
Please remove the one not used in node.conf:
yum remove #{remove.join " "}
Then, restart the httpd service.
CONFLICT
end
end

end #class OODiag


Expand Down

0 comments on commit d7c930b

Please sign in to comment.