Project

General

Profile

Architecture #13622

Add a flag library to store persistent context on the agents

Added by Alexis MOUSSET 2 months ago. Updated about 1 month ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Effort required:

Description

This lib will be part of 20_cfe_basics.

It will allow storing a persisting database of flags that will be usable in the agents. Flags are somehow like persistent conditions but:

  • They have no expiration date
  • They are kept when resetting agent state

This will allow use cases like executing a command only once on a system.

The storage format will be a json file containing:

{
  "flag_name_1": { "created": "20181008-...." },
  "flag_name_2": { "created": "20181008-...." }
}

The file is by default in /var/rudder/agent-data/flags.json, and configurable in ncf.conf.

This library should provide methods to:

  • Load the flags into a variable
  • Reserve a flag (set the persistent class, fails of already present)
  • Set a flag
  • (Get a flag)
  • (Unset a flag)

Associated revisions

Revision 5aac1ee3 (diff)
Added by Alexis MOUSSET 2 months ago

Fixes #13622: Add a flag library

Revision 5e744cb8 (diff)
Added by Alexis MOUSSET 2 months ago

Fixes #13622: Add a flag library

History

#1 Updated by Alexis MOUSSET 2 months ago

  • Project changed from Rudder to ncf
  • Category set to Generic methods

#2 Updated by Alexis MOUSSET 2 months ago

  • Description updated (diff)

#3 Updated by Alexis MOUSSET 2 months ago

  • Target version set to 4.3.5

#4 Updated by Alexis MOUSSET 2 months ago

  • Description updated (diff)

#5 Updated by Alexis MOUSSET 2 months ago

  • Description updated (diff)

#6 Updated by Alexis MOUSSET 2 months ago

  • Status changed from New to In progress

#11 Updated by Alexis MOUSSET 2 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/ncf/pull/847

#12 Updated by Vincent MEMBRÉ 2 months ago

  • Target version changed from 4.3.5 to 4.3.6

#13 Updated by Alexis MOUSSET 2 months ago

  • Status changed from Pending technical review to Pending release

#15 Updated by Alexis MOUSSET about 1 month ago

  • Subject changed from Add a flag library to Add a flag library to store persistent context on the agents

#16 Updated by Vincent MEMBRÉ about 1 month ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.3.6 and 5.0.2 which were released today.
Changelog
Changelog

Also available in: Atom PDF