Skip to content

Windows (WCOW) bug: volume mounts seem not to work correctly when running the 5 phases #2147

@natalieparellano

Description

@natalieparellano

Summary

See this branch #2146 and these failing tests:

bpOutputAsserts.ReportsReadingFileContents("Detect", testFilePath, "some-content")

fails here with output

        + 	[detector] Starting detector...
        + 	[detector] Parsing inputs...
        + 	[detector] Ensuring privileges...
        + 	[detector] Executing command...
        + 	[detector] Timer: Detector started at 2024-05-02T18:18:51Z
        + 	[detector] Checking for match against descriptor: {windows   []}
        + 	[detector] ======== Output: volume/bp@volume-bp-version ========
        + 	[detector] --- Detect: Volume Buildpack
        + 	[detector] Access is denied.
        + 	[detector] Detect: Reading file 'c:\platform\volume-mount-target\some-file': 
        + 	[detector] --- Done

bpOutputAsserts.ReportsReadingFileContents("Detect", testDetectFilePath, "some-content")

fails here with output

       [detector] Starting detector...
        [detector] Parsing inputs...
        [detector] Ensuring privileges...
        [detector] Executing command...
        [detector] Timer: Detector started at 2024-05-02T18:19:24Z
        [detector] Checking for match against descriptor: {windows   []}
        [detector] ======== Output: rw-volume/bp@rw-volume-bp-version ========
        [detector] --- Detect: Read/Write Volume Buildpack
        [detector] Access is denied.
        [detector] Detect: Writing file 'c:\volume-mount-target\detect-file': failed
        [detector] The system cannot find the file specified.
        [detector] Detect: Reading file 'c:\volume-mount-target\detect-file': 
        [detector] --- Done

I wonder if it is similar to the issue fixed by #2129 in that with the 5 phases, the volume is getting mounted first to the analyze container (which is started as root), then to the detect container (not root). Though, the creator does drop to a non-root user by the time detect starts.


Environment

Windows Containers on Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedNeed some extra hands to get this done.status/readyIssue ready to be worked on.type/bugIssue that reports an unexpected behaviour.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions