rubrik-sdk-for-powershell icon indicating copy to clipboard operation
rubrik-sdk-for-powershell copied to clipboard

Create a logship fails

Open SIDFVANAMG opened this issue 11 months ago • 0 comments

Current Behavior

Exception setting "targetFilePaths": "Cannot convert the "System.Object[]" value of type "System.Object[]" to type 
"System.Collections.Generic.List`1[RubrikSecurityCloud.Types.MssqlDbFileExportPathInput]"."
At ..\New-RscMssqlLogShippingSecondary.ps1:132 char:13
+             $query.Var.input.Config.mssqlLogShippingCreateConfig.targ ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetting

Exception calling "Invoke" with "0" argument(s): "
One or more errors occurred.
The request generated an error.

Query: mutation MutationCreateMssqlLogShippingConfiguration($input: CreateMssqlLogShippingConfigurationInput!)
{
  createMssqlLogShippingConfiguration
  (
  input: $input
  )
  {
  id
  nodeId
  status
   __typename }
 __typename }

Variables: {"input":{"clusterUuid":"","config":{"makeupReseedLimit":1,"mssqlLogShippingCreateConfig":{"maxDataStreams":2,"mssqlLogShippingTargetStateOptions":{"sho 
uldDisconnectStandbyUsers":false,"state":"MSSQL_LOG_SHIPPING_OK_STATE_STANDBY"},"targetDatabaseName":"RUBRIK_MIGRATE_TEST","targetFilePaths":[{}],"targetInstanceId 
":"7cfcec04-faf9-5323-9308-f79b54132313"}},"id":"5deae8f1-d591-5800-be6e-c696c2ba105c"}}
Operation Name: MutationCreateMssqlLogShippingConfiguration


GraphQLResponse<JObject>:
Data: null
Errors: null
HTTP Status Code: 400 BadRequest


[QueryAnalysisError] [Mssql Team] Encountered Client error (400) executing mutation with operations: [MutationCreateMssqlLogShippingConfiguration] and variables {" 
input":{"clusterUuid":"","config":{"makeupReseedLimit":1,"mssqlLogShippingCreateConfig":{"maxDataStreams":2,"mssqlLogShippingTargetStateOptions":{"shouldDisconnect 
StandbyUsers":false,"state":"MSSQL_LOG_SHIPPING_OK_STATE_STANDBY"},"targetDatabaseName":"RUBRIK_MIGRATE_TEST","targetFilePaths":[{}],"targetInstanceId":"7cfcec04-f 
af9-5323-9308-f79b54132313"}},"id":"5deae8f1-d591-5800-be6e-c696c2ba105c"}}. Error: Error during variable coercion. Violations:

Variable '$input' expected value of type 'CreateMssqlLogShippingConfigurationInput!' but got: {"clusterUuid":"","config":{"makeupReseedLimit":1,"mssqlLogShippingCr 
eateConfig":{"maxDataStreams":2,"mssqlLogShippingTargetStateOptions":{"shouldDisconnectStandbyUsers":false,"state":"MSSQL_LOG_SHIPPING_OK_STATE_STANDBY"},"targetDa 
tabaseName":"RUBRIK_MIGRATE_TEST","targetFilePaths":[{}],"targetInstanceId":"7cfcec04-faf9-5323-9308-f79b54132313"}},"id":"5deae8f1-d591-5800-be6e-c696c2ba105c"}.  
Reason: 'config.mssqlLogShippingCreateConfig.targetFilePaths[0].exportPath' Expected non-null value, found null. (line 1, column 54):
mutation MutationCreateMssqlLogShippingConfiguration($input: CreateMssqlLogShippingConfigurationInput!)
                                                     ^

Variable '$input' expected value of type 'CreateMssqlLogShippingConfigurationInput!' but got: {"clusterUuid":"","config":{"makeupReseedLimit":1,"mssqlLogShippingCr 
eateConfig":{"maxDataStreams":2,"mssqlLogShippingTargetStateOptions":{"shouldDisconnectStandbyUsers":false,"state":"MSSQL_LOG_SHIPPING_OK_STATE_STANDBY"},"targetDa 
tabaseName":"RUBRIK_MIGRATE_TEST","targetFilePaths":[{}],"targetInstanceId":"7cfcec04-faf9-5323-9308-f79b54132313"}},"id":"5deae8f1-d591-5800-be6e-c696c2ba105c"}.  
Reason: 'config.mssqlLogShippingCreateConfig.targetFilePaths[0].logicalName' Expected non-null value, found null. (line 1, column 54):
mutation MutationCreateMssqlLogShippingConfiguration($input: CreateMssqlLogShippingConfigurationInput!)
                                                     ^"
At ..\New-RscMssqlLogShippingSecondary.ps1:154 char:9
+         $query.Invoke()
+         ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : CmdletInvocationException

Expected Behavior

Create a Logship

Steps to Reproduce

$MssqlInstance = Get-RscMssqlInstance -WindowsClusterName $NAME $RscMssqlDatabase = Get-RscMssqlDatabase -Name "TESTDB" -RscMssqlInstance $MssqlInstance DestRubrikSQLInstance = Get-RscMssqlInstance -WindowsClusterName $Name2 $date = Get-RscMssqlDatabaseRecoveryPoint -RscMssqlDatabase $RscMssqlDatabase -Latest $DBFiles1 = Get-RscMssqlDatabaseFiles -RscMssqlDatabase $RscMssqlDatabase -RecoveryDateTime $date

New-RscMssqlLogShippingSecondary -RscMssqlDatabase $RscMssqlDatabase -TargetMssqlInstance $DestRubrikSQLInstance -TargetDatabaseName $DBName -state 'STANDBY' -AutomaticReseed -TargetFilePaths $DBFiles

Context

get-RubrikDebugInfo


PSVersion                     : 5.1.22621.4391
PSEdition                     : Desktop
PSCompatibleVersions          : {1.0, 2.0, 3.0, 4.0...}
BuildVersion                  : 10.0.22621.4391
CLRVersion                    : 4.0.30319.42000
WSManStackVersion             : 3.0
PSRemotingProtocolVersion     : 2.3
SerializationVersion          : 1.1.0.1
HostConsoleName               : Visual Studio Code Host
HostConsoleVersion            : 2025.0.0
HostCulture                   : en-US
HostCultureUI                 : en-US
RubrikConnection              : True
UserAgentString               : RubrikPowerShellSDK-9.0.1--5.1.22621.4391--platform--Win32NT--platform_version--Microsoft Windows 11 Enterprise22621
RubrikAuthentication          : Bearer
RubrikClusterVersion          : 9.2.2-p1-29213
RubrikCurrentModuleVersion    :
RubrikInstalledModule         : 9.0.1
RubrikModuleOptions           : ApplyCustomViewDefinitions = True; CredentialPath = ; DefaultWebRequestTimeOut = 100
RubrikModuleDefaultParameters :

Failure Logs

No response

SIDFVANAMG avatar May 15 '25 11:05 SIDFVANAMG