Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello Orsiris,
I have found one typo in /dev/tests/sudo_prep.sh. The patch is in this PR.
A question about
run_tests.sh. Is it actually current and functional? I am not complaining, but if it should be functional, I am doing something wrong. However if the status is unknown it might be there are errors in the code.For one, when executed as osyncsudo, this line:
SUDO_EXEC=yes osync.sh --initiator=/home/osyncsudo --target=ssh://osyncsudo@localhost:22//root/osync-tests --rsakey=/home/osyncsudo/.ssh/id_rsa_localfails with the error:
Remote replica path [/root/osync-tests/] does not exist / is not writable.Which is a bit surprising because I assumed osyncsudo would execute this using sudo.
When I create a directory /tmp/osync-tests, the tests run successfully but osync cannot clean up some folders it created during the tests, like
osync.remote.428385.20261026T122541.11521which are owned my root, not by osyncsudo.Then another question, not related to tests:
I use osync in a single target - multiple initiator setup. That is, I have some files on a server accessible from the public internet. And I have a number of clients which must sync this directory. It can happen that I work on alternate clients with short intervals in between. It is nice to have the target-helper functionality so the server signals the clients that a sync action has to be run.
However, in the process of planting the
osync-update.pushthis fails when the client is off-line. Either when pinging the target in advance, or when executing the SSH command in_TriggerInitiatorRunRemote. This results in a error, mails being sent, etc.I do not consider it an error when the client is off-line. Clients can be sleeping, laptops disconnected etc. It is a normal condition when a client can not be reached from the server. It would be nice however if normal operation is resumed after the client comes on-line again. I do not mean that the target must defer the push notification to the initiator and execute the notification as soon as the initiator comes back on-line. First that is too complicated, secondly the initiator can easily trigger its own sync action when coming back on-line. On the target I want to avoid error logs filling up or my mailbox filling up with error messages which are not errors.
So I made a change to
_TriggerInitiatorRunRemoteto callCheckConnectivityRemoteHost. If this check fails, no errors are written and_TriggerInitiatorRunRemotereturns no error. This happens only when these conditions are met:REMOTE_PING_SILENT_FAIL=trueIn addition, I pass this flag also to
ExecTaskswhen called fromCheckConnectivityRemoteHostto mute error logging.ExecTaskhas a parameter #13noErrorLogsAtAllwhich allows that.If this all is not clear I am happy to create a draft pull request for you to review. (I never did that, creating a draft PR so please bear with me)
But then again, is this elegant what I do? When I read thru the issues and commits, osync was created to run on the initiator and the target was just sitting there. Then you added the target-helper mode to trigger a sync action. Now I want to add a mode that no error occurs in target-helper mode when the initiator is off-line. It seems I try to use osync for a purpose it was not intended for.
See, all the target needs is to wait for a change to happen, and write a file into the initiator. All it needs is the IP address of the initiator and the location on the initiator where to write the notification. There is little which can go wrong, there cannot be any conflicts or deletions, no state recordings needed. I see it more like a UDP packet sent to a client, when it arrives it is fine, if it doesn't, it might arrive on the next try. This doesn't need a 6000-line script, it can be done in 10 lines including comment. If something is wrong in the configuration on the target, starting the script will tell. Syncing, logging and reporting will be performed on the initiator anyway. And that robustness, resilience, error checking and reporting on the initiator is fully justified.
So I don't feel quite confident if I really should modify osync for this purpose. Or better create my own, very simple notify script on the target.
What do you think?
Cheers,
Johannes