Bug 844188 - Avoid logs related to printers from samba
Avoid logs related to printers from samba
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterd (Show other bugs)
2.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jose A. Rivera
Sudhir D
:
: 984438 (view as bug list)
Depends On:
Blocks: 858432 956495
  Show dependency treegraph
 
Reported: 2012-07-29 13:48 EDT by Vijay Bellur
Modified: 2013-09-23 18:41 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 858432 (view as bug list)
Environment:
Last Closed: 2013-09-23 18:38:55 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Vijay Bellur 2012-07-29 13:48:06 EDT
Description of problem:

Following logs are seen in samba logs of a RHS 2.0 instance:

Jul 29 17:26:12 gqas015 smbd[3625]: [2012/07/29 17:26:12.373728,  0] smbd/server.c:281(remove_child_pid)
Jul 29 17:26:12 gqas015 smbd[3625]:   Could not find child 24482 -- ignoring
Jul 29 17:26:16 gqas015 smbd[24484]: [2012/07/29 17:26:16.052206,  0] printing/print_cups.c:109(cups_connect)
Jul 29 17:26:16 gqas015 smbd[24484]:   Unable to connect to CUPS server localhost:631 - Connection refused
Jul 29 17:26:16 gqas015 smbd[3627]: [2012/07/29 17:26:16.052617,  0] printing/print_cups.c:468(cups_async_callback)
Jul 29 17:26:16 gqas015 smbd[3627]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL

These are repeated and annoying in nature. This is probably to do with smb.conf containing references to 


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 Niels de Vos 2012-10-04 13:20:51 EDT
This happens when the smb service gets started through the volume hooks. If samba is not configured correctly, it should not get started.

Therefore, this might be a duplicate of bug 861506.
Comment 3 Amar Tumballi 2012-10-09 04:26:17 EDT
Chris, would be great if you help out here.
Comment 4 Christopher R. Hertel 2012-10-09 10:55:04 EDT
As the original report says, this isn't a bug it's just an annoyance.

Notes:

1) Please provide the smb.conf with any such reports.

2) Vijay:  Your report says "This is probably to do with smb.conf containing references to" ...  Containing references to what in particular?

3) If the RHS server is not being used as a print server, remove the [printers] section, if there is one.

4) If #3 doesn't work, set `load printers = no` in the [global] section.

Let me know if those options fix the problem.
Comment 5 Christopher R. Hertel 2012-10-30 02:03:40 EDT
Please post the results of trying the above suggestions.
Comment 6 Vijay Bellur 2012-10-30 02:56:02 EDT
(In reply to comment #5)
> Please post the results of trying the above suggestions.

(In reply to comment #4)
> As the original report says, this isn't a bug it's just an annoyance.
> 
> Notes:
> 
> 1) Please provide the smb.conf with any such reports.

Vanilla smb.conf that is part of RHS installs.

> 
> 2) Vijay:  Your report says "This is probably to do with smb.conf containing
> references to" ...  Containing references to what in particular?

Sorry about that, containing references to "load printers = yes" in [global] section and [printers] section in smb.conf.

> 
> 3) If the RHS server is not being used as a print server, remove the
> [printers] section, if there is one.

RHS would not be ideally used as a print server. Hence it might be better to ship a default smb.conf with RHS that doesn't enable these sections/options by default.
Comment 7 Christopher R. Hertel 2012-12-02 23:54:56 EST
(In reply to comment #6)
: 
> RHS would not be ideally used as a print server. Hence it might be better to
> ship a default smb.conf with RHS that doesn't enable these sections/options
> by default.

Agreed.

Recommended action:

* In the default smb.conf, set "load printers = no" in the [globals] section
  and remove the [printers] section.

Vijay:  Please advise.  What is the process for getting these changes into
        the RHS2.1 production stream?
Comment 8 Susant Kumar Palai 2013-07-15 05:04:57 EDT
*** Bug 984438 has been marked as a duplicate of this bug. ***
Comment 9 Susant Kumar Palai 2013-07-15 09:15:39 EDT
Chris,
      One of the option I found is disabling the logging of the messages related  to  printers.

   I changed -> printcap name = lpstat  TO  printcap name = /dev/null

   And it is not logging the messages any more.
Comment 10 Christopher R. Hertel 2013-07-16 10:28:15 EDT
Susant has come up with two solution options for this bug:

1--  Compiling samba with the "--disable cups " option, which will prevent Samba from loading the cups library.  Hence, there will be no logging related to cups.

2--  Modifying the global section with the following changes.
      *load printers = no      //it will no load printers in the printcap file
      *show add printers wizard = no
      *disable spoolss = yes  // hide printers and faxes
      *printing = bsd         // Printing system type changed to bsd will not log CUPS related logs

Next Step: Evaluation of these options from the Scrum Team.
Comment 11 Christopher R. Hertel 2013-07-18 03:14:17 EDT
Recommended ordering and comments for option 2:

  load printers = no      # Do not load printers from /etc/printcap
  disable spoolss = yes   # Shut down the RPC printing communications channel
  show add printers wizard = no  # Disable the RPC-based printing wizard
  printing = bsd          # Prevent loading the CUPS back-end.
Comment 12 Christopher R. Hertel 2013-08-05 14:56:11 EDT
Some quick research shows that the formatting I provided above is incorrect.  Samba does not allow trailing comments in the smb.conf file.  The comment characters (';' and '#') must be the first (non-whitespace) thing on the line, otherwise the comment is seen as being part of the parameter value.  This is because both ';' and '#' are legal within such values.  Moving the comments to their own separate lines should solve the problem encountered by QE.
Comment 13 Ujjwala 2013-08-12 02:38:15 EDT
Verified on Samba-glusterfs-3.6.9-156.2 build. Looks fine.
Comment 14 Scott Haines 2013-09-23 18:38:55 EDT
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.

http://rhn.redhat.com/errata/RHBA-2013-1262.html
Comment 15 Scott Haines 2013-09-23 18:41:31 EDT
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.

http://rhn.redhat.com/errata/RHBA-2013-1262.html

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