Project

Profile

Help

Task #7142

Create function that makes clone of libvirt machine/node by its name

Added by Alexander Kaluzhny almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
28.06.2016
Due date:
% Done:

0%

Estimated time:
Target branch:
Test scenario:

Run:
./mdbci --template spec/test_machine_configurations/7142_test_config.json generate libvirt_ubuntu_test/

Run:
./mdbci up libvirt_ubuntu_test/

Run:
path_to_nodes=libvirt_ubuntu_test node_name=node0 rspec spec/unit/7142_clone_libvirt_node.rb

Expect:
5 examples, 0 failures


Description

Create function that makes clone of libvirt machine/node by its name.
Function parameters:
  • path to nodes(relative path in mdbci/ folder)
  • node name (like: node0)
  • path to new config directory (like: NEW_CONF_T)

How to make libvirt clone is described here: https://dev.osll.ru/projects/mdbci/wiki/Libvirt_machines_cloning.
Cloned machine should have generated name from two variable: new config directory name and node name, devided by underscore (like NEW_CONF_T_node0)
Function must throw exception if node or config directory or node are not found.
Function must throw exception if machine origin is in running state.
Function must be implemented in file clone.rb in core/ directory


Related issues

Related to [mdbci] Maria DB Continuous integration tool - Task #7100: Implement "mdbci clone <configuration> <new_path>" commandClosed22.06.2016

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Alexander Kaluzhny almost 5 years ago

  • Related to Task #7100: Implement "mdbci clone <configuration> <new_path>" command added

#2 Updated by Alexander Kaluzhny almost 5 years ago

  • Description updated (diff)

#3 Updated by Alexander Kaluzhny almost 5 years ago

  • Description updated (diff)

#4 Updated by Alexander Kaluzhny almost 5 years ago

  • Description updated (diff)

#5 Updated by Alexander Kaluzhny almost 5 years ago

  • Sprint/Milestone set to 0.9

#6 Updated by Mark Zaslavskiy almost 5 years ago

  • Assignee set to Alexander Kaluzhny

#7 Updated by Alexander Kaluzhny almost 5 years ago

  • Status changed from New to Active / In progress

#9 Updated by Alexander Kaluzhny almost 5 years ago

  • Status changed from Active / In progress to Review
  • Assignee changed from Alexander Kaluzhny to Mark Zaslavskiy

#10 Updated by Mark Zaslavskiy almost 5 years ago

Got this at maxscale-jenkins


ERROR:  setlocale: No such file or directory
ERROR:  setlocale: No such file or directory
running
.ERROR:  setlocale: No such file or directory
ERROR:  setlocale: No such file or directory
.ERROR:  setlocale: No such file or directory
ERROR:  setlocale: No such file or directory
.91b77d8b-e987-4f58-9170-aaf8c935e858
ERROR:  setlocale: No such file or directory
ERROR:  setlocale: No such file or directory
libvirt_ubuntu_test_node0
ERROR:  setlocale: No such file or directory
.

Failures:

  1)  create clone of libvirt container to new image
     Failure/Error: new_domain_name = create_libvirt_node_clone(ENV['path_to_nodes'], ENV['node_name'], "#{ENV['path_to_nodes']}_clone")

     Errno::ENOENT:
       virt-clone -o libvirt_ubuntu_test_node0 -n libvirt_ubuntu_test_clone_node0_1467725556 --auto-clone: command exited with non zero exit code
     # ./core/helper.rb:62:in `execute_bash'
     # ./core/clone.rb:53:in `create_libvirt_node_clone'
     # ./spec/unit/7142_clone_libvirt_node.rb:33:in `block (2 levels) in <top (required)>'

Finished in 22.52 seconds (files took 0.18484 seconds to load)
5 examples, 1 failure

Failed examples:

rspec ./spec/unit/7142_clone_libvirt_node.rb:28 #  create clone of libvirt container to new image

#11 Updated by Mark Zaslavskiy almost 5 years ago

  • Status changed from Review to New
  • Assignee changed from Mark Zaslavskiy to Alexander Kaluzhny

#12 Updated by Alexander Kaluzhny almost 5 years ago

  • Status changed from New to Review
  • Assignee changed from Alexander Kaluzhny to Mark Zaslavskiy

#13 Updated by Mark Zaslavskiy almost 5 years ago

  • Status changed from Review to Closed

Also available in: Atom PDF