Skip to content

Pillar defined beacons only start running after minion restart #63583

@wweellddeerr

Description

@wweellddeerr

Description
When creating or changing a beacon using pillar definitions, after appling changes on the Master and refreshing the pillars, the new beacon definition is ok when running beacons.list, but it only starts running accordingly after restarting the minion. The behavior of beacons.list was fixed in the context of #42676, but the changes didn't fix the behavior of the running beacons.

Setup

1 Master and 1 Minion both running salt 3005.1 on Ubuntu 22.04

Please be as specific as possible and give set-up details.

  • used bootstrap to install

Steps to Reproduce the behavior

Description of Issue/Question

When creating or changing a beacon using pillar definitions, after appling changes on the Master and refreshing the pillars, the new beacon definition is ok when running beacons.list, but it only starts running accordingly after restarting the minion. The behavior of beacons.list was fixed in the context of #42676, but the changes didn't fix the behavior of the running beacons.

Setup

1 Master and 1 Minion both running salt 3005.1 on Ubuntu 22.04

Steps to Reproduce Issue

  1. Start master

  2. Start the minion with trace log level to see details of beacons execution salt-minion -l trace

  3. Confirm in the logs that there is no beacon running. Running salt '*' beacons.list also returns an empty list.

  4. Setup the beacon on the Master:

Master /srv/pillar/top.sls

base:
  '*':
    - load_beacon

Master /srv/pillar/load_beacon.sls

beacons:
  load:
    - averages:
        1m:
          - 0.0
          - 2.0
        5m:
          - 0.0
          - 1.5
        15m:
          - 0.1
          - 1.0
    - emitatstartup: True
    - onchangeonly: False
  1. Running salt '*' beacons.list returns empty, but then running salt '*' saltutil.refresh_pillar makes it return the correct beacon definitions, including the load beacon.

  2. Confirm in the logs that the minion remains without any beacon running

  3. Restart the minion keeping trace logging and confirm that the new beacon is running

Expected behavior

After changing beacons definitions in pillar data, when beacons.list returns up-to-date definition, the beacons should be running according to what is defined.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3005.1
 
Dependency Versions:
          cffi: Not Installed
      cherrypy: Not Installed
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.9
     gitpython: 3.1.24
        Jinja2: 3.0.3
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: 1.1.3
       msgpack: 1.0.3
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: Not Installed
      pycrypto: Not Installed
  pycryptodome: 3.11.0
        pygit2: Not Installed
        Python: 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 22.3.0
         smmap: 5.0.0
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: ubuntu 22.04 Jammy Jellyfish
        locale: utf-8
       machine: x86_64
       release: 5.15.0-58-generic
        system: Linux
       version: Ubuntu 22.04 Jammy Jellyfish

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

BeaconBugbroken, incorrect, or confusing behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions