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

Triggering on-demand backup returns error #1522

Closed
mdhowle opened this issue Apr 1, 2024 · 2 comments · Fixed by #1531
Closed

Triggering on-demand backup returns error #1522

mdhowle opened this issue Apr 1, 2024 · 2 comments · Fixed by #1531
Labels
bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority

Comments

@mdhowle
Copy link
Contributor

mdhowle commented Apr 1, 2024

SUMMARY

Attempting to trigger an on-demand backup of VM returns
"Create or Updating fail, no match message return, return info as None"

It does appear the snapshots are occurring.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure.azcollection.azure_rm_backupazurevm

ANSIBLE VERSION
ansible [core 2.16.5]
  config file = /home/XXXX/.ansible.cfg
  configured module search path = ['/home/XXXX/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/XXXX/ansible/venv/ansible-azure/lib/python3.11/site-packages/ansible
  ansible collection location = /home/XXXX/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/XXXX/ansible/venv/ansible-azure/bin/ansible
  python version = 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (/home/XXXX/ansible/venv/ansible-azure/bin/python)
  jinja version = 3.1.3
  libyaml = True

COLLECTION VERSION
ansible-galaxy collection list azure.azcollection

# /home/XXXX/.ansible/collections/ansible_collections
Collection         Version
------------------ -------
azure.azcollection 2.3.0

# /home/XXXX/ansible/venv/ansible-azure/lib/python3.11/site-packages/ansible_collections
Collection         Version
------------------ -------
azure.azcollection 1.19.0
CONFIGURATION
CACHE_PLUGIN(/home/XXXX/.ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/home/XXXX/.ansible.cfg) = ~/.ansible/facts/
CACHE_PLUGIN_TIMEOUT(/home/XXXX/.ansible.cfg) = 0
CONFIG_FILE() = /home/XXXX/.ansible.cfg
DEFAULT_GATHERING(/home/XXXX/.ansible.cfg) = smart
DEFAULT_TIMEOUT(/home/XXXX/.ansible.cfg) = 60
EDITOR(env: EDITOR) = vim
GALAXY_SERVER_LIST(/home/XXXX/.ansible.cfg) = ['rh_automation_hub']
HOST_KEY_CHECKING(/homeXXXX/.ansible.cfg) = False

OS / ENVIRONMENT

Debian 12
Python 3.11.2

STEPS TO REPRODUCE
---
- name: Create a backup
  hosts: all
  tasks:
    - name: Create a backup of an Azure VM
      azure.azcollection.azure_rm_backupazurevm:
        resource_group: XXXX
        recovery_vault_name: XXXX
        resource_id: '/subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.Compute/virtualMachines/XXXX'
        backup_policy_id: '/subscriptions/XXXX/resourceGroups/XXXX/providers/Microsoft.RecoveryServices/vaults/XXXX/backupPolicies/DefaultPolicy'
        state: 'backup'
EXPECTED RESULTS

VM backup triggered, or at least a better error message.

ACTUAL RESULTS

[

TASK [Create a backup of an Azure VM] ********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Create or Updating fail, no match message return, return info as None"}

Verbose: https://gist.github.com/mdhowle/0b23073bcd8a2aa7b12d3f55db43d313

I am using SP credentials but I have also tried my personal credentials with the same result. Running az backup protection backup-now works with SP credentials.

@Fred-sun
Copy link
Collaborator

Fred-sun commented Apr 9, 2024

@mdhowle Yes, there is no return value after triggering the backup now, not need to format the return value, it has been fixed in PR #1531 . Thank you!

@Fred-sun Fred-sun added bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority labels Apr 9, 2024
@mdhowle
Copy link
Contributor Author

mdhowle commented May 3, 2024

Shouldn't triggering an on-demand backup return a reference to the backup job? Then I can, ideally, use it to obtain the job details (see #1127)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has_pr PR fixes have been made medium_priority Medium priority
Projects
None yet
2 participants