Re: [Users] forced shutdown with client agent

2013-04-30 Thread Gianluca Cecchi
On Tue, Apr 23, 2013 at 8:58 AM, Michal Skrivanek wrote:



 do we allow users to cancel the shutdown?
 nope.
 It can be stopped inside the guest, well, if you manage to do that in that 
 short time.


BTW: I tried today with ovirt 3.2.1 and it is not possible to
interrupt shutdown, at least with shutdown -c command

With agent inside a CentOS 6.4 VM the comamnd run is:

[root@c2 ~]# ps -ef|grep shut
root 15767  1581  0 23:39 ?00:00:00 rhev-shutdown -h +1
System Administrator has initiated shutdown of this Virtual Machine.
Virtual Machine is shutting down.
root 15768 15767  0 23:39 ?00:00:00 [shutdown] defunct
root 15799 15781  0 23:40 pts/000:00:00 grep shut

If you try to cancel it with
shutdown -c

you get

shutdown: Cannot find pid of running shutdown

I don't know if Michal meant instead to kill the pid processes
themselves (15767 and and 15768 in my case)

Gianluca
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] forced shutdown with client agent

2013-04-23 Thread Omer Frenkel


- Original Message -
 From: Itamar Heim ih...@redhat.com
 To: Michal Skrivanek michal.skriva...@redhat.com
 Cc: Gal Hammer gham...@redhat.com, users@ovirt.org, Simon Grinberg 
 sgrin...@redhat.com
 Sent: Tuesday, April 23, 2013 12:19:25 AM
 Subject: Re: [Users] forced shutdown with client agent
 
 On 04/22/2013 01:59 PM, Michal Skrivanek wrote:
  
  - Original Message -
  From: Michal Skrivanekmichal.skriva...@redhat.com
  To:users@ovirt.org, Thomas Scofieldtscofi...@gmail.com, Vinzenz
  Feenstravfeen...@redhat.com, Barak
  Azulaybazu...@redhat.com, Gal Hammergham...@redhat.com
  Sent: Monday, April 22, 2013 11:48:18 AM
  Subject: Re: [Users] forced shutdown with client agent
  
  
  On Apr 20, 2013, at 22:42 , Itamar Heimih...@redhat.com  wrote:
  
  On 03/29/2013 04:58 AM, Thomas Scofield wrote:
  I have run into a scenario after installing the client agent.  If
  a VM
  is shutdown, the client agent calls the shutdown command with a 1
  minute
  timeout.
  
  Dummy-2::INFO::2013-03-28
  14:05:21,892::vdsAgentLogic::138::root::Shutting down (timeout =
  30,
  message = 'System Administrator has initiated shutdown of this
  Virtual
  Machine. Virtual Machine is shutting down.'
  
  Since the shutdown command is called with time parameter the VM
  sets the
  /etc/nologin file. When the VM is forced down the /etc/nologin
  file is
  not cleared and when it comes back up only root can login until
  the
  /etc/nologin file is cleared.
  
  hmmm, Vinzenz - should guest agent clear that on guest startup, if
  guest agent set this at shutdown?
  
  
  Is their some some reason the shutdown time is set to 30 seconds
  (rounded up to 1 minute in the code)?  Are there any know issues
  with
  setting this to 0?
  I wouldn't mind changing this to 0 by default if there are no
  objections.
  Barak, Gal, what do you think? Do you see any strong reason for
  keeping a grace period?
  
  The idea was to allow a logged in user to orderly close his work right?
  For that I'm not sure that even 30 seconds is enough.
  For that typically sysadmins use 5 or 10 minutes. 30s is worthless, no one
  would be able to react that fast…so to me this is the same as initiating
  shutdown right away. It's graceful anyway and all common apps would save
  the workspace on SIGTERM anyway. Well, does it even do anything on
  Windows?

i think its like doing a clean shutdown from within the guest

  That's why I'd vote for 0. And keep is configurable in case you want to use
  it, sure.
 
 
 do we allow users to cancel the shutdown?

i think 'shutdown -a' should work on windows, no?

 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] forced shutdown with client agent

