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

Invoke-VcfHealthReport failing with Split-Path error #181

Closed
4 tasks done
bhumitra opened this issue Oct 17, 2023 · 5 comments · Fixed by #182
Closed
4 tasks done

Invoke-VcfHealthReport failing with Split-Path error #181

bhumitra opened this issue Oct 17, 2023 · 5 comments · Fixed by #182
Assignees
Labels
bug Bug
Milestone

Comments

@bhumitra
Copy link
Contributor

Code of Conduct

  • I have read and agree to the Code of Conduct.
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

VMware Cloud Foundation

v5.1

PowerShell Version

Powershell 7.2

PowerCLI Version

v13.1.0

Module Version

2.4.1

PowerValidatedSolutions Version

2.6.0

PowerVCF Version

2.3.0

Guest Operating System

Photon OS

Environment Details

Linux environment - Photon OS

Description

When running the cmdlet, it fails with the below error.

Error is due to the way paths are set. It is reported that that command works on windows env.

Error or Debug Output

[10-17-2023_15:41:56] Error at Script Line 1014
[10-17-2023_15:41:56] Relevant Command: $reportDestination = Join-Path -Path $reportPath -ChildPath $reportName | Split-Path -NoQualifier -Parent
[10-17-2023_15:41:56] Error Message: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.

Expected Behavior

cmdlet should work without errors.

Actual Behavior

Error

Steps to Reproduce

Run command in a linux env.

Log Fragments and Files

No response

Screenshots

No response

References

No response

@bhumitra bhumitra added bug Bug needs-triage Needs Triage labels Oct 17, 2023
@github-actions github-actions bot added the pending-review Pending Review label Oct 17, 2023
@tenthirtyam tenthirtyam removed pending-review Pending Review needs-triage Needs Triage labels Oct 17, 2023
@tenthirtyam tenthirtyam added this to the v2.5.0 milestone Oct 17, 2023
@bhumitra
Copy link
Contributor Author

Before fix and after -

PS /root/.local/share/powershell/Modules/VMware.CloudFoundation.Reporting/2.4.1.1000> Publish-BackupStatus -server sfo-vcf01.sfo.rainpole.io -user [email protected] -pass VMw@re1! -allDomains -outputJson /opt/test
 [10-17-2023_18:46:14]   Error at Script Line 2981
 [10-17-2023_18:46:15]   Relevant Command: $json = Start-CreateOutputJsonDirectory -jsonFolder $outputJson -jsonFileSuffix $backupJsonSuffix
 [10-17-2023_18:46:15]   Error Message: Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.

AFTER -

 
PS /root/.local/share/powershell/Modules/VMware.CloudFoundation.Reporting/2.4.1.1000> Import-Module -Name VMware.CloudFoundation.Reporting
PS /root/.local/share/powershell/Modules/VMware.CloudFoundation.Reporting/2.4.1.1000> Publish-BackupStatus -server sfo-vcf01.sfo.rainpole.io -user [email protected] -pass VMw@re1! -allDomains -outputJson /opt/test
JSON Created at /opt/test/10-17-2023_06_48_05-backup-status.json
PS /root/.local/share/powershell/Modules/VMware.CloudFoundation.Reporting/2.4.1.1000>

After fix - other cmdlets -
Screenshot 2023-10-17 at 11 32 25 AM

@bhumitra
Copy link
Contributor Author

After fix -
Screenshot 2023-10-17 at 11 37 06 AM

@bhumitra
Copy link
Contributor Author

Screenshot 2023-10-17 at 11 51 51 AM Screenshot 2023-10-17 at 11 52 51 AM

bhumitra added a commit to bhumitra/powershell-module-for-vmware-cloud-foundation-reporting that referenced this issue Oct 17, 2023
Ref: vmware#181

Signed-off-by: bhumitra nagar <[email protected]>
tenthirtyam pushed a commit that referenced this issue Oct 18, 2023
- Fixed issue #181.
- Updated `CHANGELOG.md` for v2.4.2 release.
- Updated module version to 2.4.2.1000.

Signed-off-by: bhumitra nagar <[email protected]>
Signed-off-by: Ryan Johnson <[email protected]>
Co-authored-by: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam modified the milestones: v2.5.0, v2.4.2 Oct 18, 2023
@tenthirtyam
Copy link
Collaborator

Published in the v2.4.2 release.

Copy link

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants