Commit Graph

11 Commits

Author SHA1 Message Date
Billy Olsen 1bb6e20b34 Handle AddrFormatError when CIDR can't be found
The network space for the cluster space or the public space may have
addresses in a different subnet than the one that is currently assigned
to the unit. In this case, the attempt to look up the netmask results in
a value of None, which in turn causes charmhelpers to raise an
AddrFormatError when attempting to determine the CIDR.

Handle this case within the interface and return None for the respective
CIDR. This may cause some issues where the public or cluster CIDRs are
not resolvable, however the charm interface already expects to provide
None if the CIDR cannot be determined.

A better, however more invasive, change would be to change out the calls
in the ceph-mon charm to use the network_get calls rather than
network_get_primary_address. Per the documentation for the network
primitives, it appears that the cidr can still be empty and is likely to
still lead to the inability to resolve the CIDR locally.

This change will primarily focus on handling the inability to resolve a
CIDR locally, postponing the network_get transformation this late in the
cycle.

Closes-Bug: #1898299
Change-Id: If1538eb645577653cada770211fd445b76284fd3
2021-04-01 11:10:53 -07:00
Frode Nordahl 61c94148d9
Add support for handling of forwarded broker requests
Change-Id: I0d4ed457e1d59eabed3340f5dc7d8353d5d66f04
2020-11-06 10:11:09 +01:00
Frode Nordahl 2e45c2b79b Handle calls with no relations
In some situations the charm will call out to us thinking it has
relations when it has not.

Change-Id: If96f1501892784d7addedbbd7eca55dc8e7bb9ba
Closes-Bug: #1822102
2019-03-28 14:20:03 +01:00
Frode Nordahl 2677eb3a2f Add ``public_network`` and ``cluster_network`` properties
Change-Id: Ia49f4921e772376763be178e11d7777676ccc8da
2019-03-06 15:24:45 +01:00
Frode Nordahl e7fb14440e Add ``refresh_pools``
Change-Id: I97bfb9a2c0e30998566aee56d4630af6baa36d45
2019-03-06 15:24:11 +01:00
Frode Nordahl 65415824d0
Avoid duplicate ``create-pool`` requests for same pool
Change-Id: I801843f81d5fbe9838142b8fba96d93bbdfc91e4
2019-03-06 15:20:37 +01:00
Frode Nordahl 08f25a7862
Add function to create erasure coded pools
Rename the existing one to ``create_replicated_pool`` for clarity.
2019-02-28 09:09:50 +01:00
Frode Nordahl 9f6570e970
Make ``mon_hosts`` a function and not a property 2019-02-26 11:59:00 +01:00
Frode Nordahl b54d497d91 Add pool creation, fix individual key naming
Adds a pool creation function that works with Endpoint based interfaces.
2019-02-25 13:46:00 +03:00
Frode Nordahl b2ab9c6bcf Add ``key`` property 2019-02-25 13:45:51 +03:00
Frode Nordahl d515ede351
Add ``ceph-rbd-mirror`` interface 2019-02-06 09:58:45 +01:00