Skip to content

Commit 54f77cf

Browse files
author
Julio Montes
committed
agent: support agent as init process in rootfs images
Don't fail if `dev` is already mounted. fixes kata-containers#264 Signed-off-by: Julio Montes <julio.montes@intel.com>
1 parent fd28fe4 commit 54f77cf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

agent.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,11 @@ func mountToRootfs(m initMount) error {
847847
func generalMount() error {
848848
for _, m := range initRootfsMounts {
849849
if err := mountToRootfs(m); err != nil {
850-
return err
850+
// dev is already mounted if the rootfs image is used
851+
if m.src != "dev" {
852+
return err
853+
}
854+
agentLog.WithError(err).WithField("src", m.src).Warnf("Could not mount filesystem")
851855
}
852856
}
853857
return nil

0 commit comments

Comments
 (0)