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

Add link dest to synchronize module #32746

Merged
merged 3 commits into from
Nov 13, 2017

Conversation

kellinm
Copy link
Contributor

@kellinm kellinm commented Nov 9, 2017

SUMMARY

Adds support for the --link-destination behavior from rsync in the synchronize module. This is a commonly used feature for keeping several incremental release subtrees around while minimizing the space used on disk. The feature deliberately does not allow nested subtree rsyncs because of how much memory it would take to try and load the entire map into memory to perform the task. The verbose flag is added when using the new feature because rsync does not recognize hardlinking a file as a change. I have filed a bug in the Fedora bugzilla against that issue.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

synchronize

ANSIBLE VERSION
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/kellin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = ./bin/ansible
  python version = 2.7.13 (default, Sep  5 2017, 08:53:59) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)]
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Nov 9, 2017

cc @tima
click here for bot help

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 core_review In order to be merged, this PR must follow the core review workflow. feature_pull_request module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels Nov 9, 2017
@ansibot
Copy link
Contributor

ansibot commented Nov 9, 2017

The test ansible-test sanity --test pep8 [?] failed with the following errors:

lib/ansible/modules/files/synchronize.py:151:65: W291 trailing whitespace
lib/ansible/modules/files/synchronize.py:496:22: E225 missing whitespace around operator
lib/ansible/modules/files/synchronize.py:497:29: E225 missing whitespace around operator

The test ansible-test sanity --test validate-modules [?] failed with the following error:

lib/ansible/modules/files/synchronize.py:0:0: E309 version_added for new option (link_dest) should be 2.5. Currently 0.0

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 9, 2017
@kellinm kellinm force-pushed the add-link-dest-to-synchronize-module branch from 1d1e033 to a361477 Compare November 9, 2017 16:47
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 9, 2017
@kellinm
Copy link
Contributor Author

kellinm commented Nov 9, 2017

cc @maxamillion

@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Nov 9, 2017
@samdoran
Copy link
Contributor

samdoran commented Nov 9, 2017

rebuild_merge

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Nov 9, 2017
kellinm and others added 3 commits November 9, 2017 15:53
- add clean up after the last two tests in synchronize to make them
  match with the expectations in the previous tests

Signed-off-by: Robert Marshall <rmarshall@redhat.com>
- add the link-dest option to the synchronize module code
- add tests for the link-dest option
- add documentation of the link_dest option to synchronize
- modify changed flag so it can properly work around rsync
  upstream not flagging hardlinks as a change properly in
  formatted output

Signed-off-by: Robert Marshall <rmarshall@redhat.com>
@kellinm kellinm force-pushed the add-link-dest-to-synchronize-module branch from 2ab2ae1 to 80d66a6 Compare November 9, 2017 20:56
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 9, 2017
@samdoran samdoran merged commit 464ded8 into ansible:devel Nov 13, 2017
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants