BC21: SetupWebclient breaks containers when run\my is a shared volume
michvllni opened this issue · comments
We use several containers that run on the same volume.
Our volume points to C:\run\my inside the container.
SetupWebClient appears to replace the management module everytime a container is created:
The issue is when launching multiple containers at once this breaks the container creation as the containers simultanously try to update the file:
Initializing...
Starting Container
Hostname is nsysdevbg
PublicDnsName is nsysdevbuchegegen.axians-infoma.de
Using Windows Authentication
Starting Internet Information Server
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting SqlLongRunningThreshold to 10000
Setting AllowSessionWhileSyncAndDataUpgrade to true
Setting EnableTaskScheduler to true
Creating ClientServicesReconnectPeriod and setting it to 01:00:00
Setting SnapshotDebuggerEnabled to true
Setting SnapshotDebuggerServicesPort to 17083
Setting ServicesUseNTLMAuthentication to true
Setting ServicesDefaultCompany to Master BaWü
Setting PublicWebBaseUrl to https://nsysdevbuchegegen.axians-infoma.de/BC
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Set-Content : Stream was not readable.
At C:\Run\SetupWebClient.ps1:47 char:1
+ Set-Content -Path $NAVWebClientManagementModule -Value $WebManagement ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (C:\run\my\NAVWebClientManageme
nt.psm1:String) [Set-Content], ArgumentException
+ FullyQualifiedErrorId : GetContentWriterArgumentError,Microsoft.PowerShe
ll.Commands.SetContentCommand
WARNING: SetupWebClient failed, retrying...
Registering event sources
Creating DotNetCore Web Server Instance
Set-Content : Stream was not readable.
At C:\Run\SetupWebClient.ps1:47 char:1
+ Set-Content -Path $NAVWebClientManagementModule -Value $WebManagement ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (C:\run\my\NAVWebClientManageme
nt.psm1:String) [Set-Content], ArgumentException
+ FullyQualifiedErrorId : GetContentWriterArgumentError,Microsoft.PowerShe
ll.Commands.SetContentCommand
The process cannot access the file 'C:\run\my\NAVWebClientManagement.psm1' because it is being used by another process.
at <ScriptBlock>, C:\Run\SetupWebClient.ps1: line 49
at <ScriptBlock>, C:\Run\navstart.ps1: line 191
at <ScriptBlock>, C:\run\start.ps1: line 384
at <ScriptBlock>, C:\InfomaEntry.ps1: line 43
at <ScriptBlock>, <No file>: line 1
Starting EventLog Monitor
Monitoring EventSources from EventLog[Application]:
- MicrosoftDynamicsNAVClientClientService
- MicrosoftDynamicsNAVClientWebClient
- MicrosoftDynamicsNavServer$BC
- MSSQL$SQLEXPRESS
Is there any other way to fix this rather than using a separate volume for each container?
I think it is a bad idea to share c:\run\my as this is used for files related to this container.
You should share another volume with your files for the containers.
I somehow had to attach my scripts to the default scripts, and according to documentation I should put them into C:\run\my.
This is the reason why I was doing this
Same issue here ...
It would be more comfortable if the default scripts don't write into C:\Run\my.
To be more precise we are running k8s and the default behaviour is to have only read access on attached volumes generated from ConfigMaps...