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

Fixes #19218: backup file are not copied correctly when the destination directory is on another FS #3616

Conversation

fanf
Copy link
Member

@fanf fanf commented May 4, 2021

@fanf
Copy link
Member Author

fanf commented May 4, 2021

PR updated with a new commit

@@ -855,28 +856,41 @@ class PolicyWriterServiceImpl(
UIO.unit
} else {
for {
mvOptions <- getMoveOptions(sortedFolder.head)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, you're right, we need to keep the atomic move if we are on the same FS. In all case, it will give information related to performance (the warning message).

_ <- newFolders.update( folder :: _ )
_ <- PolicyGenerationLoggerPure.trace(s"Backuping old policies from '${baseFolder}' to '${backupFolder}' ")
_ <- backupNodeFolder(baseFolder, backupFolder)
// _ <- newFolders.update( folder :: _ )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't add folder anymore here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rollback in error won't be done anymore, so either no rollback or update newFolders ref

@@ -314,6 +314,7 @@ rudder.community.port=5309
# CAUTION: For performance and consistency, it is necessary that the rudder.dir.backup is on the same
# filesystem as /var/rudder/share/ , otherwise the policies change for nodes is non-atomic (move becomes
# copy then delete), and can result to incomplete/partial policies being distributed to nodes.
# Commant that option to disable policy backup.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment instead of commant

@fanf
Copy link
Member Author

fanf commented May 4, 2021

PR updated with a new commit

@fanf
Copy link
Member Author

fanf commented May 4, 2021

PR rebased

@fanf fanf force-pushed the bug_19218/backup_file_are_not_copied_correctly_when_the_destination_directory_is_on_another_fs branch from ab6ece7 to e6ac344 Compare May 4, 2021 08:56
@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder/pull/3616
-- Your faithful QA
Kant merge: "Live your life as though your every act were to become a universal law."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/38477/console)

@fanf
Copy link
Member Author

fanf commented May 5, 2021

OK, merging this PR

@fanf fanf merged commit ca69e7c into Normation:branches/rudder/6.1 May 5, 2021
@fanf fanf deleted the bug_19218/backup_file_are_not_copied_correctly_when_the_destination_directory_is_on_another_fs branch March 15, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants