chef-cookbooks / chef_client_updater

Chef Cookbook to update the chef client on nodes
https://supermarket.chef.io/cookbooks/chef_client_updater
Apache License 2.0
54 stars 79 forks source link

chef not installing in same path as previous version #205

Closed seeven-kathan closed 4 years ago

seeven-kathan commented 4 years ago

Hello,

I am facing an issuer using chef_client_updater. I have used the attribute ["chef_client_updater"]["chef_install_path"] to specify the path where chef is installed. Somehow, when the powershell(after chef create it on the machine) script doing the installation of the new version, is not taking any argument to point the install location. the rendered command is as follows in the chef_upgrade.ps1 file (#L565):

$p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /i $msi ADDLOCAL=`"ChefClientFeature,ChefServiceFeature`"" -Passthru -Wait -NoNewWindow

is it possible to make it something that :

$p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /i $msi ADDLOCAL=`"ChefClientFeature,ChefServiceFeature`" INSTALLLOCATION=`"$msi_install_path`"" -Passthru -Wait -NoNewWindow

where $msi_install_pathbe the value of ["chef_client_updater"]["chef_install_path"]?

Thank you for your help. Regards, Seeven

seeven-kathan commented 4 years ago

Hello, anyone can help? thanks, Regards, Seeven

Nirbhay1997 commented 4 years ago

@seeven-kathan Currently, we don't support installing chef-client on windows at a custom location, Even though we can force the MSI installer to change the installation directory to some other location but the resultant installation will be broken(Cannot be done by modifying chef_client_updater) References: https://github.com/chef-cookbooks/chef_client_updater/pull/80#issuecomment-353213646 https://github.com/chef-cookbooks/chef_client_updater/pull/166#issuecomment-555741634

tas50 commented 4 years ago

Closing based on @Nirbhay1997's comment.

pratixha commented 2 years ago

With reference to @Nirbhay1997's comment #https://github.com/chef-cookbooks/chef_client_updater/issues/205#issuecomment-685427918 We have updated documents in #245