saltstack / saltstack/salt

[BUG] zabbix salt state not creating a user media

Open
#62,685 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
zabbix user present state is creating the user in zabbix but didn't create a user media.

Setup
saltstack is running with version 3004.2 and have two zabbix servers which are running in version 5.4.2 and 6.2.2

***Salt_State_and_Results ***

create_john:
zabbix_user.present:
- alias: johnd
- passwd: xxxxxxxxxxxxx
- firstname: John
- surname: doe
- roleid: 2
- usrgrps:
- 7
- medias:
- johnd@example.com:
- mediatype: mail
- period: '1-7,00:00-24:00'
- severity: AHD
- active: true

Initial execution of above state and when I check it doesn't create user media.

      ID: create_john
Function: zabbix_user.present
  Result: True
 Comment: User john created.
 Started: 10:04:32.486646
Duration: 1897.273 ms
 Changes:
          ----------
          john:
              ----------
              new:
                  User john created.
              old:
                  User john does not exist.

Summary for ip-10-246-106-187.ec2.internal

Succeeded: 1 (changed=1)
Failed: 0

Second time execution and thereafter, still it doesn't create / attach media to the user


      ID: create_john
Function: zabbix_user.present
  Result: True
 Comment: User john updated.
 Started: 10:42:21.519417
Duration: 4395.031 ms
 Changes:
          ----------
          medias:
              [{'active': '1', 'mediatypeid': '1', 'period': '1-7,00:00-24:00', 'sendto': 'johnd@example.com', 'severity': '32'}]

Summary for ip-10-246-106-187.ec2.internal

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the zabbix_user.present state and reproduce the supplied Salt state against the reported Zabbix 5.4.2 and 6.2.2 versions. Trace why the media is absent after the initial run; the issue is done when the user media is created or attached on the first run and subsequent runs remain correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.