Closed EugenMayer closed 6 years ago
I can't really do anything with the above error message since there is a bunch of context missing from the Puppet run. You should be able to narrow it down using the following steps:
a) @jacobbednarz nothing erros before that ( thats why only those logs have been pasted :) )
b) That does not seem to a dnsmasq issue at all, rather launchctl triggered with a startscript which does simply no longer exist?
c)
/bin/launchctl start dev.dnsmasq
eugen-desktop :: ~ » echo $?
3
eugen-desktop :: /Library/LaunchDaemons » ls -la | grep dns
-rw-r--r-- 1 root wheel 1.1K Jan 16 14:03 dev.dnsmasq.plist
-rw-r--r-- 1 root wheel 1019 Dec 18 17:19 local.dnsmasq.plist
interestingly, since i am not using .dev, dev.dnsmasq.plist
includes the definition for .lan
cat dev.dnsmasq.plist| grep lan
<string>lan.dnsmasq</string>
<string>Redirects *.lan DNS requests to localhost.</string>
i remember when switching form dev to lan, i took a middle step trying local, so thats why that might be still exisitng?
cat local.dnsmasq.plist | grep local
<string>local.dnsmasq</string>
<string>Redirects *.local DNS requests to localhost.</string>
The question is now
a) why dev. includes the new .lan defintions, or is "dev." meant as "development" dnsmasq? if yes that ends up really confusing b) what does actually fail then?
So after removing both files and running boxen again, only
ls -la | grep dns
-rw-r--r-- 1 root wheel 1.1K Feb 13 11:55 dev.dnsmasq.plist
has been recreated, so local is in fact just an artifact we should not bother about. Still the error exists
that one is interesting though
sudo /bin/launchctl list dev.dnsmasq
Could not find service "dev.dnsmasq" in domain for system
So the actual problem is the <string>lan.dnsmasq</string>
define in the plist file, it does not match dev.dnsmasq
what i do in the boxen recipe:
class { 'dnsmasq': tld => 'lan' }
which i issume is how you designed it?
Yes, testing
sudo /bin/launchctl list lan.dnsmasq
{
"StandardOutPath" = "/opt/boxen/log/dnsmasq/console.log";
"LimitLoadToSessionType" = "System";
"StandardErrorPath" = "/opt/boxen/log/dnsmasq/console.log";
"Label" = "lan.dnsmasq";
"TimeOut" = 30;
"OnDemand" = true;
"LastExitStatus" = 0;
"PID" = 117;
"Program" = "/opt/boxen/homebrew/sbin/dnsmasq";
"ProgramArguments" = (
"/opt/boxen/homebrew/sbin/dnsmasq";
"--conf-file=/opt/boxen/homebrew/etc/boxen/dnsmasq/dnsmasq.conf";
"--keep-in-foreground";
);
};
You see that actually eventhough the file is called dev.dnsmasq.list the acual daemon is named lan.dnsmasq if one sets that, thus /bin/launchctl start dev.dnsmasq
fails, while /bin/launchctl start lan.dnsmasq
will work
I would not really say thats about a suprise - you ever tested setting an actual custom tld? since this one is static https://github.com/boxen/puppet-dnsmasq/blob/master/manifests/init.pp#L19
this one will end up being named dev.dnsmasq https://github.com/boxen/puppet-dnsmasq/blob/master/manifests/init.pp#L31
which seems to be already adressed here https://github.com/boxen/puppet-dnsmasq/commit/5bad3615f71a4b1b1e67ec52a07a16e0fc1e48ce
so i just wasted my time for nothing. So what about just releasing that version?
why dev. includes the new .lan defintions, or is "dev." meant as "development" dnsmasq? if yes that ends up really confusing
This was originally my take as well however the idea is that dev
was for local development work and you'd still be free to do other TLDs if you wanted but the development file would remain consistent. I was also going to clean the other files left around but I had a couple of people internally using this for other setups so I opted against that.
which seems to be already adressed here 5bad361
Yep, the fix in 5bad361 was my bad due to a misunderstanding on how this was designed to work.
So what about just releasing that version?
Thanks for picking this up! I initially released 2.0.5 to address the regression but the label update isn't included. I've just cut 2.0.6
that should bring it all up to date.
I'm going to close this off now but do ping me back if the new version doesn't help and I'll re-open.
It helped i forked and tried today already, so this is just fine. Thanks!
any hints on that or how to fix that?