dsk61780 2013-12-05 13:20
浏览 60

Composer更新通过puppet运行了

I'm using composer to manage dependencies. And basically want I want to do is automatically run composer update in puppet config when vagrant up is running.

I'm using puphpet to generate puppet files for vagrant.

I added composer::exec section in this code in the default.pp file:

if $php_values['composer'] == 1 {
  class { 'composer':
    target_dir      => '/usr/local/bin',
    composer_file   => 'composer',
    download_method => 'curl',
    logoutput       => true,
    tmp_path        => '/tmp',
    php_package     => "${php::params::module_prefix}cli",
    curl_package    => 'curl',
    suhosin_enabled => false,
  }

  composer::exec { 'composer-update':
    cmd             => 'update',
    cwd             => '/var/www/myproject'
  }
}

Some times I'm getting this error in output:

Error: Command exceeded timeout
Error: /Stage[main]//Composer::Exec[composer-update]/Exec[composer_update_composer-update]/returns: change from notrun to 0 failed: Command exceeded timeout

And there is no timeout property in puppet composer.

How to solve it?

  • 写回答

1条回答

  • douejuan9162 2013-12-07 21:24
    关注

    Take a look at http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-timeout - it is possible to set a timeout for an exec resource. If the puppet composer module does not provide an option to override that, it really should IMO. And if by a chance it is composer itself that's timing out, not puppet exec, you'd wanna try

    export COMPOSER_PROCESS_TIMEOUT=600
    
    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?