Mount path for windows - invalid characters?
I am trying to add a path mapping - my container is a windows container not linux. If I run the command I get back "Bad Request". If I add the --debug argument I can see that it doesn't like the --mount-path argument. I have tried various combinations like "C:/webstorage" and "/webstorage" and can't get anything to work. What is the correct syntax for this argument for windows and mounting to the C:/ drive somewhere? > msrest.http_logger : Response content: msrest.http_logger : {"Code":"BadRequest","Message":"The parameter 'AzureStoragePropertyDictionary' has an invalid value. Details: Mount path contains invalid characters. Please review documentation for a list of valid mount path characters..","Target":null,"Details":[{"Message":"The parameter 'AzureStoragePropertyDictionary' has an invalid value. Details: Mount path contains invalid characters. Please review documentation for a list of valid mount path characters.."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"01033","MessageTemplate":"The parameter '{0}' has an invalid value. Details: {1}.","Parameters":["AzureStoragePropertyDictionary","Mount path contains invalid characters. Please review documentation for a list of valid mount path characters."],"Code":"BadRequest","Message":"The parameter 'AzureStoragePropertyDictionary' has an invalid value. Details: Mount path contains invalid characters. Please review documentation for a list of valid mount path characters.."}}],"Innererror":null} msrest.exceptions : Operation returned an invalid status code 'Bad Request' cli.azure.cli.core.util : Operation returned an invalid status code 'Bad Request' Operation returned an invalid status code 'Bad Request' az_command_data_logger : exit code: 1 telemetry.save : Save telemetry record of length 2580 in cache telemetry.check : Negative: The C:\Users\DarrellTunnell.azure\telemetry.txt was modified at 2020-01-23 10:43:00.920906, which in less than 600.000000 s command ran in 6.148 seconds.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 4892bb1c-5cb4-91fa-325b-f5180cd05c3a
- Version Independent ID: 8c9a9a0e-5b36-4039-72c5-b28fd0bb9fd4
- Content: az webapp config storage-account
- Content Source: latest/docs-ref-autogen/webapp/config/storage-account.yml
- Service: app-service-web
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI @antcp
Same issue here using Az PowerShell module, please advise
--mount-path "\data" worked for me with Windows Containers in App Service
--mount-path "\data" worked for me with Windows Containers in App Service
Is "data" a subfolder of D:\home\site ?
--mount-path "\data" worked for me with Windows Containers in App Service
Assuming that maps to c:/data then that wouldnt work for mapping to other drives on windows such as D:/.
I have an existing app service with c:/webstorage mapped - so this worked at some point previously, I'm concerned to know why it now does not, I.e it seems to be a regression
@dazinator & @MaximeRastello - Yes it would mount the share into c: as the folder name data. It's not creating a new drive for the mount.
@vinisoto can you comment on this?
Thanks for using Windows Containers.
Just tried and --mountpath /webstorage works for me (both in the Portal and CLI). There was a regression a few sprints back but it is working now.
cc @jvano
@vinisoto as per the original issue, the error I was seeing was when specifying a drive etc --mountpath C:/webstorage. This used to work as a mapping through the UI. Several weeks ago this stopped working in the UI with an odd error where it seemed to add it, but didn't save, and refreshing the page it was gone. It also fails through the CLI. It does work if I don't specify a drive e.g --mountpath /webstorage and that's how I do it today. But that means seems to suggest you can't mount a custom drive, only to subfolders within the default C drive. Is this a new intentional change or has this now been fixed?
@dazinator behind the scenes we have only supported mounting in subfolders of C: all along (in fact, I believe that in the past if you specified something different than C: we showed an error message indicating that you had to specify C: as the root of your mount path). Because of that (and also to be consistent with how specify mount paths in Linux containers) we chose to remove the drive letter.
Is there a scenario in which you would need your mount path to be in a custom drive?
@vinisoto thank you, that finally explains the behaviour I was seeing.
The only scenarios for not wanting to mount under C drive that I can think of are:-
-
You are not sure whether a subfolder already exists under C for the mount path. I think if you mount into an existing non empty folder on windows it used to cause
docker runto error with a not helpful message. -
The applications running within the container use other drive paths by convention. For example they might expect E:\Backups. To stick to this convention you want to mount to E:\Backups rather than attempt to reconfigure the application.
@vinisoto can we close this issue?
I think we should close it. By design we won't be supporting custom drives for now.
Thank @vinisoto closing the issue.
@dazinator thanks for the feedback about the "E:\Backups" example.
I will add this into our backlog but as @vinisoto mentioned custom drives are not supported at this point.
Just to let you all know that we recently made a fix to support custom drives. It will take few months for the change to be released and available worldwide.