Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1515261

Summary: api - doesn't reload configuration
Product: Red Hat Gluster Storage Reporter: Martin Kudlej <mkudlej>
Component: web-admin-tendrl-apiAssignee: Anup Nivargi <anivargi>
Status: CLOSED NOTABUG QA Contact: sds-qe-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: mkarnik, rhs-bugs, sankarshan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-27 08:37:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Martin Kudlej 2017-11-20 13:02:34 UTC
Description of problem:
"systemctl reload" command doesn't reload API configuration()

Version-Release number of selected component (if applicable):
tendrl-api-1.5.4-2.el7rhgs.noarch

How reproducible:
100%

Steps to Reproduce:
1. get current date: $ date
2. get conf files for package: $ rpm -qc tendrl-api
3. reload configuration: $ systemctl reload tendrl-api
4. check if conf files from 2. are touched: $ find /etc/tendrl/ -type f | xargs stat | egrep '^Access: 2|File:'

Actual results:
"systemctl reload" doesn't reload service configuration.

Expected results:
"systemctl reload" reloads service configuration.

Comment 1 Martin Kudlej 2017-11-20 13:15:47 UTC
Cite from systemd documentation:
reload PATTERN...
           Asks all units listed on the command line to reload their
           configuration. Note that this will reload the service-specific
           configuration, not the unit configuration file of systemd. If you
           want systemd to reload the configuration file of a unit, use the
           daemon-reload command. In other words: for the example case of
           Apache, this will reload Apache's httpd.conf in the web server,
           not the apache.service systemd unit file.

           This command should not be confused with the daemon-reload
           command.

Comment 2 Mrugesh Karnik 2017-11-27 08:33:46 UTC
Online configuration reload isn't supported by the app server (puma) which serves the API. To do a configuration reload, it restarts the application processes, which does not align with what `systemctl reload` is supposed to do. As such, reload cannot be supported by the API.

In any case, the only configuration variable for the API itself (not to be confused with the configuration variables for the app server) is the etcd connection. Changing this requires a full restart of the API anyway.