diff --git a/openshift-tests-provider-cert/hack/Containerfile.tools-alp b/openshift-tests-provider-cert/hack/Containerfile.tools-alp index 7dcf15e0..5a922932 100644 --- a/openshift-tests-provider-cert/hack/Containerfile.tools-alp +++ b/openshift-tests-provider-cert/hack/Containerfile.tools-alp @@ -1,5 +1,5 @@ # Code generated for package assets by build-image.sh. DO NOT EDIT. -# sources: +# Instead, edit the sources container files: # hack/Containerfile.alp # hack/Containerfile.tools-alp @@ -23,11 +23,13 @@ WORKDIR /clients ADD https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp/${VERSION_OC}/openshift-client-linux.tar.gz ./ ADD https://github.com/jqlang/jq/releases/download/jq-1.4/jq-linux-x86_64 ./ +ADD https://github.com/elmiko/camgi.rs/releases/download/v0.9.0/camgi-0.9.0-linux-x86_64.tar ./ RUN microdnf install -y binutils \ && tar xvfz openshift-client-linux.tar.gz \ && rm -f openshift-client-linux.tar.gz kubectl README.md \ - && chmod +x jq-linux-x86_64 oc \ - && strip oc + && tar xvf camgi-0.9.0-linux-x86_64.tar && rm camgi-0.9.0-linux-x86_64.tar \ + && chmod +x jq-linux-x86_64 oc camgi \ + && strip oc && strip camgi # ## ocp-etcd-log-filters builder @@ -51,6 +53,7 @@ WORKDIR /tools COPY --from=sonobuoy /sonobuoy /usr/bin/ COPY --from=clients /clients/oc /usr/bin/ COPY --from=clients /clients/jq-linux-x86_64 /usr/bin/jq +COPY --from=clients /clients/camgi /usr/bin/camgi COPY --from=oelf-builder /usr/bin/ocp-etcd-log-filters /usr/bin/ RUN ln -svf /usr/bin/oc /usr/bin/kubectl diff --git a/openshift-tests-provider-cert/hack/build-image.sh b/openshift-tests-provider-cert/hack/build-image.sh index d5d975d4..bacf25c2 100755 --- a/openshift-tests-provider-cert/hack/build-image.sh +++ b/openshift-tests-provider-cert/hack/build-image.sh @@ -26,7 +26,7 @@ FORCE="${FORCE:-false}"; export CONTAINER_BASE_GOBUILD="golang:1.19-alpine" export CONTAINER_BASE_BUILD="alpine:3.16.5" export CONTAINER_BASE="quay.io/fedora/fedora-minimal:38-x86_64" -export VERSION_TOOLS="v0.1.0" +export VERSION_TOOLS="v0.2.0" export VERSION_OC="4.13.3" export VERSION_SONOBUOY="v0.56.12" @@ -134,7 +134,7 @@ push_tools() { cmd_succeeded=$( image_exists "${IMAGE_TOOLS}" "${VERSION_TOOLS}"; echo $? ) if [[ $cmd_succeeded -eq 0 ]] && [[ $FORCE == false ]]; then echo "#>> Tools container already exists. Ignoring push." - exit 1 + return fi echo "#> Starting Tools container pusher" pusher_tools @@ -180,7 +180,7 @@ build_plugin() { echo "#> Checking Tools container image" cmd_succeeded=$( image_exists "${IMAGE_TOOLS}" "${VERSION_TOOLS}"; echo $? ) if [[ $cmd_succeeded -eq 1 ]] && [[ $FORCE == false ]]; then - echo "#>> Tools container already exists. Ignoring push." + echo "#>> Tools image [${IMAGE_TOOLS}:${VERSION_TOOLS}] does not exists. build it with options build-tools and push-tools." exit 1 fi builder_plugin diff --git a/openshift-tests-provider-cert/plugin/executor.sh b/openshift-tests-provider-cert/plugin/executor.sh index 05499877..c0afe89d 100755 --- a/openshift-tests-provider-cert/plugin/executor.sh +++ b/openshift-tests-provider-cert/plugin/executor.sh @@ -139,6 +139,7 @@ collect_must_gather() { # > insights rules # extracting msg from etcd logs: request latency apply took too long (attl) + os_log_info "[executor][PluginID#${PLUGIN_ID}] Collecting etcd log filters" cat must-gather-opct/*/namespaces/openshift-etcd/pods/*/etcd/etcd/logs/current.log \ | ocp-etcd-log-filters \ > artifacts_must-gather_parser-etcd-attl-all.txt @@ -146,6 +147,10 @@ collect_must_gather() { | ocp-etcd-log-filters -aggregator hour \ > artifacts_must-gather_parser-etcd-attl-hour.txt + # generate camgi report + os_log_info "[executor][PluginID#${PLUGIN_ID}] Generating camgi report" + camgi must-gather-opct/ > artifacts_must-gather_camgi.html || true + # Create the tarball file artifacts_must-gather.tar.xz os_log_info "[executor][PluginID#${PLUGIN_ID}] Packing must-gather" tar cfJ artifacts_must-gather.tar.xz must-gather-opct*