graysky2 / profile-sync-daemon

Symlinks and syncs browser profile dirs to RAM thus reducing HDD/SDD calls and speeding-up browsers.
https://wiki.archlinux.org/index.php/Profile-sync-daemon
Other
910 stars 88 forks source link

PSD and SAMBA Domain on Xubuntu #50

Closed tmknight closed 11 years ago

tmknight commented 11 years ago

Great tool! However, recently something has changed either on the samba end or PSD end, but I can no longer start the service on logon. Using the Ubuntu PSD PPD, the issue (as best I can determine from review of boot.log) is that PSD is trying to start in the middle of smbd and nmbd starting and as such without the samba services running PSD throws and error that a user in PSD.conf does not exist (the user is a samba domain user). However, once I logon, I have no issues manually invoking the PSD service (since smbd and nmbd are now started).

I've tried removing and re-adding upstart symlinks to a later value (e.g. update-rc.d psd defaults 99) to no avail (i.e. service still not starting at boot but also now have no boot.log entries (i.e. boot.log entries only appear when rc.d set to 20).

Any insight on path forward to remediate would be appreciated.

Thanks agan!

graysky2 commented 11 years ago

I am not an ubuntu expert but I would think your original thought is correct: have psd start after the other dependencies. Do you know how upstart keeps track of dependency and order of start/stop?

tmknight commented 11 years ago

According to this:(https://help.ubuntu.com/community/UpstartHowto#What_order_are_initscripts_started_and_stopped_in.3F) the K and S symlinks run in order from 00 to 99, K00-99 first, then S00-99. So PSD for Ubuntu is not truly converted to UpStart and is still working via "traditional" init.d script. I attempted to set the symlinks to 30,40 & even 99, but that had no effect and worse, did not see any attempt logged in boot.log. I'm at a loss as to why when changed to a different order the init.d seems to not get triggered at boot. Manual execution after login works fine. Nothing jumps out when looking at the init.d script.

graysky2 commented 11 years ago

I contacted the author of the upstart init script via email referencing this issue. Let's see what he can add.

tmknight commented 11 years ago

Thanks graysky2, here's the boot.log section that I see as a possible clue: [code] Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility, e.g. start S20nmbd

tmk is not a valid user on this system. Check config file for typos: /etc/psd.conf

Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service S20smbd start [/code]

In the interim, as a less than elegant work-around, I added a "service start" command to lightdm.conf: [code] session-setup-script=service psd start [/code] Completely ghetto, but a working stop-gap while we work through being able to "delay" the init script.

jcharaoui commented 11 years ago

The script can be made to start later on in the boot sequence. To push it at the end, replace these two lines :

    # Required-Start: $local_fs
    # Required-Stop: $local_fs

with

    # Required-Start: $all
    # Required-Stop: $all

then run

    update-rc.d profile-sync-daemon defaults

Does it solve your problem?

tmknight commented 11 years ago

Thanks for the reply jcharaoui, unfortunately that change had no effect. I made the change, removed the links, then re-added with defaults and again with defaults 99 to no avail. Still seeing PSD attempt to start between smbd and nmbd. Any other thoughts? If not, I suggest closing, since I probably present a unique situation compared to majority of use cases. Unless you feel there is merit for being able to control startup order for other scenarios where PSD is desired to start last.

Thanks again!

jcharaoui commented 11 years ago

I don't think yours is an edge case. I'd be really happy to help you further if you give me some more info about your OS. Normally with Required-Start: $all the script should start at the very end of the boot sequence.

graysky2 commented 11 years ago

Been a few weeks... any word tmknight?

tmknight commented 11 years ago

Hi,

I haven't done anymore work on it. I've been fine with my work around. The case/bug can be closed IMO since I seem to be the only one with an issue.

Thanks! On Aug 24, 2013 1:55 PM, "graysky" notifications@github.com wrote:

Been a few weeks... any word tmknight?

— Reply to this email directly or view it on GitHubhttps://github.com/graysky2/profile-sync-daemon/issues/50#issuecomment-23215372 .

graysky2 commented 11 years ago

Hmm... I admit that you have a rather niche use case with samba and all... but if you're willing to work with jcharaoui, I think your time will be worth it if we can make the ubuntu support more robust. I will leave it to you to decide; close the issue if you are unwilling.