Open DaveLafleur opened 2 years ago
Please post the exact error received. Thank you!
[ERROR ] There was a query error: No value for given attribute Traceback (most recent call last): File "/usr/lib/python3/dist-packages/salt/cloud/cli.py", line 319, in run ret = mapper.run_map(dmap) File "/usr/lib/python3/dist-packages/salt/cloud/init.py", line 2196, in run_map output[name] = self.create(profile, local_master=localmaster) File "/usr/lib/python3/dist-packages/salt/cloud/init.py", line 1226, in create output = self.clouds[func](vm) File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 149, in call return self.loader.run(run_func, *args, kwargs) File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1201, in run return self._last_context.run(self._run_as, _func_or_method, *args, *kwargs) File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1216, in _run_as return _func_or_method(args, kwargs) File "/usr/local/lib/python3.8/dist-packages/saltext/azurerm/clouds/azurerm.py", line 1271, in create vm_request = requestinstance(vm=vm_) File "/usr/local/lib/python3.8/dist-packages/saltext/azurerm/clouds/azurerm.py", line 895, in request_instance iface_data, public_ips, private_ips = create_networkinterface(call="action", kwargs=vm) File "/usr/local/lib/python3.8/dist-packages/saltext/azurerm/clouds/azurerm.py", line 711, in create_network_interface subnet_obj = netconn.subnets.get( File "/usr/local/lib/python3.8/dist-packages/azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer return func(*args, kwargs) File "/usr/local/lib/python3.8/dist-packages/azure/mgmt/network/v2021_08_01/operations/_operations.py", line 57344, in get request = build_subnets_get_request( File "/usr/local/lib/python3.8/dist-packages/azure/mgmt/network/v2021_08_01/operations/_operations.py", line 14408, in build_subnets_get_request "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), File "/usr/local/lib/python3.8/dist-packages/msrest/serialization.py", line 652, in url output = self.serialize_data(data, data_type, kwargs) File "/usr/local/lib/python3.8/dist-packages/msrest/serialization.py", line 760, in serialize_data raise ValueError("No value for given attribute") ValueError: No value for given attribute
Yeah, it doesn't look like there's any parameter verification in that section. We'll leave this open so we can build in that error reporting.
In the meantime, the following parameters in your profile need to be changed:
virtual_network_name
> network
subnet_name
> subnet
resource_group_name
> resource_group
(or network_resource_group
if in a different rg than the rest of your resources)
They don't track the SDK names for the parameters... so that might be another thing we want to standardize.
Description salt-cloud -m errors out based on an incomplete profile but does not indicate which attribute is missing a value.
Setup
/etc/salt/cloud.providers.d/azure.conf
/etc/salt/cloud.providers.d/azure.conf ``` azure-config: driver: azurerm subscription_id:/etc/salt/cloud.profiles.d/azure.conf
/etc/salt/cloud.profiles.d/azure.conf ``` azure-ubuntu: provider: tt-azure-config image: 'canonical|0001-com-ubuntu-server-focal|20_04-lts-gen2|latest' size: Standard_D2s_v3 location: 'southcentralus' ssh_username: azureuser ssh_publickeyfile: /etc/salt/saltkey.pub virtual_network_name: EnterpriseMgmt-vnet subnet_name: default slot: production resource_group_name: EnterpriseMgmt ```Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior (Include debug logs if possible and relevant)
Expected behavior Either print minimum profile template or print the attribute that is missing the value
Screenshots If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ``` Salt Version: Salt: 3004.2 Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.7.3 docker-py: Not Installed gitdb: 2.0.6 gitpython: 3.0.7 Jinja2: 2.10.1 libgit2: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack: 0.6.2 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pycryptodome: 3.6.1 pygit2: Not Installed Python: 3.8.10 (default, Jun 22 2022, 20:18:18) python-gnupg: 0.4.5 PyYAML: 5.3.1 PyZMQ: 18.1.1 smmap: 2.0.5 timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.2 Salt Extensions: saltext.azurerm: 1.0.0 System Versions: dist: ubuntu 20.04 focal locale: utf-8 machine: x86_64 release: 5.15.0-1020-azure system: Linux version: Ubuntu 20.04 focal```Additional context Add any other context about the problem here.