Sandra Schlichting
2012-Aug-29 11:48 UTC
[Puppet Users] How to purge network-manager (requires reboot) ?
Hi all =) I would like to purge the following packages network-manager network-manager-gnome network-manager-pptp network-manager-pptp-gnome but the problem is, that I suppose a reboot is required for the NIC''s no longer to be manged by network-manager? How would you work around this? Hugs, Sandra -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZrmngeNkZCcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Krzysztof Wilczynski
2012-Aug-29 12:44 UTC
[Puppet Users] Re: How to purge network-manager (requires reboot) ?
Hi Sandra, [...]> > but the problem is, that I suppose a reboot is required for the NIC''s no longer to be manged by network-manager? > >I am not sure why would it require a restart, hm... I am used to making sure that the service is stopped, packaged purged and then you only need to make sure that static IP configuration is in place. Sometimes you need to get rid of the udev rules file, but not often. KW -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Vr_-k9qbXUEJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sandra Schlichting
2012-Aug-29 14:01 UTC
[Puppet Users] Re: How to purge network-manager (requires reboot) ?
Hi Krzysztof I am not sure why would it require a restart, hm... I am used to making> sure that the service is stopped, packaged purged and then you only need to > make sure that static IP configuration is in place. Sometimes you need to > get rid of the udev rules file, but not often. >Great. Then that problem is solved. Thanks =) Hugs, Sandra =) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/L1MZfP_loJoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2012-Aug-29 14:04 UTC
[Puppet Users] Re: How to purge network-manager (requires reboot) ?
On Wednesday, August 29, 2012 6:48:04 AM UTC-5, Sandra Schlichting wrote:> > Hi all =) > > I would like to purge the following packages > > network-manager > > network-manager-gnome > > network-manager-pptp > > network-manager-pptp-gnome > > > but the problem is, that I suppose a reboot is required for the NIC''s no longer to be manged by network-manager? > > > How would you work around this? > >Like Krzysztof, I''m not certain that a reboot is required. On the other hand, Network Manager is a tricky and sometimes pesky little beast, so maybe a reboot really is required. I can''t advise you on avoiding a reboot, but if you really do need one, then you can probably make Puppet schedule one using something along these lines: exec { ''reboot-soon'': command => ''/usr/bin/nohup /sbin/shutdown -r +5 &'', provider => ''sh'', subscribe => Package[''network-manager''], refreshonly => true, } That will reboot the system whenever Puppet changes the ''network-manager'' package (which must already have been declared elsewhere). The five-minute delay designated by the "+5" argument serves two purposes: 1. To allow the Puppet run to complete before the reboot (see also below) 2. To give an admin who happens to be logged in a chance to cancel the restart With respect to the delay time, there is an unavoidable race condition here, because you can''t really predict how much longer Puppet will take to finish up, especially if the system is heavily loaded. You can largely mitigate that, however, by ensuring that Exec[''reboot-soon''] is applied after all other resources. Although I''m not a great fan of run stages, this looks like a good use case for them. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZtpVMqFw7G8J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Sandra Schlichting
2012-Aug-29 14:39 UTC
[Puppet Users] Re: How to purge network-manager (requires reboot) ?
Hi John That is a very interesting solution! I had to look up what "provider" and "refreshonly" did. They seam to be very useful for other situations as well! Thanks =) Hugs, Sandra On Wednesday, 29 August 2012 16:04:32 UTC+2, jcbollinger wrote:> > > > On Wednesday, August 29, 2012 6:48:04 AM UTC-5, Sandra Schlichting wrote: >> >> Hi all =) >> >> I would like to purge the following packages >> >> network-manager >> >> network-manager-gnome >> >> network-manager-pptp >> >> network-manager-pptp-gnome >> >> >> but the problem is, that I suppose a reboot is required for the NIC''s no longer to be manged by network-manager? >> >> >> How would you work around this? >> >> > Like Krzysztof, I''m not certain that a reboot is required. On the other > hand, Network Manager is a tricky and sometimes pesky little beast, so > maybe a reboot really is required. I can''t advise you on avoiding a > reboot, but if you really do need one, then you can probably make Puppet > schedule one using something along these lines: > > exec { ''reboot-soon'': > command => ''/usr/bin/nohup /sbin/shutdown -r +5 &'', > provider => ''sh'', > subscribe => Package[''network-manager''], > refreshonly => true, > } > > That will reboot the system whenever Puppet changes the ''network-manager'' > package (which must already have been declared elsewhere). The five-minute > delay designated by the "+5" argument serves two purposes: > > 1. To allow the Puppet run to complete before the reboot (see also > below) > 2. To give an admin who happens to be logged in a chance to cancel the > restart > > With respect to the delay time, there is an unavoidable race condition > here, because you can''t really predict how much longer Puppet will take to > finish up, especially if the system is heavily loaded. You can largely > mitigate that, however, by ensuring that Exec[''reboot-soon''] is applied > after all other resources. Although I''m not a great fan of run stages, > this looks like a good use case for them. > > > John > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/sd-y4s4qZ5MJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.