-
Notifications
You must be signed in to change notification settings - Fork 104
fix(SSHLoggerBase): switch to use threads #11394
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
base: master
Are you sure you want to change the base?
Conversation
|
but it's different error: |
Maybe it is due to locally (on dev machine) sudo is usually configured to be passwordless? And this leads to the statement |
I will disable passwordless sudo on my machine and check this PR locally |
This missing the fix for dockerhub login, I'll rebase it later |
2923840
to
0907996
Compare
@dimakr this fix doesn't work with you changes. i.e. we still have issue with why do we need sudo within the docker ? for setting the password for docker ? |
at some point in the past the state of the code of
This led to the situation when login to DockerHub was performed under regular user, but image pull was done under sudo, for docker based nodes. So basically for docker nodes image pull was done by unauthenticated user. |
long run we don't want this command to be run within a docker instance |
meanwhile I'll try fixing this in a different way, removing the remoter recreate code that is the root cause, and this change was intended to bypass it. |
DummyNode.is_docker()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR switches the SSHLoggerBase
class from using multiprocessing to threading to resolve integration test failures. The change eliminates the need to create new remoter instances for processes, which was breaking tests that pass in LocalCmdRunner
.
- Replace
multiprocessing.Process
withThreadPoolExecutor
for journal logging - Remove remoter creation logic and reuse the existing node remoter
- Update start/stop methods to work with thread-based execution
Comments suppressed due to low confidence (1)
sdcm/utils/remote_logger.py:81
- The variable name
_child_thread
is misleading since it's actually a ThreadPoolExecutor, not a thread. Consider renaming it to_thread_executor
or_executor
.
self._child_thread = ThreadPoolExecutor(max_workers=1)
swith to threads, so we can stop creating a new remoter for process creating new remoter break some of the integration tests that pass in `LoaclCmdRunner` there no real reason for using a process here, while some of the classes inheriting from this one switch already to using a thread
switch to threads, so we can stop creating a new remoter for process
creating new remoter break some of the integration tests
that pass in
LoaclCmdRunner
there no real reason for using a process here, while some of the classes
inheriting from this one switch already to using a thread
Fixes: #11368
Testing
PR pre-checks (self review)
backport
labelsReminders
sdcm/sct_config.py
)unit-test/
folder)