Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspect fails if cannot find deployment #438

Closed
kirillmakhonin opened this issue Sep 7, 2018 · 0 comments · Fixed by #440
Closed

Inspect fails if cannot find deployment #438

kirillmakhonin opened this issue Sep 7, 2018 · 0 comments · Fixed by #440
Assignees
Labels
bug [Fixed] for any bug fixes.

Comments

@kirillmakhonin
Copy link
Member

kirillmakhonin commented Sep 7, 2018

This error occurs when k8s master data about services and deployments is out of sync.
Code tries to get information about deployment but it fails because it cannot find deployment and does not check it.

2018-09-07 05:33:59,264 - legion.http - ERROR - Exception during processing request for inspect: 'NoneType' object has no attribute 'status'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/legion/http.py", line 161, in decorated_function
    response = method(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/legion/http.py", line 234, in decorated_function
    return method(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/legion/http.py", line 205, in decorated_function
    return method(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/legion/edi/server.py", line 279, in inspect
    model_api_ok, model_api_info
  File "/usr/local/lib/python3.6/dist-packages/legion/k8s/definitions.py", line 177, in build_from_model_service
    status=model_service.status,
  File "/usr/local/lib/python3.6/dist-packages/legion/k8s/services.py", line 391, in status
    if self.scale == 0:
  File "/usr/local/lib/python3.6/dist-packages/legion/k8s/services.py", line 313, in scale
    return self.deployment.status.available_replicas if self.deployment.status.available_replicas else 0
AttributeError: 'NoneType' object has no attribute 'status'
@kirillmakhonin kirillmakhonin added the bug [Fixed] for any bug fixes. label Sep 7, 2018
@kirillmakhonin kirillmakhonin self-assigned this Sep 7, 2018
@kirillmakhonin kirillmakhonin changed the title Inspect fails Inspect fails if cannot find deployment Sep 7, 2018
kirillmakhonin added a commit that referenced this issue Sep 10, 2018
kirillmakhonin added a commit that referenced this issue Sep 10, 2018
kirillmakhonin added a commit that referenced this issue Sep 14, 2018
ablatov pushed a commit that referenced this issue Sep 14, 2018
ablatov pushed a commit that referenced this issue Sep 14, 2018
ablatov pushed a commit that referenced this issue Sep 14, 2018
ablatov pushed a commit that referenced this issue Sep 15, 2018
ablatov pushed a commit that referenced this issue Sep 15, 2018
ablatov pushed a commit that referenced this issue Sep 15, 2018
ablatov pushed a commit that referenced this issue Sep 15, 2018
ablatov pushed a commit that referenced this issue Sep 15, 2018
ablatov pushed a commit that referenced this issue Sep 15, 2018
ablatov pushed a commit that referenced this issue Sep 15, 2018
kirillmakhonin added a commit that referenced this issue Sep 18, 2018
kirillmakhonin added a commit that referenced this issue Sep 18, 2018
kirillmakhonin added a commit that referenced this issue Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [Fixed] for any bug fixes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant