-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Exception when calling create method on openstack cloud provider from reactor sls #20932
Copy link
Copy link
Closed
Labels
RIoTRelates to integration with cloud providers, hypervisors, API-based services, etc.Relates to integration with cloud providers, hypervisors, API-based services, etc.Salt-Cloudbugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorseverity-low4th level, cosemtic problems, work around exists4th level, cosemtic problems, work around exists
Milestone
Description
This is my version of salt:
root@saltmaster:~# salt --versions-report
Salt: 2014.7.1
Python: 2.7.6 (default, Mar 22 2014, 22:59:56)
Jinja2: 2.7.2
M2Crypto: 0.21.1
msgpack-python: 0.3.0
msgpack-pure: Not Installed
pycrypto: 2.6.1
libnacl: Not Installed
PyYAML: 3.10
ioflo: Not Installed
PyZMQ: 14.0.1
RAET: Not Installed
ZMQ: 4.0.4
Mako: 0.9.1
and I'm getting this exception in openstack cloud provider:
[DEBUG ] local variable 'data' referenced before assignment
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/utils/process.py", line 184, in _thread_target
func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/client/mixins.py", line 39, in low
ret = l_fun(*f_call.get('args', ()), **f_call.get('kwargs', {}))
File "/usr/lib/python2.7/dist-packages/salt/runners/cloud.py", line 141, in create
info = client.create(provider, instances, **create_kwargs)
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 392, in create
mapper.create(vm_))
File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1193, in create
output = self.clouds[func](vm_)
File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/openstack.py", line 754, in create
update_args=(vm_, data, vm_['floating']),
UnboundLocalError: local variable 'data' referenced before assignment
This is the rendered reactor.sls that is executed:
autoscale_launch:
runner.cloud.create:
- private_ips: [172.31.0.3, 10.209.164.79, 172.30.0.3]
- extra:
access_ip: 104.239.149.99
created: '2015-02-23T09:18:06Z'
disk_config: MANUAL
flavorId: general1-1
hostId: 97127ff37f52f8b82eb813e48538d4d9d0c39b6efb007146f5c76bda
imageId: a1558fdc-3182-4a0f-b48a-aa900a5826c3
key_name: saltmaster
metadata: {}
password: null
tenantId: '999999'
updated: '2015-02-23T09:18:33Z'
uri: https://dfw.servers.api.rackspacecloud.com/v2/945708/servers/41b275ac-6bd9-4ed8-9d26-7a4a5b96f8c3
- {ssh_username: root}
- {image: null}
- {_uuid: null}
- public_ips: [104.239.149.99, '2001:4800:7819:105:be76:4eff:fe05:de92']
- {name: dfw-test-06}
- {instance_id: 41b275ac-6bd9-4ed8-9d26-7a4a5b96f8c3}
- {instances: dfw-test-06}
- {provider: rackspace-dfw}
- {id: 41b275ac-6bd9-4ed8-9d26-7a4a5b96f8c3}
- {size: null}This SLS is created by python script that is triggering installation of salt minion to an openstack instance that was created by other means.
This is relevan provider configuration:
rackspace-dfw:
provider: openstack
# conigure Rackspace with openstack plugin
identity_url: https://identity.api.rackspacecloud.com/v2.0/tokens
compute_name: cloudServersOpenStack
protocol: ipv4
# ssh configuration
ssh_key_name: saltmaster
ssh_key_file: /root/.ssh/saltmaster.pem
ssh_interface: private_ips
# authentication credentials
user: <user-name>
apikey: <api-key>
tenant: <tenant-id>
# region
compute_region: DFW
# minion configuration
minion:
master: saltmaster.example.comReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RIoTRelates to integration with cloud providers, hypervisors, API-based services, etc.Relates to integration with cloud providers, hypervisors, API-based services, etc.Salt-Cloudbugbroken, incorrect, or confusing behaviorbroken, incorrect, or confusing behaviorseverity-low4th level, cosemtic problems, work around exists4th level, cosemtic problems, work around exists