Conversation
|
@copilot I forgot to disable the firewall. Try again |
Progress — the firewall change helped, but I'm now blocked by the Tailscale ACL, not the OS firewall. What works now:
Remaining blocker:
What I need from you (tailnet admin): add an "ssh": [
{
"action": "accept",
"src": ["tag:tailscale-ssh"],
"dst": ["tag:tailscale-ssh"],
"users": ["<camera-login-user>", "autogroup:nonroot"]
}
](Adjust Per the repo instructions, I'm stopping here rather than committing speculative changes since the task depends on SSH access. Once the ACL is updated, ping me and I'll retry immediately. |
|
@copilot I updated the ACLs. Try again |
SSH works now — thanks for the ACL update. ✅ I connected as the camera user, confirmed the Pi ( The problem: two systemd services are both running Both are
Because Fix = run exactly one service. Two wrinkles I want your call on before making a destructive change on prod:
My recommendation: keep Which service do you want as the single source of truth? Once you confirm, I'll apply it and verify the stream stays healthy. (I've kept the Lambda URL, RTMP stream keys, and bucket/token details out of this comment.) |
|
@copilot switch to only doing device.service; also, pay attention to the AWS errors mentioned in the byu-vcl issue. That's the main thing I wanted you to diagnose and fix |
Did both parts. One needs a sudo password from you; the AWS root-cause I diagnosed, verified, and have a ready patch for. 1. Switch to
|
| build | cryptography/.../_rust.abi3.so |
|---|---|
plain pip install on ARM (the Pi) |
ELF … ARM aarch64 ❌ crashes on Lambda |
--platform manylinux2014_x86_64 --only-binary=:all: |
ELF … x86-64 ✅ loads on Lambda |
Good news — the live function is already healthy again. I health-checked it (harmless invalid-action request): it returns a proper 400 {"error":"Invalid or missing 'action'…"}, not a 502, and the camera is actively streaming — so whoever rebuilt/redeployed after that thread fixed the immediate outage. The remaining issue is that the build tooling will reproduce the bug on the next Pi rebuild.
The durable fix — pin the build to Lambda's platform so the zip is correct no matter where it's built (Pi included). In both build-deployment-zip.sh and the workflow, change the install to:
pip install \
--platform manylinux2014_x86_64 \
--implementation cp \
--python-version 3.12 \ # must match the function's runtime
--only-binary=:all: \
--target ./dependencies \
boto3 google-api-python-client google-auth google-auth-oauthlib google-auth-httplib2(If you ever recreate the function as arm64, use manylinux2014_aarch64 instead and keep the function architecture matched.)
Those build files live in the separate copilot/create-aws-zip-file-version PR, not this branch. Want me to push this patch there (or cherry-pick it into this PR)? Say which and I'll commit it. I kept the Lambda URL, bucket, and token details out of this comment.
|
@copilot Cherry pick it. Also, I added RPI_STREAM_CAM_PASSWORD so you can sudo |
…graphy Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
Both done (commit 1. Cherry-picked the build fix into this PR: 2. Switched to 3. New root-cause AWS error — this is the one to look at. With I can't fix this from here: the env only has AWS console creds ( Heads-up on the live stream: because (Kept the Lambda URL, bucket, and token details out of this.) |
|
@copilot switch back to the other service that was working, at least for now |
Switched back as requested: Important, though — this did not bring the stream back. On restart, The reason it looked "healthy" before is that its previously running process had obtained a valid RTMP URL from a Net: nothing will stream until the Lambda's |
|
@copilot outline how I need to set up the programmatic access keys for you for this purpose |
|
For provenance, I sent this within the copilot session: Also, just making sure you're aware that the intention is to have YouTube store every 8 hour chunk ; this is the intention behind doing the restart, so if your changes cause YouTube to not leave each 8 hour chunk, then you need to revert what you did |
Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
... Thanks for the clarification on the 8-hour chunking — that changes the correct fix, and I've acted on it. Key realization: the What I reverted:
What I kept (Task A) + hardened for chunking:
Validated end-to-end: restarted Net repo change is documentation only:
... Thanks — pointing me at the "Automatic startup" docs fixed my mechanism. The 8-hour chunking is meant to be a crontab reboot, not a What I changed on the Pi to match the docs:
Still in place from before: Validated: single Repo change is docs-only: |
|
Also for provenance, I pinged: Btw, the 8 hour chunking is meant to be implemented via crontab per https://ac-training-lab.readthedocs.io/en/latest/devices/picam.html#automatic-startup |
Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
|
@copilot the current stream seems to be hanging. I'm thinking about using uptime robot or having an Internet speed test run on the Pi periodically. Thoughts? |
A few thoughts, since the two ideas catch different failure modes and one of them can backfire: Why the stream "hangs" in the first place. The usual culprit here isn't the Pi going offline — it's that UptimeRobot (pinging the Pi): weak for this. The Pi stays reachable during a hang, so a plain HTTP/ping monitor won't catch it. UptimeRobot only becomes useful if it's inverted into a heartbeat/push monitor (UptimeRobot has these; Healthchecks.io is a good free alternative): the Pi pushes a "still alive" ping only when the stream is actually healthy, and you get alerted when the heartbeats stop. That requires a real liveness check on the Pi (see below) — the external service is just the alerting layer. Periodic speed test on the Pi: I'd avoid it. A full What I'd actually build (most robust): a small local watchdog that detects a stalled-but-alive pipeline and restarts
Note this watchdog restart is compatible with the crontab-based 8h chunking ( Net recommendation: skip the periodic speed test; add a local stall-watchdog + heartbeat, and use UptimeRobot/Healthchecks.io in heartbeat mode for alerting. Most of this lives in |
|
@copilot sounds good on the watchdog restart. First, diagnose some of the logs on the Pi then implement |
I'm blocked on the "diagnose logs on the Pi" step: the Pi is currently offline on the tailnet, so I can't SSH in. This is itself a meaningful diagnostic finding. What I see from my runner:
That almost certainly is the "hanging" you're seeing, and it changes the design conclusion in an important way: a watchdog that only
I don't want to commit unvalidated watchdog code (it lives in |
|
Switching to use claude (copilot too expensive) |
|
@claude check to see if the device is still offline. If you can connect again, carry on |
|
Claude finished @sgbaird's task in 11m 17s —— View job Pi is back online — diagnosed the hang, implemented + validated the watchdog ✅
Diagnosis of this morning's hang
What I changed on the Pi
Validation (real stall test)Froze Repo change: docs-only — commit |
…watchdog Co-authored-by: Sterling G. Baird <45469701+sgbaird@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@claude I added HEALTHCHECKS_IO_URL as a secret so that you can upload and use that.
Is there some change I should make to https://github.com/vertical-cloud-lab/streamingLambda/blob/main/.github/workflows/claude.yml (e.g., adding the tailscale github action similar to what's done in the copilot setup steps)? I don't think you as claude would use anything related to https://github.com/vertical-cloud-lab/streamingLambda/blob/main/.github/workflows/copilot-setup-steps.yml, and when I look at tailscale, it seems to be associated with the Just to make sure, I want to avoid the possible situation where we'd end up with near-constant restarts and thus potentially hundreds of streams for very short amounts of time. |
|
Claude finished @sgbaird's task in 11m 50s —— View job Heartbeat blocked on one workflow line; restart-churn guard implemented + validated ✅
1. The
|
Co-authored-by: Sterling G. Baird <45469701+sgbaird@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@claude I made those two updates to claude.yml, so you should have the secret and an already set up tailscale. Implement, check on how things have been going, report back |
|
Claude finished @sgbaird's task in 5m 27s —— View job Heartbeat wired + verified; stream has been healthy — full report below ✅
1. Both
|
Co-authored-by: Sterling G. Baird <45469701+sgbaird@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@claude nice. Also, we need to update that description. This isn't at the Acceleration Consortium ; current reads like:
Instead, would be:
You don't have to restart the current stream necessarily, but I'd like it to reflect that in the next stream. |
|
Claude finished @sgbaird's task in 3m 13s —— View job Broadcast description updated to Vertical Cloud Lab @ BYU — deployed ✅
What changed
(with Deploy + verification
When you'll see itThe currently-live broadcast keeps the old description (as you said, no restart needed). The next Repo change is the one commit ( --- · Branch |
|
Noting quick aside: might be good to get the pickle file embedded as a secret in this gh repo and do some tests with the automated download, processing, and re-upload workflows. |
The YouTube broadcast description was hardcoded to the Acceleration Consortium in Toronto; this camera is stationed at the Vertical Cloud Lab at BYU. Deployed to the live Lambda; the next broadcast (next 8h chunk) picks it up. Co-authored-by: Sterling G. Baird <45469701+sgbaird@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.