Skip to content

Commit 06633b8

Browse files
committed
debug logs crio
1 parent ef89f32 commit 06633b8

File tree

5 files changed

+35
-38
lines changed

5 files changed

+35
-38
lines changed

.gitlab-ci/molecule.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
allow_failure: true
1111
stage: deploy-part1
1212
image: $PIPELINE_IMAGE
13+
variables:
14+
ANSIBLE_STDOUT_CALLBACK: debug
1315
needs:
1416
- pipeline-image
1517
script:

roles/container-engine/cri-o/molecule/default/molecule.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,3 @@ provisioner:
5959
timeout: 120
6060
playbooks:
6161
create: ../../../../../tests/cloud_playbooks/create-kubevirt.yml
62-
verifier:
63-
name: testinfra

roles/container-engine/cri-o/molecule/default/tests/test_default.py

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
- name: Get logs of crio
3+
hosts: all
4+
gather_facts: false
5+
become: true
6+
tasks:
7+
- name: Verify CRI-O
8+
block:
9+
- name: Gather services facts
10+
service_facts:
11+
12+
- name: Check CRI-O service state
13+
assert:
14+
that:
15+
- ansible_facts['services']['crio.service']['state'] == 'running'
16+
- ansible_facts['services']['crio.service']['status'] == 'enabled'
17+
18+
- name: Test runtime is crio
19+
command: /usr/local/bin/crictl version
20+
register: cri_version
21+
failed_when: >
22+
cri_version is failed or
23+
"RuntimeName: cri-o" not in cri_version.stdout
24+
25+
- name: Test running a pod
26+
command: /usr/local/bin/crictl run --with-pull --runtime crun /tmp/container.json /tmp/sandbox.json
27+
rescue:
28+
- name: Show journal logs for CRI-O
29+
command: journalctl -u crio.service -e -n 300
30+
31+
- name: Force failure
32+
fail:

roles/container-engine/cri-o/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
content: |
124124
[Service]
125125
Slice={{ kube_reserved_cgroups_for_service_slice }}
126-
Environment=CRIO_CONFIG_OPTIONS='--pull-progress-timeout=10'
126+
Environment=CRIO_CONFIG_OPTIONS='--log-level=debug --log-journald'
127127
notify: Restart crio
128128
when:
129129
- kube_reserved is defined and kube_reserved is true

0 commit comments

Comments
 (0)