[ovirt-users] Problem migration VM

Alex Crow acrow at integrafin.co.uk
Wed Sep 23 13:22:47 UTC 2015



On 23/09/15 14:11, Luca Bertoncello wrote:
> Hi Alex
>
>> Thought so. The migration then cannot continue, obviously.
> Obviously... :(
>
>>> Can someone suggest me a way to call my script as FIRST script on
>> shutdown/reboot and to block the shutdown/reboot until my script
>> complete?
>>> This will solve the problem...
>> Add your systemd script as a "requires" entry in the systemd script
>> responsible for shutting down the system?
> What do you mean? Could you please explain, maybe with an example?

I've not done anything with systemd myself but it should be entirely 
possible. Ask systemd people.

>
>>> Of course, I can try with a wrapper for /sbin/shutdown and /sbin/reboot,
>> but this is not a nice solution...
>>
>> Why don't you manage this from another machine, not from the hosts? Just
>> have a script call the API to initiate maintenance, wait for the migration to
>> complete, then call the API to shut down the host?

OK, change the shutdown script on the host that NUT calls (ie *not* the 
systemd stuff) to do what I said above. That would work. You will have 
to be careful with your timing to ensure that migration can finish 
before your UPS runs out of juice though. NUT normally only starts the 
shutdown process on LOWBATT from the UPS.

>
>> Or is it really too hard to do this from the GUI? I don't understand why you
>> have such a hard requirement to be able to do this from the hosts - the
>> whole point of Ovirt is that you don't have to manage your hosts on an
>> individual basis!
> Well, the problem is just one: if someone other Admin has to perform some works on the host that require a reboot, and he MUST log into a GUI to put the host in maintenance before the shutdown, we have a higher fail-possibility, if he forgot that.
> And, of course, automatically shutdown cannot log into the GUI...

No, but it can have access to the API. You'd have to mess around with 
the systemd scripts to do this bit. As above, I think you'd be better 
off asking the systemd people than this list - as this is now getting 
quite offtopic for here.

Alex

-- 
This message is intended only for the addressee and may contain
confidential information. Unless you are that person, you may not
disclose its contents or use it in any way and are requested to delete
the message along with any attachments and notify us immediately.
"Transact" is operated by Integrated Financial Arrangements plc. 29
Clement's Lane, London EC4N 7AE. Tel: (020) 7608 4900 Fax: (020) 7608
5300. (Registered office: as above; Registered in England and Wales
under number: 3727592). Authorised and regulated by the Financial
Conduct Authority (entered on the Financial Services Register; no. 190856).

 .




More information about the Users mailing list