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

1.3.0 broke our pipelines (no osProfile) #367

Closed
TiTi opened this issue Dec 16, 2020 · 3 comments · Fixed by #368
Closed

1.3.0 broke our pipelines (no osProfile) #367

TiTi opened this issue Dec 16, 2020 · 3 comments · Fixed by #368

Comments

@TiTi
Copy link
Contributor

TiTi commented Dec 16, 2020

SUMMARY

Hello,
Release 1.3.0 broke our pipeline because the inventory could not be loaded:
WARNING]: Unable to parse /mnt/data/...our_path.../inventory.azure_rm.yml as an inventory source

Fortunately I think I found the issue. It's related to #197

ISSUE TYPE
  • Bug Report
COMPONENT NAME

azure/plugins/inventory/azure_rm.py

ANSIBLE VERSION
2.10.4
ANALYSIS

There are 2 commits in azure/plugins/inventory/azure_rm.py between 1.2.0 and 1.3.0
1 is documentation and the other is 1436f7937eeafc2f26743b2fc383b549f8f99d48

It seems harmless but then I remember the PR #197 I made a while ago which was merged:
We have some azure VM without OS profile ! See screenshots in the PR.

Thus, I suspect that self._vm_model['properties']['osProfile'] is None
Therefore .get('computerName') likely cause an exception.

=> that's why inventory is not loaded

Could you fix this please?
Graceful degradation is acceptable (set computerName to empty string / None)

Thanks !

For now we have fixed to 1.2.0 in our code

EXPECTED RESULTS

Inventory is loaded

ACTUAL RESULTS

Inventory not loaded
Works on 1.2.0

@paultaiton
Copy link
Contributor

@TiTi
I'll take a look as soon as I can.

@paultaiton
Copy link
Contributor

@TiTi

Please see #368 . I am thinking that this will correct the problem you're seeing. I unfortunately do not have any machines that are breaking in the manner you're experiencing, so I don't have anything emulating your environment to test with. Would you be able to implement the code change I've pushed a PR for, and see if it corrects your issue locally?

@TiTi
Copy link
Contributor Author

TiTi commented Dec 17, 2020

Hello, I confirm 1.3.1 solves the issue. Thank you, great reactivity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants