Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoDrive = errors.New("no NoCloud drive: attach a cloud-init drive with user-data (fqdn) and network-config")
ErrNoDrive is a machine without a NoCloud drive.
var ErrNotBaked = errors.New("no " + config.EdgeFile + " in the ISO: this is the release ISO; boot one made with fortressctl bake")
ErrNotBaked is the release ISO booted as it ships: it has no fortress.yml, so it trusts nobody.
Functions ¶
func LoadPolicy ¶
LoadPolicy reads the policy fortressctl apply stored at path. An edge nobody applied a policy to has none: nil, and no error.
func MountSource ¶
MountSource reports what device is mounted at dir, if any.
func MountVar ¶
MountVar mounts the persistent disk at /var, formatting it ext4 if blank. An empty dev uses /dev/vda when it exists and /dev/sda otherwise. State lives in /var/fortressedge, logs in /var/log/fortressedge. Idempotent. The returned path is the device that is mounted.
func StorePolicy ¶
StorePolicy replaces the policy at path whole: a power cut leaves the old one or the new one, never part of either.
func WatchPower ¶
func WatchPower(press func())
WatchPower calls press once when the ACPI power button is pressed. Proxmox Shutdown and Reboot are that button (QMP system_powerdown); Reboot starts the VM again only after it has powered off. The goroutines block in read until the process exits on poweroff.
Types ¶
type Seed ¶
Seed is the config boot reads: fortress.yml from the ISO, user-data and network-config from the NoCloud drive. The policy is on the /var disk, read once that is mounted.