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

Add steps to check PID in lock file #1895

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

gligorisaev
Copy link
Contributor

  1. Adding Step to check the PID number stored in the lock file is the actual PID number of the running service
  2. Checking if after restarting the services the new PID number is stored in the lock files

Proposed changes

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Signed-off-by: gligorisaev <gligorisaev@gmail.com>
@gligorisaev gligorisaev temporarily deployed to Test Pull Request April 4, 2023 09:22 — with GitHub Actions Inactive
Copy link
Member

@rina23q rina23q left a comment

Choose a reason for hiding this comment

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

LGTM.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
171 0 5 171 100

Passed Tests

Name ⏱️ Duration Suite
Define Child device 1 ID 0.03 s C8Y Child Alarms Rpi
Normal case when the child device does not exist on c8y cloud 2.689 s C8Y Child Alarms Rpi
Normal case when the child device already exists 0.864 s C8Y Child Alarms Rpi
Reconciliation when the new alarm message arrives, restart the mapper 1.584 s C8Y Child Alarms Rpi
Reconciliation when the alarm that is cleared 6.047 s C8Y Child Alarms Rpi
Prerequisite Parent 19.146 s Child Conf Mgmt Plugin
Prerequisite Child 0.571 s Child Conf Mgmt Plugin
Child device bootstrapping 15.699 s Child Conf Mgmt Plugin
Snapshot from device 61.129 s Child Conf Mgmt Plugin
Child device config update 62.562 s Child Conf Mgmt Plugin
Configuration types should be detected on file change (without restarting service) 57.392 s Inotify Crate
Check lock file existence in default folder 2.493 s Lock File
Check PID number in lock file 1.821 s Lock File
Check PID number in lock file after restarting the services 3.586 s Lock File
Check starting same service twice 1.271 s Lock File
Switch off lock file creation 1.6760000000000002 s Lock File
Successful firmware operation 73.005 s Firmware Operation
Install with empty firmware name 60.96 s Firmware Operation
Prerequisite Parent 22.446 s Firmware Operation Child Device
Prerequisite Child 7.955 s Firmware Operation Child Device
Child device firmware update 7.245 s Firmware Operation Child Device
Child device firmware update with cache 6.192 s Firmware Operation Child Device
Update Inventory data via inventory.json 1.263 s Inventory Update
Retrieve a JWT tokens 57.638 s Jwt Request
Main device registration 2.1189999999999998 s Device Registration
Child device registration 2.6109999999999998 s Device Registration
Supports restarting the device 74.883 s Restart Device
Update tedge version from previous using Cumulocity 108.134 s Tedge Self Update
Test if all c8y services are up 68.848 s Service Monitoring
Test if all c8y services are down 61.975 s Service Monitoring
Test if all c8y services are using configured service type 67.919 s Service Monitoring
Test if all c8y services using default service type when service type configured as empty 58.084 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker stop start 31.961 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker restart 35.58 s Service Monitoring
Check health status of child device service 27.076 s Service Monitoring
Successful shell command with output 4.329 s Shell Operation
Check Successful shell command with literal double quotes output 3.436 s Shell Operation
Execute multiline shell command 3.223 s Shell Operation
Failed shell command 3.232 s Shell Operation
Software list should be populated during startup 53.487 s Software
Install software via Cumulocity 73.718 s Software
Software list should only show currently installed software and not candidates 53.55 s Software
Child devices support sending simple measurements 3.307 s Child Device Telemetry
Child devices support sending custom measurements 1.274 s Child Device Telemetry
Child devices support sending custom events 1.8 s Child Device Telemetry
Child devices support sending custom events overriding the type 1.9100000000000001 s Child Device Telemetry
Child devices support sending custom alarms #1699 1.134 s Child Device Telemetry
Child devices support sending inventory data via c8y topic 1.112 s Child Device Telemetry
Main device support sending inventory data via c8y topic 1.3719999999999999 s Child Device Telemetry
Child device supports sending custom child device measurements directly to c8y 1.447 s Child Device Telemetry
Main device supports sending custom child device measurements directly to c8y 1.301 s Child Device Telemetry
Check retained alarms 51.128 s Raise Alarms
Validate updated data path used by tedge-agent 1.623 s Data Path Config
Validate updated data path used by c8y-firmware-plugin 12.204 s Data Path Config
Stop tedge-agent service 0.304 s Log Path Config
Customize the log path 0.217 s Log Path Config
Initialize tedge-agent 0.201 s Log Path Config
Check created folders 0.102 s Log Path Config
Remove created custom folders 0.1 s Log Path Config
Install thin-edge via apt 45.789 s Install Apt
Install latest via script (from current branch) 28.772 s Install Tedge
Install specific version via script (from current branch) 25.606 s Install Tedge
Install latest tedge via script (from main branch) 30.861 s Install Tedge
Install then uninstall latest tedge via script (from main branch) 71.674 s Install Tedge
Support starting and stopping services 43.723 s Service-Control
Supports a reconnect 58.364 s Test-Commands
Supports disconnect then connect 57.537 s Test-Commands
Update unknown setting 48.064 s Test-Commands
Update known setting 28.731 s Test-Commands
Stop c8y-configuration-plugin 0.358 s Health C8Y-Configuration-Plugin
Update the service file 0.179 s Health C8Y-Configuration-Plugin
Reload systemd files 1.19 s Health C8Y-Configuration-Plugin
Start c8y-configuration-plugin 0.303 s Health C8Y-Configuration-Plugin
Start watchdog service 10.481 s Health C8Y-Configuration-Plugin
Check PID of c8y-configuration-plugin 0.305 s Health C8Y-Configuration-Plugin
Kill the PID 0.233 s Health C8Y-Configuration-Plugin
Recheck PID of c8y-configuration-plugin 2.276 s Health C8Y-Configuration-Plugin
Compare PID change 0.001 s Health C8Y-Configuration-Plugin
Stop watchdog service 0.179 s Health C8Y-Configuration-Plugin
Remove entry from service file 0.107 s Health C8Y-Configuration-Plugin
Stop c8y-log-plugin 0.448 s Health C8Y-Log-Plugin
Update the service file 0.223 s Health C8Y-Log-Plugin
Reload systemd files 0.798 s Health C8Y-Log-Plugin
Start c8y-log-plugin 0.19 s Health C8Y-Log-Plugin
Start watchdog service 10.159 s Health C8Y-Log-Plugin
Check PID of c8y-log-plugin 0.129 s Health C8Y-Log-Plugin
Kill the PID 0.219 s Health C8Y-Log-Plugin
Recheck PID of c8y-log-plugin 2.194 s Health C8Y-Log-Plugin
Compare PID change 0.001 s Health C8Y-Log-Plugin
Stop watchdog service 0.113 s Health C8Y-Log-Plugin
Remove entry from service file 0.122 s Health C8Y-Log-Plugin
Stop tedge-mapper 0.107 s Health Tedge Mapper C8Y
Update the service file 0.086 s Health Tedge Mapper C8Y
Reload systemd files 0.274 s Health Tedge Mapper C8Y
Start tedge-mapper 0.117 s Health Tedge Mapper C8Y
Start watchdog service 10.098 s Health Tedge Mapper C8Y
Check PID of tedge-mapper 0.178 s Health Tedge Mapper C8Y
Kill the PID 0.3 s Health Tedge Mapper C8Y
Recheck PID of tedge-mapper 0.163 s Health Tedge Mapper C8Y
Compare PID change 0.001 s Health Tedge Mapper C8Y
Stop watchdog service 0.225 s Health Tedge Mapper C8Y
Remove entry from service file 0.141 s Health Tedge Mapper C8Y
Stop tedge-agent 0.112 s Health Tedge-Agent
Update the service file 0.129 s Health Tedge-Agent
Reload systemd files 0.349 s Health Tedge-Agent
Start tedge-agent 0.109 s Health Tedge-Agent
Start watchdog service 10.129 s Health Tedge-Agent
Check PID of tedge-mapper 0.083 s Health Tedge-Agent
Kill the PID 0.236 s Health Tedge-Agent
Recheck PID of tedge-agent 0.416 s Health Tedge-Agent
Compare PID change 0.001 s Health Tedge-Agent
Stop watchdog service 0.367 s Health Tedge-Agent
Remove entry from service file 0.228 s Health Tedge-Agent
Stop tedge-mapper-az 0.255 s Health Tedge-Mapper-Az
Update the service file 0.133 s Health Tedge-Mapper-Az
Reload systemd files 0.595 s Health Tedge-Mapper-Az
Start tedge-mapper-az 0.115 s Health Tedge-Mapper-Az
Start watchdog service 10.29 s Health Tedge-Mapper-Az
Check PID of tedge-mapper-az 0.137 s Health Tedge-Mapper-Az
Kill the PID 0.37 s Health Tedge-Mapper-Az
Recheck PID of tedge-agent 2.311 s Health Tedge-Mapper-Az
Compare PID change 0.001 s Health Tedge-Mapper-Az
Stop watchdog service 0.123 s Health Tedge-Mapper-Az
Remove entry from service file 0.108 s Health Tedge-Mapper-Az
Stop tedge-mapper-collectd 0.277 s Health Tedge-Mapper-Collectd
Update the service file 0.572 s Health Tedge-Mapper-Collectd
Reload systemd files 1.166 s Health Tedge-Mapper-Collectd
Start tedge-mapper-collectd 0.255 s Health Tedge-Mapper-Collectd
Start watchdog service 10.546 s Health Tedge-Mapper-Collectd
Check PID of tedge-mapper-collectd 0.278 s Health Tedge-Mapper-Collectd
Kill the PID 0.33 s Health Tedge-Mapper-Collectd
Recheck PID of tedge-mapper-collectd 0.295 s Health Tedge-Mapper-Collectd
Compare PID change 0.005 s Health Tedge-Mapper-Collectd
Stop watchdog service 0.184 s Health Tedge-Mapper-Collectd
Remove entry from service file 0.22 s Health Tedge-Mapper-Collectd
c8y-log-plugin health status 5.788 s MQTT health endpoints
c8y-configuration-plugin health status 6.073 s MQTT health endpoints
Publish on a local insecure broker 0.391 s Connect Broker
Publish on a local secure broker 3.568 s Connect Broker
Wrong package name 0.061 s Improve Tedge Apt Plugin Error Messages
Wrong version 0.08 s Improve Tedge Apt Plugin Error Messages
Wrong type 0.21 s Improve Tedge Apt Plugin Error Messages
tedge_connect_test_positive 0.376 s Tedge Connect Test
tedge_connect_test_negative 0.461 s Tedge Connect Test
tedge_connect_test_sm_services 7.978 s Tedge Connect Test
tedge_disconnect_test_sm_services 1.202 s Tedge Connect Test
Install thin-edge.io 23.217 s Call Tedge
call tedge -V 0.093 s Call Tedge
call tedge -h 0.116 s Call Tedge
call tedge -h -V 0.137 s Call Tedge
call tedge help 0.219 s Call Tedge
tedge config list 0.092 s Call Tedge Config List
tedge config list --all 0.099 s Call Tedge Config List
set/unset device.type 0.502 s Call Tedge Config List
set/unset device.key.path 0.566 s Call Tedge Config List
set/unset device.cert.path 1.054 s Call Tedge Config List
set/unset c8y.root.cert.path 0.613 s Call Tedge Config List
set/unset c8y.smartrest.templates 0.959 s Call Tedge Config List
set/unset az.root.cert.path 0.878 s Call Tedge Config List
set/unset az.mapper.timestamp 0.79 s Call Tedge Config List
set/unset mqtt.bind_address 0.482 s Call Tedge Config List
set/unset mqtt.port 0.306 s Call Tedge Config List
set/unset tmp.path 0.331 s Call Tedge Config List
set/unset logs.path 0.379 s Call Tedge Config List
set/unset run.path 0.312 s Call Tedge Config List
Get Put Delete 3.955 s Http File Transfer Api
Set keys should return value on stdout 0.281 s Tedge Config Get
Unset keys should not return anything on stdout and warnings on stderr 0.453 s Tedge Config Get
Invalid keys should not return anything on stdout and warnings on stderr 0.296 s Tedge Config Get
Set configuration via environment variables 1.178 s Tedge Config Get
Set unknown configuration via environment variables 0.09 s Tedge Config Get

@gligorisaev gligorisaev merged commit 5dbfc7f into thin-edge:main Apr 4, 2023
15 checks passed
@gligorisaev gligorisaev deleted the pid_in_lock branch April 7, 2023 08:46
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.

None yet

3 participants