2013-04-23 Thread Michal Skrivanek

On Apr 22, 2013, at 23:19 , Itamar Heim ih...@redhat.com wrote:

 On 04/22/2013 01:59 PM, Michal Skrivanek wrote:
 
 - Original Message -
 From: Michal Skrivanekmichal.skriva...@redhat.com
 To:users@ovirt.org, Thomas Scofieldtscofi...@gmail.com, Vinzenz 
 Feenstravfeen...@redhat.com, Barak
 Azulaybazu...@redhat.com, Gal Hammergham...@redhat.com
 Sent: Monday, April 22, 2013 11:48:18 AM
 Subject: Re: [Users] forced shutdown with client agent
 
 
 On Apr 20, 2013, at 22:42 , Itamar Heimih...@redhat.com  wrote:
 
 On 03/29/2013 04:58 AM, Thomas Scofield wrote:
 I have run into a scenario after installing the client agent.  If
 a VM
 is shutdown, the client agent calls the shutdown command with a 1
 minute
 timeout.
 
 Dummy-2::INFO::2013-03-28
 14:05:21,892::vdsAgentLogic::138::root::Shutting down (timeout =
 30,
 message = 'System Administrator has initiated shutdown of this
 Virtual
 Machine. Virtual Machine is shutting down.'
 
 Since the shutdown command is called with time parameter the VM
 sets the
 /etc/nologin file. When the VM is forced down the /etc/nologin
 file is
 not cleared and when it comes back up only root can login until
 the
 /etc/nologin file is cleared.
If you don't want it setting user_shutdown_timeout to 0 should solve this.

 
 hmmm, Vinzenz - should guest agent clear that on guest startup, if
 guest agent set this at shutdown?
 
 
 Is their some some reason the shutdown time is set to 30 seconds
 (rounded up to 1 minute in the code)?  
it is rounded up because unix shutdown works with minutes only. So it's the 
seconds from user_shutdown_timeout is rounded up to minutes.
The Windows one should really be 30s.

 Are there any know issues
 with
 setting this to 0?
 I wouldn't mind changing this to 0 by default if there are no
 objections.
 Barak, Gal, what do you think? Do you see any strong reason for
 keeping a grace period?
 
 The idea was to allow a logged in user to orderly close his work right?
 For that I'm not sure that even 30 seconds is enough.
 For that typically sysadmins use 5 or 10 minutes. 30s is worthless, no one 
 would be able to react that fast…so to me this is the same as initiating 
 shutdown right away. It's graceful anyway and all common apps would save the 
 workspace on SIGTERM anyway. Well, does it even do anything on Windows?
 That's why I'd vote for 0. And keep is configurable in case you want to use 
 it, sure.
 
 
 do we allow users to cancel the shutdown?
nope.
It can be stopped inside the guest, well, if you manage to do that in that 
short time.

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] forced shutdown with client agent

2013-04-23 Thread Simon Grinberg


- Original Message -
 From: Michal Skrivanek michal.skriva...@redhat.com
 To: Itamar Heim ih...@redhat.com, users@ovirt.org
 Cc: Gal Hammer gham...@redhat.com, Simon Grinberg sgrin...@redhat.com
 Sent: Tuesday, April 23, 2013 9:58:57 AM
 Subject: Re: [Users] forced shutdown with client agent
 
 
 On Apr 22, 2013, at 23:19 , Itamar Heim ih...@redhat.com wrote:
 
  On 04/22/2013 01:59 PM, Michal Skrivanek wrote:
  
  - Original Message -
  From: Michal Skrivanekmichal.skriva...@redhat.com
  To:users@ovirt.org, Thomas Scofieldtscofi...@gmail.com,
  Vinzenz Feenstravfeen...@redhat.com, Barak
  Azulaybazu...@redhat.com, Gal Hammergham...@redhat.com
  Sent: Monday, April 22, 2013 11:48:18 AM
  Subject: Re: [Users] forced shutdown with client agent
  
  
  On Apr 20, 2013, at 22:42 , Itamar Heimih...@redhat.com
   wrote:
  
  On 03/29/2013 04:58 AM, Thomas Scofield wrote:
  I have run into a scenario after installing the client
  agent.  If
  a VM
  is shutdown, the client agent calls the shutdown command
  with a 1
  minute
  timeout.
  
  Dummy-2::INFO::2013-03-28
  14:05:21,892::vdsAgentLogic::138::root::Shutting down
  (timeout =
  30,
  message = 'System Administrator has initiated shutdown of
  this
  Virtual
  Machine. Virtual Machine is shutting down.'
  
  Since the shutdown command is called with time parameter
  the VM
  sets the
  /etc/nologin file. When the VM is forced down the
  /etc/nologin
  file is
  not cleared and when it comes back up only root can login
  until
  the
  /etc/nologin file is cleared.
 If you don't want it setting user_shutdown_timeout to 0 should solve
 this.
 
  
  hmmm, Vinzenz - should guest agent clear that on guest
  startup, if
  guest agent set this at shutdown?
  
  
  Is their some some reason the shutdown time is set to 30
  seconds
  (rounded up to 1 minute in the code)?
 it is rounded up because unix shutdown works with minutes only. So
 it's the seconds from user_shutdown_timeout is rounded up to
 minutes.
 The Windows one should really be 30s.
 
  Are there any know issues
  with
  setting this to 0?
  I wouldn't mind changing this to 0 by default if there are no
  objections.
  Barak, Gal, what do you think? Do you see any strong reason
  for
  keeping a grace period?
  
  The idea was to allow a logged in user to orderly close his work
  right?
  For that I'm not sure that even 30 seconds is enough.
  For that typically sysadmins use 5 or 10 minutes. 30s is
  worthless, no one would be able to react that fast…so to me this
  is the same as initiating shutdown right away. It's graceful
  anyway and all common apps would save the workspace on SIGTERM
  anyway. Well, does it even do anything on Windows?
  That's why I'd vote for 0. And keep is configurable in case you
  want to use it, sure.
  
  
  do we allow users to cancel the shutdown?
 nope.
 It can be stopped inside the guest, well, if you manage to do that in
 that short time.


From all the said above seems that indeed default shut-down time should be 0
But we need to be able to set shut-down policy per VM/Cluster/Something that 
will override the global config. One time fits all does not sound reasonable. 

I would say that for Desktop use case you'll probably want to allow the User 
some time to finish up things, while for Server you won't care. Etc 



 
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] forced shutdown with client agent

2013-04-22 Thread Vinzenz Feenstra

On 04/20/2013 10:52 PM, Michal Skrivanek wrote:


On 20 Apr 2013, at 22:42, Itamar Heim ih...@redhat.com wrote:


On 03/29/2013 04:58 AM, Thomas Scofield wrote:

I have run into a scenario after installing the client agent.  If a VM
is shutdown, the client agent calls the shutdown command with a 1 minute
timeout.

Dummy-2::INFO::2013-03-28
14:05:21,892::vdsAgentLogic::138::root::Shutting down (timeout = 30,
message = 'System Administrator has initiated shutdown of this Virtual
Machine. Virtual Machine is shutting down.'

Since the shutdown command is called with time parameter the VM sets the
/etc/nologin file. When the VM is forced down the /etc/nologin file is
not cleared and when it comes back up only root can login until the
/etc/nologin file is cleared.

hmmm, Vinzenz - should guest agent clear that on guest startup, if guest agent 
set this at shutdown?

It's not guest agent, shutdown does it. It behaves the same on real hw


Is their some some reason the shutdown time is set to 30 seconds
(rounded up to 1 minute in the code)?  Are there any know issues with
setting this to 0?

Vinzenz - if we are rounding up - is this a bug?

possibly yes

Sounds pretty much like a bug to me




Is this the right way to change it to 0?
psql engine postgres -c update vdc_options set option_value = '0' where
option_name = 'VmGracefulShutdownTimeout';

notmally the grace period is there for other users to react befor shutdown starts. I 
wonder if it's that much relevant here.., if we assume single user most of the time 0 
(i.e. now) should be ok



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users




--
Regards,

Vinzenz Feenstra | Senior Software Engineer
RedHat Engineering Virtualization R  D
Phone: +420 532 294 625
IRC: vfeenstr or evilissimo

Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] forced shutdown with client agent

2013-04-22 Thread Gianluca Cecchi
On Mon, Apr 22, 2013 at 12:59 PM, Michal Skrivanek  wrote:

 The idea was to allow a logged in user to orderly close his work right?
 For that I'm not sure that even 30 seconds is enough.
 For that typically sysadmins use 5 or 10 minutes. 30s is worthless, no one 
 would be able to react that fast…so to me this is the same as initiating 
 shutdown right away. It's graceful anyway and all common apps would save the 
 workspace on SIGTERM anyway. Well, does it even do anything on Windows?
 That's why I'd vote for 0. And keep is configurable in case you want to use 
 it, sure.

+1

FWIW:
Using VMware since many years and there, when VMware tools are
installed, shutdown is immediate and didn't hear anyone complaining
about it.

Gianluca
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] forced shutdown with client agent

2013-04-20 Thread Michal Skrivanek


On 20 Apr 2013, at 22:42, Itamar Heim ih...@redhat.com wrote:

 On 03/29/2013 04:58 AM, Thomas Scofield wrote:
 I have run into a scenario after installing the client agent.  If a VM
 is shutdown, the client agent calls the shutdown command with a 1 minute
 timeout.
 
 Dummy-2::INFO::2013-03-28
 14:05:21,892::vdsAgentLogic::138::root::Shutting down (timeout = 30,
 message = 'System Administrator has initiated shutdown of this Virtual
 Machine. Virtual Machine is shutting down.'
 
 Since the shutdown command is called with time parameter the VM sets the
 /etc/nologin file. When the VM is forced down the /etc/nologin file is
 not cleared and when it comes back up only root can login until the
 /etc/nologin file is cleared.
 
 hmmm, Vinzenz - should guest agent clear that on guest startup, if guest 
 agent set this at shutdown?
It's not guest agent, shutdown does it. It behaves the same on real hw

 
 
 Is their some some reason the shutdown time is set to 30 seconds
 (rounded up to 1 minute in the code)?  Are there any know issues with
 setting this to 0?
 
 Vinzenz - if we are rounding up - is this a bug?
possibly yes


 
 
 Is this the right way to change it to 0?
 psql engine postgres -c update vdc_options set option_value = '0' where
 option_name = 'VmGracefulShutdownTimeout';
notmally the grace period is there for other users to react befor shutdown 
starts. I wonder if it's that much relevant here.., if we assume single user 
most of the time 0 (i.e. now) should be ok

 
 
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] forced shutdown with client agent

2013-03-28 Thread Thomas Scofield
I have run into a scenario after installing the client agent.  If a VM is
shutdown, the client agent calls the shutdown command with a 1 minute
timeout.

Dummy-2::INFO::2013-03-28 14:05:21,892::vdsAgentLogic::138::root::Shutting
down (timeout = 30, message = 'System Administrator has initiated shutdown
of this Virtual Machine. Virtual Machine is shutting down.'

Since the shutdown command is called with time parameter the VM sets the
/etc/nologin file. When the VM is forced down the /etc/nologin file is not
cleared and when it comes back up only root can login until the
/etc/nologin file is cleared.

Is their some some reason the shutdown time is set to 30 seconds (rounded
up to 1 minute in the code)?  Are there any know issues with setting this
to 0?

Is this the right way to change it to 0?
psql engine postgres -c update vdc_options set option_value = '0' where
option_name = 'VmGracefulShutdownTimeout';
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users