mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
B #: Fix minor issues of Firecracker provision (#840)
- set `opennebula_ssh_deploy_private_key` to make sure HVs can see each other. - Add network hooks remote execution (clean) - Rename Elastic.rb to elastic.rb
This commit is contained in:
parent
6c898796f1
commit
f6e3c4ebbb
@ -1596,7 +1596,7 @@ NETWORK_VCENTER_FILES="src/vnm_mad/remotes/vcenter/pre \
|
||||
src/vnm_mad/remotes/vcenter/clean \
|
||||
src/vnm_mad/remotes/vcenter/update_sg"
|
||||
|
||||
NETWORK_ELASTIC_FILES="src/vnm_mad/remotes/elastic/Elastic.rb \
|
||||
NETWORK_ELASTIC_FILES="src/vnm_mad/remotes/elastic/elastic.rb \
|
||||
src/vnm_mad/remotes/elastic/clean \
|
||||
src/vnm_mad/remotes/elastic/post \
|
||||
src/vnm_mad/remotes/elastic/pre \
|
||||
|
@ -22,3 +22,6 @@
|
||||
defaults:
|
||||
configuration:
|
||||
oneprovision_hypervisor: 'firecracker'
|
||||
|
||||
# required for copying recovery VM snaphosts to the replica host
|
||||
opennebula_ssh_deploy_private_key: true
|
||||
|
@ -42,7 +42,8 @@ $LOAD_PATH << File.dirname(__FILE__)
|
||||
$LOAD_PATH << File.join(File.dirname(__FILE__), '..')
|
||||
$LOAD_PATH << LIB_LOCATION + '/oneprovision/lib'
|
||||
|
||||
require 'Elastic'
|
||||
require 'elastic'
|
||||
require 'CommandManager'
|
||||
|
||||
template64 = STDIN.read
|
||||
hostname = ARGV[0]
|
||||
@ -52,7 +53,7 @@ begin
|
||||
|
||||
drv.unassign
|
||||
|
||||
drv.run_hooks(ARGV, template64) if drv.deactivate == 0
|
||||
drv.run_hooks_remote(ARGV, template64) if drv.deactivate == 0
|
||||
rescue StandardError => e
|
||||
OpenNebula.log_error(e.message)
|
||||
OpenNebula.log_error(e.backtrace)
|
||||
|
@ -42,7 +42,7 @@ $LOAD_PATH << File.dirname(__FILE__)
|
||||
$LOAD_PATH << File.join(File.dirname(__FILE__), '..')
|
||||
$LOAD_PATH << LIB_LOCATION + '/oneprovision/lib'
|
||||
|
||||
require 'Elastic'
|
||||
require 'elastic'
|
||||
|
||||
template64 = STDIN.read
|
||||
|
||||
|
@ -316,6 +316,16 @@ module VNMMAD
|
||||
0
|
||||
end
|
||||
|
||||
def run_hooks_remote(args, stdin)
|
||||
hostname = args[0]
|
||||
|
||||
cmd = "run-parts #{$PROGRAM_NAME}.d".gsub('/var/lib/one/remotes',
|
||||
'/var/tmp/one')
|
||||
args.each {|arg| cmd << " --arg=\"#{arg}\"" }
|
||||
|
||||
SSHCommand.run(cmd, hostname, nil, stdin, 60)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# returns files sorted alphabetically
|
||||
|
Loading…
x
Reference in New Issue
Block a user