Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89956 - cups + samba + vmware causing endless loop in init scripts
Summary: cups + samba + vmware causing endless loop in init scripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords: Bug
: 118270 119065 119516 120256 127570 150556 156047 (view as bug list)
Depends on: 23971
Blocks:
  Show dependency tree
 
Reported: 2005-04-21 12:13 UTC by Steve Tousignant
Modified: 2007-11-09 10:22 UTC (History)
22 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
vmware net only with removed service stuff (vmware-net.diff,2.97 KB, patch)
2006-10-09 08:12 UTC, Alexander Weber
Details | Diff
vmware services only with removed net stuff (vmware-services.diff,2.18 KB, patch)
2006-10-09 08:17 UTC, Alexander Weber
Details | Diff
Patches for splitting vmware (vmware-split-patches.tgz,1.72 KB, application/x-compressed-tar)
2006-10-11 00:35 UTC, Alexander Weber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Tousignant 2005-04-21 12:14:29 UTC
this bugs is some kind of replicate of bug #15492 

We need to restart samba deamon to have printer sharing activated.

Reproducible: Always
Steps to Reproduce:
1. Have CUPS and samba for restart with default config from example 
2. add samba and cups to default runlevels
3. reboot
4. try access printer after reboot. 

Actual Results:  
the printer are not listed 

Expected Results:  
The printer should work normaly

if we look at the service startup, cups is started right after samba so samba
dont load the printer on startup.
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2005-04-23 03:08:03 UTC
added use samba to cupsd init file
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2005-04-26 03:44:42 UTC
Ok, but now samba also still 'use cups', and you get:

----
 * Caching service dependencies ...
 *  Services 'samba' and 'cupsd' have circular
 *  dependency of type 'iuse';  continuing...
Comment 3 Heinrich Wendel (RETIRED) gentoo-dev 2005-04-26 04:03:13 UTC
samba herd: please remove use cups from samba-init
Comment 4 Christian Andreetta (RETIRED) gentoo-dev 2005-04-27 06:29:36 UTC
'use cupsd' removed
Comment 5 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2005-04-28 07:30:43 UTC
Doesn't this make samba start BEFORE cups?
maybe it's just me, but cups should be running first, so samba can ask it for it's printers, or am i wrong?
Comment 6 Heinrich Wendel (RETIRED) gentoo-dev 2005-04-28 07:39:50 UTC
sorry, you are completly right, reverted the changes

this bug has to be in baselayout then
Comment 7 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2005-04-28 07:42:06 UTC
ahh, thought so, didn't make much sense :)
Comment 8 Christian Andreetta (RETIRED) gentoo-dev 2005-04-28 07:46:53 UTC
You're right 8-/ ...
Comment 9 Heinrich Wendel (RETIRED) gentoo-dev 2005-05-10 08:49:34 UTC
initial reporter: does your problem persist?
Comment 10 Steve Tousignant 2005-05-10 10:15:49 UTC
Yes the bugs still happen. 
I've played around the use flags to try solve the problem but with no success.

But then, i could try to get it work if i know where to look. Do you have some advice, or some place i should look for.
Comment 11 Heinrich Wendel (RETIRED) gentoo-dev 2005-05-10 10:23:13 UTC
try to change "use cups" to "after cups" in the samba init file
Comment 12 Steve Tousignant 2005-05-12 08:04:49 UTC
I've tryed with 2 alternative for it. 
before cups 
and 
before cupsd 
nothing has change with these modification. But i've notice that Vmware sevice load bettween those 2 maybe this bug comming from a dependency in the vmware 4.5 suite ? I'll investigate on this case later.
Comment 13 Steve Tousignant 2005-05-12 08:06:11 UTC
forget to tell i've also tryed the after cups and after cupsd thing :p
Comment 14 Steve Tousignant 2005-05-12 10:00:45 UTC
I've checked up the init script of cups and in the depends functions there is a use vmware. Why does cups need to use vmware, it should be vmware that use cups.
I'll change the init script to add the depends in vmware and remove it from cups.

I'll give more detail twomorrow morning if it has worked.
Comment 15 Steve Tousignant 2005-05-13 06:06:47 UTC
Ok now everything is working just fine. 
Please remove the dependency to vmware in cups and add it to vmware.
I'll leave the bug open for you all to see it and it solution.
Comment 16 Heinrich Wendel (RETIRED) gentoo-dev 2005-05-14 07:20:57 UTC
no, cups needs to be started before vmware, take a look at bug #23971. what if you change use vmware to after vmware?
Comment 17 Steve Tousignant 2005-05-16 08:08:07 UTC
Well cups was started after vmware before. 
When i've change the dependency of cups to vmware and vmware to cups everything worked fine and cups was started way before samba or vmware had the chance to start ( Cups even started before dbus and HAL ).
I've checked the bugs #23971 about cups not starting because of vmnet not being there. I can say i dont have this problem with my installation of vmware.
I'll investigate about this problem and bugs and post my solution.
Comment 18 Steve Tousignant 2005-05-17 14:08:07 UTC
Ok now the main problem is we have a big cyclique dependency problem that affect
samba print with cups. And Vmware is causing all these problem.
So if i explain myself we have samba, vmware and cupsd starting in that order.
The reason why is that vmware need samba to startup the samba share into vmware.
Cupsd need to be started after vmware because cups may be binded to a vmware
network interface. And to finish we need cupsd started before samba to have it
printer readed by the samba daemon. 
The only solution i can think of is reloading samba right after cupsd is started
if and only if samba is already started.
Comment 19 Peter J. de Vrijer 2005-06-16 15:29:39 UTC
Just learned about this problem the hard way. Couldn't print from
windows host, which I could yesterday (boot in between).

I added

/etc/init.d/samba restart

to /etc/conf.d/local.start

And since the local initscript is executed last ;-)

But solving this in the initscripts themselves would be appreciated!
Comment 20 Steve Tousignant 2005-06-17 08:45:34 UTC
what i have done is remove the cups depedencies to vmware since my cups
configuration is not bind to vmware virtual network interface. Then everything
work fine. In the ideal world would be that cups retry to bind itself to the
interface servral time after being started and give an error after a maximum of
retry and have a bind to minimaly 127.0.0.1, not completly fails on startup and
brings down the deamon that depends on it.
Comment 21 Czirkos Zoltan 2005-09-12 23:21:31 UTC
The reason for this bug is the additional "after vmware" in /etc/init.d/cupsd.
Vmware has "use samba", samba has "use cupsd" and cupsd has "after vmware", this
way it is a round dependency. Removing "after vmware" from /etc/init.d/cupsd
should solve the problem. And this is the logical way, because cupsd should be
started first, needed by samba, and samba is needed by vmware to share files and
printers with the host.
Comment 22 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-14 12:17:05 UTC
this bug cannot be fixed, because then #23971 would neeed to be reopened. If you can think of a solution, that takes both issues into account please tell me and reopen.
Comment 23 Stefan Schweizer (RETIRED) gentoo-dev 2006-01-14 15:21:25 UTC
*** Bug 118270 has been marked as a duplicate of this bug. ***
Comment 24 Jakub Moc (RETIRED) gentoo-dev 2006-01-15 04:27:51 UTC
*** Bug 119065 has been marked as a duplicate of this bug. ***
Comment 25 Jakub Moc (RETIRED) gentoo-dev 2006-01-15 04:36:07 UTC
Well, causing lock up in init scripts and breaking boot process for users is the worst of available options, this is not acceptable, really.
Comment 26 Roy Marples (RETIRED) gentoo-dev 2006-01-15 08:23:42 UTC
I'm amazed that no-one has thought of the obvious solution to the circular dependency which is to split vmware networking off into a separate init script (vmnet fex) or create it as a baselayout netscripts module.
Comment 27 SpanKY gentoo-dev 2006-01-19 01:43:06 UTC
*** Bug 119516 has been marked as a duplicate of this bug. ***
Comment 28 Robert Davis 2006-01-19 16:56:15 UTC
Argh!  I have been having this problem (boot hanging) and finally found out it is something with cups/vmware/samba and finally found this bug.
Comment 29 SpanKY gentoo-dev 2006-01-25 05:31:49 UTC
*** Bug 120256 has been marked as a duplicate of this bug. ***
Comment 30 Jakub Moc (RETIRED) gentoo-dev 2006-03-25 14:42:59 UTC
*** Bug 127570 has been marked as a duplicate of this bug. ***
Comment 31 Richard Fish 2006-07-21 19:04:30 UTC
This is still a problem.  With parallel startup enabled, my system will hang because samba uses cups, which wants to start after vmware, which wants to start after samba.

I fix this by commenting out the "after samba" in the vmware script.  This really seems to be the most logical thing to do to me.  In fact, some users may want samba to start *after* vmware, for the same reason as cups; to allow samba to bind only to the vmware interfaces.

Is there some use case for the vmware _services_ needing samba to be running?  I can see the need when I actually startup a virtual machine, but I don't see any value in requiring samba to be running for the vmware services.
Comment 32 Carsten Lohrke (RETIRED) gentoo-dev 2006-10-09 05:39:37 UTC
*** Bug 150556 has been marked as a duplicate of this bug. ***
Comment 33 Alexander Weber 2006-10-09 06:09:34 UTC
is it possible to split vmware: vmware-net that should be start before cups, and vmware-services that use samba?
Comment 34 Chris Gianelloni (RETIRED) gentoo-dev 2006-10-09 07:04:45 UTC
Ehh... sure.

