Skip to content

Commit

Permalink
Fill out missing members and check error
Browse files Browse the repository at this point in the history
Signed-off-by: Luciano Lo Giudice <[email protected]>
  • Loading branch information
lmlg committed Sep 25, 2023
1 parent 3696435 commit 3cfab98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions microceph/ceph/osd.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ func AddOSD(s *state.State, data types.DiskParameter, wal *types.DiskParameter,

// Wipe and/or encrypt the disk if needed.
err = prepareDisk(&data, "", osdDataPath, nr)
if err != nil {
return fmt.Errorf("Failed to prepare data device: %w", err)
}

// if we fail later, make sure we free up the record
revert.Add(func() {
Expand Down
4 changes: 4 additions & 0 deletions microceph/cmd/microceph/disk_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,14 @@ func (c *cmdDiskAdd) Run(cmd *cobra.Command, args []string) error {

if c.walDevice != "" {
req.WALDev = &c.walDevice
req.WALWipe = c.walWipe
req.WALEncrypt = c.walEncrypt
}

if c.dbDevice != "" {
req.DBDev = &c.dbDevice
req.DBWipe = c.dbWipe
req.DBEncrypt = c.dbEncrypt
}

err = client.AddDisk(context.Background(), cli, req)
Expand Down

0 comments on commit 3cfab98

Please sign in to comment.