Project

Profile

Help

Task #7109

Refactor def ssh(args)

Added by Mark Zaslavskiy about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
High
Category:
mdbci features
Sprint/Milestone:
Start date:
23.06.2016
Due date:
% Done:

100%

Estimated time:
3:00 h
Spent time:
Target branch:
Test scenario:

# 1. Generate node (echo $? => 0)
./mdbci --template confs/docker_lite.json generate SOME_DIR

# 2. Up node\nodes (echo $? => 0).
./mdbci up SOME_DIR

# 3. Need write some command at node from ssh:
# 3.1 Change directory to config:
cd ~/mdbci/SOME_DIR
# 3.2 Enter with ssh:
vagrant ssh galera0
# 3.2 Write some command at "script.sh", for example, copy script from /mdbci/scripts/run_integration_tests.sh:
nano script.sh
#crtl+v some text and ctrl+o to save, ctrl+x exit.
# 3.3. For check, should be a created script.sh file:
ls
# Or open the created file:
cat script.sh
# 3.4 Exit from vagrant ssh
exit

# 4. Run created script (will see script at console and echo $?=>0)
./mdbci ssh --command "cat script.sh" SOME_DIR/galera0

# 5. Run test (echo $?=>0)
pathToConfigToVBOXNode=SOME_DIR/galera0 rspec spec/unit/7109_ssh_spec.rb


Description

https://github.com/OSLL/mdbci/blob/4a68ae9f1f9c8bf3f45cb622607e751a2466e1b8/core/session.rb#L193
Function:
- should not contain code duplications
- should work with arguments in transparently way (for exmaple - all args[i] should be replaced for human readable and understandable name)
- exit code magic should be converted to raise
- split for two functions:
-- the first which returns its result as string in return
-- the second just wraps first and print it to $out.out
- add integration test for the whole command "ssh"

up_log.txt (359 KB) up_log.txt Ilfat Kinyaev, 05.07.2016 09:57

Related issues

Related to [mdbci] Maria DB Continuous integration tool - Task #7102: Collect info from set_environment during mdbci up and put it to text file in case of successful upClosed22.06.2016

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

History

#1 Updated by Mark Zaslavskiy about 4 years ago

  • Related to Task #7102: Collect info from set_environment during mdbci up and put it to text file in case of successful up added

#2 Updated by Mark Zaslavskiy about 4 years ago

  • Assignee set to Ilfat Kinyaev

#3 Updated by Mark Zaslavskiy about 4 years ago

  • Sprint/Milestone changed from 0.83 to 0.9

#4 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Active / In progress
  • Estimated time set to 3:00 h

#5 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from Active / In progress to New
  • % Done changed from 0 to 60
  • Test scenario updated (diff)

#7 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Active / In progress

#8 Updated by Ilfat Kinyaev about 4 years ago

  • % Done changed from 60 to 70
  • Test scenario updated (diff)

#9 Updated by Ilfat Kinyaev about 4 years ago

  • % Done changed from 70 to 90
  • Test scenario updated (diff)

#10 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from Active / In progress to Review
  • Assignee changed from Ilfat Kinyaev to Alexander Kaluzhny
  • % Done changed from 90 to 100

#11 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from Review to Active / In progress
  • Assignee changed from Alexander Kaluzhny to Ilfat Kinyaev
  • % Done changed from 100 to 90

#12 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from Active / In progress to Review
  • Assignee changed from Ilfat Kinyaev to Alexander Kaluzhny
  • % Done changed from 90 to 100

#13 Updated by Alexander Kaluzhny about 4 years ago

  • Status changed from Review to New
  • Assignee changed from Alexander Kaluzhny to Ilfat Kinyaev

./mdbci ssh --command "./install.shh" aws_suse_test/node0 --silent
Connection to ec2-54-74-86-75.eu-west-1.compute.amazonaws.com closed.
bash: ./install.shh: No such file or directory

Command on host returned non zero exit code, mdbci ended with exit code 1 but no exceptions thrown.

#14 Updated by Ilfat Kinyaev about 4 years ago

Can't check ssh, because problem with ./mdbci up, log in up_log.txt.

#15 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Active / In progress
  • Test scenario updated (diff)

#16 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from Active / In progress to New
  • % Done changed from 50 to 90

Waiting for resolve bug: https://dev.osll.ru/issues/7206

#17 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Review
  • Assignee changed from Ilfat Kinyaev to Alexander Kaluzhny
  • % Done changed from 90 to 100

Last bug have not progress, maybe check it another way?

#18 Updated by Mark Zaslavskiy about 4 years ago

  • Priority changed from Normal to High

#19 Updated by Alexander Kaluzhny about 4 years ago

  • Status changed from Review to New
  • Assignee changed from Alexander Kaluzhny to Ilfat Kinyaev

#20 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Active / In progress

#22 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from Active / In progress to New

#24 Updated by Mark Zaslavskiy about 4 years ago

It is ok - just restart it.

#25 Updated by Ilfat Kinyaev about 4 years ago

  • Status changed from New to Review
  • Assignee changed from Ilfat Kinyaev to Mark Zaslavskiy

#26 Updated by Mark Zaslavskiy about 4 years ago

  • Status changed from Review to Closed

Also available in: Atom PDF