Skip to content

Commit

Permalink
Fix Issue ContainX#188: Restore mount options when recovering state
Browse files Browse the repository at this point in the history
  • Loading branch information
fgodfrey committed Feb 10, 2020
1 parent f1aed1a commit f488c18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions netshare/drivers/mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ func (m *MountManager) GetVolumes(rootPath string) []*volume.Volume {
return volumes
}

func (m *MountManager) AddMount(name string, hostdir string, connections int) {
m.mounts[name] = &mount{name: name, hostdir: hostdir, managed: true, connections: connections}
func (m *MountManager) AddMount(name string, hostdir string, opts map[string]string, connections int) {
m.mounts[name] = &mount{name: name, hostdir: hostdir, managed: true, opts: opts, connections: connections}
}

//Checking volume references with started and stopped containers as well.
Expand Down
2 changes: 1 addition & 1 deletion netshare/netshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func syncDockerState(driverName string) *drivers.MountManager {
}
connections := activeConnections(vol.Name)
log.Infof("Recovered state: %s , %s , %s , %s , %d ", vol.Name, vol.Mountpoint, vol.Driver, vol.CreatedAt, connections)
mount.AddMount(vol.Name, vol.Mountpoint, connections)
mount.AddMount(vol.Name, vol.Mountpoint, vol.Options, connections)
}
return mount
}
Expand Down

0 comments on commit f488c18

Please sign in to comment.