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] cloud state failing on simplify_type_filters #10281

Closed
gtmanfred opened this issue Feb 8, 2014 · 6 comments
Closed

[salt.cloud] cloud state failing on simplify_type_filters #10281

gtmanfred opened this issue Feb 8, 2014 · 6 comments

Comments

@gtmanfred
Copy link
Contributor

[root@salt salt]# salt salt-master state.single cloud.present name=db1.gtmanfred.com provider=my-rackspace size=performance-1 image=2ab974de-9fe5-4f5b-9d58-766a59f3de61 ssh_key_name=ansible -l debug
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Including configuration from '/etc/salt/master.d/reactor.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/reactor.conf
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] Configuration file path: /etc/salt/master
[DEBUG ] Reading configuration from /etc/salt/master
[DEBUG ] Including configuration from '/etc/salt/master.d/reactor.conf'
[DEBUG ] Reading configuration from /etc/salt/master.d/reactor.conf
[DEBUG ] Missing configuration file: /root/.salt
[DEBUG ] LocalClientEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG ] LocalClientEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[DEBUG ] Checking whether jid 20140208024509007130 is still running
[DEBUG ] get_returns for jid 20140208024514018119 sent to set(['salt-master']) will timeout at 02:45:16
[DEBUG ] jid 20140208024514018119 found all minions
[DEBUG ] Checking whether jid 20140208024509007130 is still running
[DEBUG ] get_returns for jid 20140208024519050617 sent to set(['salt-master']) will timeout at 02:45:21
[DEBUG ] jid 20140208024519050617 found all minions
[DEBUG ] Loaded no_out as virtual quiet
[DEBUG ] Loaded json_out as virtual json
[DEBUG ] Loaded yaml_out as virtual yaml
[DEBUG ] Loaded pprint_out as virtual pprint

salt-master:

      ID: db1.gtmanfred.com
