taskcat icon indicating copy to clipboard operation
taskcat copied to clipboard

How to debug this case

Open chrisduong opened this issue 8 years ago • 5 comments

Hi,

I created a custom template for Launching RDS inside a VPC from quickstart-magneto. When I tried to debug with -v option, however this Error Message is not helping me.

DEBUG  ] :jsonstatus = True
[PASS   ] :Validated [defaults.json]
[INFO   ] :|PREPARING TO LAUNCH => defaults
[INFO   ] :No cleanup value set
[INFO   ] : - (Defaulting to cleanup)
[INFO   ] :|Acquiring tests assets for .......[defaults]
[DEBUG  ] :|S3 Bucket     => [taskcat-test-ababa]
[DEBUG  ] :|Project       => [rds]
[DEBUG  ] :|Template      => [https://s3-ap-southeast-1.amazonaws.com/taskcat-test-ababa/rds/templates/rds.yaml.template]
[DEBUG  ] :|Parameter     => [https://s3-ap-southeast-1.amazonaws.com/taskcat-test-ababa/rds/ci/defaults.json]
[DEBUG  ] :|TemplateType  => [yaml]
[DEBUG  ] :|Defined Regions:
			 - [ap-southeast-1]
[PASS   ] :(Completed) acquisition of [defaults]


[INFO   ] :Preparing to launch in region [ap-southeast-1]
[DEBUG  ] :AutoGen values for $[alfred_genpass_32]
[DEBUG  ] :Auto generating password
[DEBUG  ] :Pass size => 32
[DEBUG  ] :Pass type => default alpha-numeric
[ERROR  ] :expected string or bytes-like object
[FAIL   ] :Cannot launch rds.yaml.template

The template and Parameter file I used are: https://github.com/chrisduong/quickstart-magento/blob/rds-only/templates/rdsmysql-only.yaml.template, https://github.com/chrisduong/quickstart-magento/blob/rds-only/ci/rdsmysql-only.json

What does this error mean? I had tested manually my template in CFN console, it works with the current Parameter JSON file I used.

[ERROR  ] :expected string or bytes-like object

chrisduong avatar Mar 29 '18 08:03 chrisduong

@sshvans can you take a look at this and see if its related to https://github.com/aws-quickstart/taskcat/issues/39 (If so please re implements that fix) as it was reverted to an emergency merge)

tonynv avatar Apr 02 '18 18:04 tonynv

@chrisduong I investigated the issue and found that the problem is the parameter value of "Subnets" in rdsmysql-only.json file. The value should be of type string. I would suggest to update it to something like "subnet-cccccc,subnet-dddd" instead of ["subnet-cccccc", "subnet-dddd"].

sshvans avatar Apr 10 '18 22:04 sshvans

Thanks @sshvans. Its the problem when I pass Parameters incorrectly.

chrisduong avatar Apr 11 '18 02:04 chrisduong

This issue is also triggered when json stack input value are not wrapped in double quotes example:

[
  {
    "ParameterKey": "Param1",
    "ParameterValue": 1
  }
]

Working on fix to detect and convert

tonynv avatar Apr 15 '18 08:04 tonynv

Fixed in https://github.com/aws-quickstart/taskcat/commit/fc2017fb07510c6eae8541cb892ff8c1bf7c31c4

tonynv avatar Apr 16 '18 22:04 tonynv