Description of problem: ovirt-fence-kdump-listener service starts up too early and cannot connect to the database at boot time. Version-Release number of selected component (if applicable): ovirt-engine-tools-4.0.4.4-0.1.el7ev.noarch How reproducible: 100% Steps to Reproduce: 1. Reboot the system 2. Find 2 warnings in journalctl --unit ovirt-fence-kdump-listener.service 3. Notice that these warnings have timestamp, earlier than the first startup messages for postgresql Actual results: Service cannot connect to database at boot, and procudes the following warnings, in the systemd-journal: Oct 28 10:22:23 rhvm4.example.com ovirt-fence-kdu[638]: 2016-10-28 10:22:23,495 ovirt-fence-kdump-listener: WARNING _db_sync:303 Database connection is not available, synchronization will be postponed. Oct 28 10:22:23 rhvm4.example.com ovirt-fence-kdump-listener.py[638]: ovirt-fence-kdump-listener[638] WARNING _db_sync:303 Database connection is not available, synchronization will be postponed. Expected results: Service starts up after Postgres is up, if it needs to connect to it. No warnings in systemd journal. Additional info: Unit file misses dependencies. Adding the same as the ovirt-engine unit file, warning disappears.
# ls -l /etc/systemd/system/multi-user.target.wants/ovirt-fence-kdump-listener.service lrwxrwxrwx. 1 root root 58 Jan 23 19:33 /etc/systemd/system/multi-user.target.wants/ovirt-fence-kdump-listener.service -> /usr/lib/systemd/system/ovirt-fence-kdump-listener.service # more /etc/systemd/system/multi-user.target.wants/ovirt-fence-kdump-listener.service [Unit] Description=oVirt Engine fence_kdump listener After=network.target postgresql.service [Service] Type=notify User=ovirt Group=ovirt ExecStart=/usr/share/ovirt-engine/services/ovirt-fence-kdump-listener/ovirt-fence-kdump-listener.py --systemd=notify $EXTRA_ARGS start EnvironmentFile=-/etc/sysconfig/ovirt-fence-kdump-listener [Install] WantedBy=multi-user.target Verified by After=network.target postgresql.service