Bug 1588941

Summary: location of core files generated in gluster container images is not persistent
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: krishnaram Karthick <kramdoss>
Component: rhgs-server-containerAssignee: Saravanakumar <sarumuga>
Status: CLOSED ERRATA QA Contact: krishnaram Karthick <kramdoss>
Severity: high Docs Contact:
Priority: unspecified    
Version: cns-3.10CC: bgoyal, bmohanra, dyocum, hchiramm, kramdoss, madam, mrobson, ndevos, pkarampu, pprakash, prasanna.kalever, rgeorge, rhs-bugs, sankarshan, sarumuga, vbellur, xiubli
Target Milestone: ---   
Target Release: CNS 3.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhgs3/rhgs-server-rhel7:3.3.1-23 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-12 10:54:03 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: 1568862, 1598411    

Description krishnaram Karthick 2018-06-08 07:27:54 UTC
Description of problem:
When gluster-blockd process crashes, the core file is generated in / dir. However, in the rhgs-container image / directory is not persistent. We should be pointing all the core files to a persistent directory, probably /var/log/glusterfs/gluster-block?

Version-Release number of selected component (if applicable):
gluster-block-0.2.1-18.el7rhgs.x86_64

How reproducible:
always

Steps to Reproduce:
1. crash gluster-blockd

Actual results:
core file is generated in / directory

Expected results:
core file should be in a persistent directory, probably /var/log/glusterfs/gluster-block

Additional info:

Comment 16 Niels de Vos 2018-07-24 08:48:04 UTC
The selected approach is that the administrator has to configure the kernel.core_pattern on the systems themselves. Because this is a system-wide configuration, it is not appropriate for CNS to configure a default (that may be different from other components).

The CNS containers now should contain a /var/log/core/ directory. Administrators can take the following steps to capture cores:

1. sysctl -w kernel.core_pattern=/var/log/core/%e_%p
   (%e and %p are just examples, see 'man 5 core' for more options)

Now the admin can copy-out the core after a segfault.

2. configure a bind-mount so that /var/log/core/ is persistent on the host

With this, even if the container exits, the core stays available (probably need to change the core_pattern to include other %-options, maybe %t?).


Karthick, what were the exact steps that you tried to verify the change?

Comment 17 krishnaram Karthick 2018-07-26 17:07:28 UTC
(In reply to Niels de Vos from comment #16)
> The selected approach is that the administrator has to configure the
> kernel.core_pattern on the systems themselves. Because this is a system-wide
> configuration, it is not appropriate for CNS to configure a default (that
> may be different from other components).
> 
> The CNS containers now should contain a /var/log/core/ directory.
> Administrators can take the following steps to capture cores:
> 
> 1. sysctl -w kernel.core_pattern=/var/log/core/%e_%p
>    (%e and %p are just examples, see 'man 5 core' for more options)
> 
> Now the admin can copy-out the core after a segfault.
> 
> 2. configure a bind-mount so that /var/log/core/ is persistent on the host
> 
Is this directory not bind mounted by default? I don't see so in the latest rhgs-server-container image.

> With this, even if the container exits, the core stays available (probably
> need to change the core_pattern to include other %-options, maybe %t?).
> 
> 
> Karthick, what were the exact steps that you tried to verify the change?

What is the fix that we are providing as part of this bug? Is it just the /var/log/core/ directory that is being created within the container? and rest would be configuration changes that we are suggesting? 

I believe we should at least provide a fix with automatic bind mounting of /var/log/core/ directory.

Finally, the information on configuring how to configure core needs to be documented or our document should point to an existing document.

Comment 25 errata-xmlrpc 2018-09-12 10:54:03 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/RHBA-2018:2688

Comment 26 Red Hat Bugzilla 2023-09-15 00:09:54 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days