Project

General

Profile

Actions

action #162641

closed

coordination #132467: [epic] Prevent redundant salt state.apply actions that are executed in every call

Prevent redundant salt state.apply actions that are executed in every call - openqa-trigger-from-ibs-plugin

Added by okurz 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Start date:
2024-06-20
Due date:
% Done:

0%

Estimated time:
Tags:

Description

Motivation

We manage more and more machines within our salt infrastructure https://gitlab.suse.de/openqa/salt-states-openqa so it becomes more important to make sure that the high state is applied efficiently. Normally a recurring call of salt \* state.apply should not take long and not do any changes on the system assuming that any previous call already applies all pending changes. So we should review the actions happening in recurring calls to state.apply and change all state rules accordingly so that they are really only called if necessary. Currently there is only one problem remaining wich is the recurring call of script generations on OSD itself from openqa-trigger-from-ibs-plugin which we should address

openqa:~ # salt --no-color 'openqa.suse.de' --state-output=changes state.apply | grep -v 'Result.*Clean'
openqa.suse.de:
----------
          ID: SUSE:SLE-15-SP6:GA:TEST
    Function: cmd.run
        Name: su geekotest -c 'mkdir -p SUSE:SLE-15-SP6:GA:TEST && python3 script/scriptgen.py SUSE:SLE-15-SP6:GA:TE
      Result: True
     Comment: Command "su geekotest -c 'mkdir -p SUSE:SLE-15-SP6:GA:TEST && python3 script/scriptgen.py SUSE:SLE-15-
un   
     Started: 15:36:04.146954
    Duration: 212.952 ms
     Changes:
              ----------
              pid:
                  30433
              retcode:
                  0
              stderr:
              stdout:
                  Generating scripts for SUSE:SLE-15-SP6:GA:TEST
                  OK
----------
          ID: SUSE:SLE-15-SP6:GA:Staging:A
…

Acceptance criteria

  • AC1: No redundant repeated actions visible when calling salt 'openqa.suse.de' state.apply
  • AC2: All necessary actions are still applied on the systems including scripts in /opt/openqa-trigger-from-ibs-plugin

Acceptance tests

  • AT1-1: Given being logged in to OSD When calling for i in {1..2}; do salt 'openqa.suse.de' state.apply; done Then the second call applies no changes to any systems

Suggestions

  • Find out why the script generation from openqa-trigger-from-ibs-plugin is so far triggered in salt high states everytime and move those calls to a better place.

Related issues 1 (0 open1 closed)

Related to openQA Infrastructure (public) - action #161423: [timeboxed:10h] Incomplete config files on OSD due to salt - Improve salt state application from remotely accessible salt master size:SResolvedokurz2024-06-03

Actions
Actions

Also available in: Atom PDF