Function: cloud.present
  Result: False
 Comment: An exception occurred in this state: Traceback (most recent call last):
            File "/usr/lib/python2.7/site-packages/salt/state.py", line 1371, in call
              **cdata['kwargs'])
            File "/usr/lib/python2.7/site-packages/salt/states/cloud.py", line 58, in present
              info = __salt__['cloud.create'](provider, name, **kwargs)
            File "/usr/lib/python2.7/site-packages/salt/modules/cloud.py", line 200, in create
              info = client.create(provider, names, **kwargs)
            File "/usr/lib/python2.7/site-packages/salt/cloud/__init__.py", line 179, in create
              ret[name] = salt.utils.cloud.simple_types_filter(
            File "/usr/lib/python2.7/site-packages/salt/utils/cloud.py", line 1446, in simple_types_filter
              simpledict = {}
          AttributeError: 'bool' object has no attribute 'iteritems'
 Changes:   

Summary

Succeeded: 0

Failed: 1

Total: 1

This is built straight from develop.

Am I missing something?

Thanks,
Daniel Wallace

@gtmanfred gtmanfred reopened this Feb 8, 2014
@gtmanfred
Copy link
Contributor Author

Never mind, It looks like this is broken in develop, but working in rc3

[DEBUG ] Generating minion keys for 'db1.gtmanfred.com'
[DEBUG ] SaltEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[INFO ] Creating Cloud VM db1.gtmanfred.com
[DEBUG ] OpenStack authenticating using apikey
[DEBUG ] SaltEvent PUB socket URI: ipc:///var/run/salt/master/master_event_pub.ipc
[DEBUG ] SaltEvent PULL socket URI: ipc:///var/run/salt/master/master_event_pull.ipc
[ERROR ] Error creating db1.gtmanfred.com on OpenStack

The following exception was thrown by libcloud when trying to run the initial deployment: 400 Bad Request The server could not comply with the request since it is either malformed or otherwise incorrect.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/cloud/clouds/openstack.py", line 476, in create
data = conn.create_node(**kwargs)
File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/openstack.py", line 1229, in create_node
data={'server': server_params})
File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/openstack.py", line 156, in request
method=method, headers=headers)
File "/usr/lib/python2.7/site-packages/libcloud/common/openstack.py", line 575, in request
return super(OpenStackBaseConnection, self).request(**kwargs)
File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line 675, in request
response = responseCls(*_kwargs)
File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/openstack.py", line 1003, in init
super(OpenStack_1_1_Response, self).init(_args, *_kwargs)
File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line 112, in init
raise Exception(self.parse_error())
Exception: 400 Bad Request The server could not comply with the request since it is either malformed or otherwise incorrect.
[INFO ] Loading fresh modules for state activity
[DEBUG ] Loaded localemod as virtual locale
[DEBUG ] Loaded groupadd as virtual group
[DEBUG ] Loaded yumpkg as virtual pkg
[DEBUG ] Loaded systemd as virtual service
[DEBUG ] Loaded parted as virtual partition
[DEBUG ] Loaded linux_sysctl as virtual sysctl
[DEBUG ] Loaded gnomedesktop as virtual gnome
[DEBUG ] Loaded linux_acl as virtual acl
[DEBUG ] Loaded sysmod as virtual sys
[DEBUG ] Loaded rpm as virtual lowpkg
[DEBUG ] Loaded zcbuildout as virtual buildout
[DEBUG ] Loaded htpasswd as virtual webutil
[DEBUG ] Loaded useradd as virtual user
[DEBUG ] Loaded rh_ip as virtual ip
[DEBUG ] Loaded ini_manage as virtual ini
[DEBUG ] Loaded virtualenv_mod as virtual virtualenv
[DEBUG ] Loaded djangomod as virtual django
[DEBUG ] Loaded cmdmod as virtual cmd
[DEBUG ] Loaded pip_state as virtual pip
[DEBUG ] Loaded saltmod as virtual salt
[DEBUG ] Loaded zcbuildout as virtual buildout
[DEBUG ] Loaded ini_manage as virtual ini
[DEBUG ] Loaded virtualenv_mod as virtual virtualenv
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/state.py", line 1371, in call
*cdata['kwargs'])
File "/usr/lib/python2.7/site-packages/salt/states/cloud.py", line 58, in present
info = salt['cloud.create'](provider, name, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/modules/cloud.py", line 200, in create
info = client.create(provider, names, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/cloud/init.py", line 179, in create
mapper.create(vm
))
File "/usr/lib/python2.7/site-packages/salt/utils/cloud.py", line 1446, in simple_types_filter
for key, value in datadict.iteritems():
AttributeError: 'bool' object has no attribute 'iteritems'

[INFO ] Completed state [db1.gtmanfred.com] at time 03:50:17.302713
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Decrypting the current master AES key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Decrypting the current master AES key
[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Loaded no_out as virtual quiet
[DEBUG ] Loaded json_out as virtual json
[DEBUG ] Loaded yaml_out as virtual yaml
[DEBUG ] Loaded pprint_out as virtual pprint

local:

      ID: db_server
Function: cloud.present
    Name: db1.gtmanfred.com
  Result: False
 Comment: An exception occurred in this state: Traceback (most recent call last):
            File "/usr/lib/python2.7/site-packages/salt/state.py", line 1371, in call
              **cdata['kwargs'])
            File "/usr/lib/python2.7/site-packages/salt/states/cloud.py", line 58, in present
              info = __salt__['cloud.create'](provider, name, **kwargs)
            File "/usr/lib/python2.7/site-packages/salt/modules/cloud.py", line 200, in create
              info = client.create(provider, names, **kwargs)
            File "/usr/lib/python2.7/site-packages/salt/cloud/__init__.py", line 179, in create
              mapper.create(vm_))
            File "/usr/lib/python2.7/site-packages/salt/utils/cloud.py", line 1446, in simple_types_filter
              for key, value in datadict.iteritems():
          AttributeError: 'bool' object has no attribute 'iteritems'
 Changes:   

@gtmanfred
Copy link
Contributor Author

@techhat if you could take a look it would be greatly appreciated. I am not quite sure where it is breaking cause it looks like it is breaking on the mapper.create(vm_) from salt/cloud/init.py

        ret[name] = salt.utils.cloud.simple_types_filter(
            mapper.create(vm_))

@gtmanfred
Copy link
Contributor Author

[root@salt cloud]# cat db1.sls
db_server:
cloud.present:
- name: db1.gtmanfred.com
- provider: my-rackspace
- size: performance1-1
- image: 2ab974de-9fe5-4f5b-9d58-766a59f3de61
- ssh_key_name: ansible
- script_args: git develop
- flush_mine_on_destroy: True

@gtmanfred
Copy link
Contributor Author

I think I figured it out. I added a cloud.profile state that matches the names and it works again.

@gtmanfred
Copy link
Contributor Author

Yup, that was it.

@techhat
Copy link
Contributor

techhat commented Feb 8, 2014

Wow, lots of activity here. Glad it worked out for you, @gtmanfred. And it's good to see you here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants