Skip to content

Commit

Permalink
DAOS-15685 control: Add logging on metadata/SCM mount
Browse files Browse the repository at this point in the history
Additional logging needed for debug.

Skip-test: true

Required-githooks: true

Signed-off-by: Kris Jacque <kris.jacque@intel.com>
  • Loading branch information
kjacque committed Apr 26, 2024
1 parent 8d4a74b commit 474953e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/control/server/instance_superblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ func (ei *EngineInstance) WriteSuperblock() error {
// from storage.
func (ei *EngineInstance) ReadSuperblock() error {
if err := ei.MountMetadata(); err != nil {
ei.log.Errorf("unable to mount metadata device: %s", err.Error())
return errors.Wrap(err, "failed to mount control metadata device")
}

Expand Down
5 changes: 4 additions & 1 deletion src/control/server/storage/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func (p *Provider) MountControlMetadata() error {

if !p.engineStorage.ControlMetadata.HasPath() {
// If there's no control metadata path, we use SCM for control metadata
p.log.Debug("mounting SCM for control metadata")
return p.MountScm()
}

Expand All @@ -189,6 +190,7 @@ func (p *Provider) ControlMetadataIsMounted() (bool, error) {
p.log.Debugf("control metadata config: %+v", p.engineStorage.ControlMetadata)
if !p.engineStorage.ControlMetadata.HasPath() {
// If there's no control metadata path, we use SCM for control metadata
p.log.Debug("checking if SCM is mounted")
return p.ScmIsMounted()
}

Expand All @@ -197,6 +199,7 @@ func (p *Provider) ControlMetadataIsMounted() (bool, error) {
return false, nil
}

p.log.Debug("checking if control metadata directory is mounted")
return p.Sys.IsMounted(p.engineStorage.ControlMetadata.Path)
}

Expand Down Expand Up @@ -251,7 +254,7 @@ func (p *Provider) GetScmUsage() (*ScmMountPoint, error) {
func (p *Provider) ScmIsMounted() (bool, error) {
cfg, err := p.GetScmConfig()
if err != nil {
return false, err
return false, errors.Wrap(err, "getting SCM config")
}
return p.Sys.IsMounted(cfg.Scm.MountPoint)
}
Expand Down

0 comments on commit 474953e

Please sign in to comment.