You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue Enter-BCContainer seems to be broken on PS7. Whenever I try to enter a BC container on PS7 I get the error that I have logged down below in the full output of the scripts.
I started using the alternative Open-BCContainer ever since, which works fine. But there are a few quirks here that I think are worth reporting and resolving.
I don't really get the difference between Enter-BCContainer and Open-BCContainer. Aside from the fact that the latter opens a new terminal window and seems to be a little less "integrated" (colorcoding, syntax a.s.o.). And of course: the fact that one works for PS7 and the other doesn't. So my question is: why keep both? Why not deprecate one and just keep the other?
After finishing a New-BCContainer call, you conveniently output a list of cmdlets that are useful now. One of those keeps being Enter-BCContainer, event though - as reported above - it does no longer work on PS7.
Another quirk i noticed is: Enter-BCContainer is one of those (many) cmdlets where the name of the container is case sensitive. On a whole lot of other cmdlets it is not. This is not strictly related to Enter-BCContainer, but rather a general problem i noticed. I think it would be worth streamlining this across the entirety of BCCH.
Scripts used to create container and cause the issue
...
Cleanup old dotnet core assemblies
Container BC24-RTM successfully created
Use:
Get-BcContainerEventLog -containerName BC24-RTM to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName BC24-RTM to get debug information about the container
Enter-BcContainer -containerName BC24-RTM to open a PowerShell prompt inside the container
Remove-BcContainer -containerName BC24-RTM to remove the container again
docker logs BC24-RTM to retrieve information about URL's again
<user> on ~
# Enter-BcContainer bc24-rtm
Error: No such object: bc24-rtm
Get-BcContainerPlatformVersion Telemetry Correlation Id: 35894752-d9ab-4c45-a230-934cff2e6bea
ParentContainsErrorRecordException: C:\Users\<user>\Documents\PowerShell\Modules\BcContainerHelper\6.0.16\ContainerInfo\Get-NavContainerPlatformVersion.ps1:24
Line |
24 | if ($inspect.Config.Labels.psobject.Properties.Match('maintainer' …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The property 'Config' cannot be found on this object. Verify that the property exists.
<user> on ~
# Enter-BcContainer BC24-RTM
New-PSSession: C:\Users\<user>\Documents\PowerShell\Modules\BcContainerHelper\6.0.16\ContainerHandling\Get-NavContainerSession.ps1:67
Line |
67 | … $session = New-PSSession -Credential $credential -ComputerName $cont …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| [BC24-RTM] Connecting to remote server BC24-RTM failed with the following error message : The SSL connection cannot be established. Verify that the service on the remote host is properly configured to listen for HTTPS requests.
| Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and
| configure the WinRM service: "winrm quickconfig -transport:https". For more information, see the about_Remote_Troubleshooting Help topic.
thomas on ~```
The text was updated successfully, but these errors were encountered:
You are running 6.0.16 - I think this is fixed in 6.0.17
The difference is:
Open-BcContainer will issue a docker exec -it containername pwsh|powershell in a new prompt in the container
Enter-BcContainer will try to create a powershell session to the container and use Enter-PsSession
docker exec takes ~1 second
Creating a session takes approx. the same
Invoking a command in an established session is very quick.
Invoke-ScriptInBcContainer uses a session if possible, else it will create a .ps1 file with the script and call docker exec to execute the script in the container.
From PowerShell 5 on the host running in admin mode we can create a session using New-PSSession -ContainerId $containerId and use that session
From PowerShell 5 in non-admin mode or from PowerShell 7 (both admin and non-admin) we need to use WinRm. If WinRm is not configured, it will give an error - but enter-bccontainer should revert to open-bccontainer like:
The error you are getting is that that the SSL Connection cannot be established. On my machine, I also cannot run WinRm over SSL, but it doesn't give an error - instead it reverts to Open-BcContainer as the image above.
Describe the issue
Enter-BCContainer
seems to be broken on PS7. Whenever I try to enter a BC container on PS7 I get the error that I have logged down below in the full output of the scripts.I started using the alternative
Open-BCContainer
ever since, which works fine. But there are a few quirks here that I think are worth reporting and resolving.Enter-BCContainer
andOpen-BCContainer
. Aside from the fact that the latter opens a new terminal window and seems to be a little less "integrated" (colorcoding, syntax a.s.o.). And of course: the fact that one works for PS7 and the other doesn't. So my question is: why keep both? Why not deprecate one and just keep the other?New-BCContainer
call, you conveniently output a list of cmdlets that are useful now. One of those keeps beingEnter-BCContainer
, event though - as reported above - it does no longer work on PS7.Enter-BCContainer
is one of those (many) cmdlets where the name of the container is case sensitive. On a whole lot of other cmdlets it is not. This is not strictly related toEnter-BCContainer
, but rather a general problem i noticed. I think it would be worth streamlining this across the entirety of BCCH.Scripts used to create container and cause the issue
Full output of scripts
The text was updated successfully, but these errors were encountered: