charm upgrades takes longer time for ceph-mon to get into idle state
when there are more number of OSDs and ceph clients whenever there
is change in osd-relation data.
In these cases osd_relation triggers notify_client() that takes
significant amount of time as the client_relation() is executed for
every related unit on each client relation. Some of the function
calls and ceph commands can be reduced to be executed for every
relation or once per notify_client instead of executing them for
every related unit.
ceph.get_named_key() is currently executed for every related unit
and also each execution takes longer time as it is supposed to run
minimum of 2 ceph commands. This patch tries to reduce the number
of calls for ceph.get_named_key to once per relation.
Partial-Bug: #1913992
Change-Id: Ic455cd7c4876efafee221bc6e7a5ec61fee5643f