Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Alexander_Naumov:SLE-12:Update
salt.24749
transactional_update-detect-recursion-in-the-ex...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File transactional_update-detect-recursion-in-the-executo.patch of Package salt.24749
From c08d3e194794d91d46abb585e3734c76825882cb Mon Sep 17 00:00:00 2001 From: Alberto Planas <aplanas@suse.com> Date: Tue, 27 Apr 2021 14:00:58 +0200 Subject: [PATCH] transactional_update: detect recursion in the executor (#357) --- salt/executors/transactional_update.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/salt/executors/transactional_update.py b/salt/executors/transactional_update.py index ef7d92bc05..0fa83d730b 100644 --- a/salt/executors/transactional_update.py +++ b/salt/executors/transactional_update.py @@ -5,6 +5,8 @@ Transactional executor module """ +import os + import salt.utils.path # Functions that are mapped into an equivalent one in @@ -98,6 +100,8 @@ def execute(opts, data, func, args, kwargs): add_delegated_functions: [file.copy] """ + inside_transaction = os.environ.get("TRANSACTIONAL_UPDATE") + fun = data["fun"] module, _ = fun.split(".") @@ -114,11 +118,13 @@ def execute(opts, data, func, args, kwargs): delegated_modules |= set(opts.get("add_delegated_modules", [])) delegated_functions |= set(opts.get("add_delegated_functions", [])) - if fun in DELEGATION_MAP: + if fun in DELEGATION_MAP and not inside_transaction: result = __executors__["direct_call.execute"]( opts, data, __salt__[DELEGATION_MAP[fun]], args, kwargs ) - elif module in delegated_modules or fun in delegated_functions: + elif ( + module in delegated_modules or fun in delegated_functions + ) and not inside_transaction: result = __salt__["transactional_update.call"](fun, *args, **kwargs) else: result = __executors__["direct_call.execute"](opts, data, func, args, kwargs) -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor