Skip to content

Commit

Permalink
WIP: use jiff crate
Browse files Browse the repository at this point in the history
TODO:
* use a released Retina
* look over `base/time.rs` changes
  • Loading branch information
scottlamb committed Aug 24, 2024
1 parent 140f625 commit 278a1e8
Show file tree
Hide file tree
Showing 22 changed files with 439 additions and 484 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ even on minor releases, e.g. `v0.7.5` -> `v0.7.6`.
* bump minimum Rust version to 1.79.
* in UI's list view, add a tooltip on the end time which shows why the
recording ended.
* use `jiff` for time manipulations.

## v0.7.16 (2024-05-30)

Expand Down
5 changes: 2 additions & 3 deletions guide/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ services:
# - seccomp:unconfined

environment:
# Edit zone below to taste. The `:` is functional.
TZ: ":America/Los_Angeles"
# Edit zone below to taste.
TZ: "America/Los_Angeles"
RUST_BACKTRACE: 1

# docker's default log driver won't rotate logs properly, and will throw
Expand Down Expand Up @@ -323,7 +323,6 @@ After=network-online.target

[Service]
ExecStart=/usr/local/bin/moonfire-nvr run
Environment=TZ=:/etc/localtime
Environment=MOONFIRE_FORMAT=systemd
Environment=MOONFIRE_LOG=info
Environment=RUST_BACKTRACE=1
Expand Down
13 changes: 10 additions & 3 deletions guide/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ need more help.
* [Docker setup](#docker-setup)
* [`"/etc/moonfire-nvr.toml" is a directory`](#etcmoonfire-nvrtoml-is-a-directory)
* [`Error response from daemon: unable to find user UID: no matching entries in passwd file`](#error-response-from-daemon-unable-to-find-user-uid-no-matching-entries-in-passwd-file)
* [`clock_gettime failed: EPERM: Operation not permitted`](#clock_gettime-failed-eperm-operation-not-permitted)
* [`clock_gettime(CLOCK_MONOTONIC) failed: EPERM: Operation not permitted`](#clock_gettimeclock_monotonic-failed-eperm-operation-not-permitted)
* [`VFS is unable to determine a suitable directory for temporary files`](#vfs-is-unable-to-determine-a-suitable-directory-for-temporary-files)
* [Server errors](#server-errors)
* [`unable to get IANA time zone name; check your $TZ and /etc/localtime`](#unable-to-get-iana-time-zone-name-check-your-tz-and-etclocaltime)
* [`Error: pts not monotonically increasing; got 26615520 then 26539470`](#error-pts-not-monotonically-increasing-got-26615520-then-26539470)
* [Out of disk space](#out-of-disk-space)
* [Database or filesystem corruption errors](#database-or-filesystem-corruption-errors)
Expand Down Expand Up @@ -217,7 +218,7 @@ If Docker produces this error, look at this section of the docker compose setup:
user: UID:GID
```

#### `clock_gettime failed: EPERM: Operation not permitted`
#### `clock_gettime(CLOCK_MONOTONIC) failed: EPERM: Operation not permitted`

If commands fail with an error like the following, you're likely running
Docker with an overly restrictive `seccomp` setup. [This stackoverflow
Expand All @@ -227,7 +228,7 @@ the `- seccomp: unconfined` line in your Docker compose file.

```console
$ sudo docker compose run --rm moonfire-nvr --version
clock_gettime failed: EPERM: Operation not permitted
clock_gettime(CLOCK_MONOTONIC) failed: EPERM: Operation not permitted

This indicates a broken environment. See the troubleshooting guide.
```
Expand All @@ -250,6 +251,12 @@ container in your Docker compose file.

### Server errors

#### `unable to get IANA time zone name; check your $TZ and /etc/localtime`

Moonfire NVR loads the system time zone via the logic described at
[`jiff::tz::TimeZone::system`](https://docs.rs/jiff/0.1.8/jiff/tz/struct.TimeZone.html#method.system)
and expects to be able to get the IANA zone name.

#### `Error: pts not monotonically increasing; got 26615520 then 26539470`

If your streams cut out and you see error messages like this one in Moonfire
Expand Down
Loading

0 comments on commit 278a1e8

Please sign in to comment.