Bug #32713
closed
Cloud parameter does not have any validation on it
Added by Chris Roberts over 3 years ago.
Updated over 3 years ago.
Category:
General Plugin Issues
|
Description
If you send in --cloud="pizza" or anything it will fail with a long traceback since it can't load the regions, if it does manage to load the regions it creates the compute resource and then will fail upon doing anything with it.
Ruby Traceback:
10:31:32 rails.1 | 2021-06-03T10:31:32 [I|app|1ea49c3d] Backtrace for 'Action failed' error (NoMethodError): undefined method `resource_manager_endpoint_url' for nil:NilClass
10:31:32 rails.1 | 1ea49c3d | /home/vagrant/foreman_azure_rm/lib/foreman_azure_rm/azure_sdk_adapter.rb:31:in `subscription_client'
10:31:32 rails.1 | 1ea49c3d | /home/vagrant/foreman_azure_rm/lib/foreman_azure_rm/azure_sdk_adapter.rb:86:in `list_regions'
10:31:32 rails.1 | 1ea49c3d | /home/vagrant/foreman_azure_rm/app/models/foreman_azure_rm/azure_rm.rb:84:in `regions'
10:31:32 rails.1 | 1ea49c3d | /home/vagrant/foreman_azure_rm/app/models/foreman_azure_rm/azure_rm.rb:66:in `validate_region'
10:31:32 rails.1 | 1ea49c3d | /home/vagrant/foreman_azure_rm/app/models/foreman_azure_rm/azure_rm.rb:62:in `ensure_attributes_and_values'
Hammer output:
[vagrant@hammer ~]$ hammer compute-resource create --name="food1" --secret-key="xxxxx" --location-id 2 --organization-id 1 --provider AzureRm --app-ident="xxxx" --sub-id="xxxx" --tenant="xxxxx" --region="eastus" --cloud="pizza"
Could not create the compute resource:
Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.
- Pull request https://github.com/theforeman/foreman_azure_rm/pull/129 added
- Status changed from New to Ready For Testing
- Target version changed from 2.2.5 to 2.2.6
- Fixed in Releases 2.2.6 added
- Status changed from Ready For Testing to Closed
Also available in: Atom
PDF