Open cyphar opened 8 years ago
@icecrime What do you think of this?
For some background, in order to make the migration as smooth as possible, we package a script with our migration package so that it will "auto-detect" which storage drivers to migrate and sourcing /etc/sysconfig/docker
is made much easier with this patch.
I don't quite understand the use case, but I'm not opposed neither given that the change is not of huge importance.
Here's a simplified usecase:
% cat /our/auto/migration/script
source /etc/sysconfig/docker
migrator $DOCKER_OPTS
In order to ensure that it is possible to use /etc/sysconfig/docker, we have to ignore any undefined flags. Since the migrator doesn't require any positional arguments, this means we can ignore all undefined and left-over arguments.
We print warnings so the user is somewhat aware of what's going on.
Signed-off-by: Aleksa Sarai asarai@suse.de
I know it's bad form to modify a vendored package, but I feel like this is a special case (upstream wouldn't accept it, but having this code means that people can just append their normal Docker command-line flags to the migrator).
/cc @tonistiigi