Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to mount volume error when deploying AspireShop sample #201

Closed
vicperdana opened this issue Apr 17, 2024 · 7 comments
Closed

Unable to mount volume error when deploying AspireShop sample #201

vicperdana opened this issue Apr 17, 2024 · 7 comments

Comments

@vicperdana
Copy link

Hi @DamianEdwards,

I am getting this error in the container logs after deploying the sample. to Azure. The same error occurs on all containers that rely on the persistent volumes (Az Fileshares).

This may be related to this issue.

Thinking of tinkering with the generated deployment manifests in Bicep, but keen to hear ideas! Thanks.

basketcache
{"TimeStamp":"2024-04-17 15:24:37 \u002B0000 UTC","Type":"Warning","ContainerAppName":"basketcache","RevisionName":"basketcache--pw2dqfs","ReplicaName":"basketcache--pw2dqfs-7fbdff6678-q4jmn","Msg":"MountVolume.SetUp failed for volume \u0022basketcache-aspireshopapphost-basketcache-data\u0022 : rpc error: code = Internal desc = volume(csi-013e9aa7c10952d1a636d63d7aaf6638b79c7a8a946084ae614a1b1913da6990) mount //voloplsf5k257d5c.file.core.windows.net/basketcache-aspireshopapphost-basketcache-data on /var/lib/kubelet/pods/37796c77-df8e-4a88-b6cd-1d5ac12f4991/volumes/kubernetes.io~csi/basketcache-aspireshopapphost-basketcache-data/mount failed with mount failed: exit status 32\nMounting command: mount\nMounting arguments: -t cifs -o ,file_mode=0777,dir_mode=0777,actimeo=30,mfsymlinks,nosharesock,\u003Cmasked\u003E //voloplsf5k257d5c.file.core.windows.net/basketcache-aspireshopapphost-basketcache-data /var/lib/kubelet/pods/37796c77-df8e-4a88-b6cd-1d5ac12f4991/volumes/kubernetes.io~csi/basketcache-aspireshopapphost-basketcache-data/mount\nOutput: mount error(2): No such file or directory\nRefer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)\n\nPlease refer to http://aka.ms/filemounterror for possible causes and solutions for mount errors.","Reason":"FailedMount","EventSource":"ContainerAppController","Count":2}

catalog
{"TimeStamp":"2024-04-17 15:30:44 \u002B0000 UTC","Type":"Warning","ContainerAppName":"catalog","RevisionName":"catalog--vpy9024","ReplicaName":"catalog--vpy9024-57d89dbc74-sbb7x","Msg":"Unable to attach or mount volumes: unmounted volumes=[catalog-aspireshopapphost-catalog-data], unattached volumes=[], failed to process volumes=[]: timed out waiting for the condition","Reason":"FailedMount","EventSource":"ContainerAppController","Count":5} {"TimeStamp":"2024-04-17 15:31:56 \u002B0000 UTC","Type":"Warning","ContainerAppName":"catalog","RevisionName":"catalog--vpy9024","ReplicaName":"catalog--vpy9024-57d89dbc74-sbb7x","Msg":"MountVolume.SetUp failed for volume \u0022catalog-aspireshopapphost-catalog-data\u0022 : rpc error: code = Internal desc = volume(csi-d5b2f04ab28a8625a6670b47a31f5ab2adef1a448896482b6f6da67956a6a045) mount //voloplsf5k257d5c.file.core.windows.net/catalog-aspireshopapphost-catalog-data on /var/lib/kubelet/pods/5475d8bd-2b3f-47ca-8fb7-7d9e99e77042/volumes/kubernetes.io~csi/catalog-aspireshopapphost-catalog-data/mount failed with mount failed: exit status 32\nMounting command: mount\nMounting arguments: -t cifs -o ,file_mode=0777,dir_mode=0777,actimeo=30,mfsymlinks,nosharesock,\u003Cmasked\u003E //voloplsf5k257d5c.file.core.windows.net/catalog-aspireshopapphost-catalog-data /var/lib/kubelet/pods/5475d8bd-2b3f-47ca-8fb7-7d9e99e77042/volumes/kubernetes.io~csi/catalog-aspireshopapphost-catalog-data/mount\nOutput: mount error(2): No such file or directory\nRefer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)\n\nPlease refer to http://aka.ms/filemounterror for possible causes and solutions for mount errors.","Reason":"FailedMount","EventSource":"ContainerAppController","Count":10}

@davidfowl
Copy link
Member

Yes this is a known issue dotnet/aspire#3685.

@vicperdana
Copy link
Author

Thanks @davidfowl - made a change on AppHost, and still seeing a similar error.

Here's the edited Program.cs in AppHost. Should we update nuget to preview 4 too?

var builder = DistributedApplication.CreateBuilder(args);

var catalogDb = builder.AddPostgres("catalog", password: builder.CreateStablePassword("catalog-password"));
if (builder.ExecutionContext.IsRunMode)
{
    catalogDb.WithDataVolume();
}

var postgres = catalogDb.AddDatabase("catalogdb");

var basketCache = builder.AddRedis("basketcache")
    .WithRedisCommander();
    
if (builder.ExecutionContext.IsRunMode)
{
    basketCache.WithDataVolume();
}

var catalogService = builder.AddProject<Projects.AspireShop_CatalogService>("catalogservice")
    .WithReference(postgres);

var basketService = builder.AddProject<Projects.AspireShop_BasketService>("basketservice")
    .WithReference(basketCache);

builder.AddProject<Projects.AspireShop_Frontend>("frontend")
    .WithReference(basketService)
    .WithReference(catalogService)
    .WithExternalHttpEndpoints();

builder.AddProject<AspireShop_CatalogDbManager>("catalogdbmanager")
    .WithReference(postgres);

@davidfowl
Copy link
Member

Should we update nuget to preview 4 too?

Everything has to be updated to preview 5.

@vicperdana
Copy link
Author

Yes I didn't make that change, kept it as preview 5, but still getting the same errors.

Might be going down the bicep edit route...?

Thanks for the super quick response!

@davidfowl
Copy link
Member

Try deploying to a new environment. If you are seeing the same error then something else is wrong.

@vicperdana
Copy link
Author

Yep, re-inited and redeployed to a new environment. Will take a look again later.

@vicperdana
Copy link
Author

All fixed. Thanks @davidfowl!

Added Projects on this line of code.

builder.AddProject<Projects.AspireShop_CatalogDbManager>("catalogdbmanager")
    .WithReference(postgres);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants