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

salt-cloud: TypeError 'bool' object is unscriptable on map destruction #13266

Closed
Jamezz opened this issue Jun 5, 2014 · 5 comments
Closed

salt-cloud: TypeError 'bool' object is unscriptable on map destruction #13266

Jamezz opened this issue Jun 5, 2014 · 5 comments
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P3 Priority 3 Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@Jamezz
Copy link

Jamezz commented Jun 5, 2014

I am attempting to destroy a map of VM's using the devel vSphere cloud provider. The VM's get created just fine and I can destroy them one-by-one, but I can't seem to destroy them using "salt-cloud /etc/salt/cloud.maps.d/testpool.map -d" as it throws this exception.

Output:
[ERROR ] An un-handled exception was caught by salt's global exception handler:
TypeError: 'bool' object is unsubscriptable
Traceback (most recent call last):
File "/usr/bin/salt-cloud", line 10, in
salt_cloud()
File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 142, in salt_cloud
cloud.run()
File "/usr/lib/python2.6/site-packages/salt/cloud/cli.py", line 141, in run
matching = mapper.delete_map(query='list_nodes')
File "/usr/lib/python2.6/site-packages/salt/cloud/init.py", line 1515, in delete_map
elif vm_details['state'].lower() not in ('running',
TypeError: 'bool' object is unsubscriptable
Traceback (most recent call last):
File "/usr/bin/salt-cloud", line 10, in
salt_cloud()
File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 142, in salt_cloud
cloud.run()
File "/usr/lib/python2.6/site-packages/salt/cloud/cli.py", line 141, in run
matching = mapper.delete_map(query='list_nodes')
File "/usr/lib/python2.6/site-packages/salt/cloud/init.py", line 1515, in delete_map
elif vm_details['state'].lower() not in ('running',
TypeError: 'bool' object is unsubscriptable

--Map File--

Mob_Server2012R2U1:
- TH-ST-12R2-PWH:
grains:
pool_id: 1234

Mob_Server2008R2:
- TH-ST-08R2-NMS1:
grains:
pool_id: 1234

--End Map File--

@basepi
Copy link
Contributor

basepi commented Jun 6, 2014

Thanks for the report. What version of salt are you using?

@basepi basepi added Bug and removed Regression labels Jun 6, 2014
@basepi basepi added this to the Approved milestone Jun 6, 2014
@Jamezz
Copy link
Author

Jamezz commented Jun 6, 2014

salt-master/cloud is running 2014.1.0-6887-g5fa1127 (Hydrogen). I compiled it a few days ago as the devel branch is the only one with the vSphere module.

@basepi
Copy link
Contributor

basepi commented Jun 6, 2014

Thanks!

@pass-by-value pass-by-value added the P3 Priority 3 label Jun 2, 2015
@rallytime
Copy link
Contributor

@Jamezz Are you still running into this issue on a newer version of salt (current stable is 2015.5.1)?

@rallytime rallytime added fixed-pls-verify fix is linked, bug author to confirm fix severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around and removed severity-low 4th level, cosemtic problems, work around exists labels Jun 2, 2015
@jfindlay jfindlay added the RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. label Jun 9, 2015
@rallytime rallytime removed the RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. label Jun 16, 2015
@rallytime
Copy link
Contributor

Since we didn't hear back on this issue, I am going to close it.

Also note that the vshpere driver is on a deprecation path and will be officially removed in Salt Carbon (see #24487 and #24504). As such, we'd recommend moving to the new vmware driver. Since we have a much more robust and clean driver, we won't be spending time cleaning up bugs for vsphere. However, we will of course be accepting fixes from community members as they are submitted.

If this issue still remains a problem for you, I would recommend giving the vmware driver a try to see if the issue remains on the new driver. There are some good instructions about how to switch to the vmware driver (as it currently isn't packaged in any release and is only available on the develop branch) in #23705.

If this bug remains in the new vmware driver, please feel free to file a new issue and we will take a look. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P3 Priority 3 Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

5 participants