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

remove bogus attempt to lock cscreenrc #273

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

olafhering
Copy link
Contributor

touch(1) can not be used to lock a resource.

touch(1) can not be used to lock a resource.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
@olafhering
Copy link
Contributor Author

In case locking can not be implemented in execute, a poor-mans-lock could be done with until mkdir $lockdir ;do sleep 1;done and rmdir $lockdir.

$lockdir could be /run/cscreen/cscreenrc.lock.

@SchoolGuy SchoolGuy self-requested a review November 29, 2024 16:20
Copy link
Collaborator

@SchoolGuy SchoolGuy left a comment

Choose a reason for hiding this comment

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

For a daemon like Orthos having something like SSH needed is an error in itself. As such I have no issue removing this part of the code without a replacement in execute.

@SchoolGuy
Copy link
Collaborator

@olafhering Do you consider this PR ready to be merged?

@olafhering
Copy link
Contributor Author

Some locking is needed. I changed a dozen machines, and ended up with an cscreenrc which just contained the ORTHOS section. Apparently there are competing tasks, even if each machine is updated with enough time in between.

@SchoolGuy
Copy link
Collaborator

This is why I proposed to move this problem into a microservice running on the cscreen server. This fits more with the sidecar approach that would work better in the container world.

See #260 for my proposal.

@olafhering
Copy link
Contributor Author

Yes, I have seen this. I think this PR is ready.

@SchoolGuy
Copy link
Collaborator

If you have your GPG key at hand I would appreciate a sign and force push.

@olafhering
Copy link
Contributor Author

0e4686a is signed AFAICS, just GH does not recognize it after force push.

@SchoolGuy
Copy link
Collaborator

Ah you didn't upload your public key to GitHub.

@SchoolGuy SchoolGuy merged commit 99c9e40 into openSUSE:master Nov 29, 2024
11 of 12 checks passed
@olafhering
Copy link
Contributor Author

It is uploaded, just GH is not entirely happy with it.

@olafhering olafhering deleted the cscreenrc_lock branch November 29, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants