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

The wrong status is being transmitted #2330

Open
khromenokroman opened this issue Aug 20, 2024 · 5 comments
Open

The wrong status is being transmitted #2330

khromenokroman opened this issue Aug 20, 2024 · 5 comments

Comments

@khromenokroman
Copy link
Contributor

khromenokroman commented Aug 20, 2024

авг 20 20:10:38 eve-deb systemd[1]: Starting test-iceoryx.service - Test iceoryx RouDi daemon...
авг 20 20:10:38 eve-deb systemd[1]: Started test-iceoryx.service - Test iceoryx RouDi daemon.
авг 20 20:10:38 eve-deb audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=test-iceoryx comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
авг 20 20:10:38 eve-deb iox-roudi[48315]: Log level set to: [Warning]
авг 20 20:10:38 eve-deb iox-roudi[48315]: Reserving 1538259816 bytes in the shared memory [iceoryx_mgmt]
авг 20 20:10:47 eve-deb iox-roudi[48315]: [ Reserving shared memory successful ]
авг 20 20:10:47 eve-deb iox-roudi[48315]: Reserving 108800000 bytes in the shared memory [ses]
авг 20 20:10:47 eve-deb iox-roudi[48315]: [ Reserving shared memory successful ]
авг 20 20:10:47 eve-deb iox-roudi[48315]: RouDi is ready for clients

start in 20:10:38
ready in 20:10:47

when I run through systemd, it turns out that roudi started and systemd said that everything was fine, I started based on this, I'm trying to write something, but in fact it's just starting

unit file:

$ cat /usr/lib/systemd/system/test-iceoryx.service 
[Unit]
Description=TEST iceoryx RouDi daemon

PartOf=test.target

[Service]
Type=exec
ExecStart=iox-roudi -c /usr/share/test/iceoryx/test-iceoryx.toml
User=ses
Restart=always
RestartSec=10
TimeoutStartSec=10

[Install]
WantedBy=multi-user.target

configuration file:

$ cat /usr/share/test/iceoryx/test-iceoryx.toml
[general]
version = 1

[[segment]]

[[segment.mempool]]
size = 32
count = 10000

[[segment.mempool]]
size = 128
count = 10000

[[segment.mempool]]
size = 1024
count = 100000

@elBoberido please help me, we can solve this problem

@elBoberido
Copy link
Member

I'm not quite sure what you mean. If you want to let systemd start and stop RouDi, then I must disappoint you, RouDi does not support the systemd readiness protocol which would be required in order to make it work with systemd.

@elfenpiff
Copy link
Contributor

@elBoberido would this be something for iceoryx2 to support the systemd readiness protocol?

@khromenokroman
Copy link
Contributor Author

I'm not quite sure what you mean. If you want to let systemd start and stop RouDi, then I must disappoint you, RouDi does not support the systemd readiness protocol which would be required in order to make it work with systemd.

@elBoberido RouDi does not support the systemd readiness protocol which would be required in order to make it work with systemd. are you planning to add this functionality to the 1st version of iceoryx?

@elBoberido
Copy link
Member

@khromenokroman we are quite busy at the moment with other stuff and iceoryx1 is more or less in maintenance mode. I don't think it will be added anytime soon.

@elfenpiff since iceoryx2 does not need a central daemon, it is up to the application to add systemd support. The only thing that iceoryx2 could do is to provide an abstraction to uniformly do this across multiple OSes. But it would still need something the user has to do explicitly.

@khromenokroman
Copy link
Contributor Author

@elBoberido Thanks for the reply :)

khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 22, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 22, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 22, 2024
This change updates the GitHub Action to include the libsystemd-dev package in the list of dependencies. Adding this package ensures that all necessary development libraries are available for builds.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 22, 2024
This change updates the GitHub Action to include the libsystemd-dev package in the list of dependencies. Adding this package ensures that all necessary development libraries are available for builds.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 22, 2024
Introduce a configurable option to enable systemd support in the build process. This helps in integrating systemd features if needed while keeping it optional by default.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 22, 2024
Introduce preprocessor directives to conditionally enable systemd-related code and linking. This change allows for builds without systemd on Linux by checking for the USE_SYSTEMD flag, offering greater flexibility in different environments.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 22, 2024
…read_watchdog

Standardize the naming convention for the listen thread watchdog variable to match the member variable naming pattern. This change ensures consistency and improves code readability.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 23, 2024
Refactored thread naming and error handling for the watchdog thread. Replaced raw `sd_notify` usage with `IOX_POSIX_CALL` to better handle errors. Enhanced log messages for clearer error reporting.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 23, 2024
In the `roudi.cpp` file, added early returns to handle errors more effectively when setting the thread watchdog name and sending READY=1 or WATCHDOG=1 signals. This ensures the system will not proceed if critical setup steps fail, enhancing reliability and maintainability.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 23, 2024
…INVOCATION_ID'

Replaced getenv with iox_getenv_s to fetch 'INVOCATION_ID' securely and handle errors. Added necessary includes and modified related variable and constant for better clarity.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 23, 2024
…h_roudi

Update the CMake script to enable systemd support only for iceoryx_posh_roudi. This ensures that systemd is correctly utilized where needed and prevents potential misconfigurations for other targets.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 23, 2024
…tion

The 'libsystemd-dev' package was removed from the install script in the 'install-iceoryx-deps-and-clang' GitHub action. This change reduces the set of dependencies to only those required for successful execution.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 23, 2024
…lass

Extracted systemd-related functionality into a new Systemd_service_handler class. This refactor improves modularity and simplifies the main RouDi code by encapsulating systemd-specific logic, making it easier to maintain and extend in the future.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 23, 2024
Implemented a shutdown method in Systemd_service_handler to allow graceful termination of the watchdog thread. This enhancement ensures proper resource cleanup and improves system robustness by avoiding potential hang-ups during the shutdown process.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
…mpilation

Moved the Systemd include directive under a conditional compilation block using the USE_SYSTEMD flag. This change ensures that the dependency on Systemd is only included when necessary, reducing potential compilation issues and improving portability.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
…nsistency

Renamed class names and method names to follow camel case conventions, improving code readability and consistency. Updated related variables and comments to match the new naming scheme.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
Updated `roudi_systemd` to `roudiSystemd` and `process_notify` to `processNotify` for consistency with naming conventions. This enhances code readability and maintains consistent style throughout the file.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
…guide

Include an example unit file for enabling systemd support with the `-DUSE_SYSTEMD=ON` build option. This addition clarifies how to configure and manage the service using systemd.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
Introduce std::condition_variable and std::mutex to replace sleep logic in the watchdog loop. This change aims to improve resource management and responsiveness to shutdown signals, making the watchdog more efficient.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
Extract environment variable retrieval logic into a static method. This refactoring improves code readability and reuse, ensuring cleaner and more maintainable code.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Aug 24, 2024
…adability

Improve SystemdServiceHandler readability by adding detailed comments and helper functions. This refactor helps in managing the watchdog loop and sending notifications more clearly, ensuring proper thread name setting and signal handling.
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
… tests

iox-eclipse-iceoryx#2330 Add missing license headers

iox-eclipse-iceoryx#2330 Skip SetThreadNameHelper test on Windows

iox-eclipse-iceoryx#2330 Skip specific tests on Windows

iox-eclipse-iceoryx#2330 Skip specific tests on Windows

iox-eclipse-iceoryx#2330 Skip specific tests on Windows

iox-eclipse-iceoryx#2330 Fix uninitialized unique_ptr in module tests

iox-eclipse-iceoryx#2330 Enhance systemd build-test

iox-eclipse-iceoryx#2330 Add sendSDNotifySignalHelper to ServiceManagement

Introduced a new virtual function enable sending notifications  sd_notify

iox-eclipse-iceoryx#2330 Add Windows-spec test skips in RoudiSystemD tests

iox-eclipse-iceoryx#2330 Fix incorrect preprocessor directive in RouDi.hpp

iox-eclipse-iceoryx#2330 Add libsystemd-dev to installation script

iox-eclipse-iceoryx#2330 Refactor SD notify

iox-eclipse-iceoryx#2330 Upd Actions to fix dependencies and enable tests

iox-eclipse-iceoryx#2330 Add platform-specific includes

iox-eclipse-iceoryx#2330 Refactor systemd notification handling

iox-eclipse-iceoryx#2330 Refactor ci scripts
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
Update the call to iox_getenv_s casting for info.total_size

iox-eclipse-iceoryx#2330 Add module tests for RoudiSystemManager

Introduce tests to verify the functionality of RoudiSystemManager

iox-eclipse-iceoryx#2330 Refactor func for platform

iox-eclipse-iceoryx#2330 Refactor ci scripts

iox-eclipse-iceoryx#2330 Edit ci
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 5, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 9, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 9, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 9, 2024
khromenokroman added a commit to khromenokroman/iceoryx that referenced this issue Sep 9, 2024
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

No branches or pull requests

3 participants