Skip to content

[bug] mapt should test the permission of the target files/directories before creating anything #693

@kpouget

Description

@kpouget

When launching mapt in containers with the wrong user permissions, mapt may fail to create the files necessary to destroy the cloud resource (with mapt).

Examples:

INFO Resources:
INFO     + 16 created
INFO
INFO Duration: 9m39s
INFO
open /workspace/host: is a directory
INFO Resources:
INFO     + 16 created
INFO
INFO Duration: 12m26s
INFO
open /workspace/username: permission denied

This one is less of an issue, as it fails early. But mapt could provide a more user-friendly error message:

DEBU Based on avg prices for instance types ...
DEBU Spot data: {[Standard_D48s_v4] 0.8233680000000001 uksouth  0}
DEBU managing stack stackCreateWindowsDesktop-kpouget-windows-desktop-test
ERRO Failed to create or select stack: failed to select stack: exit status 255
code: 255
stdout:
stderr: error: write ".pulumi/meta.yaml": blob (key ".pulumi/meta.yaml") (code=Unknown): mkdir /workspace/.pulumi: permission denied

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions