exec resource stuck during the install of an Oracle Client on Windows

66 views
Skip to first unread message

Louis Coilliot

unread,
Jun 11, 2018, 11:38:52 AM6/11/18
to puppet...@googlegroups.com
Hello,

I'm trying to install an Oracle client on Windows with the "Oracle Universal Installer".

The command works fine manually in a command prompt :

P:\oracle_client\winx64_12102_client\client\setup.exe -silent -nowelcome -nowait -responseFile D:\resources\client.rsp

or

C:\Windows\System32 /c "P:\oracle_client\winx64_12102_client\client\setup.exe -silent -nowelcome -nowait -responseFile D:\resources\client.rsp"

In the command window it launches a new install window and gives back the command prompt immediately.  In the new window, the install is fine and in the end the window is closing automatically.

Note that it gives back the prompt immediately and that the installer runs in another window.

Doing this in an exec resource with puppet, it gets stuck

- the installer window is launched
- the installation process is OK
- the installer window is closed automatically
- the puppet agent gets stuck

Then I need to kill the command window with the puppet agent run to kill the puppet run.

When I do that, the Oracle client is installed and working. A new run won't try to install it again.

And the software is present in the installed software list.

Here is the code :

  $winpath = "C:\\Windows\\System32"

  $orainstcmd = [
    #"${winpath}\\cmd.exe /c",
    #"\"",
    "P:\\oracle_client\\winx64_12102_client\\client\\setup.exe",
    '-silent',
    '-nowelcome',
    '-nowait',
    "-responseFile D:\\resources\\client.rsp",
    #"\"",
  ]

  $orainstcmdstr = join($orainstcmd, ' ')

  $tstcommand = "${winpath}\\cmd.exe /c \"if exist D:\\Oracle\\sqlplus.exe (exit 0) else (exit 1)\""

  exec { 'install_ora64_client':
      command => $orainstcmdstr,
      require => [
        Exec['Map resource drive'],
        File['d:\\resources\client.rsp'],
      ],
      unless  => $tstcommand,
      timeout => 240,
  }

The timeout is not helping.

-silent: Runs Oracle Universal Installer in silent mode and suppresses the Welcome window.

-nowait: Closes the console window when the silent installation completes.

Any hints ?

Thanks in advance.

Regards,

Louis Coilliot

Louis Coilliot

unread,
Jun 12, 2018, 4:45:31 AM6/12/18
to puppet...@googlegroups.com
Hello,

I managed to make it work with an other strategy :

  
  $instoracltps1 = 'd:\\resources\\installoraclt.ps1'
  
  exec { 'install_ora64_client':
      command => "${pwshellbin} -executionpolicy remotesigned -file ${instoracltps1}",
      # (...)  
}

The powershell script is :

$env:SEE_MASK_NOZONECHECKS = 1
$args = "-silent -force -noconsole -nowelcome -nowait -responseFile D:\resources\client.rsp"
Start-Process "P:\oracle_client\winx64_12102_client\client\setup.exe" -wait -ArgumentList $args | out-null

Installer argument -noconsole -> no new window

Powershell argument -wait -> wait for subprocess

Regards,

Louis Coilliot

John Gelnaw

unread,
Jun 12, 2018, 2:55:49 PM6/12/18
to Puppet Users

If I recall, you should be able to do something similar with the "start" command under cmd.exe:

start /wait <oracle install command>

Which is effectively what you're doing under powershell.

Reply all
Reply to author
Forward
0 new messages