Skip to content

Commit

Permalink
Backport mon.host entry cleanup from main to reef (#450)
Browse files Browse the repository at this point in the history
# Description
Adds a patch to remove mon.host entries on mon service cleanup.

Fixes #444 

## Type of change

Please delete options that are not relevant.

- [X] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?
CI

## Contributor's Checklist

Please check that you have:

- [X] self-reviewed the code in this PR.
- [X] added code comments, particularly in hard-to-understand areas.
- [ ] updated the user documentation with corresponding changes.
- [ ] added tests to verify effectiveness of this change.

Signed-off-by: Utkarsh Bhatt <utkarsh.bhatt@canonical.com>
  • Loading branch information
UtkarshBhatthere authored Nov 12, 2024
1 parent c9f2b08 commit a97ae91
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions microceph/ceph/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,15 @@ func removeServiceDatabase(s interfaces.StateInterface, service string) error {
return fmt.Errorf("failed to remove service from db %q: %w", service, err)
}

// Clear mon host entry from config table.
if service == "mon" {
key := fmt.Sprintf("mon.host.%s", s.ClusterState().Name())
err = database.DeleteConfigItem(ctx, tx, key)
if err != nil {
return err
}
}

return nil
})
return err
Expand Down

0 comments on commit a97ae91

Please sign in to comment.