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

Nutanix Licensing API Bug with AOS 6.5.3 causes script to fail #16

Open
aramsay82 opened this issue Feb 9, 2024 · 3 comments
Open

Nutanix Licensing API Bug with AOS 6.5.3 causes script to fail #16

aramsay82 opened this issue Feb 9, 2024 · 3 comments

Comments

@aramsay82
Copy link

Describe the bug
In certain conditions on AOS 6.5.3, Licensing in the API reflects starter and not fully licensed.
This causes the script to fail with error "You cannot call a method on a none valued expression" when processing Licensing region beginning at line 425 of Invoke-AsBuiltRreport.Nutanix.PrismElement.ps1.

The specific failure is when ($NtnxLicense.category).Replace('_',' ') is called on line 433 as the object is null and has no methods

To Reproduce
Steps to reproduce the behavior:

  1. Validate AOS version is 6.5.3
  2. In Prism check licensing, if starter license is installed even if Pro is also installed this will trigger the API bug
  3. Run New-AsBuiltReport for Nutanix with -Verbose
  4. See error

Expected behavior
The script looks for information in the object retrieved from the API called licenseDTO. In the fault condition this is null and information is in a different object called licenseInfoDTO which has a different structure.

Screenshots!
image

Desktop (please complete the following information):

  • OS: Windows Server 2019
  • Powershell
  • Version 5.1 and 7

Additional context
This was tested against AOS 6.5.7 on another cluster and the script ran without issue.
Commenting out lines 425 to 483 in Invoke-AsBuiltRreport.Nutanix.PrismElement.ps1. is a work around to let the script continue to run.

@sourcil8
Copy link

sourcil8 commented May 31, 2024

Hello
Sorry for the delay..
Perfect.. it's ok now with your workaround
Thanks a lot

These scripts are perfect... honestly.. for Nutanix and VMWare of course... it's a dream

PS : For Nutanix, nothing about the "Data-at-Rest Encryption" @storage level.. possible to add something ? :-)
And nothing about Nutanix Files and the "shares"

Thanks a lot

@tpcarman
Copy link
Contributor

tpcarman commented Jun 6, 2024

For Nutanix, nothing about the "Data-at-Rest Encryption" @storage level.. possible to add something ? :-)
And nothing about Nutanix Files and the "shares"

I no longer actively work with Nutanix infrastructure so further development of this module is unlikely unless someone is able to takeover.

@backbuu
Copy link

backbuu commented Nov 28, 2024

Additional context This was tested against AOS 6.5.7 on another cluster and the script ran without issue. Commenting out lines 425 to 483 in Invoke-AsBuiltRreport.Nutanix.PrismElement.ps1. is a workaround to let the script continue to run.

the workaround is working for AOS 6.10

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

No branches or pull requests

4 participants