Feel free to attach a patch to do it and I'll commit it.  Otherwise, it'll have to wait until I drum up some time to look into it more closely.  The init script-fu for VMware kinda scares me.  The biggest problem is that we're actually using VMware's init script with just a wrapper, instead of our own script.

I've been planning on completely rewriting VMware's script as a Gentoo init script, but that's still a ways off.  If someone wanted to do it for me and submit it to this bug, I'd be much appreciative.
Comment 35 Alexander Weber 2006-10-09 08:12:20 UTC
Created attachment 99203 [details, diff]
vmware net only with removed service stuff

vmware net only with removed service stuff
Comment 36 Alexander Weber 2006-10-09 08:17:12 UTC
Created attachment 99205 [details, diff]
vmware services only with removed net stuff
Comment 37 Alexander Weber 2006-10-09 08:24:46 UTC
I have 2 patches, for /etc/vmware/init.d/vmware, but the original have VMWare Copyright. Your rewrite is welcome.
I dont use samba on vmware. For me it is a cosmetical bug.
sorry for broken english.
 
Comment 38 Alexander Weber 2006-10-11 00:35:00 UTC
Created attachment 99347 [details]
Patches for splitting vmware

Here is my full patchset for splitting by duplicate & remove-unneeded.
services contains only dhcpd and samba
litle more tested with vmware-player-1.0.1.19317-r4

#Installing-instructions:
/etc/init.d/vmware stop
cp /etc/init.d/vmware /etc/init.d/vmware.bak
cp /etc/init.d/vmware /etc/init.d/vmware-services
cp /etc/vmware/init.d/vmware /etc/vmware/init.d/vmware-base
cp /etc/vmware/init.d/vmware /etc/vmware/init.d/vmware-services
patch /etc/init.d/vmware init.d/vmware.diff
patch /etc/init.d/vmware-services init.d/vmware-services.diff
patch /etc/vmware/init.d/vmware-base mod/vmware-base.diff
patch /etc/vmware/init.d/vmware-services mod/vmware-services.diff
/etc/init.d/vmware-services start
Comment 39 Jakub Moc (RETIRED) gentoo-dev 2006-11-23 11:10:16 UTC
*** Bug 156047 has been marked as a duplicate of this bug. ***
Comment 40 Mike Auty (RETIRED) gentoo-dev 2006-11-23 11:43:34 UTC
Guys, I hate to ask this so far down the line, but does vmware really require samba?  As far as I was aware, vmware starts it's *own* samba server to support the "shared folders" feature, which may not even be required, and otherwise I'm not aware of any reason why the system samba needs to be started before vmware, or why there is any dependency between them at all.

Could someone who has samba installed and uses vmware's shared folders feature please verify whether vmware actually needs the system samba service to be started to still function properly?
Comment 41 Steve Tousignant 2006-11-23 14:12:45 UTC
The problem is not that vmware need samba to work but mostly samba need vmware Network interface for some case on user config placing restriction on the specific IP address. Sames goes with cups and other deamon that the user put a specific configuration on an IP address provided by VMWare modules.

The provided solution is ideal cause it can overcome any kind of user config that we could came across.

Regarding the the previous duplicate comment bugs, maybe juste the vmware init script is not updated ?
Comment 42 Richard Fish 2006-11-23 20:42:44 UTC
(In reply to comment #40)
> Guys, I hate to ask this so far down the line, but does vmware really require
> samba?

That was my question in #31.  I'm still not aware of any case where samba and/or cups need to be running before the vmware services start.  I certainly need them to start before my actual virtual machine(s) startup, but that happens later.


> Could someone who has samba installed and uses vmware's shared folders feature
> please verify whether vmware actually needs the system samba service to be
> started to still function properly?

No, samba does not need to be running for shared folders to work.
Comment 43 Jose Medellin 2007-04-26 17:44:28 UTC
Ok, the last comment was on 2006.  I just emerged vmware-player and added vmware to default.  And this is still happening.  The loop is still there in the init scripts.

any definitive solution?  What I did was that I substituded after samba to after local.  That gave a circular because local is supposed to start after *, but the machine started (grin).

Ok, I know that was an ugly fix, but at least it works.  Any approved fixes?

thanks
Comment 44 Jurek Bartuszek (RETIRED) gentoo-dev 2007-08-16 22:44:51 UTC
It seems that I had to learn about this issue the hard way, too. Any progress?
Comment 45 Stefan Schweizer (RETIRED) gentoo-dev 2007-11-09 10:22:16 UTC
removed after vmware from cups init scripts for now. Feel free to continue with the splitup in vmware and readdit then.