Skip to content

Commit

Permalink
Refactor early system mounting (#1866)
Browse files Browse the repository at this point in the history
* Add mount command

The mount command mounts the system and is meant to run in an initrd to
actually mount the root filesystem and use systemd to switch-root into
it.

It also optionally writes an /etc/fstab file to the newly mounted
system so that systemd will mount the system after switching root.

The command is used in the new dracut module elemental-rootfs, which
will coexist with immutable-rootfs (they are functionally the same)
until immutable-rootfs can be deprecated.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Add tmpfs overlay mount

Mounts a tmpfs to /run/elemental/overlay with size= flag set

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Examples use the new elemental-rootfs

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Add persistent overlay mounts

Persistent mounts use the /run/elemental/persistent/.state directory to
store upper and work dirs.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Add sentinel files

Write sentinel file (active_mode, passive_mode, recovery_mode) to
/run/cos or /run/elemental based on which kernel cmdline is used
(cos-img/filename or elemental.image)

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Read kernel cmdline for mount

This commit adds capabilities to the mount command to read configuration
from the kernel cmdline. The supported parameters are:

* elemental.disable + rd.cos.disable
* elemental.image + cos-img/filename
* elemental.oemlabel + rd.cos.oemlabel

In the new elemental.image parameter we can specify
active|passive|recovery instead of the path to the image.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Enable recovery booting and reset

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Load env vars

Currently supported:
* OVERLAY
* RW_PATHS
* PERSISTENT_STATE_PATHS
* PERSISTENT_STATE_BIND

Loaded from files (if they exist):
* /run/elemental/layout.env
* /run/cos/cos-layout.env

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Run rootfs stage inside mount command

Since the rootfs stage should be run between mounting the image and
mounting the rest of the system I added a call to RunStage that takes
care of this and then uses godotenv dependency to actually load
/run/elemental/layout.env and /run/cos/cos-layout.env.

This means the old way of generating layout files will still work with
the new mount-command.

The caveat here is that in the current implementation the rootfs stage
will run twice, once from the elemental-setup-rootfs service and once
from this command. I would say the easiest way forward is to remove the
elemental-setup-rootfs when switching to elemental-rootfs as the default
mounting module.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Add persistent bind mounts

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Add block overlay

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Use registry.opensuse.org for example images

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Minor changes to get tests working

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Fsck partitions before mounting

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Fix for fsck

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

More mount tests

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Comment mount example configuration

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Add elemental-setup services to elemental-rootfs

The elemental-setup and rootfs features are heavily dependent on each
other.

This commit copies the elemental-setup feature into elemental-rootfs,
and changes the mount-command to actually start the
elemental-setup-rootfs service during mount to not run the yip rootfs
stage twice.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

Fix lint goconst

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Add elemental-sysroot feature

The features elemental-sysroot, elemental-rootfs and elemental-setup are
used for mounting the root filesystem and all overlays.

elemental-sysroot is used for mounting state/recovery partition to
/run/elemental/state, and then mounting the image from the partition
based on kernel parameters.

elemental-setup actually runs the different stages of boot using
elemental run-stage command.

elemental-rootfs runs the 'elemental mount' command to mount tmpfs
overlays, persistent overlays and then writes the /etc/fstab to actually
mount when pivoting to the new root.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Update sysroot, setup and rootfs dracut modules

This commit goes through the early systemd services run in dracut and
adds Wants,Before,Requires to each step to make them run during the
correct stage of the bootup (man dracut.bootup).

We also change all the /run/cos and /run/initramfs/cos-state to the new
/run/elemental and /run/initramfs/elemental-state directories.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Test compatibility

Tests still use /run/cos, this commit adds back
/run/cos/active|passive|recovery_mode files

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Update to latest ele-testhelpers

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Forwards compatibility for immutable-rootfs feat

This commit makes the immutable-rootfs module forwards compatible with
the other changes in mount, elemental-sysroot and elemental-setup.

It uses the new elemental.image and elemental.oemlabel cmdline paramters
if found, otherwise falls back to the old parameters and also sets the
/run/elemental/active|passive|recovery_mode files.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Update init features for green and tumbleweed

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

* Remove oem mounts from elemental-setup-initramfs

This should fix installer-tests in CI since the /oem might not exist
when booting from ISO.

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>

---------

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
  • Loading branch information
frelon authored Dec 12, 2023
1 parent 840c80c commit 9676ec9
Show file tree
Hide file tree
Showing 50 changed files with 1,198 additions and 92 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ iso-meta.yaml
.qemu/
.loop
tests/**/logs
tests/vmstdout
serial_port1.log
capture.webm

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BASE_OS_IMAGE=opensuse/leap
ARG BASE_OS_IMAGE=registry.opensuse.org/opensuse/leap
ARG BASE_OS_VERSION=15.5
ARG GO_VERSION=1.20
ARG GO_VERSION=1.21

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine as elemental-bin

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PACKER_TARGET?=qemu.elemental-${ARCH}
REPO?=local/elemental-$(FLAVOR)
TOOLKIT_REPO?=local/elemental-toolkit
DOCKER?=docker
BASE_OS_IMAGE?=opensuse/leap
BASE_OS_IMAGE?=registry.opensuse.org/opensuse/leap
BASE_OS_VERSION?=15.5
DOCKER_SOCK?=/var/run/docker.sock

Expand Down
72 changes: 70 additions & 2 deletions cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package config

import (
"errors"
"fmt"
"io"
"io/fs"
Expand Down Expand Up @@ -241,9 +242,9 @@ func ReadInitSpec(r *v1.RunConfig, flags *pflag.FlagSet) (*v1.InitSpec, error) {
if vp == nil {
vp = viper.New()
}
// Bind install cmd flags
// Bind init cmd flags
bindGivenFlags(vp, flags)
// Bind install env vars
// Bind init env vars
viperReadEnv(vp, "INIT", constants.GetInitKeyEnvMap())

err := vp.Unmarshal(init, setDecoder, decodeHook)
Expand All @@ -253,6 +254,73 @@ func ReadInitSpec(r *v1.RunConfig, flags *pflag.FlagSet) (*v1.InitSpec, error) {
return init, err
}

func ReadMountSpec(r *v1.RunConfig, flags *pflag.FlagSet) (*v1.MountSpec, error) {
mount := config.NewMountSpec()
vp := viper.Sub("mount")
if vp == nil {
vp = viper.New()
}
// Bind mount cmd flags
bindGivenFlags(vp, flags)
// Bind mount env vars
viperReadEnv(vp, "MOUNT", constants.GetMountKeyEnvMap())

err := vp.Unmarshal(mount, setDecoder, decodeHook)
if err != nil {
r.Logger.Warnf("error unmarshalling MountSpec: %s", err)
return mount, err
}

if err := applyKernelCmdline(r, mount); err != nil {
r.Logger.Errorf("Error reading kernel cmdline: %s", err.Error())
return mount, err
}

err = mount.Sanitize()
r.Logger.Debugf("Loaded mount spec: %s", litter.Sdump(mount))
return mount, err
}

func applyKernelCmdline(r *v1.RunConfig, mount *v1.MountSpec) error {
cmdline, err := r.Config.Fs.ReadFile("/proc/cmdline")
if err != nil {
r.Logger.Errorf("Error reading /proc/cmdline: %s", err.Error())
return err
}

for _, cmd := range strings.Fields(string(cmdline)) {
split := strings.SplitN(cmd, "=", 2)

val := ""
if len(split) == 2 {
val = split[1]
}

switch split[0] {
case "elemental.image":
mount.Mode = val
case "elemental.disable", "rd.cos.disable":
mount.Disable = true
case "cos-img/filename":
switch val {
case constants.ActiveImgPath:
mount.Mode = constants.ActiveImgName
case constants.PassiveImgPath:
mount.Mode = constants.PassiveImgName
case constants.RecoveryImgPath:
mount.Mode = constants.RecoveryImgName
default:
r.Logger.Errorf("Error parsing cmdline %s", cmd)
return errors.New("Unknown image path")
}
case "elemental.oemlabel", "rd.cos.oemlabel":
mount.Partitions.OEM.FilesystemLabel = val
}
}

return nil
}

func ReadResetSpec(r *v1.RunConfig, flags *pflag.FlagSet) (*v1.ResetSpec, error) {
reset, err := config.NewResetSpec(r.Config)
if err != nil {
Expand Down
63 changes: 63 additions & 0 deletions cmd/mount.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
Copyright © 2022 - 2023 SUSE LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package cmd

import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"k8s.io/mount-utils"

"github.com/rancher/elemental-toolkit/cmd/config"
"github.com/rancher/elemental-toolkit/pkg/action"
"github.com/rancher/elemental-toolkit/pkg/constants"
elementalError "github.com/rancher/elemental-toolkit/pkg/error"
)

func NewMountCmd(root *cobra.Command) *cobra.Command {
c := &cobra.Command{
Use: "mount",
Short: "Mount an elemental system into the specified sysroot",
RunE: func(cmd *cobra.Command, args []string) error {
mounter := mount.New(constants.MountBinary)

cfg, err := config.ReadConfigRun(viper.GetString("config-dir"), cmd.Flags(), mounter)
if err != nil {
cfg.Logger.Errorf("Error reading config: %s\n", err)
return elementalError.NewFromError(err, elementalError.ReadingRunConfig)
}

cmd.SilenceUsage = true
spec, err := config.ReadMountSpec(cfg, cmd.Flags())
if err != nil {
cfg.Logger.Errorf("Error reading spec: %s\n", err)
return elementalError.NewFromError(err, elementalError.ReadingSpecConfig)
}

if spec.Disable {
cfg.Logger.Info("Mounting disabled, exiting")
return nil
}

cfg.Logger.Info("Mounting system...")
return action.RunMount(cfg, spec)
},
}
root.AddCommand(c)
return c
}

var _ = NewMountCmd(rootCmd)
23 changes: 23 additions & 0 deletions config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,29 @@ upgrade:
# grub menu entry, this is the string that will be displayed
grub-entry-name: Elemental

# configuration used for the 'mount' command
mount:
sysroot: /sysroot # Path to mount system to
write-fstab: true # Write fstab into sysroot/etc/fstab
overlay:
type: tmpfs # tmpfs|block
device: /dev/sda6 # Block device used to store overlay. Used when type is set to block
size: 25% # Size of tmpfs as percentag of system memory. Used when type is set to tmpfs
paths:
- /var
- /etc
- /srv
persistent:
mode: overlay # overlay|bind
paths:
- /etc/systemd
- /etc/ssh
- /home
- /opt
- /root
- /usr/libexec
- /var/log

# use cosign to validate images from container registries
cosign: true
# cosign key to used for validation
Expand Down
4 changes: 2 additions & 2 deletions examples/green/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VERSION
FROM ${TOOLKIT_REPO}:${VERSION} AS TOOLKIT

# OS base image of our choice
FROM opensuse/leap:15.5 AS OS
FROM registry.opensuse.org/opensuse/leap:15.5 as OS
ARG REPO
ARG VERSION
ENV VERSION=${VERSION}
Expand Down Expand Up @@ -55,7 +55,7 @@ RUN systemctl enable NetworkManager.service
RUN cp /usr/share/systemd/tmp.mount /etc/systemd/system

# Generate initrd with required elemental services
RUN elemental --debug init -f
RUN elemental init --debug --force

# Update os-release file with some metadata
RUN echo IMAGE_REPO=\"${REPO}\" >> /etc/os-release && \
Expand Down
4 changes: 2 additions & 2 deletions examples/tumbleweed/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# run `make build` to build local/elemental-toolkit image
ARG TOOLKIT_REPO
ARG VERSION
ARG OS_IMAGE=opensuse/tumbleweed
ARG OS_IMAGE=registry.opensuse.org/opensuse/tumbleweed
ARG OS_VERSION=latest

FROM ${TOOLKIT_REPO}:${VERSION} AS TOOLKIT
Expand Down Expand Up @@ -79,7 +79,7 @@ RUN cd /usr/lib/dracut && \
rm /*.patch

# Generate initrd with required elemental services
RUN elemental --debug init -f
RUN elemental --debug init --force && \

# Update os-release file with some metadata
RUN echo IMAGE_REPO=\"${REPO}\" >> /etc/os-release && \
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/rancher/elemental-toolkit

go 1.20
go 1.21

require (
github.com/canonical/go-efilib v0.3.1-0.20220324150059-04e254148b45
Expand All @@ -16,7 +16,7 @@ require (
github.com/mudler/yip v1.4.6
github.com/onsi/ginkgo/v2 v2.12.1
github.com/onsi/gomega v1.27.10
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231121104300-eb56c5436c4e
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231206161614-20a517410736
github.com/sanity-io/litter v1.5.5
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
Expand Down
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/apex/log v1.9.0 h1:FHtw/xuaM8AgmvDDTI9fiwoAL25Sq2cxojnZICUU8l0=
github.com/apex/log v1.9.0/go.mod h1:m82fZlWIuiWzWP04XCTXmnX0xRkYYbCdYn8jbJeLBEA=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
Expand Down Expand Up @@ -147,6 +148,7 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU=
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
Expand Down Expand Up @@ -216,6 +218,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down Expand Up @@ -350,11 +353,13 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx
github.com/moby/moby v23.0.4+incompatible h1:A/pe8vi9KIKhNbzR0G3wW4ACKDsMgXILBveMqiJNa8M=
github.com/moby/moby v23.0.4+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc=
github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78=
github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI=
github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=
github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo=
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc=
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mudler/entities v0.0.0-20220905203055-68348bae0f49 h1:P1QgHLh0hX935j6m9K6rlSxc0mkD1UuIAOQEu+1VCW4=
github.com/mudler/entities v0.0.0-20220905203055-68348bae0f49/go.mod h1:qquFT9tYp+/NO7tTotto4BT9zSRYSMDxo2PGZwujpFA=
github.com/mudler/yip v1.4.6 h1:V/fP2wqIekg6prW/dI4glJ+TOZkKOT4KB72VQZPlJ0c=
Expand All @@ -368,6 +373,7 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA=
github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
Expand Down Expand Up @@ -412,6 +418,8 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231121104300-eb56c5436c4e h1:1pWxPAbjDxLWadV1goUOVZBzUqDKkD8pqwE2Nbzpd30=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231121104300-eb56c5436c4e/go.mod h1:Ex+a/ng4u2BvcGQdQjTHI48h88bQ6k2a7q8rnvU0XbQ=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231206161614-20a517410736 h1:xWNdHJ63vkdVUDjotF4nuGff+KSl3vQzqvgwOTFnmaw=
github.com/rancher-sandbox/ele-testhelpers v0.0.0-20231206161614-20a517410736/go.mod h1:Ex+a/ng4u2BvcGQdQjTHI48h88bQ6k2a7q8rnvU0XbQ=
github.com/rancher-sandbox/linuxkit v1.0.2 h1:mUFPL2Mgl1XZ5H82ABR57t5H2G2Qd+lu3gMYvUGmeZo=
github.com/rancher-sandbox/linuxkit v1.0.2/go.mod h1:n6Fkjc5qoMeWrnLSA5oqUF8ZzFKMrM960CtBwfvH1ZM=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
Expand Down Expand Up @@ -484,6 +492,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8=
github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
Expand Down Expand Up @@ -723,6 +732,7 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -738,6 +748,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA=
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down Expand Up @@ -927,6 +938,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
2 changes: 1 addition & 1 deletion pkg/action/build-disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ func (b *BuildDiskAction) SetExpandableCloudInitStage() error {
},
}, deployStage: {
schema.Stage{
If: `[ -f "/run/cos/recovery_mode" ]`,
If: `[ -f "/run/elemental/recovery_mode" ]`,
Name: "Deploy active system",
Commands: []string{
strings.Join(deployCmd, " "),
Expand Down
Loading

0 comments on commit 9676ec9

Please sign in to comment.