Artica Wiki

Artica Meta: System tasks and Proxy tasks policies

Impose scheduled tasks on a fleet of Artica nodes from Artica Meta, next to the tasks created on each node.

Back to Artica Meta · Artica Meta: Policies

The System tasks and Proxy tasks policies impose scheduled tasks on a fleet of Artica nodes from the Meta console.
The tasks of the policy are added to the tasks created on each node.
They never replace them.

Some tasks must run on every node: a backup, an update, a purge.
Before these policies, each node was set by hand.
A policy defines these tasks once and Meta sends them to every attached node.

The two policies

Policy Node page What it carries
System tasks System scheduled tasks (fw.system.tasks.php) System scheduled tasks
Proxy tasks Proxy scheduled tasks (fw.proxy.tasks.php) Proxy scheduled tasks

Both policies work the same way.
They only differ by the list of task types they offer and by their cluster behaviour.

What a policy carries

A policy holds a list of tasks.
Each task has:

A policy holds at most 500 tasks.
The same limit applies after the policies of a node are merged.

The task list is either Not defined or defined.

In every case, the tasks created on the node stay.

Two tasks of the same policy cannot have the same type and the same schedule.
When two policies attached to the same node carry the same task, the node receives it once.

Requirements

Deploy in order: Artica Meta first, then the nodes.
A node with an older agent stays pending.
The reason says that Artica and the debian-agent must be updated.

Create a policy

  1. Open Artica Meta > Policies.
  2. Click New policy, choose the type System tasks or Proxy tasks and enter a name.
  3. In the Tasks tab, click New task.
  4. Pick the task type, set the schedule and the description.
  5. In the Targets tab, attach agents or groups of agents.
  6. Click Apply.

Nothing is sent before Apply.

Changing the schedule of a task creates a new task on the nodes.
The task gets a new local ID and its run history starts again.

Import from a node

Click Import system tasks from a node or Import proxy tasks from a node to start from a node that is already set up.
Meta creates a policy with the tasks created on that node.
The Meta tasks already on the node are not taken.
The policy is attached to the node but not applied.
Check it, then click Apply.

Some tasks cannot be imported: an invalid task, a duplicate, or a task over the limit.
Meta lists them after the import, with the reason.
A description longer than 128 characters is shortened.
A node that already has a policy of the same type attached, directly or through a group, cannot be imported.

What happens on the node

The node writes the tasks of the policy next to its own tasks.
Then it rebuilds its scheduled tasks.

The local task page shows a banner while a policy manages the node.
Each task of the policy is marked Artica Meta.

A task is never run twice at the same time:

If the node cannot rebuild its scheduled tasks right away, the delivery stays pending.
Meta sends the policy again.

Some tasks cannot run on a node.
The node writes them, does not schedule them and reports them ignored with the reason:

Detaching a node

When a node no longer receives any policy of a type, it is released.

If Meta is gone, run one of these commands on the node:

articarest -systemtasks-meta-release
articarest -proxytasks-meta-release

Delivery status

The Delivery status tab shows the last sending of the policy to each node.
The report lists the Meta tasks written, unchanged, removed or ignored by the node.

Clusters

The two policies behave differently in a cluster.

Policy Cluster slave HaCluster client
System tasks Receives its own policy.
System tasks are not replicated.
Receives the policy and applies it itself.
Proxy tasks Receives the policy through its master. Receives the policy and applies it itself.

Each Squid of an HaCluster runs its own scheduled tasks.
Attach the policy to the group of the Squid nodes behind a load balancer.

Tasks policies and tenants

A tenant creates System tasks and Proxy tasks policies for its own nodes.
A global policy attached to its nodes is shown read-only.

Known limits