Skip to content

Docker source plugin fails to fetch images #95

@doraskayo

Description

@doraskayo

It appears that any image that uses one of the following features cannot be fetched correctly by the Docker plugin:

  1. Whiteout files corresponding to files that cannot be removed due to parent directory permissions
        [00:00:06] FAILURE [0e4ec5fd] images/redhat-ubi8-x86_64.bst: docker source at images/redhat-ubi8-x86_64.bst [line 4 column 2]: Error staging source: [Errno 2] No such file or directory: '/home/user/.cache/buildstream/tmp/staging-tempi542ewmq/root/buildinfo/'
    
  2. Files without read permission by the running user:
          [00:10:04] FAILURE [0e4ec5fd] images/redhat-ubi8-x86_64.bst: Failed to capture tree /home/user/.cache/buildstream/tmp/staging-temppou9rkp9: code: 13
          message: "System error in `merklize()` for path \"/home/user/.cache/buildstream/tmp/staging-temppou9rkp9\": std::system_error exception thrown at [buildboxcommon_me
    rklize.cpp:1125] [system:13], errMsg = \"Failed to open path \"\"etc/gshadow\"\"\", errno : Permission denied"
    
  3. Opaque whiteout files. They are not handled by the plugin at all. These files are currently matched as normal whiteout files and would trigger an exception when trying to remove a nonexistent file.
  4. Whiteout files with ".wh." somewhere in their name (in addition to the beginning of the file name). The file name is identified correctly and an exception would be triggered when trying to remove a nonexistent file. Found through code audit.

This was tested using the following image:

kind: import

sources:
- kind: docker
  url: docker_registry:redhat/ubi8
  track: 8.5
  architecture: "amd64"
  ref: fef1f0adb231b94c80f22be55bb7678b5c8898d3eb314ee7ceeae7c520d76958

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions