systeminit/si

Error when running si update

Octogonapus opened this issue · 6 comments

What happened?

si update failed to perform an update due to an unexpected error:

> si update
System Initiative Launcher is in "local" mode


Container update found for systeminit/postgres
Container update found for systeminit/otelcol
Container update found for systeminit/nats
Container update found for systeminit/jaeger
Container update found for systeminit/veritech
Container update found for systeminit/sdf
Container update found for systeminit/pinga
Container update found for systeminit/council
Container update found for systeminit/web
Launcher update found: from 20230816.151117.0-sha.fae4e1c44 to bin/si/binary/20230818.205543.0-sha.9629dfb23

Updating the containers will destroy your data!
> Are you sure you want to update the binary and the containers listed above? Yes
Stopping Container: local-web-1
Stopping Container: local-sdf-1
Stopping Container: local-pinga-1
Stopping Container: local-veritech-1
Stopping Container: local-council-1
Stopping Container: local-otelcol-1
Stopping Container: local-nats-1
Stopping Container: local-postgres-1
Stopping Container: local-jaeger-1
All system components stopped...
Deleting container: local-postgres-1 (aa853d315bc2ba906456e07e184bb92328cfb8121e25681de759aeec7dfb0e4f)
Deleting container: local-otelcol-1 (4d54f1b284933851e42177a795a5ef077293d3869b3f479a7451207ade438751)
Deleting container: local-nats-1 (d61f189a98bc811768e9a4fecb3f4de3612a7700d557c2d78e1327cd99ee8d8a)
Deleting container: local-jaeger-1 (02c88755c03d1d13417ca3ec40bd6a3eea4542661731ac38c39fc86277e19d79)
Deleting container: local-veritech-1 (897e5c49247ad788498bed1d34e77f4df6127daec073c3d83233ea1bbcfee971)
Deleting container: local-sdf-1 (715173546c55069ddc1bea301057b1c53bcb6dd4e56caa107012687a7b40d8d6)
Deleting container: local-pinga-1 (3cd55ab2d456f155bc925048f62cbaa2fc6de2c09ec5497c221ba182c384ece2)
Deleting container: local-council-1 (6475261693cf7264a37ae58c92081ebbe4be447cc93485199d9c2897fe8b391b)
Deleting container: local-web-1 (993798171c1649ac432f184c827fbc355228d4b411d6376f45f588cff7d07086)
System Initiative needs some credentials in order to be able to interact with AWS and Docker.
The credentials are never sent back to System Initiative and can be inspected at the location:
/home/salmon/.local/share/SI/si_credentials.toml

Checking that the system is able to interact with the docker engine to control System Initiative...
┌──────────────────────┬────────────┐
│ Docker Engine Active ┆     ✅     │
└──────────────────────┴────────────┘
All containers downloaded

Starting systeminit/jaeger:stable as local-jaeger-1
Starting systeminit/postgres:stable as local-postgres-1
Starting systeminit/nats:stable as local-nats-1
Starting systeminit/otelcol:stable as local-otelcol-1
Starting systeminit/council:stable as local-council-1
Starting systeminit/veritech:stable as local-veritech-1
Starting systeminit/pinga:stable as local-pinga-1
Starting systeminit/sdf:stable as local-sdf-1
Starting systeminit/web:stable as local-web-1
All system components running... System Initiative is alive!

You can now use the `si launch` command to open the System Initiative web portal
Downloading new binary
Overwriting current binary
Error: 
   0: io: Invalid cross-device link (os error 18)
   1: Invalid cross-device link (os error 18)

Location:
   bin/si/src/main.rs:128

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 3 frames hidden ⋮                               
   4: si::main::{{closure}}::hc959437c33741098
      at <unknown source file>:<unknown line>
   5: tokio::runtime::park::CachedParkThread::block_on::h8657001296f26bdc
      at <unknown source file>:<unknown line>
   6: tokio::runtime::scheduler::multi_thread::MultiThread::block_on::hc81638d8fa067ff8
      at <unknown source file>:<unknown line>
   7: tokio::runtime::runtime::Runtime::block_on::haa13a5c81da961a0
      at <unknown source file>:<unknown line>
   8: si::main::h9c3529cb47f1a178
      at <unknown source file>:<unknown line>
   9: std::sys_common::backtrace::__rust_begin_short_backtrace::hb6319b36f3c9c391
      at <unknown source file>:<unknown line>
  10: std::rt::lang_start::{{closure}}::hadca2ee8395f889c
      at <unknown source file>:<unknown line>
  11: std::rt::lang_start_internal::h76f3e81e6b8f13f9
      at <unknown source file>:<unknown line>
  12: main<unknown>
      at <unknown source file>:<unknown line>
  13: __libc_start_call_main<unknown>
      at <unknown source file>:<unknown line>
  14: __libc_start_main@GLIBC_2.2.5<unknown>
      at <unknown source file>:<unknown line>
  15: _start<unknown>
      at <unknown source file>:<unknown line>

How can we reproduce this?

All I did was run si stop and si update.

Operating system

Linux

Architecture

x86_64 / amd64

What browsers are you seeing the problem on?

Firefox

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

Thanks for the report! After double checking our code, I see that we aren't performing a final atomic move from within the same parent directory of the original si binary. If I was to guess, I would wager that your temp directory is a separate volume mount from that of si's destination.

I'll see about fixing this up and link a PR

Unfortunately, because the updated "update" logic is in a new binary release, you'll have to re-install si with:

curl -sSfL https://auth.systeminit.com/install.sh | sh

or manually from the download page.

Hope this does the trick, happy Friday!

Done. I'd like to test it, but given it's an installer bug, I'll have to wait for the next release. Thanks!

Yeah...I was in my terminal thinking the exact same thing!

As one last data point, I did manage to trigger the same error using an older version of the launcher, installed in $HOME/.local/bin/si which is a different fs mount than my /tmp fs

I think you are right:

╰─ df -h
Filesystem             Size  Used Avail Use% Mounted on
devtmpfs               4.0M     0  4.0M   0% /dev
tmpfs                   32G   27M   32G   1% /dev/shm
tmpfs                   13G  2.4M   13G   1% /run
/dev/dm-0              1.9T  870G  991G  47% /
/dev/dm-0              1.9T  870G  991G  47% /home
/dev/nvme1n1p2         974M  324M  583M  36% /boot
tmpfs                   32G   17M   32G   1% /tmp
/dev/nvme1n1p1         599M   43M  557M   8% /boot/efi
tmpfs                  6.3G  2.4M  6.3G   1% /run/user/1000