Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1393345

Summary: ovirt-fence-kdump-listener service unit file for systemd does not contain dependency on postgresql
Product: Red Hat Enterprise Virtualization Manager Reporter: Tim Speetjens <tspeetje>
Component: ovirt-engineAssignee: Martin Perina <mperina>
Status: CLOSED ERRATA QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: low    
Version: 4.0.0CC: gklein, lsurette, lsvaty, mperina, oourfali, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.1.0-betaKeywords: EasyFix
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-25 00:54:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Speetjens 2016-11-09 11:28:10 UTC
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.

Comment 5 Pavol Brilla 2017-02-02 16:16:17 UTC
# 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