Bug 1484871

Summary: target service doesn't start as /etc/target/saveconfig.json file is not available
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: krishnaram Karthick <kramdoss>
Component: CNS-deploymentAssignee: Raghavendra Talur <rtalur>
Status: CLOSED ERRATA QA Contact: krishnaram Karthick <kramdoss>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: cns-3.6CC: akhakhar, annair, asriram, hchiramm, jarrpa, madam, mliyazud, mzywusko, pprakash, rhs-bugs, rreddy, rtalur, srmukher
Target Milestone: ---Keywords: Regression
Target Release: CNS 3.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhgs-server-docker-3.3.0-15 cns-deploy-5.0.0-23.el7rhgs Doc Type: Bug Fix
Doc Text:
Previously, on restart of rhgs-server container target service failed to start as saveconfig.json was not found. With this update, /etc/target is bind mounted to host and gluster-block-target service starts as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-11 06:58:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1445448    

Description krishnaram Karthick 2017-08-24 12:54:28 UTC
Description of problem:
/etc/target/saveconfig.json is introduced as a directory instead of a file in the container image. As a result, target service doesn't come up.

sh-4.2# systemctl status target -l
● target.service - Restore LIO kernel target configuration
   Loaded: loaded (/usr/lib/systemd/system/target.service; disabled; vendor preset: disabled)
   Active: inactive (dead) since Thu 2017-08-24 12:37:29 UTC; 13min ago
  Process: 2424 ExecStop=/usr/bin/targetctl clear (code=exited, status=0/SUCCESS)
  Process: 2405 ExecStart=/usr/bin/targetctl restore (code=exited, status=0/SUCCESS)
 Main PID: 2405 (code=exited, status=0/SUCCESS)

Aug 24 12:37:25 dhcp46-203.lab.eng.blr.redhat.com systemd[1]: Starting Restore LIO kernel target configuration...
Aug 24 12:37:25 dhcp46-203.lab.eng.blr.redhat.com target[2405]: No saved config file at /etc/target/saveconfig.json, ok, exiting
Aug 24 12:37:25 dhcp46-203.lab.eng.blr.redhat.com systemd[1]: Started Restore LIO kernel target configuration.
Aug 24 12:37:29 dhcp46-203.lab.eng.blr.redhat.com systemd[1]: Stopping Restore LIO kernel target configuration...
Aug 24 12:37:29 dhcp46-203.lab.eng.blr.redhat.com systemd[1]: Stopped Restore LIO kernel target configuration.

Version-Release number of selected component (if applicable):
cns-deploy-5.0.0-21.el7rhgs.x86_64 (with the 

How reproducible:
Always

Steps to Reproduce:
1. deploy cns and check for target service and gluster-blockd service

Comment 8 Humble Chirammal 2017-08-24 14:15:59 UTC
This was an issue in bind mount of /etc/target which is corrected now in the template and next cns-build will have the fix.

Comment 9 krishnaram Karthick 2017-09-01 13:02:41 UTC
Verified the fix in build - cns-deploy-5.0.0-23.el7rhgs.x86_64

gluster-block-target service starts without any issues and the configuration file is stored in /etc/target/saveconfig.json

sh-4.2# ls -l /etc/target/saveconfig.json 
-rw-------. 1 root root 24696 Aug 29 06:17 /etc/target/saveconfig.json

snippet of gluster-template:

          volumeMounts:
          - mountPath: /etc/target
            name: glusterfs-gblock

Moving the bug to verified.

Comment 11 Raghavendra Talur 2017-10-04 08:25:36 UTC
Changed the doc text a little bit. Looks good to me.

Comment 12 errata-xmlrpc 2017-10-11 06:58:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2877