Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Exec takes too long to run script

Below is the class for pushing content to agents and run the script

class push{ } class { 'staging': path => '/root/script', owner => 'root', group => 'root' }

staging::file { 'Linux-hardening.zip': source => 'puppet:///modules/push/Linux-hardening.zip' }

staging::extract { 'Linux-hardening.zip': target => '/root/script', creates => '/root/script/hardening', require => Staging::File['Linux-hardening.zip'], notify => Exec['Changing permissions of hardening script'], } exec{ "Changing permissions of hardening script": command => "chmod +x /root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", path => "/bin", logoutput => true, notify => Exec['Run hardening script'], } exec{ "Run hardening script": command => "/root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", logoutput => true,

path => "/root/script/Linux-hardening/Linux-hardening/hardening/"

}

Following is the output of puppet agent --test [After unzipping the tar file exec gets stuck at running "/root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh" command for at least 10 minutes

[root@umairtest ~]# puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for umairtest Info: Applying configuration version '1422162159' Notice: /Stage[main]/Staging/File[/root/script]/ensure: created Notice: /Stage[main]/Main/Staging::File[Linux-hardening.zip]/File[/root/script//Linux-hardening.zip]/ensure: defined content as '{md5}050e1cd8f5096eb5a7415ce574bfbc66' Notice: /Stage[main]/Main/Staging::Extract[Linux-hardening.zip]/Exec[extract Linux-hardening.zip]/returns: executed successfully Info: Staging::Extract[Linux-hardening.zip]: Scheduling refresh of Exec[Changing permissions of hardening script] Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]/returns: executed successfully Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script] Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Triggered 'refresh' from 1 events Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script]

Exec takes too long to run script

Below is the class for pushing content to agents and run the script

class push{ } class { 'staging': path => '/root/script', owner => 'root', group => 'root' }

staging::file { 'Linux-hardening.zip': source => 'puppet:///modules/push/Linux-hardening.zip' }

staging::extract { 'Linux-hardening.zip': target => '/root/script', creates => '/root/script/hardening', require => Staging::File['Linux-hardening.zip'], notify => Exec['Changing permissions of hardening script'], } exec{ "Changing permissions of hardening script": command => "chmod +x /root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", path => "/bin", logoutput => true, notify => Exec['Run hardening script'], } exec{ "Run hardening script": command => "/root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", logoutput => true,

path => "/root/script/Linux-hardening/Linux-hardening/hardening/"

}

Following is the output of puppet agent --test [After unzipping the tar file exec gets stuck at running "/root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh" command for at least 10 minutes

[root@umairtest ~]# puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for umairtest Info: Applying configuration version '1422162159' Notice: /Stage[main]/Staging/File[/root/script]/ensure: created Notice: /Stage[main]/Main/Staging::File[Linux-hardening.zip]/File[/root/script//Linux-hardening.zip]/ensure: defined content as '{md5}050e1cd8f5096eb5a7415ce574bfbc66' Notice: /Stage[main]/Main/Staging::Extract[Linux-hardening.zip]/Exec[extract Linux-hardening.zip]/returns: executed successfully Info: Staging::Extract[Linux-hardening.zip]: Scheduling refresh of Exec[Changing permissions of hardening script] Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]/returns: executed successfully Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script] Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Triggered 'refresh' from 1 events Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script]script] Error: Command exceeded timeout Wrapped exception: execution expired Error: /Stage[main]/Main/Exec[Run hardening script]/returns: change from notrun to 0 failed: Command exceeded timeout

Exec takes too long to run script

Below is the class for pushing content to agents and run the script

class push{ } class { 'staging': path => '/root/script', owner => 'root', group => 'root' }

staging::file staging::deploy { 'Linux-hardening.zip': source => 'puppet:///modules/push/Linux-hardening.zip' 'puppet:///modules/push/Linux-hardening.zip', target => '/root', notify => Exec['Changing permissions of hardening script'] }

staging::extract { 'Linux-hardening.zip': target => '/root/script', creates => '/root/script/hardening', require => Staging::File['Linux-hardening.zip'], notify => Exec['Changing permissions of hardening script'], } exec{ "Changing permissions of hardening script": command => "chmod +x /root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", /root/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", path => "/bin", logoutput => true, notify => Exec['Run hardening script'], } Script'], }

exec{ "Run hardening script": Script": command => "/root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", "/root/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", logoutput => true,

path => "/root/script/Linux-hardening/Linux-hardening/hardening/"

true, }

Following is the output of puppet agent --test [After unzipping the tar file exec gets stuck at running "/root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh" command. I dont know why its taking too long to just run a simple command for at least 10 minuteswhich will run the script.

[root@umairtest ~]# puppet agent --test Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for umairtest Info: Applying configuration version '1422162159' Notice: /Stage[main]/Staging/File[/root/script]/ensure: created Notice: /Stage[main]/Main/Staging::File[Linux-hardening.zip]/File[/root/script//Linux-hardening.zip]/ensure: defined content as '{md5}050e1cd8f5096eb5a7415ce574bfbc66' Notice: /Stage[main]/Main/Staging::Extract[Linux-hardening.zip]/Exec[extract Linux-hardening.zip]/returns: executed successfully Info: Staging::Extract[Linux-hardening.zip]: Scheduling refresh of Exec[Changing permissions of hardening script] Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]/returns: executed successfully Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script] Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Triggered 'refresh' from 1 events Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script] Error: Command exceeded timeout Wrapped exception: execution expired Error: /Stage[main]/Main/Exec[Run hardening script]/returns: change from notrun to 0 failed: Command exceeded timeout

Exec takes too long to run script

Below is the class for pushing content to agents and run the script

class push{
}
staging::deploy { 'Linux-hardening.zip':
  source => 'puppet:///modules/push/Linux-hardening.zip',
  target => '/root',
  notify =>  Exec['Changing permissions of hardening script']
}

} exec{ "Changing permissions of hardening script": command => "chmod +x /root/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", path => "/bin", logoutput => true, notify => Exec['Run Script'], }

} exec{ "Run Script": command => "/root/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh", logoutput => true, }

}

Following is the output of puppet agent --test [After unzipping the tar file exec gets stuck at running "/root/script/Linux-hardening/Linux-hardening/hardening/hardeingscript.sh" command. I dont know why its taking too long to just run a simple command which will run the script.

[root@umairtest ~]# puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for umairtest
Info: Applying configuration version '1422162159'
Notice: /Stage[main]/Staging/File[/root/script]/ensure: created
Notice: /Stage[main]/Main/Staging::File[Linux-hardening.zip]/File[/root/script//Linux-hardening.zip]/ensure: defined content as '{md5}050e1cd8f5096eb5a7415ce574bfbc66'
Notice: /Stage[main]/Main/Staging::Extract[Linux-hardening.zip]/Exec[extract Linux-hardening.zip]/returns: executed successfully
Info: Staging::Extract[Linux-hardening.zip]: Scheduling refresh of Exec[Changing permissions of hardening script]
Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]/returns: executed successfully
Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script]
Notice: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Triggered 'refresh' from 1 events
Info: /Stage[main]/Main/Exec[Changing permissions of hardening script]: Scheduling refresh of Exec[Run hardening script]
Error: Command exceeded timeout
Wrapped exception:
execution expired
Error: /Stage[main]/Main/Exec[Run hardening script]/returns: change from notrun to 0 failed: Command exceeded timeout

timeout