-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: driver.provider.name
Overrided by VAGRANT_DEFAULT_PROVIDER
#155
base: main
Are you sure you want to change the base?
Conversation
In case environment variable `VAGRANT_DEFAULT_PROVIDER` is defined (see <https://www.vagrantup.com/docs/other/environmental-variables#vagrant_default_provider>), our `driver.provider.name` will have no effect and always start with above default provider as specifiied. With python-vagrant `up()` (see <https://github.com/pycontribs/python-vagrant/blob/main/src/vagrant/__init__.py#L310-L318>) we could specify the target provider with `provider` option, where our current wrapper only provide the `provision` option. See ansible-community/molecule-vagrant#174 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.0.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.0.0-1.spec mv ../python*-molecule-plugins*23.0.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.0.0 rm -rf ../python*-molecule-plugins*23.0.0*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.0-1.spec mv ../python*-molecule-plugins*23.4.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.0 rm -rf ../python*-molecule-plugins*23.4.0*.* See ansible-community#142 See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.1-1.spec mv ../python*-molecule-plugins*23.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.1 rm -rf ../python*-molecule-plugins*23.4.1*.* See ansible-community#142 See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.0.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.0.0-1.spec mv ../python*-molecule-plugins*23.0.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.0.0 rm -rf ../python*-molecule-plugins*23.0.0*.* See ansible-community#155 See ansible-community#156 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.0-1.spec mv ../python*-molecule-plugins*23.4.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.0 rm -rf ../python*-molecule-plugins*23.4.0*.* See ansible-community#142 See ansible-community#155 See ansible-community#156 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.1-1.spec mv ../python*-molecule-plugins*23.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.1 rm -rf ../python*-molecule-plugins*23.4.1*.* See ansible-community#142 See ansible-community#155 See ansible-community#156 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.0-1.spec mv ../python*-molecule-plugins*23.4.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.0 rm -rf ../python*-molecule-plugins*23.4.0*.* See ansible-community#142 See ansible-community#155 See ansible-community#156 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.1-1.spec mv ../python*-molecule-plugins*23.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.1 rm -rf ../python*-molecule-plugins*23.4.1*.* See ansible-community#142 See ansible-community#155 See ansible-community#156 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
driver.provider.name
Overrided by VAGRANT_DEFAULT_PROVIDER
driver.provider.name
Overrided by VAGRANT_DEFAULT_PROVIDER
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.0-1.spec mv ../python*-molecule-plugins*23.4.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.0 rm -rf ../python*-molecule-plugins*23.4.0*.* See ansible-community#142 See ansible-community#155 See ansible-community#156 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.4.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.4.1-1.spec mv ../python*-molecule-plugins*23.4.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.4.1 rm -rf ../python*-molecule-plugins*23.4.1*.* See ansible-community#142 See ansible-community#155 See ansible-community#156 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
Isn't this expected behaviour? |
Let's reference original code (see https://github.com/hashicorp/vagrant/blob/2092df529ae73bd0ae4d01e2d35c8952b9620988/lib/vagrant/environment.rb#L319-L332):
Corresponding detail official documents (see https://developer.hashicorp.com/vagrant/docs/providers/basic_usage#default-provider):
With python-vagrant, it do able to specify the
Within our current Molecule Vagrant plugin implementation, we suppose providing
But the real behavior as mentioned in this PR, we DIDN'T pass this |
as I said in the past always forcing it is wrong too. It should always be possible to not force the provider, for cases where things are "just" working. |
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.0-1.spec mv ../python*-molecule-plugins*23.5.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.0 rm -rf ../python*-molecule-plugins*23.5.0*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.0-1.spec mv ../python*-molecule-plugins*23.5.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.0 rm -rf ../python*-molecule-plugins*23.5.0*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
I faced with this issue, but I don't have full knowledge of this source code, so shouldn't be better to just modify this line like this "provider": os.environ.get("VAGRANT_DEFAULT_PROVIDER", self._module.params["provider_name"]), So |
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.0-1.spec cp ../python*-molecule-plugins*23.5.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.0 rm -rf ../python*-molecule-plugins*23.5.0*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.6.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.6.0-1.spec cp ../python*-molecule-plugins*23.6.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.6.0 rm -rf ../python*-molecule-plugins*23.6.0*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.0-1.spec cp ../python*-molecule-plugins*23.5.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.0 rm -rf ../python*-molecule-plugins*23.5.0*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.3-1.spec cp ../python*-molecule-plugins*23.5.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.3 rm -rf ../python*-molecule-plugins*23.5.3*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.3-1.spec cp ../python*-molecule-plugins*23.5.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.3 rm -rf ../python*-molecule-plugins*23.5.3*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.3-1.spec cp ../python*-molecule-plugins*23.5.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.3 rm -rf ../python*-molecule-plugins*23.5.3*.* See ansible-community#155 See ansible-community#237 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.3-1.spec cp ../python*-molecule-plugins*23.5.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.3 rm -rf ../python*-molecule-plugins*23.5.3*.* See ansible-community#155 See ansible-community#237 See ansible-community#240 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.0.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.0-1.spec cp ../python*-molecule-plugins*23.5.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.0 rm -rf ../python*-molecule-plugins*23.5.0*.* See ansible-community#155 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
git clean -xdf tar zcvf ../python-molecule-plugins_23.5.3.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule-plugins.spec ../python-molecule-plugins_23.5.3-1.spec cp ../python*-molecule-plugins*23.5.3*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-plugins-23.5.3 rm -rf ../python*-molecule-plugins*23.5.3*.* See ansible-community#155 See ansible-community#237 See ansible-community#240 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
In case environment variable
VAGRANT_DEFAULT_PROVIDER
is defined (see https://www.vagrantup.com/docs/other/environmental-variables#vagrant_default_provider), ourdriver.provider.name
will have no effect and always start with above default provider as specifiied.With python-vagrant
up()
(seehttps://github.com/pycontribs/python-vagrant/blob/main/src/vagrant/__init__.py#L310-L318) we could specify the target provider with
provider
option, where our current wrapper only provide theprovision
option.See ansible-community/molecule-vagrant#174