Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

List pools command fails with "TypeError: 'NoneType' object is not iterable" #309

Closed
barborico opened this issue Aug 30, 2019 · 4 comments
Closed
Assignees
Labels

Comments

@barborico
Copy link

Problem Description

Intermittently, the shipyard pool list command fails with the exception TypeError: 'NoneType' object is not iterable.

Batch Shipyard Version

3.7.0

Steps to Reproduce

After cloning the batch shipyard repo locally, the command used is:

python3 shipyard.py pool list --pool <path to pool config yaml>

This does not reliably reproduce the error, but the error has appeared multiple times transiently.

Expected Results

2019-08-30 17:20:03.986 DEBUG - fetching credentials conf from keyvault
2019-08-30 17:20:04.653 INFO - list of pools
* pool id: ...

Actual Results

2019-08-30 18:40:04.092 DEBUG - fetching credentials conf from keyvault
Traceback (most recent call last):
  File "/opt/batch-shipyard/shipyard.py", line 3130, in <module>
    cli()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/opt/batch-shipyard/shipyard.py", line 1567, in pool_list
    convoy.fleet.action_pool_list(ctx.batch_client, ctx.config)
  File "/opt/batch-shipyard/convoy/fleet.py", line 3221, in action_pool_list
    batch.list_pools(batch_client, config)
  File "/opt/batch-shipyard/convoy/batch.py", line 1215, in list_pools
    for de in err.values:
TypeError: 'NoneType' object is not iterable

Redacted Configuration

pool_specification:
  id: <pool id> 
  vm_configuration:
    platform_image:
      offer: <offer>
      publisher: <publisher>
      sku: <sku>
      native: true
  vm_size: STANDARD_DS2_V2
  vm_count:
    dedicated: 0
    low_priority: 0
  autoscale:
    evaluation_interval: 00:10:00
    formula: '$TargetDedicatedNodes=0;$TargetLowPriorityNodes=2000;'
  remote_access_control:
    starting_port: <port>
    deny:
    - '*'
  block_until_all_global_resources_loaded: false
  additional_node_prep:
    commands:
      post:
      - env > myenvfile
      - docker run --name scan-node-1 --restart unless-stopped --net host --env-file myenvfile -d <image> python3 <script>
      - docker run --name scan-node-2 --restart unless-stopped --net host --env-file myenvfile -d <image> python3 <script>
    environment_variables_keyvault_secret_id: https://<vault name>.vault.azure.net/secrets/<secret name>

Additional Logs

Additional Comments

@alfpark alfpark self-assigned this Aug 30, 2019
@alfpark alfpark added the defect label Aug 30, 2019
@alfpark
Copy link
Collaborator

alfpark commented Aug 30, 2019

Related to #307 with low priority preemption.

@barborico
Copy link
Author

Thanks for jumping on this issue so quickly, Fred! Do you have a ballpark estimate for when this fix will be deployed?

@alfpark
Copy link
Collaborator

alfpark commented Sep 4, 2019

3.8.2 is anticipated for sometime this week.

@alfpark
Copy link
Collaborator

alfpark commented Sep 9, 2019

Apologies, the next release should be this week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants