add actions for osd reweight and osd crush reweight

Bug #1675387 reported by JuanJo Ciarlante
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph Monitor Charm
In Progress
Wishlist
Unassigned

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

Revision history for this message
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.

Revision history for this message
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)
Revision history for this message
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.

Revision history for this message
Xav Paice (xavpaice) wrote :
Xav Paice (xavpaice)
tags: added: sts
James Page (james-page)
Changed in charm-ceph-mon:
assignee: Chris Holcombe (xfactor973) → nobody
James Page (james-page)
Changed in charm-ceph-mon:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → 18.02
Ryan Beisner (1chb1n)
Changed in charm-ceph-mon:
milestone: 18.02 → 18.05
James Page (james-page)
Changed in charm-ceph-mon:
milestone: 18.05 → 18.08
James Page (james-page)
Changed in charm-ceph-mon:
milestone: 18.08 → 18.11
James Page (james-page)
Changed in charm-ceph-mon:
milestone: 18.11 → 19.04
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-ceph-mon (master)

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

David Ames (thedac)
Changed in charm-ceph-mon:
milestone: 19.04 → 19.07
David Ames (thedac)
Changed in charm-ceph-mon:
milestone: 19.07 → 19.10
David Ames (thedac)
Changed in charm-ceph-mon:
milestone: 19.10 → 20.01
James Page (james-page)
Changed in charm-ceph-mon:
milestone: 20.01 → 20.05
David Ames (thedac)
Changed in charm-ceph-mon:
milestone: 20.05 → 20.08
James Page (james-page)
Changed in charm-ceph-mon:
milestone: 20.08 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Chris MacNaughton <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/charm-ceph-mon/+/665719
Reason: Closing this review as it has updates requested for over a year and no updates submitted.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.