1
0
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:
Christian González 2021-02-18 18:09:05 +01:00 committed by GitHub
parent 6c898796f1
commit f6e3c4ebbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 4 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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