bug: deploy.sh starts duplicate process — cobot responds twice #139
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Competitor
Kind/Documentation
Kind/Enhancement
Kind/Epic
Kind/Feature
Kind/Security
Kind/Story
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Scope/Core
Scope/Cross-Plugin
Scope/Plugin-System
Scope/Single-Plugin
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ultanio/cobot#139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
After CI deploy, two cobot processes run simultaneously:
alpha(correct)root(duplicate)Both poll Telegram, causing Alpha to respond twice to every message.
Root Cause
The
deploy.shscript doesexec sudo -u alpha $0when running as root. But the deploy workflow (or authorized_keys command restriction) may spawn the script in a way that creates two processes. Additionally, the PID file check may not prevent the second instance because:exec sudodoesn't fully replace the root processEvidence
Expected
Only ONE cobot process should run after deploy. The deploy script should:
Workaround
Manually
killthe root process after each deploy.