Samba [printers] section doesn't work

Bug #660535 reported by Julio Cesar Gazquez
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: upstart

I'm using 10.04.1.

I found that regardless the smb.conf have a [printers] section (meaning smbd should automatically share all the CUPS printers), it can't because Samba starts earlier, then the printers aren't shared.

If I do "service smbd reload" manually I get it working as intended.

The worst part is the fact Samba is started as a native Upstart service, but CUPS still is a old-style SysV service, becoming difficult to fix the dependency chain (yet I'm not sure if starting CUPS earlier is the right thing or the init script should do a smbd reload)

Both packages are up to date:
Samba: 2:3.4.7~dfsg-1ubuntu3.2
Cups: 1.4.3-1ubuntu1.2

Tags: lucid upstart
Revision history for this message
Julio Cesar Gazquez (juliogazquez) wrote :

Did I put upstart as the affected package? Sorry, it should be cups!

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Julio, thanks for taking the time to file this bug report and help us make Ubuntu better!

Right, in natty cups has an upstart job. So we could make it:

start on ((filesystem or starting smbd)
           and (started dbus or runlevel [2345])
          and stopped udevtrigger)

But that will run us into the and problem when trying to stop/start smbd, so we will need to use a waiter job. The waiter job can be backported to use the init.d script in lucid and still function properly.

Marking Triaged, as this only affects Ubuntu and its clear what the problem is. Setting Importance to Medium.

affects: upstart (Ubuntu) → cups (Ubuntu)
Changed in cups (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
tags: added: lucid upstart
Revision history for this message
John Edwards (john-cornerstonelinux) wrote :

This looks related to bug #494141, where Samba does not show CUPS printers because CUPS starts after smbd:
    https://bugs.launchpad.net/ubuntu/+source/cups/+bug/494141/

A long term fix may be in the CUPS upstart configuration, but that doesn't help people using Ubuntu 10.04 LTS where CUPS is still using a SysV startup script instead of upstart. Some suggested workarounds for Ubuntu 10.04 are given in that bug report.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

John interesting. I commented on bug #494141 as well about the lucid situation.

It seems to me that it is in fact a duplicate of that bug.

Martin Pitt, in comment #30, says that the impact of the bug is mitigated by the fact that smbd will attempt to refresh the printers every 750 seconds. So while 12 minutes is a long time to wait, its not a total loss. I think even my suggested solution is a bit large to put into an SRU.

I'm going to mark this as a duplicate of that bug.

Revision history for this message
John Edwards (john-cornerstonelinux) wrote :

Just to mention that smbd does *not* refresh CUPS printers every 750 seconds. You need to send it a reload (or SIGHUP) .

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.