rubrikinc / rubrik-powershell-sdk

The Rubrik Security Cloud SDK
https://www.powershellgallery.com/packages/RubrikSecurityCloud
MIT License
7 stars 9 forks source link

Connect-Rsc dosen't work in RubrikSecurityCloud 1.7 #131

Closed SahFari closed 2 months ago

SahFari commented 2 months ago

I installed RubrikSecurityCloud 1.7 on a lab server this morning, this after that have uninstalled older versions of RubrikSecurityCloud on the same server.

I couldn’t connect to RSC when I used PS 5. It worked in PS7!

Did many tests, uninstalled, and reinstalled RubrikSecurityCloud 1.7 several times, rebooted the server. It didn’t work.

Checked it on my own computer. It worked there. Checked if I had other versions of RubrikSecurityCloud installed. I had 11 versions in PS 7 and 6 versions in PS 5!

Get-InstalledModule RubrikSecurityCloud -AllVersions

I start testing some more on my lab server.

Did this 3 times! This is what I got when I only had installed 1.7 and couldn’t connect:

DEBUG: [Connect_Rsc] RscBasePSCmdlet.cs:154:BeginProcessing() Cmdlet Inputs: DEBUG: [Connect_Rsc] Connect-Rsc.cs:303:_Connect() Before Auth: AuthState=NOT_AUTHORIZED, PSVar= DEBUG: [Connect_Rsc] RscSessionInfo.cs:59:.ctor() Sending GQL Query: query GetRscVersion{ deploymentVersion

} connect-rsc : One or more errors occurred. At line:1 char:1

kacummings commented 2 months ago

I have the same issue. Been messing with it all day until I saw this and tried 1.5. It works for me, whereas 1.7 fails auth with the same error.

SahFari commented 2 months ago

@kacummings I ended up removing 1.7 from PS 5. I got the same issue after a reboot yesterday! Did 2 more tests yesterday, there I removed 1.7, and reinstalled it once again. Rebooted the server after each test.

After a reboot 1.7 can’t connect to RSC in PS 5.

For the 5:th time I removed 1.7, leaving 1.5 in PS 5. Could connect to RSC after a reboot.

I logged on to that server today. I could connect and disconnect to RSC via PS 5. 1.7 is still working on PS 7.

rynardtspies commented 2 months ago

Thank you for bringing this issue to our attention.

We have identified a library conflict between .NET Framework and one of the GraphQL libraries that is causing the problem in Windows PowerShell 5.1. Our team is actively collaborating with Microsoft to resolve this issue as soon as possible.

In the meantime, we recommend using PowerShell 7, which is not affected by this conflict.

We apologize for any inconvenience this may cause and appreciate your understanding.

Best regards, Rynardt Spies

Technical Specialist Rubrik Professional Services

kacummings commented 2 months ago

Thank you. Late yesterday I looked into the GitHub repo for this module and found that someone else commented the same issue a few days ago. I was able to work around it using their suggestion- by removing v1.7 of the module, then installing v1.5.

That being said, I still haven't been able to find how to list all active/running jobs by object type (backup, archive, recovery) with RSC module as I had done in the past with the Rubrik PS module. I did find a way to create a token for the service user and login to the cluster locally via the old Rubrik module. For the time being that will work, as long as the token continues to work.

We push the running tasks to a dashboard and refresh every couple of minutes. It just helps us keep an eye on potential issues. If you have any suggestions or examples for pull the same information with RSC module, please let me know.

@.***

Thank you!

Kyle Cummings Cornerstone Information Systems @.*** 812-330-4361


From: Rynardt Spies @.> Sent: Wednesday, August 14, 2024 5:44:41 AM To: rubrikinc/rubrik-powershell-sdk @.> Cc: Kyle Cummings @.>; Mention @.> Subject: Re: [rubrikinc/rubrik-powershell-sdk] Connect-Rsc dosen't work in RubrikSecurityCloud 1.7 (Issue #131)

This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and expect that the content is safe.

Thank you for bringing this issue to our attention.

We have identified a library conflict between .NET Framework and one of the GraphQL libraries that is causing the problem in Windows PowerShell 5.1. Our team is actively collaborating with Microsoft to resolve this issue as soon as possible.

In the meantime, we recommend using PowerShell 7, which is not affected by this conflict.

We apologize for any inconvenience this may cause and appreciate your understanding.

Best regards, Rynardt Spies

Technical Specialist Rubrik Professional Services

- Reply to this email directly, view it on GitHubhttps://github.com/rubrikinc/rubrik-powershell-sdk/issues/131#issuecomment-2288312623, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANOJQ4SGAFBHJ4D7FNCPN73ZRMRITAVCNFSM6AAAAABMMC7JPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGMYTENRSGM. You are receiving this because you were mentioned.Message ID: @.***>

SahFari commented 2 months ago

@kacummings

Service Accounts needs to be created in RSC, download the .json file to a location and then run a script Set-RscServiceAccountFile -InputFilePath "C:\location_of_the_Json_file to create a "token" and then delete the .json file.

I can see running tasks by running this:

Get-RscEventSeries | 
Where-Object {$_.LastActivityStatus -eq 'RUNNING'} | 
Format-Table ObjectType, ObjectId, LastActivityStatus, ActivitySeriesId, ClusterUuid, IsCancelable, IsPolarisEventSeries

Object types Get-RscEventSeries | Select-Object ObjectType -Unique

kacummings commented 2 months ago

Awesome. I will give this a try. Thanks.

From: Fari Sah @.> Sent: Wednesday, August 14, 2024 8:59 AM To: rubrikinc/rubrik-powershell-sdk @.> Cc: Kyle Cummings @.>; Mention @.> Subject: Re: [rubrikinc/rubrik-powershell-sdk] Connect-Rsc dosen't work in RubrikSecurityCloud 1.7 (Issue #131)

This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and expect that the content is safe.

@kacummingshttps://github.com/kacummings

Service Accounts needs to be created in RSC, download the .json file to a location and then run a script Set-RscServiceAccountFile -InputFilePath "C:\location_of_the_Json_file to create a "token" and then delete the .json file.

I can see running tasks by running this:

Get-RscEventSeries |

Where-Object {$_.LastActivityStatus -eq 'RUNNING'} |

Format-Table ObjectType, ObjectId, LastActivityStatus, ActivitySeriesId, ClusterUuid, IsCancelable, IsPolarisEventSeries

Object types Get-RscEventSeries | Select-Object ObjectType -Unique

— Reply to this email directly, view it on GitHubhttps://github.com/rubrikinc/rubrik-powershell-sdk/issues/131#issuecomment-2288673125, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANOJQ4QHREO3PIOLIJPX273ZRNIABAVCNFSM6AAAAABMMC7JPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYGY3TGMJSGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

rynardtspies commented 2 months ago

This issue has been resolved in Version 1.8