Bogumil Zebek | 483ccbf | 2020-03-25 11:54:11 +0100 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. http://creativecommons.org/licenses/by/4.0 |
| 3 | .. Copyright 2020 NOKIA |
| 4 | |
Tomasz Wrobel | c1ad93c | 2020-04-16 09:28:23 +0200 | [diff] [blame^] | 5 | .. _cert_logs: |
| 6 | |
Bogumil Zebek | 483ccbf | 2020-03-25 11:54:11 +0100 | [diff] [blame] | 7 | Logging |
| 8 | ======= |
| 9 | |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 10 | Certification Service API |
| 11 | -------------------------- |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 12 | To see console Certification Service logs use: |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 13 | |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 14 | - Docker: |
Bogumil Zebek | 483ccbf | 2020-03-25 11:54:11 +0100 | [diff] [blame] | 15 | |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 16 | .. code-block:: bash |
Bogumil Zebek | 483ccbf | 2020-03-25 11:54:11 +0100 | [diff] [blame] | 17 | |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 18 | docker logs <cert-service-container-name> |
| 19 | |
| 20 | - Kubernetes: |
| 21 | |
| 22 | .. code-block:: bash |
| 23 | |
| 24 | kubectl logs <cert-service-pod-name> |
| 25 | |
| 26 | Console logs contain logs for logging levels from **DEBUG** to **ERROR**. |
| 27 | |
| 28 | Certification Service logs for different logging levels are available in the container: |
| 29 | |
| 30 | - Docker: |
| 31 | |
| 32 | .. code-block:: bash |
| 33 | |
| 34 | docker exec -it <cert-service-container-name> bash |
| 35 | |
| 36 | - Kubernetes: |
| 37 | |
| 38 | .. code-block:: bash |
| 39 | |
| 40 | kubectl exec -it <cert-service-pod-name> bash |
Bogumil Zebek | 483ccbf | 2020-03-25 11:54:11 +0100 | [diff] [blame] | 41 | |
| 42 | Path to logs: |
| 43 | |
| 44 | /var/log/onap/aaf/certservice |
| 45 | |
| 46 | Available log files: |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 47 | |
| 48 | - audit.log - contains logs for **INFO** logging level |
| 49 | - debug.log - contains logs for logging levels from **DEBUG** to **ERROR** |
| 50 | - error.log - contains logs for **ERROR** logging level |
| 51 | |
| 52 | User cannot change logging levels. |
Bogumil Zebek | 483ccbf | 2020-03-25 11:54:11 +0100 | [diff] [blame] | 53 | |
| 54 | |
Tomasz Wrobel | c1ad93c | 2020-04-16 09:28:23 +0200 | [diff] [blame^] | 55 | |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 56 | Certification Service Client |
| 57 | ---------------------------- |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 58 | To see console Certification Service Client logs use : |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 59 | |
| 60 | - Docker: |
| 61 | |
| 62 | .. code-block:: bash |
| 63 | |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 64 | docker logs <cert-service-client-container-name> |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 65 | |
| 66 | - Kubernetes: |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 67 | CertService Client is used as init container in other components. In the following example: |
| 68 | - *<some-component-pod-name>* refers to the component that uses CertService Client as init container |
| 69 | - *<cert-service-client-init-container-name>* refers to name of init container used by the mentioned component. It can be found by executing *'kubectl descrine pod <some-component-pod-name>'* and looking into 'Init Containers section' |
| 70 | |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 71 | .. code-block:: bash |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 72 | |
| 73 | kubectl logs <some-component-pod-name> -c <cert-service-client-init-container-name> |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 74 | |
| 75 | |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 76 | |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 77 | | Container stops after execution, so all logs available are printed to console. |
| 78 | | User cannot change logging levels. |
Tomasz Wrobel | 7198621 | 2020-03-26 09:43:41 +0100 | [diff] [blame] | 79 | |
| 80 | Client application exits with following exit codes: |
| 81 | |
| 82 | |
| 83 | +-------+------------------------------------------------+ |
| 84 | | Code | Information | |
| 85 | +=======+================================================+ |
| 86 | | 0 | Success | |
| 87 | +-------+------------------------------------------------+ |
| 88 | | 1 | Invalid client configuration | |
| 89 | +-------+------------------------------------------------+ |
| 90 | | 2 | Invalid CSR configuration | |
| 91 | +-------+------------------------------------------------+ |
| 92 | | 3 | Fail in key pair generation | |
| 93 | +-------+------------------------------------------------+ |
| 94 | | 4 | Fail in CSR generation | |
| 95 | +-------+------------------------------------------------+ |
| 96 | | 5 | CertService HTTP unsuccessful response | |
| 97 | +-------+------------------------------------------------+ |
| 98 | | 6 | Internal HTTP Client connection problem | |
| 99 | +-------+------------------------------------------------+ |
| 100 | | 7 | Fail in PKCS12 conversion | |
| 101 | +-------+------------------------------------------------+ |
| 102 | | 8 | Fail in Private Key to PEM Encoding | |
| 103 | +-------+------------------------------------------------+ |
Aleksandra Maciaga | 946b3dd | 2020-04-16 21:46:06 +0200 | [diff] [blame] | 104 | | 9 | Wrong TLS configuration | |
| 105 | +-------+------------------------------------------------+ |