Skip to content

"mgrctl cp" fails when source file is being written while being transfered #772

Description

@meaksh

This issue was found while running acceptance tests for Uyuni:

FAIL: mgrctl cp server:/var/log/rhn/reposync.log /tmp/reposync.log returned status code = 1.
Output:
4:16PM INF Starting mgrctl cp server:/var/log/rhn/reposync.log /tmp/reposync.log
4:16PM INF Error: 1 error occurred:
	* copying from container: copier: get: "/var/log/rhn/reposync.log": copying /var/log/rhn/reposync.log: archive/tar: write too long

It seems this error happens when the source file is being updated at the same time that mgrctl cp is preparing for transfering the file.

Maybe mgrctl cp could create a temporal copy of the source file and use it for the transfer, so we can prevent this situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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