Open Tyil opened 6 years ago
FWIW, this is the last part of a tutorial I'm writing on how to get started with Sparrowdo, including some sample code to set up a DNS cache with dnsmasq
. This tutorial in turn intends to close https://github.com/melezhik/sparrowdo/issues/24.
Hi Patrick! Sparrowdo runs sparrow client with --purge-cache
option enabled, that results in cleanup of all temp/cache files upon sparrow run. Here is 67f6533bee4c5ef702c5201d6ab09e574c23c894 fix to make it possible overwrite this option on sparrowdo side, I will want to like that:
sparrowdo --purge_cache=False
Please let me know if it helps.
Alexey
Probably I need to dynamically disable cache purge in case of any errors during sparrow client execution, so that a use could take troubleshooting, but this require changes in Sparrow client, meanwhile please use sparrowdo --purge_cache=False
as a work around ....
With that patch the error log does exist, but it's empty.
Please run as sparrwodo --verbose --purge_cache=False
and attach output ... I will take a look closer ...
Ok, no need to attach the log, I know the reason:
$ cat hook.bash
service=$(config service)
shopt -s nocasematch;
if [[ $os =~ "debian" ]]; then
run_story $(config action) os debian service $service
elif [[ "$os" =~ "ubuntu" ]]; then
run_story $(config action) os debian service $service
elif [[ "$os" =~ "amazon" ]]; then
run_story $(config action) os amazon service $service
elif [[ "$os" =~ "centos" ]]; then
run_story $(config action) os $os service $service
elif [[ "$os" =~ "archlinux" ]]; then
run_story $(config action) os $os service $service
elif [[ "$os" =~ "minoca" ]]; then
run_story $(config action) os $os service $service
else
echo "unknown os: $os"
exit 1
fi
Obviously funtoo is not listed here, so Sparrow just print "unknown os: funtoo" into STDOUT and just exit with 1
The reason you can't see anything in the STDOUT is a Sparrow specific how it, handles errors in so called hooks files. ( The is a probably subject for another improvement ticket ),
I will fix you up with patch soon.
I've released to SPH a new version of service
plugin with Funtoo support - https://sparrowhub.org/info/service?v=0.002000
Please you this one and make sure that sparrow client index is updated on remote host ( this is default mode unless you don't use --no_index_update
)
Oh, I completely missed that part, I was looking in the modules/start/story.bash
file, and just updated that one in the hopes that'd work. I can rewrite that file to a case
and see if I can fix it like that. As an added bonus, we'll get some cleaner code out of it. I'll probably add a default case to try the Debian version, but add in a warning about it.
I'll try to update to your new version for now, and update it if I think it can be made prettier :)
Sure, it's open source )))))
The new version you uploaded works to call the rc-service
tool correctly! Thanks for the quick update!
Yeah, sure. It's was "blind" change but I have been found lucky )))
I'm trying to start a service with
service-start
, which fails on my OS (Funtoo) because it usesrc-service
, notservice
. I've found this out by looking through the source code, because the log file it should create doesnt exist:I'm also trying to fix the issue on my machine, but it still errors out, and since there's no log file I can't really troubleshoot at this point. Why is there no error log at the path noted in the output of
sparrowdo
?