vmware-samples / validated-solutions-for-cloud-foundation

A companion repository for the VMware Validated Solutions for VMware Cloud Foundation.
https://vmware.com/go/vvs
BSD 2-Clause "Simplified" License
23 stars 5 forks source link

[HRM] Storage reporting fails when running `send-data-to-vrops.py` #59

Closed robbuxton closed 1 year ago

robbuxton commented 1 year ago

Code of Conduct

VMware Cloud Foundation

4.5.1

Environment Details

VCF 4.5.1 vCenter 7.0.3 Update l Aria Operations 8.12.0 Multi-site, 2 x SDDC Manager, 2 x Workload Domains per sit - 4 x vCenter.

Description

When the send-data-to-vrops.py script is run no storagecapacityhealth-status.json is created.

No obvious errors in connectivity.

Only errors reported in the script are when the script reports it cannot find the file.

Logon using the local vcf account does report as successful.

Expected Behavior

storagecapacityhealth-status.json created and the VCF Storage Health Dashboards populated.

Actual Behavior

No file created, dashboards empty.

Steps to Reproduce

Run the send-data-to-vrops.py script.

Screenshots

No response

References

No response

bhumitra commented 1 year ago

@robbuxton

Could you get me the send-data-to-vrops.log file from the log folder created when the python script runs. It is located at /opt/vmware/hrm/logs/send-data_ and email it to me at bnagar@vmware.com.

robbuxton commented 1 year ago

Hi,

This contains two logs. The -HLZ one is the second SDDC Manager added. For that I copied the env.json, encrypt-passwords.py and send-data-to-vrops as -hlz files, created new encrypted files and run that as a separate cron job.

For HLZ the vcf login is failing, but the first SDDC added was doing that earlier as well. I think it got resolved after a vcf password change. I think that might be a password complexity issue - I'm going to test that theory today by getting the HLZ vcf password reset with special characters that are no different than Auckland.

We have two sites: HLZ - Hamilton - SDDC - csvaprmgt1206, vCenter csvaprmgt1208 and csvaprmgt1246 AKL - Auckland - SDDC - csvaprmgt1205, vCenter csvaprmgt1207 and csvaprmgt1245

Rob.

From: bhumitra nagar @.> Sent: Thursday, July 6, 2023 3:22 AM To: vmware-samples/validated-solutions-for-cloud-foundation @.> Cc: Rob Buxton @.>; Mention @.> Subject: Re: [vmware-samples/validated-solutions-for-cloud-foundation] Storage reporting fails when running VCF Cloud Foundation Health reporting (Issue #59)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

@robbuxtonhttps://github.com/robbuxton

Could you get me the send-data-to-vrops.log file from the log folder created when the python script runs. It is located at /opt/vmware/hrm/logs/send-data_ and email it to me at @.**@.>.

- Reply to this email directly, view it on GitHubhttps://github.com/vmware-samples/validated-solutions-for-cloud-foundation/issues/59#issuecomment-1621985800, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA6DQOYCDG6A2FJ3VTDZNVTXOWBAPANCNFSM6AAAAAAZZBENTY. You are receiving this because you were mentioned.Message ID: @.***>

bhumitra commented 1 year ago

I am working with @robbuxton to address these issues. So far these are outside HRM code and related to powerCLI. Will update here when I have more information.

tenthirtyam commented 1 year ago

If the password contains a $ it may be that it's not escaping correctly when passing the password to PowerShell.

For example:

$vmPass = "MyPa$$word" would fail. $vmPass = 'MyPa$$word' should not fail.

May require a change in the Python module - will allow @bhumitra to review.

robbuxton commented 1 year ago

I was concerned with password complexity before so did change the HLZ based vcf password to restrict it to the same special characters as the working AKL one.

But, the HLZ one does have a "$$".

I'll look at generating a new password that has similar complexity to AKL and without the double $.

From: Ryan Johnson @.> Sent: Tuesday, July 18, 2023 6:49 AM To: vmware-samples/validated-solutions-for-cloud-foundation @.> Cc: Rob Buxton @.>; Mention @.> Subject: Re: [vmware-samples/validated-solutions-for-cloud-foundation] [HRM] Storage reporting fails when running send-data-to-vrops.py (Issue #59)

If the password contains a $ it may be that it's not escaping correctly when passing the password to PowerShell.

For example:

$vmPass = "MyPa$$word" would fail. $vmPass = 'MyPa$$word' should not fail.

May require a change in the Python module - will allow @bhumitrahttps://github.com/bhumitra to review.

- Reply to this email directly, view it on GitHubhttps://github.com/vmware-samples/validated-solutions-for-cloud-foundation/issues/59#issuecomment-1638687889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA6DQO5CXQBVKCWMM4TKCG3XQWCIBANCNFSM6AAAAAAZZBENTY. You are receiving this because you were mentioned.Message ID: @.**@.>>

robbuxton commented 1 year ago

Reset the password so that complexity matched what we have in AKL which works when the script is run. But, the HLZ script still failing. At ne point it failed and had part of the password in the log, so was obviously tripping up somewhere.

Still not really sure why AKL works and HLZ doesn't.

From: Ryan Johnson @.> Sent: Tuesday, July 18, 2023 6:49 AM To: vmware-samples/validated-solutions-for-cloud-foundation @.> Cc: Rob Buxton @.>; Mention @.> Subject: Re: [vmware-samples/validated-solutions-for-cloud-foundation] [HRM] Storage reporting fails when running send-data-to-vrops.py (Issue #59)

If the password contains a $ it may be that it's not escaping correctly when passing the password to PowerShell.

For example:

$vmPass = "MyPa$$word" would fail. $vmPass = 'MyPa$$word' should not fail.

May require a change in the Python module - will allow @bhumitrahttps://github.com/bhumitra to review.

- Reply to this email directly, view it on GitHubhttps://github.com/vmware-samples/validated-solutions-for-cloud-foundation/issues/59#issuecomment-1638687889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BA6DQO5CXQBVKCWMM4TKCG3XQWCIBANCNFSM6AAAAAAZZBENTY. You are receiving this because you were mentioned.Message ID: @.**@.>>