Why is it an error if you're on a pure systemd system with no /etc/init.d??
2016.11.3, but that's hardly relevant. Look at [jettero@2d254be0f6] for details.
I didn't submit a pull request (or indeed, finish the thought) because I'm just asking. I get this error constantly, and I refuse to give in and pretend I have an /etc/init.d … I don't have or want one. Could we maybe have a config option about whether this should be an error? should it not be an error?
You know, ... on further reflection, ... you do check errno.EEXIST.
My error is [Error 2] in the log. My python2 errno.EEXIST is 17. I can't explain the difference. I think my python is broken? Maybe?
Ahh, I got it:
My $(uname -r) is 4.9.1-1 and my header version is 4.7-1. I need to reboot and it'll go away I bet.
If this error persists, we should add another if statement in the OSError exception block for catching if the directory does not exist, and just returning an empty list.
https://github.com/saltstack/salt/blob/develop/salt/modules/systemd.py#L207-L221
I guess I should schedule a reboot then... to clear the info needed tag. I'm fairly sure it will clear up though. I hate rebooting.
Yeah, post reboot, python2 still thinks errno.EEXIST is 17, and open('fail") gives an exception with errno 2.
I guess I'd need to recompile my python to fix that.
... is the problem that we really want errno.ENOENT?
@terminalmage should this line be errno.ENOENT?
https://github.com/saltstack/salt/blob/develop/salt/modules/systemd.py#L208
EEXIST is for when the file exists.
errno.ENOENT
No such file or directory
Thanks,
Daniel
Yes, this is correct. EEXIST is for when the file/directory is present. Sorry for the oversight.
Thanks!
On Wed, Mar 22, 2017 at 1:35 PM, Erik Johnson notifications@github.com
wrote:
Fixed in #40226 https://github.com/saltstack/salt/pull/40226.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/saltstack/salt/issues/40149#issuecomment-288497491,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAssoY7och8ifa0RVcugDWyT_Jm7B6--ks5roWoAgaJpZM4MiX0Q
.