-
Notifications
You must be signed in to change notification settings - Fork 23
Review and correct log levels for messages. #64
Description
We should modify the message log level for different messages. I'll add an example bellow, but we should verify all the log messages.
i.e.:
The example is from the setup_ca method -> https://github.com/hyperledger-labs/nephos/blob/master/nephos/fabric/ca.py#L163
2019-06-25 09:22:59,598 misc INFO helm status rca-pg
2019-06-25 09:23:00,655 misc ERROR Command failed with CalledProcessError:
2019-06-25 09:23:00,656 misc ERROR Error: getting deployed release "rca-pg": release: "rca-pg" not found
2019-06-25 09:23:00,656 misc INFO helm install stable/postgresql -n rca-pg --namespace cas --version 3.18.3 -f /path_to/helm_values/postgres-ca/rca-pg.yaml
2019-06-25 09:23:04,962 k8s INFO Ensuring that all pods are running
2019-06-25 09:23:04,963 misc INFO kubectl get pods -n cas -l "app=postgresql,release=rca-pg" -o jsonpath="{.items[*].status.phase}"
.2019-06-25 09:23:15,357 misc INFO kubectl get pods -n cas -l "app=postgresql,release=rca-pg" -o jsonpath="{.items[*].status.phase}"
.2019-06-25 09:23:25,603 misc INFO kubectl get pods -n cas -l "app=postgresql,release=rca-pg" -o jsonpath="{.items[*].status.phase}"
So, for example in this case, going line by line
-
INFO helm status rca-pg
This message could be divided into two, info "Checking for existing helm app <>" and a debug message with the command. -
ERROR Command failed with CalledProcessError:
-
ERROR Error: getting deployed release "rca-pg": release: "rca-pg" not found
These message shouldn't be error, but debug, I would even move into the future to a "try" structure, with python we shouldn't ask for before. -
INFO helm install stable/postgresql -n rca-pg --namespace cas --version 3.18.3 -f /tools/deployer/test_deployments/at-e2e/qa/helm_values/postgres-ca/rca-pg.yaml
This is a debug message as well, but should be replaced with the command in debug and another INFO saying something like "Installing helm posgresql chart" -
INFO Ensuring that all pods are running
It's good as it is. -
kubectl get pods -n cas -l "app=postgresql,release=rca-pg" -o jsonpath="{.items[*].status.phase}"
Also to be divided into two messages, an info and a debug.