Update To 1503 Release Problem

Home » CentOS » Update To 1503 Release Problem
CentOS 5 Comments

Hi there, Yesterday I’ve updated from 7 to 7.1 and today I’ve noticed on 2 server that PostgreSQL systemd file was replaced with default values. This make postgres to no start and webserver give me problem. This problem was fixed and now all works good. It’s normal that on major update I can get this problem? If so, I’ve ridden release change but I have not ridden about PostgreSQL problem.

Someone had the same issue?

5 thoughts on - Update To 1503 Release Problem

  • I’m going for a shot in the dark here that he edited files in
    /usr/lib/systemd/system which he should not do and did not follow the instructions on how to override a unit in systemd via files in
    /etc/systemd/system

    If my assumption is correct then OP you were editing the equivalent of
    /etc/init.d files which have never been marked %config so will always be replaced by rpm

  • Hi list, the update has modified
    /etc/systemd/system/multi-user.target.wants/PostgreSQL.service pointing to /usr/lib/systemd/system/PostgreSQL.service.

    I have edited postgres file to change PGDATA.

    How James says, I have edited PostgreSQL.service manually. What is the correct way?

    Thanks in advance.

  • From freedesktop.org:

    Q: I want to change a service file, but rpm keeps overwriting it in
    /usr/lib/systemd/system all the time, how should I handle this?

    A: The recommended way is to copy the service file from
    /usr/lib/systemd/system to /etc/systemd/system and edit it there. The latter directory takes precedence over the former, and rpm will never overwrite it. If you want to use the distributed service file again you can simply delete (or rename) the service file in /etc/systemd/system again.

    This is the way?

  • Yes. The files under /usr/lib/systemd/system are defaults that systemd only uses if a similar files does not exist in /etc/systemd/system. The default files themselves should never be edited.

    Regards,
    Dennis