Skip to content

Commit

Permalink
Log minikube commands in debug level
Browse files Browse the repository at this point in the history
Log the minikube commands in debug level to make it eaiser to understand
failures on remote machines and verify changes in minikube commands.

Example of the new logs:

    $ drenv start envs/test.yaml -v
    2023-06-22 19:25:07,827 INFO    [test] Starting environment
    2023-06-22 19:25:07,920 INFO    [cluster] Starting minikube cluster
    2023-06-22 19:25:07,920 DEBUG   [cluster] Running ['minikube', 'start', '--profile', 'cluster',
    '--driver', 'podman', '--container-runtime', 'cri-o', '--disk-size', '20g', '--nodes', '1',
    '--cni', 'auto', '--cpus', '2', '--memory', '2g', '--alsologtostderr']
    ...

    $ drenv delete envs/test.yaml -v
    2023-06-22 19:26:05,932 INFO    [test] Deleting environment
    2023-06-22 19:26:05,933 INFO    [cluster] Deleting cluster
    2023-06-22 19:26:05,933 DEBUG   [cluster] Running ['minikube', 'delete', '--profile', 'cluster']
    ...

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs authored and raghavendra-talur committed Jun 22, 2023
1 parent ea4ff83 commit 762a767
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/drenv/minikube.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ def _run(command, *args, profile=None, output=None):
def _watch(command, *args, profile=None):
cmd = ["minikube", command, "--profile", profile]
cmd.extend(args)
logging.debug("[%s] Running %s", profile, cmd)
for line in commands.watch(*cmd):
logging.debug("[%s] %s", profile, line)

0 comments on commit 762a767

Please sign in to comment.