Feat/diagnosis script for support(dwh prefs#15) - #27
Conversation
| # services and processes | ||
| echo -e "+++++ WILDFLY SERVICE STATUS +++++" > "$LOGFOLDER/services.txt" | ||
| if [[ "$DEPLOYMENT_TYPE" == "Docker" ]]; then | ||
| echo "Running inside Wildfly container" >> "$LOGFOLDER/services.txt" |
There was a problem hiding this comment.
Check if service wildfly status can be skipped for docker, by checking what actually runs under that command. On a Debian setup i found the socket for wildfly service under /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service, with content ```
[Unit]
Description=The WildFly Application Server
After=syslog.target network.target
Before=httpd.service
[Service]
Environment=LAUNCH_JBOSS_IN_BACKGROUND=1
EnvironmentFile=-/etc/wildfly/wildfly.conf
User=wildfly
LimitNOFILE=102642
PIDFile=/var/run/wildfly/wildfly.pid
ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND
StandardOutput=null
[Install]
WantedBy=multi-user.target
You can see each _service wildfly_-command executes ```launch.sh``` which likely calls a JBoss CLI command to retrieve the status.
Because this is maybe a bit too much for now, create an issue for this task instead and leave the code as is.
LongusBongus
left a comment
There was a problem hiding this comment.
Good work overall, some changes can be made and on some topics i would like to hear why things are implemented as they are. If anything is unclear or my assumption in some comments is wrong or wouldn't work, you can tell me by replying to my comments directly.
Description
Adds a diagnostic Bash script designed to gather system logs, environment metadata, process information, and folder permissions into a timestamped archive (/tmp/aktin_diag_.tar.gz).
Key Features & Functionality
Deployment Auto-Detection: Automatically distinguishes between Docker (/.dockerenv) and Debian environments to query the correct paths and services.
Log Aggregation: Copies Wildfly, Apache2, and PostgreSQL logs where available.
Health & Service Checks:
AKTIN Metadata & Structure Validation:
Non-Blocking Execution: Uses safe error handling (|| true) alongside set -euo pipefail so diagnostic collection finishes even if individual commands fail (e.g., missing log directories or absent packages).
Automated Archiving: Compresses all results into a single .tar.gz bundle located in /tmp/ for quick retrieval.