Samba printers are missing after reboot until smbd is restarted

Bug #1182655 reported by Nick B.
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This may be related to
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1010501
and
https://bugs.launchpad.net/ubuntu/lucid/+source/upstart/+bug/494141

After a reboot Samba printers are not visible until smbd is restarted.
I've tried adding "and started cups" to /etc/init/smbd.conf but that only seemed to work very intermittently (I'm guessing this caused a race condition). I've also tried adding "and started smbd" to /etc/init/cups.conf but that didn't work at all. The only thing that seems to have worked is the patch in this comment https://bugs.launchpad.net/ubuntu/lucid/+source/upstart/+bug/494141/comments/18

Steps to reproduce
1. Reboot a samba server with printers shared through samba
2. Run "smbclient -L COMPUTER -N" after it comes back up

What is expected:
Samba printers should be listed under Sharename in the output from the smbclient command above or to Windows clients

What happens instead:
Printers are not available through samba until smbd is restarted

$ sudo testparm -S
[sudo] password for nick:
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (4096) to minimum Windows limit (16384)
Processing section "[print$]"
Processing section "[printers]"
Processing section "[Nick]"
Processing section "[public]"
WARNING: The security=share option is deprecated
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        server string =
        security = SHARE
        username map = /etc/samba/smbusers
        syslog only = Yes
        log file = /var/log/samba.log
        announce version = 5.0
        name resolve order = hosts wins bcast
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
        printcap name = cups
        idmap config * : backend = tdb

[print$]
        path = /usr/share/cups/drivers/
        write list = root
        create mask = 0664
        directory mask = 0775
        guest ok = Yes

[printers]
        comment = All Printers
        path = /var/spool/samba
        write list = root
        guest ok = Yes
        printable = Yes
        print ok = Yes
        browseable = No

[Nick]
        path = /media/Share/Users/Nick
        read only = No
        create mask = 0644

[public]
        comment = Public Folder
        path = /media/Share/Public
        force user = nobody
        force group = nogroup
        read only = No
        create mask = 0777
        directory mask = 0777
        guest ok = Yes

apt-cache policy samba
samba:
  Installed: 2:3.6.9-1ubuntu1
  Candidate: 2:3.6.9-1ubuntu1
  Version table:
 *** 2:3.6.9-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ raring/main i386 Packages
        100 /var/lib/dpkg/status

Tags: raring
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in samba (Ubuntu):
status: New → Confirmed
floid (jkanowitz)
tags: added: raring
Revision history for this message
floid (jkanowitz) wrote :

Noticed today as well on 13.04 (64-bit).

The "reload-smbd" upstart script already exists to handle this per the prior bugs, but apparently something's still racing.

-rw-r--r-- 1 root root 213 Nov 23 08:55 /etc/init/reload-smbd.conf

smbd.log appears to suggest that the reload isn't happening (boot at 13:00; manual restart of smbd when printing issue noticed at 14:23):

[2013/05/21 13:00:07, 0] smbd/server.c:1026(main)
  smbd version 3.6.9 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2013/05/21 13:00:07.819348, 0] smbd/server.c:1082(main)
  standard input is not a socket, assuming -D option
[2013/05/21 13:00:07.828557, 0] printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Transport endpoint is not connected
[2013/05/21 13:00:07.829032, 0] printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2013/05/21 13:00:09.208510, 0] printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Transport endpoint is not connected
[2013/05/21 13:00:09.209564, 0] printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2013/05/21 14:23:11, 0] smbd/server.c:1026(main)
  smbd version 3.6.9 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2011
[2013/05/21 14:23:12.160294, 0] smbd/server.c:1082(main)
  standard input is not a socket, assuming -D option

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.