Register 3 AI Agents by CSN (New Machine)
Clone the GIIP agent environment to a new machine and register giip-agent, giip-cqe, and gissue-scheduler consistently with a single CSN.
📋 Overview
One machine (container) belongs to a single CSN, and these three run together inside it:
- giip-agent — registers this machine as a live server in GIIP and reports its status every minute.
- giip-cqe — periodically pulls and runs the commands (CQE) dispatched to this machine.
- gissue-scheduler — periodically processes the issues for this CSN.
🔑 Key Principle: Put the CSN in One Place
To prevent the three schedules from drifting onto different CSNs, write this machine's CSN in one place only.
Single source of truth (SSOT): the CSN value in
csn-projects.json
Everything else (such as which CSN the scheduler processes) is derived from this value automatically. Previously, the value baked in at first boot would stick, so changing only the mapping later left the scheduler running on the old CSN. Now it is re-aligned from this file on every boot.
🚀 Register on a New Machine
Method A — Start a new container (recommended)
- Put this machine's values in the deployment settings: login ID, secret key, and the CSN.
- Start the container.
- During startup the CSN mapping is created automatically, and all 3 schedules register with that value.
- Check with Verify Consistency below.
Method B — Clone an existing environment and change only the CSN
- Change the CSN value in
csn-projects.jsonto a single new CSN. - Set the agent's secret key to the new machine's value, and clear the server number so a new one is issued.
- Restart the container. On startup, the schedules are re-aligned based on
csn-projects.json. - Check with Verify Consistency.
✅ Verify Consistency
Run the following on the new machine to check, in one shot, whether all three are consistent with the same CSN.
bash scripts/gissue/check-csn-consistency.sh
If the server number has not been issued yet, this also performs self-registration:
bash scripts/gissue/check-csn-consistency.sh --register
If every item reports PASS, the three schedules are registered consistently under this machine's single CSN.
🛠️ Troubleshooting
| Symptom | Cause | Action |
|---|---|---|
| Scheduler runs on the old CSN | Value from first boot lingered | Restart the container (re-aligned to the source value) |
| Warning that CSN values differ | Setting holds an old value | Change the CSN in the setting and restart |
| No CSN, or several | Mapping has 0 or 2+ CSNs | Consolidate to one CSN |
| Server number not registered | Not yet self-registered under the new CSN | Run with the --register option above |