apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.93k stars 464 forks source link

Init script kills cupsd processes in all Solaris zones #3389

Closed michaelrsweet closed 12 years ago

michaelrsweet commented 14 years ago

Version: -feature CUPS.org User: automatthias

Solaris 10 features virtualization technology, called Solaris Zones. The init script is unaware of this technology; in effect, when the start/stop script is invoked to stop cupsd, it stops the cupsd processes in all zones, not just the global zone. For example:

Before:

solarisbox.example.com - cupsd is running solarisbox-zone1.example.com - cupsd is running solarisbox-zone2.example.com - cupsd is running solarisbox-zone3.example.com - cupsd is running

solarisbox # svcadm disable cswcupsd

solarisbox.example.com - cupsd is disabled solarisbox-zone1.example.com - cupsd is in maintenance state solarisbox-zone2.example.com - cupsd is in maintenance state solarisbox-zone3.example.com - cupsd is in maintenance state

solarisbox # svcadm enable cswcupsd

solarisbox.example.com - cupsd is running solarisbox-zone1.example.com - cupsd is in maintenance state solarisbox-zone2.example.com - cupsd is in maintenance state solarisbox-zone3.example.com - cupsd is in maintenance state

The maintenance state means that the service is offline and can't be started.

The patch linked below implements a bugfix. If /usr/bin/zonename binary is present, indicating that the system has zones technology installed, it will only look for cupsd processes in the current zone.

http://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/cups/branches/cups-1.4.0/files/0007-Solaris-zone-support-in-init-script.patch

michaelrsweet commented 14 years ago

CUPS.org User: mike

Solaris zones are not currently supported; moving this to a CUPS 1.5 feature request, as we don't add features in patch releases.

michaelrsweet commented 14 years ago

CUPS.org User: SunTzuTech

Given that there's a CUPS smf manifest, why is this being done with init scripts? S8 and S9 don't have zones.

michaelrsweet commented 14 years ago

CUPS.org User: automatthias

The CUPS manifest calls the init script, it's generally only a wrapper. OpenCSW's script autogenerate a manifest to wrap the init script.

If you look at the OpenCSW build file[1], you'll see this:

INITSMF = $(sysconfdir)/init.d/cswcups

This line tells the build system: "this is the start/stop file you need to use with SMF".

[1] https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/cups/trunk/Makefile

michaelrsweet commented 12 years ago

CUPS.org User: mike

Sorry, we have decided this issue will not be addressed in a CUPS release.

(and the CUPS-supplied manifest replaces the init script and does not have this problem)