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

Update minikube status check #846

Merged
merged 3 commits into from
Oct 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions aimmo_runner/minikube.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/user/bin/env python
from __future__ import print_function

from subprocess import CalledProcessError

import docker
import kubernetes
import os
Expand Down Expand Up @@ -74,10 +76,10 @@ def start_cluster(minikube):
Starts the cluster unless it has been already started by the user.
:param minikube: Executable minikube installed beforehand.
"""
status = run_command([minikube, 'status'], True)
if 'minikube: Running' in status:
try:
run_command([minikube, 'status'], True)
print('Cluster already running')
else:
except CalledProcessError:
run_command([minikube, 'start', '--memory=2048', '--cpus=2'])


Expand Down