Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #880 from fao89/plogs
Browse files Browse the repository at this point in the history
Document persistent logs
  • Loading branch information
openshift-merge-bot[bot] authored May 15, 2024
2 parents 57cf568 + 796bc82 commit df679d3
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/assemblies/creating-the-data-plane.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ include::con_provisioning-bare-metal-data-plane-nodes.adoc[leveloffset=+1]

include::proc_deploying-the-data-plane.adoc[leveloffset=+1]

include::logs.adoc[leveloffset=+1]

include::proc_troubleshooting-data-plane-creation-and-deployment.adoc[leveloffset=+1]

include::tls.adoc[leveloffset=+1]
Expand Down
64 changes: 64 additions & 0 deletions docs/assemblies/logs.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
= Persistent logs

For enabling persistent logging:

. Create a https://docs.openshift.com/container-platform/4.14/storage/understanding-persistent-storage.html#persistent-volumes_understanding-persistent-storage[PersistentVolume] and a https://docs.openshift.com/container-platform/4.14/storage/understanding-persistent-storage.html#persistent-volume-claims_understanding-persistent-storage[PersistentVolumeClaim]

. Mount `/runner/artifacts` into the PersistentVolume through `extraMounts` field

[discrete]
==== Example:

[,yaml]
----
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
spec:
...
nodeTemplate:
extraMounts:
- extraVolType: Logs
volumes:
- name: ansible-logs
persistentVolumeClaim:
claimName: <PersistentVolumeClaim name>
mounts:
- name: ansible-logs
mountPath: "/runner/artifacts"
----

== Accessing the logs

. Query for pods with the OpenStackAnsibleEE label

oc get pods -l app=openstackansibleee
+
Sample output:
+
configure-network-edpm-compute-j6r4l 0/1 Completed 0 3m36s
validate-network-edpm-compute-6g7n9 0/1 Pending 0 0s
validate-network-edpm-compute-6g7n9 0/1 ContainerCreating 0 11s
validate-network-edpm-compute-6g7n9 1/1 Running 0 13s

. SSH into a pod
+
When a pod is running:
+
oc rsh validate-network-edpm-compute-6g7n9
+
When a pod is *not* running:
+
oc debug configure-network-edpm-compute-j6r4l

. List the directories under `/runner/artifacts`

ls /runner/artifacts
+
Sample output:
+
configure-network-edpm-compute
validate-network-edpm-compute

. Get the stdout of the desired artifact

cat /runner/artifacts/configure-network-edpm-compute/stdout

0 comments on commit df679d3

Please sign in to comment.