nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #00252
[Merge] ~aieri/hw-health-charm:fix/ready_disks into hw-health-charm:master
Andrea Ieri has proposed merging ~aieri/hw-health-charm:fix/ready_disks into hw-health-charm:master.
Requested reviews:
Alvaro Uría (aluria)
For more details, see:
https://code.launchpad.net/~aieri/hw-health-charm/+git/hw-health-charm/+merge/362769
This is just a quick fix because we need this charm deployed ASAP, and I'll be off the rest of the week.
--
Your team Nagios Charm developers is subscribed to branch hw-health-charm:master.
diff --git a/Makefile b/Makefile
index 2eb1188..53603a1 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,10 @@ unittest:
build:
@echo "Building charm to base directory $(JUJU_REPOSITORY)"
- @git describe --tags > ./src/repo-info
+ @git show -s --format="commit-sha-1: %H%ncommit-short: %h" > ./src/repo-info
+ @echo -n "info-generated: " >> ./src/repo-info
+ @date --utc >> ./src/repo-info
+ @echo "note: This file should exist only in a built or released charm artifact (not in the charm source code tree)." >> ./src/repo-info
@LAYER_PATH=./layers INTERFACE_PATH=./interfaces\
JUJU_REPOSITORY=$(JUJU_REPOSITORY) charm build ./src --force
@@ -41,8 +44,8 @@ release: lint clean build
clean:
@echo "Cleaning files"
- @if [ -d src/.tox ] ; then rm -r src/.tox ; fi
- @if [ -d src/.pytest_cache ] ; then rm -r src/.pytest_cache ; fi
+ @for dir in src/.tox src/.pytest_cache builds deps; do \
+ rm -rf $$dir ; done
# The targets below don't depend on a file
.PHONY: lint test unittest build release clean help
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..f4aa970
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1 @@
+repo-info
diff --git a/src/files/mpt/check_sas3ircu.py b/src/files/mpt/check_sas3ircu.py
index 4ff999e..a7d0f75 100755
--- a/src/files/mpt/check_sas3ircu.py
+++ b/src/files/mpt/check_sas3ircu.py
@@ -74,7 +74,9 @@ def parse_output():
tmpdev = devices.get(device[2], [])
tmpdev.append('{}:{}'.format(device[0], device[1]))
devices[device[2]] = tmpdev
- if 'Optimal' not in device:
+ # Disks that are part of a RAID should be in Optimal state
+ # JBOD disks can be in Ready state
+ if 'Optimal' not in device and 'Ready' not in device:
critical = True
device = []
dev_type = None
References