Ask Your Question

Automatic timeout for package installation

asked 2014-12-10 07:55:27 -0600

Puppet user gravatar image

I am using agent 3.7.1 on Windows 7. Packages often get stuck in infinite loop during installation and make Puppet unusable until the problem is manually fixed.

Is there way to have Puppet automatically abort current installation and skip to next after x minutes?

Exec resource seems to have timeout function but package does not.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-12-10 21:49:18 -0600

GregLarkin gravatar image

You'll probably have to exec a "package install killer" script that waits in the background for a period of time before checking for package installs to kill.

However, it's probably better to figure out why you are getting so many problems with your package installs. Can you describe the infinite loop issue in more detail? Do you have a slow network connection, or is your machine heavily loaded?

The only time I've seen an issue with slow package installing is if a manual installation started up and then Puppet started just afterwards. In that case, the RPM DB will be locked, but it should clear out after the manual installation finishes.

edit flag offensive delete link more


Network or computer load should not be cause of problems. Network is reliable and computers are quite new and powerful. Most trouble has come from Adobe Flash Player. (Updating to from the earlier version). Maybe 30% of computers get stuck with it but the rest show no problems.

Puppet user gravatar imagePuppet user ( 2014-12-12 02:20:12 -0600 )edit

Sorry, I glossed over the fact that you're running on Windows. It's not a great solution, but maybe you should install everything except Flash with package resources. Then use an exec with a timeout to install Flash so it will be killed if it hangs.

GregLarkin gravatar imageGregLarkin ( 2014-12-12 12:27:28 -0600 )edit

Is there any way to use onlyif/unless to make sure the exec would be executed only if the latest version is not already installed. Otherwise it will try to run update every time and slow down the Puppet runs. I can't figure out way to create working conditional for this.

Puppet user gravatar imagePuppet user ( 2014-12-17 00:38:03 -0600 )edit

I'm no Windows expert, but I think you'll need to write a command to check for a registry key created by the Flash installer. I would expect such a key to contain a version string, too, so you could compare it against what you expect and either install the latest version or skip it.

GregLarkin gravatar imageGregLarkin ( 2014-12-17 21:09:57 -0600 )edit

This looks like a good place to start:

GregLarkin gravatar imageGregLarkin ( 2014-12-17 21:10:05 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-12-10 07:55:27 -0600

Seen: 504 times

Last updated: Dec 10 '14