Skip to content

Commit

Permalink
fix nri removeMount does not work bug
Browse files Browse the repository at this point in the history
nri needs to pass the del mount info to containerd,
so that containerd can handle the mount records that
need to be deleted correctly
  • Loading branch information
jingtaoliang committed May 29, 2024
1 parent 7977ced commit 8a2ea29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/adaptation/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ func (r *result) adjustMounts(mounts []*Mount, plugin string) error {
r.reply.adjust.Mounts = append(r.reply.adjust.Mounts, m)
}

// need add del mount, containerd needs to process this del mounts
for _, m := range del {
r.reply.adjust.Mounts = append(r.reply.adjust.Mounts, m)
}

// finally, apply additions/modifications to plugin container creation request
create.Container.Mounts = append(create.Container.Mounts, add...)

Expand Down

0 comments on commit 8a2ea29

Please sign in to comment.