projectatomic / container-storage-setup

Service to set up storage for Docker and other container systems
Apache License 2.0
153 stars 77 forks source link

One bad config is not ignored #216

Open ghost opened 7 years ago

ghost commented 7 years ago

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

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

rhvgoyal commented 7 years ago

Are you testing the latest code?

rhvgoyal commented 7 years ago

I can't reproduce it.

rhvgoyal commented 7 years ago

Oh you specified extra S, I can see it.

rhvgoyal commented 7 years ago

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

rhvgoyal commented 7 years ago

@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?

rhatdan commented 7 years ago

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

rhvgoyal commented 7 years ago

@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.

rhatdan commented 7 years ago

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

rhvgoyal commented 7 years ago

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