Validate your Swarm installation

Tip

When Swarm starts it verifies the Redis cache, during this time you cannot log in to Swarm. The time taken to verify the Redis cache depends on the number of users, groups, and projects Swarm has. Start-up time can be improved by persisting the memory cache. You can persist the memory cache by disabling background saves and enabling append saves in the redis-server.conf file, see Redis server configuration file.

Now that Swarm is fully installed the final step is to check that your Swarm installation is working correctly by doing the following:

  1. Create a new changelist that:
    1. Contains at least one modified file
    2. Contains the #review keyword in the changelist description
  2. Right click on the new changelist in P4V and click Shelve Files...
  3. Important

    Do not select Request New Swarm Review... because this method uses the API and will not fully test the Swarm Helix Core Server extension.

    This is also true if you are using Swarm Helix Core Server Triggers instead of the Swarm Helix Core Server extension.

  4. Check that a new Swarm review is created for the changelist.
    • If a Swarm review is created, the Swarm Helix Core Server extension is working. If you are using Swarm Helix Core Server Triggers instead of the Swarm Helix Core Server extension and the review is created, the triggers are working.
    • If a Swarm review is not created, see Review not created.

You are now all set to start using Swarm, enjoy!

Tip

To get started with Swarm, see the Quickstart chapter.

Optional Swarm integrations

Swarm provides a number of optional integrations that can be enabled if required, see Integrations.

Review not created

If you are using the Swarm Helix Core Server extension

If a new Swarm review is not created when you validate your installation, your Swarm Helix Core Server extension is probably not working correctly on the Helix Core Server.

Check the Swarm Helix Core Server extension is working

To check that the Swarm Helix Core Server extension is working, run the following command on your Helix Core Server:

p4 extension --run swarm ping

Success message:

OK

Example failure message:

BAD (Cannot reach https://swarm-example.com/)

For information about Helix Core Server Extensions on your Helix Core Server, see the Helix Core Extensions Developer Guide.

Check installed versions

To check your Swarm version and your Swarm Helix Core Server extension version, run the following command on your Helix Core Server:

p4 extension --run swarm version

Example response:

Swarm Version: SWARM/2022.1/2226999 (2022/03/20)
Extension Version: 2022.1.20221215

If you are using Swarm Helix Core Server Triggers

If a new Swarm review is not created when you validate your installation, your Swarm Helix Core Server Triggers are probably not installed correctly on the Helix Core Server. For instructions on how to install the Swarm Helix Core Server Triggers on your Helix Core Server, see Installing Triggers.

Review cannot be updated when using triggers

This is rare but can sometimes happen if your Swarm server is configured for SSL.

Issue

The swarm-trigger.pl tries to use the Perl HTTP::Tiny module if it is installed. Sometimes it has a problem with certificates and a 599 error is generated.

To check if this is the issue, examine the operating system log of your Helix Core Server for errors logged by swarm-trigger.pl.

  • Windows platforms, look in the Windows Event viewer
  • Linux platforms:
    • Ubuntu/Debian: look in /var/log/syslog
    • RedHat: look in /var/log/messages

The error message looks something like: Error: (599/Internal Exception) (probably invalid SSL certificate) .....

Workaround

If you see this error, modify the Swarm trigger script file on the Helix Core Server so that it uses Curl instead of HTTP::Tiny.

Modify the trigger script to use Curl:

There are two lines in the swarm-trigger.pl script that enable the use of HTTP::Tiny, edit these two lines to make the script fallback to Curl:

  1. Find both instances of the following line:
  2. if ($HAVE_TINY) {

  3. Add ! to $HAVE_TINY for each line so that they look like this:
  4. if (!$HAVE_TINY) {

  5. Save the trigger script file.