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

Fix VM info module for failed VM provisions #745

Merged

Conversation

JoostMuller-TomTom
Copy link
Contributor

SUMMARY

Fixes usage of undeclared variables for virtual machines that failed to provision correctly.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

azure_rm_virtualmachine_info.py

ADDITIONAL INFORMATION

serialize_vm() in azure_rm_virtualmachine_info.py fails with the message:

  msg: Error getting virtual machine None - local variable 'display_status' referenced before assignment

The value of instance for the failed-to-provision VM is:

{
  'hyperVGeneration': 'V1',
  'disks': [{ <snip> }],
  'statuses': [{
    'code': 'ProvisioningState/failed/NetworkingInternalOperationError',
    'level': 'Error',
    'displayStatus': 'Provisioning failed',
    'message': 'An unexpected error occured while processing the network profile of the VM. Please retry later.',
    'time': '2021-12-21T10:06:31.289877Z',
  }]
}

@JoostMuller-TomTom
Copy link
Contributor Author

JoostMuller-TomTom commented Jan 27, 2022

@Fred-sun: issue was introduced by #657, FYI.

@Fred-sun Fred-sun added enhancement New feature or request medium_priority Medium priority work in In trying to solve, or in working with contributors labels Feb 12, 2022
@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Mar 4, 2022
@xuzhang3
Copy link
Collaborator

xuzhang3 commented Mar 9, 2022

LGTM

@xuzhang3 xuzhang3 merged commit 509e937 into ansible-collections:dev Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium_priority Medium priority ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants