Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passenger-install-apache2-module should allow Apache config sanity check skip #1525

Closed
tmilker opened this issue May 30, 2015 · 6 comments

Comments

Projects
None yet
3 participants
@tmilker
Copy link

commented May 30, 2015

Passenger 4.0.59: The installer for the apache2 module should have a flag to skip the apache config sanity check. I'm currently upgrading my Apache installations to 2.4, from 2.2 that is already running Passenger and configured correctly. apache 2.4 can't load the passenger module, so a configtest properly complains about it. I can't re-build Passenger without commenting out every reference to Passenger everywhere across my apache configuration to get it to pass this sanity check that isn't doing anything but preventing me from re-compiling the module and then uncommenting them.

Passenger shouldn't really care whether the apache config is broken or not to begin with, this is the kind of hand holding that just creates more issues than it solves.

@jamgregory

This comment has been minimized.

Copy link

commented Jun 4, 2015

I've been having a similar issue - like @tmilker, I'm upgrading our servers to Apache 2.4, and I end up having to disable Passenger and all sites before I can install it.

👍 for a flag to allow us to skip this check.

@FooBarWidget

This comment has been minimized.

Copy link
Member

commented Jun 4, 2015

Passenger has legit reasons to care whether the Apache config is broken or not. It happened more than once that people tried to install Passenger, but had an (unrelated) Apache problem, couldn't figure out why their Apache wouldn't start, then contact our support forums in anger or even switch away thinking that Passenger is garbage. We want to avoid that. So we will not step away from the "hand-holding" approach.

Another reason is that all kinds of autodetection routines depend on the output of apache2ctl -V. For example, Red Hat 5 has a bug in its Apache package that causes modules to be compiled with the wrong compiler flags. The installer autodetects this kind of situation and adjusts the compiler flags. Another example is that the installer checks whether your MPM is compatible with Passenger (we only support prefork, worker and event).

However, on recent Ubuntu systems, apache2ctl -V tries to parse and load the config file, so we are unable to obtain any useful information as long as the config file has problems. This creates a chicken-and-egg problem.

Anyway, it is correct that the installer should advise, but not enforce. I've made a change so that the installer nags you with a clear warning, but still allows you to continue.

I remain convinced that the hand-holding approach is the way to go, though it may occasionally need refinements here and there.

FooBarWidget added a commit that referenced this issue Jun 4, 2015

passenger-install-apache2-module no longer aborts with an error if th…
…e Apache configuration file contains errors

Closes GH-1525.

@FooBarWidget FooBarWidget added this to the 5.0.10 milestone Jun 4, 2015

@FooBarWidget FooBarWidget self-assigned this Jun 4, 2015

@jamgregory

This comment has been minimized.

Copy link

commented Jun 4, 2015

Thanks @FooBarWidget! Will the notification about Apache being broken be "ignored" when the installer is in automated mode? At present, it causes it to fail where it'd be preferable for it to go ahead and try to install it anyway.

@tmilker

This comment has been minimized.

Copy link
Author

commented Jun 4, 2015

Yep, that is what I need too, the -a functionality to continue on its own. That's why I asked for a flag.

@FooBarWidget

This comment has been minimized.

Copy link
Member

commented Jun 4, 2015

Yes. When --auto is given, the warning is still printed but it will not wait for a prompt.

@jamgregory

This comment has been minimized.

Copy link

commented Jun 4, 2015

Cool, thanks @FooBarWidget 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.