Skip to main content

Diagnose a package that fails to deploy

When a Medulla package fails to deploy, the problem may occur at several stages of the process:

  • before the deployment begins;
  • during file transfer;
  • while the package is being parsed;
  • while executing commands on the computer;
  • or due to a dependency or deployment condition.

Note:
The first thing to check is the deployment status, followed by the details available in the audit. The audit message often allows you to directly identify the step causing the problem.


1. Identify at which step the deployment is stuck

Start by noting the status displayed in Medulla.

Status Interpretation
DEPLOYMENT PENDING The deployment is awaiting launch
DEPLOYMENT SPOOLED The deployment is queued
WAITING MACHINE ONLINE The target computer is unavailable
ABORT TRANSFER FAILED The package files could not be transferred
ERROR TRANSFER FAILED The package server does not have the requested package
ABORT MISSING DEPENDENCY A package dependency is missing
ABORT PACKAGE WORKFLOW ERROR The workflow or package descriptor is incorrect
ABORT PACKAGE EXECUTION ERROR A command in the package failed on the computer
ABORT PACKAGE EXECUTION CANCELLED The execution was canceled
ABORT ON TIMEOUT The deployment window ended before the execution

2. Review the deployment audit

Before making any changes to the package, open the audit for the relevant deployment.

Note the following in particular:

  • the exact status;
  • the last message displayed;
  • the package’s UUID;
  • the target computer;
  • the relay used;
  • the workflow stage reached;
  • the command output, when available.

Tip:
The status helps identify the type of issue, but the detailed audit message often reveals the exact cause.


3. Verify that the computer is available

If the deployment remains in:

WAITING MACHINE ONLINE

or ends with:

ABORT ON TIMEOUT

first verify that the target computer is actually available.

ping MACHINE_IP

When a computer is powered off, Medulla makes up to three Wake on LAN attempts before switching to the status:

WAITING MACHINE ONLINE

Medulla then waits for the computer to come back online as long as the deployment time window remains open.

If the computer does not come back online before the end of this time window, the deployment may end with:

ABORT ON TIMEOUT

4. The deployment remains in PENDING

The status:

DEPLOYMENT PENDING

is a temporary status prior to the actual start of the deployment.

One documented possible cause is that all available deployment slots are already in use.

To find out the number of deployments awaiting execution:

SELECT
    COUNT(msc.commands.id) AS 'nb pending'
FROM
    msc.commands_on_host
INNER JOIN
    msc.commands
    ON msc.commands.id = msc.commands_on_host.fk_commands
INNER JOIN
    msc.target
    ON msc.target.id = msc.commands_on_host.fk_target
INNER JOIN
    msc.phase
    ON msc.phase.fk_commands_on_host = msc.commands_on_host.id
WHERE
    msc.phase.name = 'execute'
    AND msc.phase.state = 'ready'
    AND NOW() BETWEEN msc.commands.start_date
                  AND msc.commands.end_date;

Note:
A DEPLOYMENT PENDING status does not necessarily mean that the package is defective. It may simply be waiting for an execution slot to become available.


5. The deployment remains in the queue

The status:

DEPLOYMENT SPOOLED

indicates that the deployment has been placed in a queue.

The associated message may be:

Spooling the deployment in queue

This is a dynamic status and not an error with the package itself.

If this status persists for an unusually long time, check for other ongoing deployments and verify the availability of deployment resources.


6. Check the package ID

The status:

ABORT PACKAGE IDENTIFIER MISSING

indicates that the expected package UUID is missing.

The package’s UUID can be found in the deployment audit, under the package information.

Next, check for the presence of the uuid key in:

/var/lib/pulse2/packages/sharing/global/PACKAGE_UUID/xmppdeploy.json

For example:

grep -i "uuid" /var/lib/pulse2/packages/sharing/global/PACKAGE_UUID/xmppdeploy.json

If the UUID key is missing, the operations guide recommends recreating the package.


7. Verify the package name and version

The following statuses indicate that required package information is missing:

ABORT PACKAGE NAME MISSING
ABORT PACKAGE VERSION MISSING

Package information is stored, among other places, in:

xmppdeploy.json

If this file is missing or incomplete, the package was likely created or modified incorrectly.

Recommended action:
When the package name, version, or identifier is missing from its configuration, it is best to recreate the package rather than manually modify its structure.


8. Check the package workflow

The status:

ABORT PACKAGE WORKFLOW ERROR

indicates an error in the package workflow.

The operations guide specifically identifies:

  • a missing workflow step;
  • an inconsistency in xmppdeploy.json;
  • a missing descriptor for the operating system;
  • an error during workflow initialization.

The associated messages may be:

Package error: descriptor for OS %s missing

Descriptor inconsistency error

Error initializing grafcet

Missing operating system descriptor

The message:

Package error: descriptor for OS %s missing

may appear when the wrong operating system was selected during package creation or when the expected system does not exist in:

xmppdeploy.json

Recommended action:
Verify the operating system configured in the package and its workflow. If the package structure is inconsistent, the operations guide recommends recreating the package.


9. Check the package dependencies

The message:

Deployment error: missing dependency

corresponds to the status:

ABORT MISSING DEPENDENCY

It indicates that a dependency required by the package is no longer available.

One documented cause is that a package referenced as a dependency has been removed.

Recommended action

  • open the package configuration;
  • check the packages listed as dependencies;
  • make sure these packages still exist;
  • remove or replace any dependencies that are no longer valid.

10. Verify file transfer

If the package transfer to the computer fails, the deployment may result in:

ABORT TRANSFER FAILED

