Skip to content

Sfctl command to run Chaos test is failing with an error #220

@sandeepcongh

Description

@sandeepcongh

Hi,

The Sfctl command to run Chaos test is failing with this error.

sfctl version - 9.0.0
Service Fabric cluster runtime version - 7.1.409.9590
Service Fabric hosting location - Azure

sfctl Command
sfctl chaos start --time-to-run $timeToRunMinute --max-concurrent-faults $maxConcurrentFaults --max-cluster-stabilization $maxClusterStabilizationTimeSecs --wait-time-between-iterations $waitTimeBetweenIterationsSec --wait-time-between-faults $waitTimeBetweenFaultsSec --app-type-health-policy-map $clusterHealthPolicyJSON --chaos-target-filter $chaosTargetFilterJSON --debug

Parameters
$timeToRunMinute: 10
$maxConcurrentFaults: 3
$maxClusterStabilizationTimeSecs: 30
$waitTimeBetweenIterationsSec: 10
$waitTimeBetweenFaultsSec: 0
$clusterHealthPolicyJSON: {
"ConsiderWarningAsError":0,
"MaxPercentUnhealthyNodes":100,
"MaxPercentUnhealthyApplications":100,
"ApplicationTypeHealthPolicyMap":{}
}
$chaosTargetFilterJSON: {
"NodeTypeInclusionList":[

    ],
    \"ApplicationInclusionList\":[

    ]

}

Error Message
Command arguments: ['chaos', 'start', '--time-to-run', '10', '--max-concurrent-faults', '3', '--max-cluster-stabilization', '30', '--wait-time-between-iterations', '10', '--wait-time-between-faults', '0', '--app-type-health-policy-map', '{\r\n"ConsiderWarningAsError":0,\r\n"MaxPercentUnhealthyNodes":100,\r\n"MaxPercentUnhealthyApplications":100,\r\n"ApplicationTypeHealthPolicyMap":{}\r\n}', '--chaos-target-filter', '{\r\n\t"NodeTypeInclusionList":[\r\n\r\n\t],\r\n\t"ApplicationInclusionList":[\r\n\r\n\t]\r\n}', '--debug']
Event: Cli.PreExecute []
Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0383DF58>, <function OutputProducer.on_global_arguments at 0x03A4DD60>, <function CLIQuery.on_global_arguments at 0x03A79A48>]
Event: CommandInvoker.OnPreCommandTableCreate []
Event: CommandLoader.OnLoadArguments []
Event: CommandInvoker.OnPostCommandTableCreate []
Event: CommandInvoker.OnCommandTableLoaded []
Event: CommandInvoker.OnPreParseArgs []
Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x03A4DDA8>, <function CLIQuery.handle_query_parameter at 0x03A79A90>]
msrest.universal_http.requests : Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
'str' object has no attribute 'get'
Traceback (most recent call last):
File "c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\knack\cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\sfctl\entry.py", line 81, in execute
return super(SFInvoker, self).execute(args)
File "c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\knack\invocation.py", line 208, in execute
cmd_result = parsed_args.func(params)
File "c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\knack\commands.py", line 139, in call
return self.handler(*args, **kwargs)
File "c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\knack\commands.py", line 246, in _command_handler
result = op(client, **command_args) if client else op(**command_args)
File "c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\sfctl\custom_chaos.py", line 93, in start
health_map = parse_app_health_map(app_type_health_policy_map)
File "c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\sfctl\custom_health.py", line 60, in parse_app_health_map
name = item.get('key', None)
AttributeError: 'str' object has no attribute 'get'
msrest.universal_http.requests : Configuring retry: max_retries=3, backoff_factor=0.8, max_backoff=90
Performing cluster version check
msrest.universal_http : Configuring redirects: allow=True, max=30
msrest.universal_http : Configuring request: timeout=100, verify=True, cert=None
msrest.universal_http : Configuring proxies: ''
msrest.universal_http : Evaluate proxies against ENV settings: True
urllib3.connectionpool : Starting new HTTPS connection (1): immersive-usw2-ppe.westus2.cloudapp.azure.com:19080
urllib3.connectionpool : https://immersive-usw2-ppe.westus2.cloudapp.azure.com:19080 "GET /$/GetClusterVersion?api-version=6.4&timeout=60 HTTP/1.1" 200 26
c:\users\v-sakish\appdata\local\programs\python\python38-32\lib\site-packages\sfctl\custom_cluster.py:255: UserWarning: sfctl has version "9.0.0" which does not match the cluster version "7.1.409.9590". See https://docs.microsoft.com/azure/service-fabric/service-fabric-cli#service-fabric-target-runtime for version compatibility. Upgrade to a compatible version for the best experience.
warn(str.format(

Thanks,
Sandeep

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions