You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run state.apply which installs the package(s) from the "second packages" state before the required "requirement" state.
salt-call -l info --local state.apply
$ salt-call --local -l info state.apply[INFO ] Loading fresh modules for state activity[INFO ] Creating module dir '/var/cache/salt/minion/extmods/clouds'[INFO ] Syncing clouds for environment 'base'[INFO ] Loading cache from salt://_clouds, for base[INFO ] Caching directory '_clouds/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/beacons'[INFO ] Syncing beacons for environment 'base'[INFO ] Loading cache from salt://_beacons, for base[INFO ] Caching directory '_beacons/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/modules'[INFO ] Syncing modules for environment 'base'[INFO ] Loading cache from salt://_modules, for base[INFO ] Caching directory '_modules/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/states'[INFO ] Syncing states for environment 'base'[INFO ] Loading cache from salt://_states, for base[INFO ] Caching directory '_states/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/sdb'[INFO ] Syncing sdb for environment 'base'[INFO ] Loading cache from salt://_sdb, for base[INFO ] Caching directory '_sdb/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/grains'[INFO ] Syncing grains for environment 'base'[INFO ] Loading cache from salt://_grains, for base[INFO ] Caching directory '_grains/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/renderers'[INFO ] Syncing renderers for environment 'base'[INFO ] Loading cache from salt://_renderers, for base[INFO ] Caching directory '_renderers/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/returners'[INFO ] Syncing returners for environment 'base'[INFO ] Loading cache from salt://_returners, for base[INFO ] Caching directory '_returners/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/output'[INFO ] Syncing output for environment 'base'[INFO ] Loading cache from salt://_output, for base[INFO ] Caching directory '_output/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/utils'[INFO ] Syncing utils for environment 'base'[INFO ] Loading cache from salt://_utils, for base[INFO ] Caching directory '_utils/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/log_handlers'[INFO ] Syncing log_handlers for environment 'base'[INFO ] Loading cache from salt://_log_handlers, for base[INFO ] Caching directory '_log_handlers/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/executors'[INFO ] Syncing executors for environment 'base'[INFO ] Loading cache from salt://_executors, for base[INFO ] Caching directory '_executors/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/proxy'[INFO ] Syncing proxy for environment 'base'[INFO ] Loading cache from salt://_proxy, for base[INFO ] Caching directory '_proxy/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/engines'[INFO ] Syncing engines for environment 'base'[INFO ] Loading cache from salt://_engines, for base[INFO ] Caching directory '_engines/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/thorium'[INFO ] Syncing thorium for environment 'base'[INFO ] Loading cache from salt://_thorium, for base[INFO ] Caching directory '_thorium/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/serializers'[INFO ] Syncing serializers for environment 'base'[INFO ] Loading cache from salt://_serializers, for base[INFO ] Caching directory '_serializers/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/matchers'[INFO ] Syncing matchers for environment 'base'[INFO ] Loading cache from salt://_matchers, for base[INFO ] Caching directory '_matchers/' for environment 'base'[INFO ] Creating module dir '/var/cache/salt/minion/extmods/pillar'[INFO ] Syncing pillar for environment 'base'[INFO ] Loading cache from salt://_pillar, for base[INFO ] Caching directory '_pillar/' for environment 'base'[INFO ] Loading fresh modules for state activity[INFO ] Fetching file from saltenv 'base', ** done ** 'test.sls'/usr/lib/python3.11/site-packages/salt/utils/pycrypto.py:26: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13 import crypt/usr/lib/python3.11/site-packages/salt/modules/linux_shadow.py:21: DeprecationWarning: 'spwd' is deprecated and slated for removal in Python 3.13 import spwd[INFO ] Running state [first packages] at time 02:51:37.173427[INFO ] Executing state pkg.installed for [first packages][INFO ] Executing command rpm in directory '/root'[INFO ] Executing command systemd-run in directory '/root'[INFO ] Executing command systemd-run in directory '/root'[WARNING ] 'version' argument will be ignored for multiple package targets[INFO ] Executing command systemd-run in directory '/root'[INFO ] Executing command rpm in directory '/root'[INFO ] Made the following changes:'drpm' changed from 'absent' to '0.5.2-1.fc38''gc' changed from 'absent' to '8.2.2-3.fc38'[INFO ] Loading fresh modules for state activity[INFO ] Completed state [first packages] at time 02:51:46.412181 (duration_in_ms=9238.755)[INFO ] Running state [requirement] at time 02:51:47.755257[INFO ] Executing state test.nop for [requirement][INFO ] Success![INFO ] Completed state [requirement] at time 02:51:47.761107 (duration_in_ms=5.851)[INFO ] Running state [second packages] at time 02:51:47.762141[INFO ] Executing state pkg.installed for [second packages][INFO ] All specified packages are already installed[INFO ] Completed state [second packages] at time 02:51:47.789906 (duration_in_ms=27.765)local:---------- ID: first packages Function: pkg.installed Result: True Comment: The following packages were installed/updated: drpm, gc Started: 02:51:37.173426 Duration: 9238.755 ms Changes: ---------- drpm: ---------- new: 0.5.2-1.fc38 old: gc: ---------- new: 8.2.2-3.fc38 old:---------- ID: requirement Function: test.nop Result: True Comment: Success! Started: 02:51:47.755256 Duration: 5.851 ms Changes:---------- ID: second packages Function: pkg.installed Result: True Comment: All specified packages are already installed Started: 02:51:47.762141 Duration: 27.765 ms Changes:Summary for local------------Succeeded: 3 (changed=1)Failed: 0------------Total states run: 3Total run time: 9.272 s
Expected behavior
The packages from a state that has a state specified as a requires requisite should not be installed until the required state has run; for the given test case example the gc from "second packages" state should not be installed until after the "requirement" state has been run.
Versions Report
salt --versions-report
Salt Version:
Salt: 3006.3Python Version:
Python: 3.11.2 (main, Feb 8 2023, 00:00:00) [GCC 13.0.1 20230208 (Red Hat 13.0.1-0)]Dependency Versions:
cffi: Not Installedcherrypy: Not Installeddateutil: 2.8.2docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.0.3libgit2: Not Installedlooseversion: 1.3.0M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.4msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 23.0pycparser: Not Installedpycrypto: Not Installedpycryptodome: 3.17.0pygit2: Not Installedpython-gnupg: Not InstalledPyYAML: 6.0PyZMQ: 24.0.1relenv: Not Installedsmmap: Not Installedtimelib: Not InstalledTornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: fedora 38locale: utf-8machine: x86_64release: 6.2.9-300.fc38.x86_64system: Linuxversion: Fedora Linux 38
Additional context
I used the following vagrant file for the simple test case
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# config.vm.box = "bento/ubuntu-22.04"
config.vm.box = "fedora/38-cloud-base"
# config.vm.box = "centos/stream8"
config.vm.hostname = 'salt-test-box'
# Give the machine 2048MB of RAM.
# This assumes you're using the virtualbox provider, see
# https://www.vagrantup.com/docs/providers/ for information on the
# other providers.
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
# config.vm.synced_folder "salt", "/srv/salt", :nfs => false
# # required for nfs shared folder
# config.vm.network "private_network", type: "dhcp"
# config.vm.provision :salt do |salt|
# salt.install_type = "stable"
# salt.masterless = true
# salt.minion_config = "salt/minion"
# salt.run_highstate = true
# end
end
The problem was also experienced on RHEL 8.7 onedir installation.
The text was updated successfully, but these errors were encountered:
The ability to aggregate yum package installations was the primary feature that attracted us to salt over other tools like puppet or ansible. This is an important feature to be fixed for us since we need the performance benefit of being able to aggregate the package installations.
The ability to aggregate yum package installations was the primary feature that attracted us to salt over other tools like puppet or ansible. This is an important feature to be fixed for us since we need the performance benefit of being able to aggregate the package installations.
This is a feature that AFAICT the https://github.com/purpleidea/mgmt/ project invented and has existed there since the beginning. I'd love to hear more about your use case for it. We call it autogrouping.
Description
Setting
state_aggregate: True
causes packages in apkg.installed
state to be installed before specifiedrequires
requisite.Setup
Please be as specific as possible and give set-up details.
Steps to Reproduce the behavior
Setup directories and files; set minion to have
state_aggregate: True
;Run state.apply which installs the package(s) from the
"second packages"
state before the required"requirement"
state.Expected behavior
The packages from a state that has a state specified as a
requires
requisite should not be installed until the required state has run; for the given test case example thegc
from"second packages"
state should not be installed until after the"requirement"
state has been run.Versions Report
salt --versions-report
Additional context
I used the following vagrant file for the simple test case
The problem was also experienced on RHEL 8.7 onedir installation.
The text was updated successfully, but these errors were encountered: