Skip to content

Cannot mount path on ACI from az container create #26591

@xavis

Description

@xavis

Describe the bug

Currently I'm running the following command:

az container create --resource-group $containers_resource_group \ --name $container_name \ --image $image_name \ --registry-login-server $acr_name.azurecr.io \ --registry-username $acr_name \ --registry-password $acr_password \ --cpu $container_cpu \ --dns-name-label $container_name-$container_count \ --memory $container_memory \ --ports 80 \ --protocol TCP \ --restart-policy Never \ --os-type Linux \ --azure-file-volume-account-name $STORAGE_NAME \ --azure-file-volume-account-key $STORAGE_KEY \ --azure-file-volume-share-name $STORAGE_FILE_SHARE \ --azure-file-volume-mount-path $PATHTOMOUNT

I created a file share in my storage account and I want to mount it in /files, so
PATHTOMOUNT="/files"

But I am not able to do that I always receive the error:

The volume mount path cannot contain ':'

If I remove the root slash
PATHTOMOUNT="files"
It works but I need to mount the files in my desired folder.

Related command

az container create --resource-group $containers_resource_group
--name $container_name
--image $image_name
--registry-login-server $acr_name.azurecr.io
--registry-username $acr_name
--registry-password $acr_password
--cpu $container_cpu
--dns-name-label $container_name-$container_count
--memory $container_memory
--ports 80
--protocol TCP
--restart-policy Never
--os-type Linux
--azure-file-volume-account-name $STORAGE_NAME
--azure-file-volume-account-key $STORAGE_KEY
--azure-file-volume-share-name $STORAGE_FILE_SHARE
--azure-file-volume-mount-path $PATHTOMOUNT

Errors

The volume mount path cannot contain ':'

Issue script & Debug output

DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 651, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/invocation.py", line 113, in _validation
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 859, in _validate_arg_level
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/_validators.py", line 18, in validate_volume_mount_path
knack.util.CLIError: The volume mount path cannot contain ':'

ERROR: cli.azure.cli.core.azclierror: The volume mount path cannot contain ':'
ERROR: az_command_data_logger: The volume mount path cannot contain ':'
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x03A4C808>]
INFO: az_command_data_logger: exit code: 1
INFO: cli.main: Command ran in 1.285 seconds (init: 0.346, invoke: 0.939)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 3691 in cache
WARNING: telemetry.check: Negative: The C:\Users\javier.sanchez.azure\telemetry.txt was modified at 2023-06-02 14:44:41.854090, which in less than 600.000000 s

Expected behavior

It should be able to mount my file share in that directory regarding to docs.

Environment Summary

azure-cli 2.49.0

core 2.49.0
telemetry 1.0.8

Extensions:
aks-preview 0.5.131

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botContainer Instancesaz containerService AttentionThis issue is responsible by Azure service team.act-observability-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions