Skip to content

Create Config_check.service - #9

Open
fzahir786 wants to merge 1 commit into
developfrom
topic/NOJIRA-3333
Open

Create Config_check.service#9
fzahir786 wants to merge 1 commit into
developfrom
topic/NOJIRA-3333

Conversation

@fzahir786

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

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 introduces a new systemd service file Config_check.service to perform configuration validation after the WPEFramework service starts. However, the service file contains multiple critical violations of the repository's systemd service coding guidelines that must be addressed before merging.

Changes:

  • Adds new systemd service file Config_check.service with dependency on Wpeframework.service

[Service]
Type=simple
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

ExecStartPost must use an absolute path. The mkdir command needs to be specified with its full path.

Change from:
ExecStartPost=mkdir -p /var/run/config_checker

To:
ExecStartPost=/bin/mkdir -p /var/run/config_checker

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#2-provide-absolute-path-for-execution-directives

Copilot generated this review using guidance from repository custom instructions.
After=Wpeframework.service

[Service]
Type=simple

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

Using Type=simple is not recommended. Prefer Type=notify for long-running services or Type=oneshot for one-time tasks. Type=simple doesn't guarantee service readiness and can cause race conditions.

Based on the service behavior (creates a directory which suggests persistent state), this should likely be Type=oneshot. If config_check is a long-running daemon that can send readiness signals, use Type=notify instead.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#3-define-appropriate-service-type

Copilot generated this review using guidance from repository custom instructions.
Type=simple
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker
RemainAfterExit=yes

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

RemainAfterExit=yes is only valid with Type=oneshot, not with Type=simple. This configuration is invalid and will cause errors.

The service must be changed to Type=oneshot if RemainAfterExit=yes is needed. RemainAfterExit tells systemd that the service's "effect" persists after the process exits, which only makes sense for one-time operations (oneshot), not for running processes (simple or notify).

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#4-service-state-managementremainafterexit

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +4 to +8
[Service]
Type=simple
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker
RemainAfterExit=yes

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

Missing timeout configuration. Both TimeoutStartSec and TimeoutStopSec should be specified to prevent indefinite waits and ensure clear expectations.

Add to the [Service] section:
TimeoutStartSec=30
TimeoutStopSec=10

TimeoutStartSec should be 30 seconds or less, and TimeoutStopSec should be 10 seconds or less. If values greater than 90 seconds are needed, proper justification is required.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#8-set-timeouts-and-limits-appropriately

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +1 to +8
[Unit]
After=Wpeframework.service

[Service]
Type=simple
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker
RemainAfterExit=yes

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

Missing [Install] section. Services must include an [Install] section with WantedBy=multi-user.target to ensure the service starts automatically during boot.

Add at the end of the file:
[Install]
WantedBy=multi-user.target

Without this section, the service won't start automatically at boot and won't be properly integrated into the boot sequence.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#9-boot-integration-requirement

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +1 to +2
[Unit]
After=Wpeframework.service

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

Missing Description field in the [Unit] section. Every service must have a clear, descriptive Description= that explains what the service does. This helps others understand the service's purpose.

For example:
Description=Configuration Validation Service for System Settings

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#1-add-proper-service-description

Copilot generated this review using guidance from repository custom instructions.

[Service]
Type=simple
ExecStart=config_check --option

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

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

ExecStart must use an absolute path instead of a relative command. Systemd does not inherit environment variables like $PATH, so bare commands will fail.

Change from:
ExecStart=config_check --option

To (example):
ExecStart=/usr/bin/config_check --option

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#2-provide-absolute-path-for-execution-directives

Copilot generated this review using guidance from repository custom instructions.
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