Persistent should be RW

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
Itxaka
2023-02-08 15:51:21 +01:00
parent 4407bef252
commit 2a62ff5dac

View File

@@ -403,18 +403,19 @@ func (s *State) Register(g *herd.Graph) error {
for what, where := range s.CustomMounts {
// TODO: scan for the custom mount disk to know the underlying fs and set it proper
fstype := "auto"
mountOptions := []string{"ro"}
// Translate label to disk for COS_PERSISTENT
// Persistent needs to be RW
if strings.Contains(what, "COS_PERSISTENT") {
fstype = runtime.Persistent.Type
mountOptions = []string{"rw"}
}
s.Logger.Debug().Str("what", what).Str("where", s.path(where)).Str("type", fstype).Msg("mounting custom mounts")
err = multierror.Append(err, s.MountOP(
what,
s.path(where),
fstype,
[]string{
"ro", // or rw
},
mountOptions,
10*time.Second,
)(ctx))