container-storage-setup icon indicating copy to clipboard operation
container-storage-setup copied to clipboard

One bad config is not ignored

Open ghost opened this issue 8 years ago • 9 comments

Use STORAGE_DRIVERS=overlay2 instead of correct STORAGE_DRIVER will result in some unexpected error messages.

# docker-storage-setup ERROR: Invalid storage driver: devicemapper.

ghost avatar Mar 01 '17 15:03 ghost

Are you testing the latest code?

rhvgoyal avatar Mar 01 '17 15:03 rhvgoyal

I can't reproduce it.

rhvgoyal avatar Mar 01 '17 16:03 rhvgoyal

Oh you specified extra S, I can see it.

rhvgoyal avatar Mar 01 '17 16:03 rhvgoyal

Ok, this overrides that internal variable STORAG_DRIVERS and that's the problem.

rhvgoyal avatar Mar 01 '17 16:03 rhvgoyal

@rhatdan may be we should source the external files first and then define internal global variables to make sure users can't intentionally/accidentally override container-storage-setup gloabal variables?

rhvgoyal avatar Mar 01 '17 16:03 rhvgoyal

https://github.com/projectatomic/container-storage-setup/pull/217

rhatdan avatar Mar 01 '17 16:03 rhatdan

@rhatdan I am playing with another patch where I want to initialize global variables after sourcing config file. That way all the globals will be protected.

rhvgoyal avatar Mar 01 '17 19:03 rhvgoyal

We can also do that, but it could get confusing. We have globals that can be overridden, as well.

rhatdan avatar Mar 01 '17 19:03 rhatdan

I think I have taken care of that in my patch. Have a look.

rhvgoyal avatar Mar 01 '17 19:03 rhvgoyal