@@ -30,6 +30,7 @@ static struct {
3030 char * name ;
3131 unsigned int timeout ;
3232 unsigned int tolerance ;
33+ int delay ;
3334 int rc ;
3435} async_fence_data ;
3536
@@ -109,12 +110,13 @@ async_fence_helper(gpointer user_data)
109110
110111 st -> cmds -> register_notification (st , T_STONITH_NOTIFY_FENCE , notify_callback );
111112
112- call_id = st -> cmds -> fence (st ,
113- st_opt_allow_suicide ,
114- async_fence_data .target ,
115- async_fence_data .action ,
116- async_fence_data .timeout /1000 ,
117- async_fence_data .tolerance /1000 );
113+ call_id = st -> cmds -> fence_with_delay (st ,
114+ st_opt_allow_suicide ,
115+ async_fence_data .target ,
116+ async_fence_data .action ,
117+ async_fence_data .timeout /1000 ,
118+ async_fence_data .tolerance /1000 ,
119+ async_fence_data .delay );
118120
119121 if (call_id < 0 ) {
120122 g_main_loop_quit (mainloop );
@@ -131,7 +133,8 @@ async_fence_helper(gpointer user_data)
131133
132134int
133135pcmk__fence_action (stonith_t * st , const char * target , const char * action ,
134- const char * name , unsigned int timeout , unsigned int tolerance )
136+ const char * name , unsigned int timeout , unsigned int tolerance ,
137+ int delay )
135138{
136139 crm_trigger_t * trig ;
137140
@@ -141,6 +144,7 @@ pcmk__fence_action(stonith_t *st, const char *target, const char *action,
141144 async_fence_data .action = action ;
142145 async_fence_data .timeout = timeout ;
143146 async_fence_data .tolerance = tolerance ;
147+ async_fence_data .delay = delay ;
144148 async_fence_data .rc = pcmk_err_generic ;
145149
146150 trig = mainloop_add_trigger (G_PRIORITY_HIGH , async_fence_helper , NULL );
@@ -157,8 +161,10 @@ pcmk__fence_action(stonith_t *st, const char *target, const char *action,
157161#ifdef BUILD_PUBLIC_LIBPACEMAKER
158162int
159163pcmk_fence_action (stonith_t * st , const char * target , const char * action ,
160- const char * name , unsigned int timeout , unsigned int tolerance ) {
161- return pcmk__fence_action (st , target , action , name , timeout , tolerance );
164+ const char * name , unsigned int timeout , unsigned int tolerance ,
165+ int delay )
166+ {
167+ return pcmk__fence_action (st , target , action , name , timeout , tolerancei , delay );
162168}
163169#endif
164170
0 commit comments