Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

docker-health monitor doesn't work#46

Merged
jackfrancis merged 1 commit intoAzure:masterfrom
jackfrancis:docker-health-missing-params
Nov 20, 2018
Merged

docker-health monitor doesn't work#46
jackfrancis merged 1 commit intoAzure:masterfrom
jackfrancis:docker-health-missing-params

Conversation

@jackfrancis
Copy link
Member

What this PR does / why we need it: If you define a bash function omitting the function keyword, you need ()

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

If applicable:

  • documentation
  • unit tests
  • tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

bash needs params for function definition

@jackfrancis jackfrancis changed the title bash needs params for function definition docker-health monitor doesn't work Nov 20, 2018
@jackfrancis
Copy link
Member Author

Evidence of breakage:

$ sudo journalctl -u docker-monitor
-- Logs begin at Tue 2018-11-20 21:00:31 UTC, end at Tue 2018-11-20 21:38:15 UTC. --
Nov 20 21:29:19 k8s-master-30117068-0 systemd[1]: Started a script that checks docker health and restarts if needed.
Nov 20 21:29:19 k8s-master-30117068-0 health-monitor.sh[10812]: /usr/local/bin/health-monitor.sh: line 9: container_runtime_monitoring: command not found
Nov 20 21:29:19 k8s-master-30117068-0 health-monitor.sh[10812]: /usr/local/bin/health-monitor.sh: line 10: local: can only be used in a function
Nov 20 21:29:19 k8s-master-30117068-0 health-monitor.sh[10812]: /usr/local/bin/health-monitor.sh: line 11: local: can only be used in a function
Nov 20 21:29:19 k8s-master-30117068-0 health-monitor.sh[10812]: /usr/local/bin/health-monitor.sh: line 12: KUBE_HOME: unbound variable
Nov 20 21:29:19 k8s-master-30117068-0 systemd[1]: docker-monitor.service: Main process exited, code=exited, status=1/FAILURE```

@codecov
Copy link

codecov bot commented Nov 20, 2018

Codecov Report

Merging #46 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #46   +/-   ##
=======================================
  Coverage   52.41%   52.41%           
=======================================
  Files          91       91           
  Lines       12792    12792           
=======================================
  Hits         6705     6705           
  Misses       5479     5479           
  Partials      608      608

@jackfrancis
Copy link
Member Author

Confirmed fixed:

$ sudo systemctl status docker-monitor
● docker-monitor.service - a script that checks docker health and restarts if needed
   Loaded: loaded (/etc/systemd/system/docker-monitor.service; static; vendor preset: enabled)
   Active: active (running) since Tue 2018-11-20 22:50:21 UTC; 14min ago
 Main PID: 8736 (bash)
    Tasks: 2
   Memory: 2.7M
      CPU: 2.718s
   CGroup: /system.slice/docker-monitor.service
           ├─ 8736 bash /usr/local/bin/health-monitor.sh container-runtime
           └─20854 sleep 10

Nov 20 22:50:21 k8s-master-19477088-0 systemd[1]: Started a script that checks docker health and restarts if needed.
Nov 20 22:50:21 k8s-master-19477088-0 health-monitor.sh[8736]: Start kubernetes health monitoring for container-runtime

@tariq1890
Copy link
Contributor

/lgtm

@acs-bot
Copy link

acs-bot commented Nov 20, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis, tariq1890

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [jackfrancis,tariq1890]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis merged commit 76ca14f into Azure:master Nov 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants