Project

General

Profile

User story #11610

file_copy_with_check

Added by François ARMAND 11 months ago. Updated 7 months 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:

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
1275
1276

Associated revisions

Revision 13e510ce (diff)
Added by Alexis MOUSSET 7 months ago

Fixes #11610: file_copy_with_check

History

#2 Updated by Benoît PECCATTE 11 months ago

  • Category set to Generic methods

#3 Updated by Alexis MOUSSET 9 months ago

  • Assignee set to Alexis MOUSSET
  • Target version set to 4.1.10

#4 Updated by Alexis MOUSSET 9 months ago

  • Status changed from New to In progress

#5 Updated by Alexis MOUSSET 9 months 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)

#6 Updated by Alexis MOUSSET 9 months ago

It would be called "file_copy_from_local_source_with_check".

#7 Updated by Alexis MOUSSET 9 months ago

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

#9 Updated by Janos Mattyasovszky 7 months 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...

#13 Updated by Alexis MOUSSET 7 months 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

#14 Updated by Alexis MOUSSET 7 months ago

  • Status changed from Pending technical review to Pending release

#15 Updated by Vincent MEMBRÉ 7 months 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.

Also available in: Atom PDF