Open till opened 8 years ago
Should probably note that this is a BC break for VMs that are running when the plugin is updated.
cc @sethvargo @reset — Any thoughts?
@till unfortunately this would break quite a bit more than you think. The shelves are uniquely named for the machine, which is why the machine name is included. If there are cases where the name must be shorter than X characters, which it seems is the case with some providers as you pointed out, we should instead perhaps choose a hashing function which will create a unique identifier within those character limits and use that value instead.
@reset do you think the machine name is really necessary? From what I understand mktmpdir()
is already unique enough? Well, at least I think the point of that function is to create a unique temporary directory. The machine name makes it slightly more human-readable, but yeah... :)
On FreeBSD nfs mounts (path + host) are limited to 88 characters. Which means that excluding the IP, there's 73 characters left to build a path that works.
I can't do much about a long username, but e.g. I can try to trim the path berkshelf creates to share the shelf into the VM.
I shortened "berkshelf" to "bs", and I dropped the suffix. Unless I don't understand Dir.mktmpdir(), I think this should be "unique" enough to work.
I'd add a test if someone gives me an idea what to test for. :)