Hi, I have an exec command that executed successfully, but when checking the processes it did not run the command. --manifest-- 179 exec { "sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp": 180 alias => oracle_installed, 181 require => [User["oracle_user"], 182 Exec["oracle_dl"], 183 Exec["oracle_extracted"], 184 File["responsefile"], 185 File["oracle_installation_dir"], 186 File["oracle_orainventory_dir"], 187 File["oracle_dir"]], 188 path => ["/usr/bin", "/usr/sbin", "/bin", "/sbin"], 190 user => oracle, 191 creates => "/var/puppet/state/oracleinstalled", --log says-- Fri Oct 16 11:04:42 +0000 2009 //Node[basenode]/oraclecube/Exec[sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp] (debug): Changing returns Fri Oct 16 11:04:42 +0000 2009 //Node[basenode]/oraclecube/Exec[sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp] (debug): 1 change(s) Fri Oct 16 11:04:42 +0000 2009 //Node[basenode]/oraclecube/Exec[sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp] (debug): Executing ''sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp'' Fri Oct 16 11:04:42 +0000 2009 Puppet (debug): Executing ''sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp'' Fri Oct 16 11:04:47 +0000 2009 //Node[basenode]/oraclecube/Exec[sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp]/returns (notice): executed successfully --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
> I have an exec command that executed successfully, but when checking the > processes it did not run the command.version etc? If puppet tells you that the exec ran successfully the cmd exited with exit code 0. cheers pete --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
Yes, it did return exit 0, that''s why it''s weird Peter Meier wrote:>> I have an exec command that executed successfully, but when checking the >> processes it did not run the command. > > version etc? > > If puppet tells you that the exec ran successfully the cmd exited with > exit code 0. > > cheers pete >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
> Yes, it did return exit 0, that''s why it''s weirdwell, then it''s rather a weird behavior of your cmd. cheers pete --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
This is the log snippet that says my command executed successfully --begin-- Sat Oct 17 18:02:24 +0000 2009 //Node[basenode]/oraclecube/Exec[sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp &] (debug): 1 change(s) Sat Oct 17 18:02:24 +0000 2009 //Node[basenode]/oraclecube/Exec[sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp &] (debug): Executing ''sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp &'' Sat Oct 17 18:02:24 +0000 2009 Puppet (debug): Executing ''sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp &'' Sat Oct 17 18:02:24 +0000 2009 //Node[basenode]/oraclecube/Exec[sh /mnt/oracle-installation/database/runInstaller -silent -ignoreDiskWarning -responsefile /mnt/oracle-installation/database/oracle-11g_SE.rsp &]/returns (notice): executed successfully --end-- but when checking the processlist, runInstaller is not there Peter Meier wrote:>> Yes, it did return exit 0, that''s why it''s weird > > well, then it''s rather a weird behavior of your cmd. > > cheers pete > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
> but when checking the processlist, runInstaller is not thereHmm, why do you send the installer to the background? The whole idea of puppet is that it manages the state of your resources. In your case this is now the resource oracle which should be in the state "installed" (maybe even more, but this is what we are talking now about). But if you send the installer to the background and let puppet terminate the state of your resource can''t be known to puppet. Anyway I tried to run exec{"/usr/bin/yes foo &": } with puppet and the process was still there so this works theoretically. But I don''t see it as a good idea anyway, as backgrounding a process always exits with 0: $ /bin/false & [1] 6966 $ echo $? 0 [1]+ Exit 1 /bin/false as the process was always successfully backgrounded. so you''ll never know with which exitcode the process actually exited and you''ll never know the actual state nor if there have been any problems. I assume that your installer exits later with something different than 0 and even prints out a message, but as puppet isn''t catching anymore any output of this process you don''t even see it. What if you take the & away? cheers pete --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
I tried to run it both ways, background and not, still the same issue. Peter Meier wrote:>> but when checking the processlist, runInstaller is not there > > Hmm, why do you send the installer to the background? The whole idea of > puppet is that it manages the state of your resources. In your case this > is now the resource oracle which should be in the state "installed" > (maybe even more, but this is what we are talking now about). But if you > send the installer to the background and let puppet terminate the state > of your resource can''t be known to puppet. > > Anyway I tried to run exec{"/usr/bin/yes foo &": } with puppet and the > process was still there so this works theoretically. But I don''t see it > as a good idea anyway, as backgrounding a process always exits with 0: > > $ /bin/false & > [1] 6966 > $ echo $? > 0 > [1]+ Exit 1 /bin/false > > as the process was always successfully backgrounded. > > so you''ll never know with which exitcode the process actually exited and > you''ll never know the actual state nor if there have been any problems. > > I assume that your installer exits later with something different than 0 > and even prints out a message, but as puppet isn''t catching anymore any > output of this process you don''t even see it. > > What if you take the & away? > > cheers pete > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---
Hi, pinoyskull wrote:> I tried to run it both ways, background and not, still the same issue.You''re assuming the OUI (runInstaller) is actually reporting a problem when it exits. This is not always the case. I would recommend not running runInstaller directly with exec{}. Rather, wrap it into a shell script so that you have more control over exit values. At the very least, pipe the output of the command to something like /tmp/db-install.log just for testing to see what happens when the command runs. Also, look for /tmp/OraInstall* directories. The OUI silent installer should create those while it runs. cYa, Avi --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. 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 -~----------~----~----~----~------~----~------~--~---