The operations guide indicates that the problem may specifically involve:

  • an rsync transfer;
  • a download using curl;
  • the availability of the package on the server used for deployment.

A possible error message is:

Transfer error: curl download

Note:
Always check the detailed message in the audit. ABORT TRANSFER FAILED indicates which step failed, but there are several technical causes that can trigger this error.


11. The package server does not have the package

The message:

Transfer error: Package Server does not have this package

corresponds to an error of the following type:

ERROR TRANSFER FAILED

In this case, the server used for the transfer does not have the expected package.

Check:

  • that the package still exists;
  • that it is present on the package server;
  • that it is available on the relay used for deployment;
  • that it has been synchronized correctly.

Caution:
The fact that a package is visible in the Medulla console does not necessarily guarantee that it is present on the server or relay used for the transfer.


12. Verify the package’s location

The operations guide also describes a scenario in which a package may end up in the global location when another location was expected.

In this case, check the field:

localisation_server

in the files:

conf.json
xmppdeploy.json

If the location is incorrect, this may explain why the package is not available where expected.

Caution:
The operations guide also contains commands that allow you to directly modify the files and the database. For public diagnostic documentation, it is recommended that you first identify the inconsistency and only modify the location after confirming the expected configuration.


13. Verify the execution of the package commands

The status:

ABORT PACKAGE EXECUTION ERROR

indicates that the package has reached the execution stage but that a command failed on the target computer.

The associated message may be:

Package execution error

or, in some cases:

Package delayed execution error

The operations guide specifies that a command may work on one computer and fail on another.

The error therefore does not necessarily stem from the Medulla deployment engine, but may be related to the command being executed or the computer’s environment.


14. View the full command output

To troubleshoot:

ABORT PACKAGE EXECUTION ERROR

edit the package and configure it to display the full output of the command.

After a new deployment, the command output will be available in the audit.

This will allow you to identify, among other things:

  • an error return code;
  • an unknown command;
  • a missing file;
  • a problem specific to the target computer;
  • the exact message returned by the executed program.

Recommendation:
When a package works on some computers but not on others, displaying the complete command output in the audit is the top priority.


15. Case of an inventory error during execution

The operations guide also records the message:

Deployment aborted: inventory error

associated with:

ABORT PACKAGE EXECUTION ERROR

This message indicates that the failure occurred during an inventory operation related to deployment.

Note:
The operations guide identifies this message but does not provide a more detailed corrective procedure. In this case, troubleshooting must continue based on the deployment audit and the logs of the affected computer.


16. Check whether the execution was canceled

The status:

ABORT PACKAGE EXECUTION CANCELLED

indicates that the package execution was canceled.

The associated message may be:

Package delayed execution cancelled

The operations guide provides the example of a deferred deployment for which the expected number of computers was not reached.

In this case, check the conditions configured for the deployment rather than the package’s contents.


17. Check whether the package requires a reboot

The status:

WAITING REBOOT

indicates that the package has requested an intentional reboot of the computer.

This is therefore not an error.

Check the package’s workflow to confirm that this reboot step is indeed expected.


18. Test the package on another computer

When the package works on one computer but not on another, this points the diagnosis toward the target computer or the command being executed.

The operations guide explicitly states that a command included in a package may work correctly on one computer but fail on another.

In this situation:

  1. enable full output display for the command;
  2. rerun the package on the computer where the error occurred;
  3. compare the output with that from a computer where the deployment is working.

19. Quick diagnostic tree

Symptom Priority check
Package in PENDING Check pending deployments and available slots
Package in SPOOLED Check the deployment queue
WAITING MACHINE ONLINE Check that the computer is available
ABORT ON TIMEOUT Check the computer and the deployment time window
ABORT PACKAGE IDENTIFIER MISSING Check the UUID in xmppdeploy.json
ABORT PACKAGE NAME MISSING Check the package structure
ABORT PACKAGE VERSION MISSING Check the package structure
ABORT PACKAGE WORKFLOW ERROR Check the workflow and descriptor
ABORT MISSING DEPENDENCY Check the package dependencies
ABORT TRANSFER FAILED View the transfer message in the audit
ERROR TRANSFER FAILED Verify that the package server has the package
ABORT PACKAGE EXECUTION ERROR Display the full command output
ABORT PACKAGE EXECUTION CANCELLED Check the deployment conditions
WAITING REBOOT Check the package reboot step

20. Recommended diagnostic procedure

When a package fails to deploy, perform the following checks in this order:

  1. open the deployment audit;
  2. determine the exact status;
  3. verify that the target computer is available;
  4. check whether the deployment is simply pending or in the queue;
  5. verify the package’s UUID, name, and version;
  6. check the workflow and descriptor;
  7. check the dependencies;
  8. if the transfer fails, check the availability of the package on the server or relay;
  9. if execution fails, enable full command output;
  10. compare the behavior with another computer when possible.

21. Information to collect if the problem persists

Before continuing with troubleshooting or opening a support ticket, gather the following:

  • the package name;
  • its UUID;
  • the target computer;
  • the exact deployment status;
  • the full message displayed in the audit;
  • the relay server used;
  • the full output of the command in case of an execution error;
  • the package dependencies;
  • the date and time of the deployment;
  • information indicating whether the same package works on another computer.

Recommendation:
To troubleshoot a package that fails to deploy, always start by identifying which step fails: waiting, transfer, package read, or execution. A transfer issue should be diagnosed by checking the package’s availability and the relay server, while an ABORT PACKAGE EXECUTION ERROR should be diagnosed based on the complete command output in the audit.