Help us shape the future of Go! Take the 2026 Go Developer Survey

idmigrate

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package idmigrate moves the files of the lockfile volumes from the account ids of the releases before 0.3 (10000-10002, the ones locksql uses) to lockfile's own (10030-10032). It is idempotent: it changes only the old ids and leaves every other owner alone. It stays for one release.

Index

Constants

This section is empty.

Variables

View Source
var (
	UIDs = map[uint32]uint32{10001: 10031, 10002: 10032}
	GIDs = map[uint32]uint32{10000: 10030, 10001: 10031, 10002: 10032}
)

UIDs and GIDs map each old id to its new one: the console account lockfile (10001, with its group of the same id), the agent account (10002) and the group lockfile-clients (10000).

View Source
var Dirs = []string{"/run/lockfile", "/home/lockfile"}

Dirs are the mount points of the volumes the image declares.

View Source
var Lchown = os.Lchown

Lchown changes the owner of one file, not following a symlink; tests replace it.

Functions

func Migrate

func Migrate(dirs []string) (int, error)

Migrate walks each of dirs (a missing one is skipped) and gives every file owned by an old id its new one. It returns the number of files changed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL