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 task type, picked from the task types of the node page,
- a schedule,
- a description, at most 128 characters, without angle brackets,
- an Enabled state,
- optional Parameters (Proxy tasks only).
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.
- A defined list is sent to every attached node at the next Apply.
- A defined empty list removes the Meta tasks sent before.
- When the list is not defined, the node also removes the Meta tasks sent before.
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
- Artica Meta.
- Nodes running Artica.
- debian-agent 1.2.1 or later on every attached node.
- An articarest version on the node that serves these policies.
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
- Open Artica Meta > Policies.
- Click New policy, choose the type System tasks or Proxy tasks and enter a name.
- In the Tasks tab, click New task.
- Pick the task type, set the schedule and the description.
- In the Targets tab, attach agents or groups of agents.
- 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 Meta task can be run on demand.
- A Meta task cannot be modified, disabled or deleted on the node.
- The tasks created on the node stay editable.
- New local tasks can still be created.
A task is never run twice at the same time:
- When a local task has the same type and the same schedule as an enabled Meta task, only the Meta task runs.
The local task shows Not applicable. - When two Meta tasks have the same type and the same schedule, only one runs.
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:
- the task type does not exist in the Artica version of the node,
- the script of the task is missing on the node,
- the node is an HaCluster load balancer, or its proxy service and local categories service are both disabled (Proxy tasks only).
Detaching a node
When a node no longer receives any policy of a type, it is released.
- The Meta tasks of that type are removed from the node.
- The tasks created on the node stay.
- The lock on the local page is lifted.
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
- Two Proxy tasks that only differ by their parameters run once.
- The rescue command run during an apply can be undone by the rollback of that apply.
Run it again when the node is idle.