Project

Profile

Help

Task #7032

Make aws config file existance optional

Added by Mark Zaslavskiy over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
mdbci features
Sprint/Milestone:
Start date:
09.06.2016
Due date:
% Done:

0%

Estimated time:
Target branch:
Test scenario:

http://maxscale-jenkins.mariadb.com:8090/job/mdbci_integration_test/407/

https://github.com/OSLL/mdbci/pull/267

1) delete aws-config.yml:

rm aws-config.yml

generate with aws template:

./mdbci --template confs/aws_lite.json generate aws

INFO: Load AWS config from aws-config.yml
ERROR: AWS configuration file not found
ERROR: No such file or directory - aws-config.yml
ERROR: ./mdbci:127:in `<main>'
ERROR: /home/vagranttest/mdbci_berlenko_/core/session.rb:446:in `commands'
ERROR: /home/vagranttest/mdbci_berlenko_/core/session.rb:517:in `generate'
ERROR: /home/vagranttest/mdbci_berlenko_/core/exception_handler.rb:6:in `handle'
ERROR: /home/vagranttest/mdbci_berlenko_/core/session.rb:517:in `block in generate'
ERROR: /usr/lib/ruby/1.9.1/psych.rb:297:in `load_file'
ERROR: /usr/lib/ruby/1.9.1/psych.rb:297:in `open'
ERROR: /usr/lib/ruby/1.9.1/psych.rb:297:in `initialize'
ERROR: /home/vagranttest/mdbci_berlenko_/core/exception_handler.rb:15:in `exit'
/home/vagranttest/mdbci_berlenko_/core/exception_handler.rb:15:in `rescue in handle'
/home/vagranttest/mdbci_berlenko_/core/exception_handler.rb:5:in `handle'
/home/vagranttest/mdbci_berlenko_/core/session.rb:517:in `generate'
/home/vagranttest/mdbci_berlenko_/core/session.rb:446:in `commands'
./mdbci:127:in `<main>'
ERROR: exit

generate with docker template:

./mdbci --template confs/docker_lite.json generate docker
....
(there are not errors/exceptions) - it's OK

./mdbci up docker
....
All nodes successfully up!

2) remove "aws_config" : "../aws-config.yml" in confs/aws_lite.json, but aws-config.yml exists

./mdbci --template confs/aws_lite.json generate aws1

ERROR: /home/vagranttest/mdbci_berlenko_/core/session.rb:515:in `generate'
/home/vagranttest/mdbci_berlenko_/core/session.rb:446:in `commands'
./mdbci:127:in `<main>'
ERROR: The path of configuration aws file is not specified

./mdbci --template confs/docker_lite.json generate docker
....
(there are not errors/exceptions) - it's OK

./mdbci up docker/
...

All nodes successfully up!

3) file and "aws_config" : "../aws-config.yml" line exist

./mdbci --template confs/aws_lite.json generate aws1
....
(there are not errors/exceptions) - it's OK
./mdbci up aws1
...
INFO: All nodes successfully up!


Description

Mdbci should not require aws_config (file in root directory and directive in configs) for non aws related actions.

History

#1 Updated by Tatyana Berlenko over 5 years ago

  • Status changed from New to Active / In progress

#2 Updated by Mark Zaslavskiy over 5 years ago

  • Sprint/Milestone changed from 0.83 to 0.9

#3 Updated by Mark Zaslavskiy over 5 years ago

  • Status changed from Active / In progress to New

#4 Updated by Mark Zaslavskiy over 5 years ago

  • Description updated (diff)

#5 Updated by Tatyana Berlenko over 5 years ago

  • Estimated time set to 1:00 h

#6 Updated by Tatyana Berlenko over 5 years ago

  • Status changed from New to Active / In progress

#7 Updated by Tatyana Berlenko over 5 years ago

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

#8 Updated by Tatyana Berlenko over 5 years ago

  • Assignee changed from Tatyana Berlenko to Mark Zaslavskiy

#9 Updated by Mark Zaslavskiy over 5 years ago

  • Status changed from Review to New
  • Assignee changed from Mark Zaslavskiy to Tatyana Berlenko

http://maxscale-jenkins.mariadb.com:8090/job/mdbci_integration_test/410/consoleFull
http://maxscale-jenkins.mariadb.com:8090/job/mdbci_integration_test/408

INFO:  Load configuration nodes from vagrant status ...
ERROR: /home/vagranttest/mdbci/core/network.rb:186:in `rescue in getIpWrapper'
/home/vagranttest/mdbci/core/network.rb:182:in `getIpWrapper'
/home/vagranttest/mdbci/core/network.rb:174:in `getNetwork'
/home/vagranttest/mdbci/core/network.rb:305:in `block in collectConfigurationNetworkInfo'
/home/vagranttest/mdbci/core/network.rb:303:in `each'
/home/vagranttest/mdbci/core/network.rb:303:in `collectConfigurationNetworkInfo'
/home/vagranttest/mdbci/core/network.rb:290:in `block in printConfigurationNetworkInfoToFile'
/usr/lib/ruby/1.9.1/open-uri.rb:35:in `open'
/usr/lib/ruby/1.9.1/open-uri.rb:35:in `open'
/home/vagranttest/mdbci/core/network.rb:289:in `printConfigurationNetworkInfoToFile'
/home/vagranttest/mdbci/core/session.rb:779:in `up'
/home/vagranttest/mdbci/core/session.rb:448:in `commands'
./mdbci:127:in `&lt;main&gt;'
ERROR: Incorrect node

#10 Updated by Tatyana Berlenko over 5 years ago

  • Status changed from New to Active / In progress

#11 Updated by Mark Zaslavskiy over 5 years ago

- check all usages of awsConfigFile variable
- use https://github.com/OSLL/mdbci/pull/271/files for ensuring what exception is raised in ERROR: /home/vagranttest/mdbci/core/network.rb:186:in `rescue in getIpWrapper'
- check that does not ommit some output | exception $exception_handler.handle

#12 Updated by Mark Zaslavskiy over 5 years ago

  • Status changed from Active / In progress to New

#13 Updated by Tatyana Berlenko over 5 years ago

  • Status changed from New to Active / In progress

#14 Updated by Tatyana Berlenko over 5 years ago

#<Node:0x00000002ebd7f8>

Connection to ec2-54-74-255-76.eu-west-1.compute.amazonaws.com closed.

/home/vagranttest/mdbci_berlenko_/core/node.rb:80:in `getIp'

/home/vagranttest/mdbci_berlenko_/core/network.rb:185:in `getIpWrapper'

/home/vagranttest/mdbci_berlenko_/core/network.rb:174:in `getNetwork'

/home/vagranttest/mdbci_berlenko_/core/network.rb:308:in `block in collectConfigurationNetworkInfo'

/home/vagranttest/mdbci_berlenko_/core/network.rb:306:in `each'

/home/vagranttest/mdbci_berlenko_/core/network.rb:306:in `collectConfigurationNetworkInfo'

/home/vagranttest/mdbci_berlenko_/core/network.rb:293:in `block in printConfigurationNetworkInfoToFile'

/usr/lib/ruby/1.9.1/open-uri.rb:35:in `open'

/usr/lib/ruby/1.9.1/open-uri.rb:35:in `open'

/home/vagranttest/mdbci_berlenko_/core/network.rb:292:in `printConfigurationNetworkInfoToFile'

/home/vagranttest/mdbci_berlenko_/core/session.rb:777:in `up'

/home/vagranttest/mdbci_berlenko_/core/session.rb:448:in `commands'

./mdbci:127:in `<main>'

#15 Updated by Tatyana Berlenko over 5 years ago

  • Status changed from Active / In progress to Review
  • Assignee changed from Tatyana Berlenko to Mark Zaslavskiy

Now a problem occured with amazon server, when we try to up aws machine, we have the following errors:
ERROR: /home/vagranttest/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
ERROR: /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/expects.rb:6:in `response_call': AuthFailure => AWS was not able to validate the provided access credentials (Fog::Compute::AWS::Error)
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/response_parser.rb:8:in `response_call'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/connection.rb:389:in `response'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/connection.rb:253:in `request'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/idempotent.rb:26:in `error_call'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/base.rb:10:in `error_call'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/base.rb:10:in `error_call'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/connection.rb:273:in `rescue in request'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/connection.rb:221:in `request'
ERROR: from /home/vagranttest/.vagrant.d/gems/gems/excon-0.49.0/lib/excon/middlewares/idempotent.rb:26:in `error_call'

(etc)

#16 Updated by Mark Zaslavskiy over 5 years ago

The problem: at this moment https://github.com/OSLL/mdbci/pull/267/files#diff-2c7c33fe3d62c247a61b18055aa8a286R91 $session.awsConfig is not a dictionary, but a filepath!

Bigger problem - determine when and on which mdbci commands we need to load aws-config and load it then.

#17 Updated by Mark Zaslavskiy over 5 years ago

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

#18 Updated by Ilfat Kinyaev over 5 years ago

  • Status changed from New to Active / In progress

#19 Updated by Ilfat Kinyaev over 5 years ago

NOTE: Same function calls at:
./mdbci show network SOME_DIR/node0
and no reason call up command.

#20 Updated by Ilfat Kinyaev over 5 years ago

  • Estimated time deleted (1:00 h)

awsConfigFile need be initialized.
In past: in mdbci file, at $session.awsConfigFile='aws-config.yml'
Now: variants get path to awsConfigFile in:
1) /confs
2) Vagrantfile in generated nodes

Problems:
1) Need parse once, when call command with aws, then use old value.
2) Can't be in ./mdbci, because commands switch in core/session.rb

#21 Updated by Ilfat Kinyaev over 5 years ago

  • Status changed from Active / In progress to New
  • Assignee changed from Ilfat Kinyaev to Mark Zaslavskiy

#22 Updated by Mark Zaslavskiy about 5 years ago

  • Sprint/Milestone changed from 0.9 to backlog

#23 Updated by Mark Zaslavskiy over 4 years ago

  • Status changed from New to Closed

Also available in: Atom PDF