Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1636208 - redis.service tries to start before network is online
Summary: redis.service tries to start before network is online
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: redis
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Flavio Percoco
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-04 17:37 UTC by ilmostro7
Modified: 2018-11-12 04:20 UTC (History)
4 users (show)

Fixed In Version: redis-3.2.12-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-12 04:20:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description ilmostro7 2018-10-04 17:37:23 UTC
Description of problem:

Upon boot up, redis fails to start due to network status.

redis-shutdown[1613]: Could not connect to Redis at 10.3.7.3:6379: Network is unreachable


Version-Release number of selected component (if applicable):

redis-3.2.12-1.el7.x86_64

How reproducible:

Simple service enable, reboot, observe failure.  Restarting the service works as expected


Actual results:

The redis.service file should reference the "network-online.target", rather than "network.target", as described at https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

# /usr/lib/systemd/system/redis.service
[Unit]
Description=Redis persistent key-value database
After=network.target

[Service]
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd
ExecStop=/usr/libexec/redis-shutdown
Type=notify
User=redis
Group=redis
RuntimeDirectory=redis
RuntimeDirectoryMode=0755

[Install]
WantedBy=multi-user.target


Expected results:

# /usr/lib/systemd/system/redis.service
[Unit]
Description=Redis persistent key-value database
After=network.target
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd
ExecStop=/usr/libexec/redis-shutdown
Type=notify
User=redis
Group=redis
RuntimeDirectory=redis
RuntimeDirectoryMode=0755

[Install]
WantedBy=multi-user.target



Additional info:

Comment 1 Fedora Update System 2018-10-26 07:09:58 UTC
redis-3.2.12-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-b9fd00656d

Comment 2 Fedora Update System 2018-10-26 17:26:50 UTC
redis-3.2.12-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-b9fd00656d

Comment 3 Fedora Update System 2018-11-12 04:20:03 UTC
redis-3.2.12-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.