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

Pre-check whether a httpd.service file exists in /etc/system/systemd as it can prevent Apache restarts after the finish phase #225

Open
Bitpalast opened this issue Mar 28, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Bitpalast
Copy link

Is your feature request related to a problem? Please describe.
For unknown reasons, on one of our servers, /etc/systemd/system contained a "httpd.service" file. In that file some service properties of Apache were defined, like

[Service]
EnvironmentFile=/etc/sysconfig/httpd

This worked well with the existing Apache installation. But during the centos2alma conversion, Apache is replaced by a new version, and the EnvironmentFile entry was no longer valid. This lead to a situation where Apache entered an auto-restart rotation and failed to start over and over and over again. The problem with that situation for a user is, that an error message like "Environment file not found" is logged to /var/log/messages, but where is that file defined? Well, it was defined in a superfluous /etc/systemd/system/httpd.service file.

Describe the solution you'd like
We propose to pre-check the existence of /etc/systemd/system/httpd.service, but also entries in /etc/systemd/system/httpd.service.d. An informative message should be displayed to a user, telling the user that these files might contain settings that will discontinue to work with a new Apache installation.

Describe alternatives you've considered
n/a

@Bitpalast Bitpalast added the enhancement New feature or request label Mar 28, 2024
@SandakovMM
Copy link
Collaborator

As far as I can tell, EnvironmentFile=/etc/sysconfig/httpd in httpd.service configuration is fine for a standard Plesk installation. After the conversion process, this value should not be present in the httpd.service file because the file should be substituted with the new version. Unless the file was manually modified on the CentOS 7 side.
Maybe httpd.service was customized before the conversion? Don't you have /etc/systemd/system/httpd.service.rmpnew on the server?

@Bitpalast
Copy link
Author

The file does not exist on any of our CentOS installations. No .rpmnew either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants