Bug 844188 - Avoid logs related to printers from samba
Summary: Avoid logs related to printers from samba
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jose A. Rivera
QA Contact: Sudhir D
URL:
Whiteboard:
: 984438 (view as bug list)
Depends On:
Blocks: 858432 956495
TreeView+ depends on / blocked
 
Reported: 2012-07-29 17:48 UTC by Vijay Bellur
Modified: 2013-09-23 22:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 858432 (view as bug list)
Environment:
Last Closed: 2013-09-23 22:38:55 UTC
Embargoed:


Attachments (Terms of Use)

Description Vijay Bellur 2012-07-29 17:48:06 UTC
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 17:20:51 UTC
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 08:26:17 UTC
Chris, would be great if you help out here.

Comment 4 Christopher R. Hertel 2012-10-09 14:55:04 UTC
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 06:03:40 UTC
Please post the results of trying the above suggestions.

Comment 6 Vijay Bellur 2012-10-30 06:56:02 UTC
(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-03 04:54:56 UTC
(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 09:04:57 UTC
*** Bug 984438 has been marked as a duplicate of this bug. ***

Comment 9 Susant Kumar Palai 2013-07-15 13:15:39 UTC
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 14:28:15 UTC
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 07:14:17 UTC
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 18:56:11 UTC
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 06:38:15 UTC
Verified on Samba-glusterfs-3.6.9-156.2 build. Looks fine.

Comment 14 Scott Haines 2013-09-23 22:38:55 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.

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

Comment 15 Scott Haines 2013-09-23 22:41:31 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.

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.