Skip to main content

actor-IaC v2.13.0 Released

· 3 min read
Scivics Lab
Development Team

We are pleased to announce the release of actor-IaC v2.13.0.

This release brings WorkflowReporter for execution reports, Java plugin support, and the new AptLockChecker plugin.

WorkflowReporter

A new feature for automatic workflow execution report generation. WorkflowReporter aggregates lines prefixed with % from the log database and presents them in a "Check Results" summary section.

This is useful for collecting status messages from multiple nodes:

# Output status for WorkflowReporter
- actor: this
method: executeCommand
arguments:
- |
HOSTNAME=$(hostname -s)
if [ "$STATUS" = "OK" ]; then
echo "%$HOSTNAME: [OK] Service running"
else
echo "%$HOSTNAME: [FAIL] Service down"
fi

The % prefix tells WorkflowReporter to collect this line for the final report.

Example Report Output

[workflow-reporter] === Workflow Execution Report ===
[workflow-reporter] Session #42 | Workflow: main-install-gpu-drivers.yaml | Status: COMPLETED

[workflow-reporter] --- Check Results ---
[workflow-reporter] stonefly513: [OK] nvidia-smi already installed (driver 535.183.01)
[workflow-reporter] stonefly514: [SKIP] No NVIDIA GPU
[workflow-reporter] stonefly521: [SKIP] APT_HUNG (16d) PID=203601

CLI Improvements

  • describe command: Enhanced workflow description with better formatting
  • list-workflows command: Improved workflow discovery and listing
  • WorkflowScanner: New utility class for scanning workflow directories

Java Plugin Support

actor-IaC now fully supports Java plugins through the new POJO-actor 2.13.0 features:

# Load plugin JAR
- states: ["0", "1"]
actions:
- actor: loader
method: loadJar
arguments: ["../plugins/my-plugin.jar"]

# Create plugin actor
- states: ["1", "2"]
actions:
- actor: loader
method: createChild
arguments: ["this", "myPlugin", "com.example.MyPlugin"]

# Use plugin
- states: ["2", "3"]
actions:
- actor: myPlugin
method: doSomething
arguments: ["${result}"]

AptLockChecker Plugin (actor-IaC-plugins)

A new plugin repository has been created: actor-IaC-plugins

The first plugin is AptLockChecker for detecting hung apt processes on Debian/Ubuntu systems.

Problem Solved

On Ubuntu systems, apt.systemd.daily or unattended-upgrade can sometimes hang for hours, blocking all apt operations. This plugin detects such hung processes before attempting package installations.

How It Works

  1. Parses output from ps -eo pid,etimes,args
  2. Identifies apt-related processes (/usr/lib/apt/apt.systemd.daily, /usr/bin/unattended-upgrade)
  3. Checks if they've been running longer than the threshold (default: 1 hour)
  4. Returns human-readable status: OK or HUNG:pid:age

Example Workflow

name: install-nvidia-driver

steps:
# Load plugin
- states: ["0", "1"]
actions:
- actor: loader
method: loadJar
arguments: ["../actor-IaC-plugins/target/actor-IaC-plugins-1.0.0.jar"]

- states: ["1", "2"]
actions:
- actor: loader
method: createChild
arguments: ["this", "aptChecker", "com.scivicslab.actoriac.plugins.aptcheck.AptLockChecker"]

# Get process list
- states: ["2", "3"]
actions:
- actor: this
method: executeCommand
arguments: ["ps -eo pid,etimes,args 2>/dev/null"]

# Check for hung apt processes
- states: ["3", "4"]
actions:
- actor: aptChecker
method: check
arguments:
psOutput: "${result}"
hostname: "${json.hostname}"
threshold: 3600 # 1 hour in seconds

# Store result and skip if hung
- states: ["4", "5"]
actions:
- actor: this
method: executeCommand
arguments:
- |
RESULT='${result}'
if echo "$RESULT" | grep -q "^HUNG:"; then
echo "SKIP_REASON=APT_HUNG"
else
echo "SKIP_REASON=none"
fi

This pattern allows workflows to gracefully skip nodes with hung apt processes instead of waiting indefinitely.

Upgrade

Update your pom.xml:

<dependency>
<groupId>com.scivicslab</groupId>
<artifactId>actor-IaC</artifactId>
<version>2.13.0</version>
</dependency>

References