Skip to content

Commit

Permalink
Root filesystem must be created directly of zfs dataset due to requir…
Browse files Browse the repository at this point in the history
…ements of zfs dracut module (#241)
  • Loading branch information
outofforest authored Jul 3, 2023
1 parent 492f39a commit e07c054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infra/storage/zfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (d *zfsDriver) BuildID(ctx context.Context, buildKey types.BuildKey) (types
func (d *zfsDriver) CreateEmpty(ctx context.Context, imageName string, buildID types.BuildID) (FinalizeFn, string, error) {
buildDir := filepath.Join("/", d.config.Root, string(buildID))
filesystem, err := zfs.CreateFilesystem(ctx, d.config.Root+"/"+string(buildID), zfs.CreateFilesystemOptions{Properties: map[string]string{
"mountpoint": buildDir,
"mountpoint": filepath.Join(buildDir, "root"),
propertyName: string(must.Bytes(json.Marshal(types.BuildInfo{
BuildID: buildID,
Name: imageName,
Expand Down Expand Up @@ -142,7 +142,7 @@ func (d *zfsDriver) Clone(ctx context.Context, srcBuildID types.BuildID, dstImag
properties := dstBuildID.Type().Properties()
buildDir := filepath.Join("/", d.config.Root, string(dstBuildID))
filesystem, err := snapshot.Clone(ctx, d.config.Root+"/"+string(dstBuildID), zfs.CloneOptions{Properties: map[string]string{
"mountpoint": buildDir,
"mountpoint": filepath.Join(buildDir, "root"),
propertyName: string(must.Bytes(json.Marshal(types.BuildInfo{
BuildID: dstBuildID,
BasedOn: srcBuildID,
Expand Down

0 comments on commit e07c054

Please sign in to comment.