chore: use machined for shutdown calls

Use machined socket for `shutdown`, `poweroff` alias.

Depends on: https://github.com/siderolabs/talos/pull/7489

Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
Noel Georgi 2023-07-19 17:18:55 +05:30
parent 048de33816
commit 6366b171c7
No known key found for this signature in database
GPG Key ID: 21A9F444075C9E36
4 changed files with 12 additions and 10 deletions

View File

@ -7,4 +7,4 @@ metadata:
This system extension provides the network-ups-tools upsmon service. This system extension provides the network-ups-tools upsmon service.
compatibility: compatibility:
talos: talos:
version: ">= v1.2.0" version: ">= v1.5.0"

View File

@ -5,6 +5,7 @@ depends:
- addresses - addresses
- connectivity - connectivity
- etcfiles - etcfiles
- path: /system/run/machined/machine.sock
container: container:
entrypoint: ./upsmon entrypoint: ./upsmon
args: args:
@ -30,9 +31,9 @@ container:
options: options:
- bind - bind
- ro - ro
# `/sbin/init` talks to `apid`. # `/sbin/init` talks to `machined`.
- source: /system/run/apid/apid.sock - source: /system/run/machined/machine.sock
destination: /system/run/apid/apid.sock destination: /system/run/machined/machine.sock
type: bind type: bind
options: options:
- rshared - rshared

View File

@ -25,8 +25,7 @@ steps:
ln -s /toolchain/bin/python3 /toolchain/bin/python ln -s /toolchain/bin/python3 /toolchain/bin/python
pip3 install ninja pip3 install ninja
build:
- |
extra_args=( ) extra_args=( )
if [[ "${ARCH}" == aarch64 ]]; then if [[ "${ARCH}" == aarch64 ]]; then
@ -48,7 +47,8 @@ steps:
--enable-guest-agent \ --enable-guest-agent \
--enable-stack-protector \ --enable-stack-protector \
"${extra_args[@]}" "${extra_args[@]}"
build:
- |
make -j $(nproc) qemu-ga make -j $(nproc) qemu-ga
install: install:
- | - |

View File

@ -1,6 +1,7 @@
name: qemu-guest-agent name: qemu-guest-agent
depends: depends:
- service: cri - service: cri
- path: /system/run/machined/machine.sock
- path: /dev/virtio-ports/org.qemu.guest_agent.0 - path: /dev/virtio-ports/org.qemu.guest_agent.0
container: container:
entrypoint: ./qemu-ga entrypoint: ./qemu-ga
@ -34,9 +35,9 @@ container:
- rshared - rshared
- rbind - rbind
- rw - rw
# `/sbin/init` talks to `apid`. # `/sbin/init` talks to `machined`.
- source: /system/run/apid/apid.sock - source: /system/run/machined/machine.sock
destination: /system/run/apid/apid.sock destination: /system/run/machined/machine.sock
type: bind type: bind
options: options:
- rshared - rshared