Skip to content

Commit

Permalink
formatting cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MadnessASAP committed Dec 10, 2024
1 parent 3a2c9c1 commit cf36646
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/server/device/device_utils_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func DiskMount(srcPath string, dstPath string, recursive bool, propagation strin
} else {
err = unix.Mount(srcPath, dstPath, fsName, uintptr(flags), mountOptionsStr)
}

if err != nil {
return fmt.Errorf("Unable to mount %q at %q with filesystem %q: %w", srcPath, dstPath, fsName, err)
}
Expand Down
3 changes: 3 additions & 0 deletions internal/server/storage/drivers/utils_ceph.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,14 @@ func CephKeyring(cluster string, client string) (string, error) {
return cephSecret, nil
}

// CephFSID returns the ceph fsid for a given cluster name
// requires that the ceph client is avaible on the host.
func CephFSID(cluster string) (string, error) {
fsid, err := subprocess.RunCommand("ceph", "--cluster", cluster)
if err != nil {
return "", fmt.Errorf("Failed to get fsid for cluster %q: %w", cluster, err)
}

fsid = strings.TrimSpace(fsid)
return fsid, nil
}

0 comments on commit cf36646

Please sign in to comment.