Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASM-7104 Raise error for software update if there were some or no VIBs failed to install #128

Merged
merged 1 commit into from
Jul 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/puppet/provider/esx_software_update/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ def create
Puppet.debug("Attempting to install the VIB: #{vib_url}")
install_results = install_vib vib_url
installed_vibs += install_results[:VIBsInstalled]
skipped_vibs += install_results[:VIBsSkipped]
skipped_vibs += install_results[:VIBsSkipped] if install_results[:VIBsSkipped]
reboot_required ||= install_results[:RebootRequired]
end
if installed_vibs.length == @actionable_vibs.length
Puppet.info("Successfully installed the VIBs")
elsif installed_vibs.length > 0
Puppet.info("Successfully installed following VIBs : #{installed_vibs}")
Puppet.info("Skipped installing following VIBs : #{skipped_vibs}")
if installed_vibs.length + skipped_vibs.length < @actionable_vibs.length
raise "Some VIBs failed to install"
end
else
raise "no VIBs installed"
end
# Unmount all NFS stores we mounted
unmount_mounted_nfs_shares
reboot_and_wait_for_host if reboot_required
else
raise "No VIBs to update"
end
rescue Exception => e
unmount_mounted_nfs_shares
Expand Down