> > 2) The next problem is that a graceful shutdown sometimes does not work
> > when the machine just booted. This patch makes the RA send a shutdown
> > command every 10 seconds while shutting down the machine. This catches
> > the boot problem.
> > 
> > @@ -234,6 +240,9 @@
> > 
> >                 shutdown_timeout=$((($OCF_RESKEY_CRM_meta_timeout/1000)-5
> >                 )) # Loop on status for $shutdown_timeout seconds
> >                 for i in `seq $shutdown_timeout`; do
> > 
> > +                   if [ $((i%10)) -eq 0 ]; then
> > +                       virsh $VIRSH_OPTIONS shutdown ${DOMAIN_NAME}
> > +                   fi
> > 
> >                     VirtualDomain_Status
> >                     status=$?
> >                     case $status in
> 
> I see the point -- if you're issuing a KVM shutdown while the machine is
> still booting and the guest's acpid is not started, then the shutdown
> effectively doesn't happen. And issuing a shutdown request for a domain
> that's already got one should do no harm.
> 
> Question is, why only do this every 10 seconds then? Might as well do it
> on every iteration. So we could just roll the invocation of "virsh
> $VIRSH_OPTIONS shutdown ${DOMAIN_NAME}" into the existing "while [ $NOW
> -lt $shutdown_timeout ]; do" loop.
> 
> What do others think?

Perhaps the shutdown might cause a considerably load on the system. If the 
system is slow it might be not a good idea to fire a shutdown every second. On 
the other hand, if acpip is not started, the shutdown will not harm.

I am not against firing every second.

Geetings,

-- 
Dr. Michael Schwartzkopff
Guardinistr. 63
81375 München

Tel: (0163) 172 50 98

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to