
On 14 January 2016 at 12:02, Anton Marchukov <amarchuk@redhat.com> wrote:
I was under the impression you are thinking about a wrapper job you need to wrap around every job. This is a single, out of band, job. So it may not be that bad. You seem to imply that slaves managed by the Swarm plugin are not 'normal' ssh-based slaves, so there might be something there we can exploit (For example, perhaps the swarm client JAR can be made to exit once the slave is brought offline, so we can wrap it in a script that will shut the slave down when it does). I will look deeper into this in my POC.
Arent there any ability to hook into shutdown process and delay it from=
--v2Uk6McLiE8OV1El Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 01/14 12:41, Barak Korren wrote: the
hook itself? There are vdsm hooks for that but I am not sure how pool scheduler interacts with it. Maybe we can ask on user list. As I see the ideal is to catch shutdown, than run some hook that will put skave to maintanance, wait for job to finish and than unblocks shutdown.
But this is the reverse of what we need, the problem is how to make the slave shut down in the first place, you can`t just do it from the job that used it because it will make the job fail. =20 But maybe we can actually use the good old 'shutdown $TIME_DELAY' to make the slave shut down a few seconds after the job is done... I can't believe I forgot you can time delay a shut down... I was initially thinking of 'at' and then I remebred this...
You end up with a race condition anyhow, if there's a post-build job that take a bit too much, it will break it.
--=20 Barak Korren bkorren@redhat.com RHEV-CI Team
--=20 David Caro Red Hat S.L. Continuous Integration Engineer - EMEA ENG Virtualization R&D Tel.: +420 532 294 605 Email: dcaro@redhat.com IRC: dcaro|dcaroest@{freenode|oftc|redhat} Web: www.redhat.com RHT Global #: 82-62605 --v2Uk6McLiE8OV1El Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWl3xTAAoJEEBxx+HSYmnD3/oH/iZ4aHrL34yyBCw+sDKm23Ye yZuzCvVYSwGhRlrcXsZItsD0U4VIJuV3+3jQghYuDQJaZD3+CnqLt0RXX0zFW1pU NZfwgY/ZUOB1Cw1AYU15mik82o9M750dw5q7ztvl8907CYM3kmu963wZU01pSHyH tIR0RF7vDzvXoKI+GTULUOsxSDNv1cpjX7qaaA38OEmGCD9kqljePU4GRnKnX3DE IeLdyMxPtHiCWRjYH4wn/pES5EvTBEJP3KYT0V5Ot2ylAz9WpVmrA2vFkilwW8K1 cohEDGyv4dxVLyVk8O1GzDL6PKEjI6aPdtoWkCuY+siYawivFwWBxRgccZtgPwQ= =9esO -----END PGP SIGNATURE----- --v2Uk6McLiE8OV1El--