Merge pull request #97 from kurokobo/pulp-0.12.0

feat: bump pulp operator and ansible runner, add guide to reveal censored logs
This commit is contained in:
kurokobo 2022-06-25 17:16:01 +09:00 committed by GitHub
commit 747d691ff3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 41 additions and 6 deletions

View file

@ -7,3 +7,6 @@ metadata:
spec:
deployment_name: awx
backup_pvc: awx-backup-claim
# Uncomment to reveal "censored" logs
#no_log: "false"

View file

@ -30,3 +30,6 @@ spec:
web_resource_requirements: {}
task_resource_requirements: {}
ee_resource_requirements: {}
# Uncomment to reveal "censored" logs
#no_log: "false"

View file

@ -180,7 +180,7 @@ There is a Kubernetes Operator for Pulp 3 named Pulp Operator.
- [pulp/pulp-operator: Kubernetes Operator for Pulp 3](https://github.com/pulp/pulp-operator)
This project is still under active development and there is no support, however, at least the code to create a new instance seems to be implemented. In this procedure, we use [Pulp Operator 0.11.1](https://github.com/pulp/pulp-operator/tree/0.11.1)
This project is still under active development and there is no support, however, at least the code to create a new instance seems to be implemented. In this procedure, we use [Pulp Operator 0.12.0](https://github.com/pulp/pulp-operator/tree/0.12.0)
### Patch K3s
@ -218,7 +218,7 @@ Install specified version of Pulp Operator.
cd ~
git clone https://github.com/pulp/pulp-operator.git
cd pulp-operator
git checkout 0.11.1
git checkout 0.12.0
```
Export the name of the namespace where you want to deploy Pulp Operator as the environment variable `NAMESPACE` and run `make deploy`. The default namespace is `pulp-operator-system`.
@ -324,7 +324,7 @@ $ kubectl -n galaxy logs -f deployments/pulp-operator-controller-manager -c pulp
...
----- Ansible Task Status Event StdOut (pulp.pulpproject.org/v1beta1, Kind=Pulp, galaxy/galaxy) -----
PLAY RECAP *********************************************************************
localhost : ok=84 changed=0 unreachable=0 failed=0 skipped=67 rescued=0 ignored=0
localhost : ok=86 changed=0 unreachable=0 failed=0 skipped=69 rescued=0 ignored=0
```
Required objects has been deployed next to Pulp Operator in `galaxy` namespace.

View file

@ -4,8 +4,8 @@ metadata:
name: galaxy
spec:
# These parameters are designed for use with:
# - Pulp Operator: 0.11.1
# https://github.com/pulp/pulp-operator/blob/0.11.1/README.md
# - Pulp Operator: 0.12.0
# https://github.com/pulp/pulp-operator/blob/0.12.0/README.md
# - Galaxy NG: 4.5.0
# https://github.com/ansible/galaxy_ng/tree/4.5.0

View file

@ -15,3 +15,6 @@ spec:
#backup_pvc_namespace: awx
#backup_pvc: awx-backup-claim
#backup_dir: /backups/tower-openshift-backup-2021-06-06-10:51:49
# Uncomment to reveal "censored" logs
#no_log: "false"

View file

@ -10,7 +10,7 @@ This repository includes ready-to-use files as an example to run Ansible Runner.
- CentOS Stream 8 (Minimal)
- Python 3.9
- Docker 20.10.17
- Ansible Runner 2.2.0
- Ansible Runner 2.2.1
## Install

View file

@ -10,6 +10,7 @@ Some hints and guides for when you got stuck during deployment and daily use of
- [First Step: Investigate your Situation](#first-step-investigate-your-situation)
- [Investigate Status and Events of the Pods](#investigate-status-and-events-of-the-pods)
- [Investigate Logs of the Containers inside the Pods](#investigate-logs-of-the-containers-inside-the-pods)
- [Reveal "censored" output in the AWX Operator's log](#reveal-censored-output-in-the-awx-operators-log)
- [The Pod is `ErrImagePull` with "429 Too Many Requests"](#the-pod-is-errimagepull-with-429-too-many-requests)
- [The Pod is `Pending` with "1 Insufficient cpu, 1 Insufficient memory." event](#the-pod-is-pending-with-1-insufficient-cpu-1-insufficient-memory-event)
- [The Pod is `Pending` with "1 pod has unbound immediate PersistentVolumeClaims." event](#the-pod-is-pending-with-1-pod-has-unbound-immediate-persistentvolumeclaims-event)
@ -102,6 +103,31 @@ For AWX Operator and AWX, specifically, the following commands are helpful.
- Logs of PostgreSQL
- `kubectl -n awx logs -f statefulset/awx-postgres`
### Reveal "censored" output in the AWX Operator's log
If you've found the `FAILED` tasks while investigating AWX Operator's log, sadly sometimes it's marked as `censored` and you can't get actual log.
```bash
$ kubectl -n awx logs -f deployments/awx-operator-controller-manager -c awx-manager
...
TASK [Restore database dump to the new postgresql container] ********************************
fatal: [localhost]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": true}
...
```
AWX Operator 0.23.0 or later supports making this revealed.
To achieve this, you can uncomment `no_log: "false"` manually under `spec` for your `awx.yaml`, `awxbackup.yaml`, or `awxrestore.yaml`, and then re-run your deployment, backup, or restoration.
```yaml
...
spec:
...
# Uncomment to reveal "censored" logs
no_log: "false" 👈👈👈
...
```
### The Pod is `ErrImagePull` with "429 Too Many Requests"
If your Pod for PostgreSQL is in `ErrImagePull` and its `Events` shows following events, this is due to [the rate limit on Docker Hub](https://docs.docker.com/docker-hub/download-rate-limit/).