Skip to content

Commit

Permalink
Fix mountpoint 3 (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
outofforest authored Aug 24, 2022
1 parent e632ea5 commit f03c1b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,7 @@ func cloneForMount(ctx context.Context, image types.BuildInfo, buildKey types.Bu
defer func() {
if retErr != nil {
_ = s.Drop(ctx, buildID)
return
}
retErr = finalizeFn()
}()

if err := s.StoreManifest(ctx, types.ImageManifest{
Expand All @@ -338,13 +336,17 @@ func cloneForMount(ctx context.Context, image types.BuildInfo, buildKey types.Bu
return types.BuildInfo{}, err
}

if err := finalizeFn(); err != nil {
return types.BuildInfo{}, err
}

return s.Info(ctx, buildID)
}

func mac() string {
buf := make([]byte, 5)
must.Any(rand.Read(buf))
res := "00" // just to ensure that unicast address is generated
res := "00" // to ensure that unicast address is generated
for _, b := range buf {
res += fmt.Sprintf(":%02x", b)
}
Expand Down
1 change: 1 addition & 0 deletions infra/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ var buildTypes = map[BuildType]BuildTypeProperties{
},
BuildTypeVM: {
Mountable: true,
AutoMount: true,
VM: true,
},
}
Expand Down

0 comments on commit f03c1b8

Please sign in to comment.