mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
M #-: Fix for wild vm import
New sunstone hardening in systemd caused errors in wild import due to lack of permissions in /tmp
This commit is contained in:
parent
62afe391b2
commit
b7c5dc6d93
@ -40,7 +40,7 @@ module VCenterDriver
|
||||
def lock
|
||||
return unless @locking
|
||||
|
||||
@locking_file = File.open('/tmp/vcenter-importer-lock', 'w')
|
||||
@locking_file = File.open('/var/tmp/vcenter-importer-lock', 'w')
|
||||
@locking_file.flock(File::LOCK_EX)
|
||||
end
|
||||
|
||||
@ -50,9 +50,9 @@ module VCenterDriver
|
||||
|
||||
@locking_file.close
|
||||
|
||||
return unless File.exist?('/tmp/vcenter-importer-lock')
|
||||
return unless File.exist?('/var/tmp/vcenter-importer-lock')
|
||||
|
||||
File.delete('/tmp/vcenter-importer-lock')
|
||||
File.delete('/var/tmp/vcenter-importer-lock')
|
||||
end
|
||||
|
||||
def vm?
|
||||
|
Loading…
x
Reference in New Issue
Block a user