Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions scripts/barclamp_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def usage()
exit_code = -3
end
end
bc_install_update_config_db barclamps, log
end

generate_navigation
Expand Down
12 changes: 12 additions & 0 deletions scripts/barclamp_mgmt_lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,18 @@ def check_schema_migration(bc)
return old_schema_revision != new_schema_revision
end

def bc_install_update_config_db(barclamps, log)
File.open(log, "a") do |f|
f.puts(
"======== Updating configuration DB for #{barclamps.join(", ")} -- " \
"#{Time.now.strftime("%c")} ========"
)
end
unless run_rake_task("crowbar:update_config_db[#{barclamps.join(" ")}]", log)
fatal "Failed to update configuration DB for #{barclamps.join(", ")}.", log
end
end

def get_rpm_file_list(rpm)
cmd = "rpm -ql #{rpm}"
file_list = `#{cmd}`.lines.map { |line| line.rstrip }
Expand Down
2 changes: 2 additions & 0 deletions scripts/install-chef-suse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,8 @@ do
# already installed
echo '{ "crowbar_wall": { "registering": true } }' | \
$chef_client --json-attributes /dev/stdin
# admin server got allocated an IP address, regenerate the config db
su -s /bin/sh - crowbar sh -c "cd /opt/dell/crowbar_framework && RAILS_ENV=production bin/rake crowbar:update_config_db"
else
$chef_client
fi
Expand Down