Eclipse BlueChi is a systemd service controller intended for multi-node environments with a predefined number of nodes and with a focus on highly regulated ecosystems such as those requiring functional safety.
Even after changing the SELinux policy back to permissive mode (https://github.com/eclipse-bluechi/bluechi/pull/885), quite a lot of integration tests on multihost mode were still failing. This PR contains multiple commits tackling these issues:
Use different file name for ctrl config
concatenate stderr and stdout in sshclient
The client for the podman container seems to concatenate stderr and stdout in its output parameter. In the SSH client stderr and stdout are different return variables. In order to not break the exec_run API of the Client class and still get a uniform behavior of both clients, lets concat stderr and stdout in the SSH client.
actively check if bluechi_machine_lib exists
In order to avoid failing mkdir calls on subsequent tests for the bluechi_machine_lib, an active check is being made. If it doesn't exist yet, we create the directory and the library files. These files are not tracked and thus not deleted after a test. This way, we only create the lib once.
switch order of restoring created and changed files
When creating files, we first keep track of them in the list for newly created ones. If a file is already in that list and another file with the same path (dir+name) is created we keep create a backup and track it.
For clean-up we need to reverse that order - first restore tracked backup files and then remove created files. This ensures that there are no dangling files.
coverage: 84.585%. remained the same
when pulling bc59f01ab26f240ec5356364f2ed4e3f77b656a7 on fix-multihost-tests
into d686335974afebbbbdd3cd488bcac7d01fda0cd0 on main.
Even after changing the SELinux policy back to permissive mode (https://github.com/eclipse-bluechi/bluechi/pull/885), quite a lot of integration tests on multihost mode were still failing. This PR contains multiple commits tackling these issues:
Use different file name for ctrl config
concatenate stderr and stdout in sshclient
The client for the podman container seems to concatenate stderr and stdout in its output parameter. In the SSH client stderr and stdout are different return variables. In order to not break the
exec_run
API of the Client class and still get a uniform behavior of both clients, lets concat stderr and stdout in the SSH client.actively check if bluechi_machine_lib exists
In order to avoid failing mkdir calls on subsequent tests for the bluechi_machine_lib, an active check is being made. If it doesn't exist yet, we create the directory and the library files. These files are not tracked and thus not deleted after a test. This way, we only create the lib once.
switch order of restoring created and changed files
When creating files, we first keep track of them in the list for newly created ones. If a file is already in that list and another file with the same path (dir+name) is created we keep create a backup and track it. For clean-up we need to reverse that order - first restore tracked backup files and then remove created files. This ensures that there are no dangling files.
1) Example run with test failures: http://artifacts.osci.redhat.com/testing-farm/c028903c-1611-4a93-be04-686594d8a210/
2) Example run after fixes: http://artifacts.osci.redhat.com/testing-farm/754765a9-2181-462a-b4e3-688adf697743/ The flaky propagate test failed, unfortunately. This will be tackled in https://github.com/eclipse-bluechi/bluechi/issues/874)