Skip to content
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

vSphere_guest Config mismatch for vm_disk: size_gb #7385

Closed
oheinz opened this issue May 13, 2014 · 4 comments
Closed

vSphere_guest Config mismatch for vm_disk: size_gb #7385

oheinz opened this issue May 13, 2014 · 4 comments
Labels
bug This issue/PR relates to a bug. cloud P2 Priority 2 - Issue Blocks Release

Comments

@oheinz
Copy link

oheinz commented May 13, 2014

Issue Type:

Bug Report

Ansible Version:

1.6.1
devel branch

Environment:

Debian wheezy 7.5

Summary:

Some similar int casting bugs have already been fixed in pull/7190.

Steps To Reproduce:

Use a variable for Disk size:

   vm_disk:
     disk1:
       size_gb: "{{ vm_disk_size }}"
Expected Results:

Create a guest with specified disk size.

Actual Results:

Play fails with error:
msg: Config mismatch for vm_disk on [('size_gb', <type 'int'>)]

@mpdehaan
Copy link
Contributor

Suspect this is because the module isn't casting.

@jimi-c
Copy link
Member

jimi-c commented May 13, 2014

The above patch should fix this issue. If you continue having problems related to this issue, please let us know. Thanks!

@oheinz
Copy link
Author

oheinz commented May 14, 2014

Sorry, with current devel branch I still get the exact same error.

The error is raised in config_check. To me it seems as if config_check still checks if the value is int as defined in main's proto_vm_disk.

When i change the proto_vm_disk type for size_gb from int to basestring it works. But I'm not sure if this is the right solution. Though I don't understand why it seems to work for
'memory_mb': int,
'num_cpus': int,
although I pass them as Jinga substituted variables as well ?! But as I don't speak python there is a lot of guessing involved.

@jimi-c jimi-c reopened this May 14, 2014
@jimi-c jimi-c closed this as completed in 67d8df0 May 14, 2014
@jimi-c
Copy link
Member

jimi-c commented May 14, 2014

I've also merged in the above patch to address the config check issue. The check will now attempt to cast the value to the type specified and will only mark the value as missing if that fails as well. Please let us know if you are still seeing any problems related to this issue after testing this patch. Thanks!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. cloud P2 Priority 2 - Issue Blocks Release
Projects
None yet
Development

No branches or pull requests

4 participants