Allow periods in pillar filenames
Currently salt does not allow having periods in a pillar's filename. Trying to do so will return the error:
Specified SLS 'host_data/test.example.org' in environment 'base' is not available on the salt master
The use case I'm thinking of is including per-node pillar data. Using a node's nodename is not ideal as there could be collisions, and doing something like test_host_name.sls seems like a hack.
I don't think this is something that we'd end up doing, since we already replace the path separators with dots (for example, foo/bar/baz.sls would be SLS target foo.bar.baz).
I'd like to hear more from some of my fellow devs, though.
Yes, the issue is that when Tom created salt, he decided to use dots as path separators, much like Python does when you import modules. Since he was trying to make Salt as Pythonic as possible, it made sense. Changing the path separator at this point can't really happen because of backwards compatibility, so I'm not sure we'll be able to implement this one. Most people are currently using underscores or dashes in place of the dots when they want to mirror minion IDs. Not a great workaround, but a workaround nonetheless.
We could potentially support both, but it would add a lot of search overhead, as we'd have to start by looking for the full path, then work our way backwards.
For example, foo.bar.baz.blah could match foo/bar/baz/blah.sls or foo/bar/baz.blah.sls or foo/bar.baz.blah.sls or foo.bar.baz.blah.sls. And what's to stop it from matching foo.bar/baz.blah.sls or similar? Someone is going to try that if we implement this, and complain if it doesn't match. So we end up with a very inefficient search pattern (I think it turns into exponential complexity) that we have to follow to find files, and a documentation problem as well (we'd have to very carefully document conflict behavior).
Just a mind dump of my thoughts on the matter.
Yeah, I wasn't thinking about Pythonesque matching, and s/./_/ is trivial to do to workaround this... mostly my OCD kicking in :)
Totally understandable. I think I'm going to close this for now, pending further discussion.