OpenShift's oc debug and parallel execution

A colleague reported some issues in the OpenShift troubleshooting and diagnosis scripts at OpenShift-checks. Some time ago I did contribute some changes to use functions and allow using the RISU wrapper to the scripts, helping consuming the results via RISU’s HTML interface. As my colleague reported, for some plugins, the output of the command was not shown in the HTML Interface. After some investigation, it was found that parallel execution for the plugins was causing no output to be shown, but when filtering to individual ones via risu -i XXXXXXX/plugin -l it was working fine… the problem was not the check itself, as both of them worked fine when executed individually but failed when executing them together....

November 3, 2022 · 2 min · Pablo Iranzo Gómez

Ansible - dynamically include Jinja templates and tasks

For my ansible playbooks, I wanted to be able to add several new templates to be copied to target system, and additionally be able to perform some commands for them without having to specify each individual file/template to copy. My approach: Define for the hosts I want to find templates/playbooks define a var named extras for the relevant hosts: extras: - ntp - certificates The names defined (in above example ntp and certificates) are just name of folders laying inside tasks/templates/${folder} that are searched and included or excluded based on extras values....

September 24, 2022 · 2 min · Pablo Iranzo Gómez

Include Ansible playbooks sorted

Use sorted list for included files vs random provided by with_fileglob. - name: Include tasks include_tasks: "{{item}}" loop: "{{ query('fileglob', 'tasks/*.yaml') | sort }}"

September 23, 2022 · 1 min · Pablo Iranzo Gómez

Check Agent status per state

Check agent status per state watch -d "oc get agent -A -o jsonpath='{range .items[*]}{@.status.debugInfo.state}{\"\n\"}{end}' |sort | uniq --count"

August 10, 2022 · 1 min · Pablo Iranzo Gómez

Unsupported upgrade for RHEL-based distributions without reinstallation

Most systems, based on RHEL, were not able to upgrade without reinstallation, or best said, not supported. The new version, that was released at around 18 months later contained so many changes that it was hard to test the upgrades themselves until leapp was introduced. Check the lifecycle here: https://access.redhat.com/support/policy/updates/errata However, the biggest problem could be the incompatibility of packages or package formats… but as usually there were some middle layers it was possible to upgrade without reinstallation by performing some manual steps....

April 23, 2022 · 15 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.