cohesity / cohesity-powershell-module

This repository provides a PowerShell Module for Cohesity DataPlatform. https://cohesity.github.io/cohesity-powershell-module
Apache License 2.0
42 stars 16 forks source link

Register-CohesityProtectionSourceAcropolis fails with correct Authentication #156

Closed DavidSeaton closed 3 years ago

DavidSeaton commented 3 years ago

🐛 Bug Report

When attempting to Register a Nutanix Acropolis system, the process fails.

This process should work as information given during process is correct.

To Reproduce

(Write your steps here:)

  1. Run the Register Command.

    Register-CohesityProtectionSourceAcropolis -Server $SourceHostname -Credential (Get-Credential)

  2. Provide Credentials when prompted.

Expected behavior

Should see command execution successful.

Actual Behavior

Process fails to with general error.

Register-CohesityProtectionSourceAcropolis : Could not populate incoming entity protos
At C:\repo\cohesity_ps\Cohesity-SetSource.ps1:19 char:6
+      Register-CohesityProtectionSourceAcropolis -Server $SourceHostna ...
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Register-Cohesi...SourceAcropolis], Exception
    + FullyQualifiedErrorId : System.Exception,Cohesity.Powershell.Cmdlets.ProtectionSource.RegisterCohesityProtectionSourceAcropolis

Register-CohesityProtectionSourceAcropolis-Fail

pyashish commented 3 years ago

Thanks David, we got escalations from Support and we are looking into this.

bijayprasadtiwari commented 3 years ago

@DavidSeaton , we have made a fix and the code has been pushed to github. The fix will be available in the upcoming release. Below steps were followed to ensure that the AHV protection source works as expected. Please note, that a new attribute is introduced "EntityType" with a default value "KStandaloneCluster" in the cmdlet "Register-CohesityProtectionSourceAcropolis"

Register-CohesityProtectionSourceAcropolis -Server "ahv-cluster" -Credential (New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "admin", (ConvertTo-SecureString -AsPlainText 'passsword' -Force))

New-CohesityProtectionJob -Name job-ahv -StorageDomainId 5 -PolicyId 426644075588690:1611300700859:3 -SourceIds 9 -ParentSourceId 1 -Environment KAcropolis

Start-CohesityProtectionJob -Id 17395

Stop-CohesityProtectionJob -Id 17395

Get-CohesityProtectionJobRun -JobId 17395

Get-CohesityProtectionJob -Ids 17395

bijayprasadtiwari commented 3 years ago

The fix is available at https://www.powershellgallery.com/packages/Cohesity.PowerShell/1.6.9. Closing the ticket, do reopen if the bug is not fixed.