lp:~guoqiao/charm-hw-health

Owned by Joe Guo
Get this repository:
git clone https://git.launchpad.net/~guoqiao/charm-hw-health
Only Joe Guo can upload to this repository. If you are Joe Guo please log in for upload directions.

Branches

Name Last Modified Last Commit
1932215-ilorest-nocache 2021-07-08 22:08:09 UTC
cron_ilorest.py: add --nocache to avoid logout/login

Author: Joe Guo
Author Date: 2021-06-17 03:42:06 UTC

cron_ilorest.py: add --nocache to avoid logout/login

By default, ilorest list cmd relies on session info cached in $HOME/.iLORest/cache.
When session expired, cmd will fail and trigger alert. We have to go to host and
ilorest logout/login to workaround.

With the `--nocache` option, ilorest can login when cmd run, and store
session in memory, which will avoid above session expiry issue.

LP: #1932215

Signed-off-by: Joe Guo <joe.guo@canonical.com>

LP1906991-chown-output-files 2021-03-07 21:02:54 UTC
ensure cron output dir and files are owned by nagios user

Author: Joe Guo
Author Date: 2021-02-12 07:24:12 UTC

ensure cron output dir and files are owned by nagios user

Before, nrpe-server and cron jobs are run by root, so legacy output dir and files are
owned by root. Now the user has changed to nagios, which will get permission errors
while writing to legacy dir and files owned by root.

This patch try to ensure the permission is correct.

LP: #1906991

Signed-off-by: Joe Guo <joe.guo@canonical.com>

LP1906991-chown-cronjob-output-dir 2021-02-03 05:05:49 UTC
tools.py: chown cronjob output dir to ensure write permission

Author: Joe Guo
Author Date: 2021-02-03 05:05:49 UTC

tools.py: chown cronjob output dir to ensure write permission

When installing a cronjob for a hw check, copying the scripts to dst path is only part of the task.
We also need to ensure the script can write output file to output dir.

Before, everyting is running as root, so no permission issue.
Recently, we have set the `cron_user` arg to `nagios`, so we also need to ensure this
user can write to output dir.

LP: #1906991
LP: #1904045

Signed-off-by: Joe Guo <joe.guo@canonical.com>

LP1906991-change-nagios-ipmi-output-file-dir 2021-02-02 21:49:11 UTC
change ipmi output file dir to workaround permission

Author: Joe Guo
Author Date: 2021-02-02 21:31:12 UTC

change ipmi output file dir to workaround permission

`cron_ipmi_sensors.py` will write output to `/var/lib/nagios/ipmi_sensors.out`,
and `check_ipmi.py` will read that file.

Before, the check is run by root. Since commit [1], it's switched to `nagios` instead.
`nagios` user can not write to dir `/var/lib/nagios`, caused following bug:

LP: #1906991

This patch changes the output file path on both side:

/var/lib/nagios/ipmi_sensors.out -> /var/run/nagios/ipmi_sensors.out

dir `/var/run/nagios` is owned by `nagios`.

Also, using a dir in `/var/lib` for runtime output file doesn't make sense,
`/var/run/` is more suitable for such purpose.

[1] https://git.launchpad.net/charm-hw-health/commit/?id=ee9ba763

Signed-off-by: Joe Guo <joe.guo@canonical.com>

14 of 4 results
This repository contains Public information 
Everyone can see this information.

Subscribers