add actions for osd reweight and osd crush reweight

Bug #1675387 reported by JuanJo Ciarlante on 2017-03-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack ceph-mon charm

Bug Description

It would be very useful to be able to have
ceph reweight ops framed inside actions.

Most used ones:
ceph osd reweight osd.N WEIGHT
ceph osd crush reweight osd.N WEIGHT
ceph osd reweight-by-utilization

It would be also useful to be able to have
something to reweight all OSDs at a particular
juju unit, something like e.g.:

juju run-action ceph-mon/0 reweight-osds-at-unit \
  unit=ceph-osd/42 weight=0.2

Chris Holcombe (xfactor973) wrote :

I've been trying to avoid creating actions on the ceph-mon charm that are a 1:1 mapping to the underlying ceph command. Any of the commands you mentioned could easily be run with a juju run command without having the additional overhead of the juju run-action interface. Anything that requires multiple steps is a great candidate for an action.

James Troup (elmo) wrote :

So, the reason I think an action is better than juju run:

 1) the charm knows which OSDs are on which node; I, as a human,
    don't. That makes at least two of the things jjo mentioned a
    multi-step process, which is better wrapped in an action

 2) putting it into an action means it can be tested and become part
    of the normal CI/QA process and won't break if (for example) ceph
    change their CLI

Changed in charm-ceph-mon:
assignee: nobody → Chris Holcombe (xfactor973)
Chris Holcombe (xfactor973) wrote :

Yeah I agree with point 2. The juju action yaml file is expressive enough that we could lock down what is/isn't allowed to be passed to the command.

I don't follow what you mean in point 1. I think I see what you're getting at though. As a user of the charm all you see from the status output is x osds on some unit. While somewhat useful it's not very useful for figuring out for example that I want to reweight osd.2 on unit ceph-osd/0 because I don't actually know where osd.2 lives.

If however you did juju run ceph-mon/0 "ceph osd tree" to see where everything lives and you figured out the osd you want to reweight it would still be a single command run against any of the mon units.

Does that make sense? Running any of those commands against a ceph-osd unit would fail because they don't have admin keys and if they did it would just get redirected to one of the mon units.

Xav Paice (xavpaice) on 2017-09-12
tags: added: sts
James Page (james-page) on 2017-09-19
Changed in charm-ceph-mon:
assignee: Chris Holcombe (xfactor973) → nobody
James Page (james-page) on 2017-09-21
Changed in charm-ceph-mon:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → 18.02
Ryan Beisner (1chb1n) on 2018-03-09
Changed in charm-ceph-mon:
milestone: 18.02 → 18.05
James Page (james-page) on 2018-06-12
Changed in charm-ceph-mon:
milestone: 18.05 → 18.08
James Page (james-page) on 2018-09-12
Changed in charm-ceph-mon:
milestone: 18.08 → 18.11
James Page (james-page) on 2018-11-20
Changed in charm-ceph-mon:
milestone: 18.11 → 19.04

Change abandoned by Xav Paice (<email address hidden>) on branch: master
Reason: this action increases the total workload on the cluster which is the opposite of the intent.

David Ames (thedac) on 2019-04-17
Changed in charm-ceph-mon:
milestone: 19.04 → 19.07
David Ames (thedac) on 2019-08-12
Changed in charm-ceph-mon:
milestone: 19.07 → 19.10
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers