Project

General

Profile

Actions

User story #11610

closed

file_copy_with_check

Added by François ARMAND over 3 years ago. Updated about 3 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Suggestion strength:
User visibility:
Effort required:

Description

We would like to be able to use a method which copy a file only if the dest file is different and an oracle returns "ok".

The workflow would be the one:


Files

copy_file_with_validation.png (7.34 KB) copy_file_with_validation.png François ARMAND, 2017-10-17 14:28
copy_file_with_validation.png (66.7 KB) copy_file_with_validation.png François ARMAND, 2017-10-17 14:31
Actions #2

Updated by Benoît PECCATTE over 3 years ago

  • Category set to Generic methods
Actions #3

Updated by Alexis MOUSSET over 3 years ago

  • Assignee set to Alexis MOUSSET
  • Target version set to 4.1.10
Actions #4

Updated by Alexis MOUSSET over 3 years ago

  • Status changed from New to In progress
Actions #5

Updated by Alexis MOUSSET over 3 years ago

  • The actual file copy has to be done by a files promises (to get backup, etc.)
  • The diff check can use a file promise in dry-run mode (or an execresult with the diff command)
Actions #6

Updated by Alexis MOUSSET over 3 years ago

It would be called "file_copy_from_local_source_with_check".

Actions #7

Updated by Alexis MOUSSET over 3 years ago

  • do we want it to be (possibly ?) recursive?
  • in this case, on what do we call the command?
Actions #9

Updated by Janos Mattyasovszky about 3 years ago

bundle agent file_copy_from_local_source_with_check(source, destination, check_command)

You might want to add rc_code_ok or similar, since you might have to have some specific non-zero exit-code that represents a validation success...

Actions #13

Updated by Alexis MOUSSET about 3 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/ncf/pull/705
Actions #14

Updated by Alexis MOUSSET about 3 years ago

  • Status changed from Pending technical review to Pending release
Actions #15

Updated by Vincent MEMBRÉ about 3 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.10 and 4.2.4 which were released today.

Actions

Also available in: Atom PDF