Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Mon, Feb 29, 2016 at 03:10:35PM +0000, Vladislav Bogdanov wrote: > Now OCF RA has plenty of parameters, most of them are external to drbd > itself. Allow to change that parameters without resource restart. Ok. Though I usually do maintenance-mode=on change stuff double check stuff maybe do some "cleanup" tripple check stuff maintenance-mode=off (but do not commit yet) crm_simulate potentially go back a few steps ... commit > As an added value, adjust resource configuration just in case the > reload operation was requested by administrator > (if https://github.com/ClusterLabs/pacemaker/pull/606 is going to be > merged). > --- > scripts/drbd.ocf | 30 ++++++++++++++++++++++++++++++ > 1 files changed, 30 insertions(+), 0 deletions(-) > > diff --git a/scripts/drbd.ocf b/scripts/drbd.ocf > index 632e16e..5c87d32 100755 > --- a/scripts/drbd.ocf > +++ b/scripts/drbd.ocf > @@ -263,6 +263,7 @@ See description of unfence_if_all_uptodate. > > <actions> > <action name="start" timeout="240" /> > +<action name="reload" timeout="30" /> > <action name="promote" timeout="90" /> > <action name="demote" timeout="90" /> > <action name="notify" timeout="90" /> > @@ -790,6 +791,32 @@ drbd_start() { > return $rc > } > > +drbd_reload() { > + local rc > + local status > + > + rc=$OCF_ERR_GENERIC > + > + drbd_status > + status=$? > + > + case "$status" in > + $OCF_SUCCESS|$OCF_RUNNING_MASTER) > + # Adjust resource just in case reload was requested manually > + # Changes to resource parameters do not require this > + do_drbdadm adjust $DRBD_RESOURCE > + rc=$OCF_SUCCESS > + ;; > + $OCF_NOT_RUNNING) No need for no-ops. > + : > + ;; > + esac > + # Update score as adjust_master_score may be changed > + drbd_update_master_score > + > + return $rc > +} > + > drbd_promote() { > local rc > local status > @@ -1187,6 +1214,9 @@ start) > stop) > drbd_stop > ;; > +reload) > + drbd_reload > + ;; > notify) > drbd_notify > ;; -- : Lars Ellenberg : http://www.LINBIT.com | Your Way to High Availability : DRBD, Linux-HA and Pacemaker support and consulting DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. __ please don't Cc me, but send to list -- I'm subscribed