azure icon indicating copy to clipboard operation
azure copied to clipboard

Trying to create a postgresqlflexibleserver fail with an API internal server error

Open mbegoc opened this issue 5 months ago • 4 comments

SUMMARY

When trying to create a postgresqlflexibleserver with ansible, I end up with a fatal server error and absolutely no output to understand what's happening. It works fine with postgresqlserver though.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure.azcollection.azure_rm_postgresqlflexibledatabase

ANSIBLE VERSION
ansible [core 2.17.4]
  config file = None
  configured module search path = ['/home/michel/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/michel/ws/projects/mypath-sa/venv/lib/python3.12/site-packages/ansible
  ansible collection location = /home/michel/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/michel/ws/projects/mypath-sa/venv/bin/ansible
  python version = 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] (/home/michel/ws/projects/mypath-sa/venv/bin/python)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
Collection         Version
------------------ -------
azure.azcollection 2.7.0  

# /home/michel/ws/projects/mypath-sa/venv/lib/python3.12/site-packages/ansible_collections
Collection         Version
------------------ -------
azure.azcollection 2.7.0 
CONFIGURATION
CONFIG_FILE() = None
EDITOR(env: EDITOR) = vim
OS / ENVIRONMENT

Linux Mint 22 Wilma

STEPS TO REPRODUCE
- name: make db creation fail
  azure.azcollection.azure_rm_postgresqlflexibleserver:                                                
    name: dbserver                                                                                         
    version: 16                                                                                        
    administrator_login: admin_login                                                                          
    administrator_login_password: ###########                                                          
    resource_group: myresourcegroup                                                                      
    sku:                                                                                            
      name: Standard_B1ms                                                                           
      tier: Burstable
EXPECTED RESULTS

Database creation, or at least an error saying what's going on.

ACTUAL RESULTS
The full traceback is:
  File "/tmp/ansible_azure.azcollection.azure_rm_postgresqlflexibleserver_payload_2r8g4x2b/ansible_azure.azcollection.azure_rm_postgresqlflexibleserver_payload.zip/ansible_collections/azure/azcollection/plugins/modules/azure_rm_postgresqlflexibleserver.py", line 862, in create_postgresqlflexibleserver
    response = self.get_poller_result(response)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/ansible_azure.azcollection.azure_rm_postgresqlflexibleserver_payload_2r8g4x2b/ansible_azure.azcollection.azure_rm_postgresqlflexibleserver_payload.zip/ansible_collections/azure/azcollection/plugins/module_utils/azure_rm_common.py", line 635, in get_poller_result
    poller.wait(timeout=delay)
  File "/home/michel/ws/projects/mypath-sa/venv/lib/python3.12/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/michel/ws/projects/mypath-sa/venv/lib/python3.12/site-packages/azure/core/polling/_poller.py", line 261, in wait
    raise self._exception  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/michel/ws/projects/mypath-sa/venv/lib/python3.12/site-packages/azure/core/polling/_poller.py", line 176, in _start
    self._polling_method.run()
  File "/home/michel/ws/projects/mypath-sa/venv/lib/python3.12/site-packages/azure/core/polling/base_polling.py", line 745, in run
    raise HttpResponseError(response=self._pipeline_response.http_response, error=err) from err
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "ad_user": null,
            "adfs_authority_url": null,
            "administrator_login": "admin_login",
            "administrator_login_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_profile": "latest",
            "append_tags": true,
            "auth_source": "auto",
            "availability_zone": null,
            "backup": null,
            "cert_validation_mode": null,
            "client_id": null,
            "cloud_environment": "AzureCloud",
            "create_mode": null,
            "disable_instance_discovery": false,
            "fully_qualified_domain_name": null,
            "high_availability": null,
            "identity": null,
            "is_restart": false,
            "is_start": false,
            "is_stop": false,
            "location": null,
            "log_mode": null,
            "log_path": null,
            "maintenance_window": null,
            "name": "test",
            "network": null,
            "password": null,
            "point_in_time_utc": null,
            "profile": null,
            "resource_group": "myresourcegroup",
            "secret": null,
            "sku": {
                "name": "Standard_B2ms",
                "tier": "Burstable"
            },
            "source_server_resource_id": null,
            "state": "present",
            "storage": null,
            "subscription_id": null,
            "tags": null,
            "tenant": null,
            "thumbprint": null,
            "version": "16",
            "x509_certificate_path": null
        }
    },
    "msg": "Error creating the PostgreSQL Flexible Server instance: (InternalServerError) An unexpected error occured while processing the request. Tracking ID: '00d0955c-e4e1-48e3-a57b-e5868f78523d'\nCode: InternalServerError\nMessage: An unexpected error occured while processing the request. Tracking ID: '00d0955c-e4e1-48e3-a57b-e5868f78523d'"
}

mbegoc avatar Sep 17 '24 19:09 mbegoc