Skip to content

Conversation

@ricardoklein
Copy link

PR progress checklist (to be filled in by reviewers)

  • Changes to documentation are appropriate (or tick if not required)
  • Changes to tests are appropriate (or tick if not required)
  • Reviews completed

What type of PR is this?

Primary type

  • [build] Changes related to the build system
  • [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ci] Changes to the continuous integration configuration
  • [feat] A new feature
  • [fix] A bug fix
  • [perf] A code change that improves performance
  • [refactor] A code change that neither fixes a bug nor adds a feature
  • [revert] A change used to revert a previous commit
  • [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [docs] Documentation changes
  • [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

  • Updated the README (e.g. Available states).
  • Updated pillar.example.

Testing checklist

  • Included in Kitchen (i.e. under state_top).
  • Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • Updated the relevant test pillar.

Additional context

If you want, we can also use this pillar example to show how to use this with other formulas to have a complete zabbix server setup: https://gist.github.com/kleinstuff/65929dd3023fba8cc7e7c995a2d6bbf5

Ricardo Klein added 3 commits May 5, 2020 13:21
* osfinger, osfamily and all maps
* Added another condition on repo.sls to properly set the repository
  for (open)SUSE (leap)15 and 12.
* Forgot to set the zabbix-web-<dbtype> to pgsql
* Changed defaults and osfammilymap to support SUSE
* Tested against openSUSE 15.1 and openSUSE 15.2
@pull-assistant
Copy link

Score: 0.93

Best reviewed: commit by commit


Optimal code review plan

     feat(SUSE): Added (open)SUSE support on base files

     bugfix(osfamilymap): Set everything to pgsql

     fix(SUSE-support): SLE and Leap working on 15.1 and 15.2 beta

Powered by Pull Assistant. Last update 52ded9d ... d343b29. Read the comment docs.

@ricardoklein
Copy link
Author

About the lint error... I think this may be caused by using SUSE and SLE in upper case, but, well, this is how it is...

@myii
Copy link
Contributor

myii commented Jun 16, 2020

@kleinstuff Apologies for the delay. Let's ask if any of the regular contributors here can have a look at this PR: @hatifnatt @xenadmin @absmith82 -- can any of you help out here?

Copy link
Collaborator

@hatifnatt hatifnatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks more like a new feature than a bug fix. Overall I think this PR need some improvements before it can be merged.

---
zabbix:
version_repo: 2.2
version_repo: 5.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussion about setting v 5 as default is going on here #123

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this as part of the merge. While I agree it needs to happen, this should be in a different pull request.

server:
pkgs:
- zabbix-server-mysql
- zabbix-server-pgsql
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't change global defaults and call it 'non breaking change'. Also I can't understand why you ever touch global defaults if you have Suse section in osfamilymap.yaml.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with changing this portion of the defaults file altogether. There is a whole portion of this formula to deal with postgres instead of mysql. Mysql is still valid, and there is no reason to change this in the defaults.

- /etc/zabbix/zabbix_agentd.d/*.conf
server:
pkgs:
- zabbix-server-pgsql
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You set package to PostgreSQL version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless mysql is not available in Suse, which I imagine it is, these changes need to be made in the zabbix.pgsql portion of the formula, or can be modified in your own pillar files.

- zabbix-server-pgsql
service: zabbix-server
config: /etc/zabbix/zabbix_server.conf
dbsocket: /var/lib/mysql/mysql.sock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you don't set dbsocket to empty string as required for PostgreSQL DB type. Also you don't set dbtype: POSTGRESQL in frontend section below.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless mysql is not available in Suse, which I imagine it is, these changes need to be made in the zabbix.pgsql portion of the formula, or can be modified in your own pillar files.

- gpgkey: https://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-79EA5ED4
{%- elif salt['grains.get']('os_family') == 'Suse' %}
zabbix_repo:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id_prefix must be used in state id, otherwise there will be conflicts between id-s i.e. when Zabbix server and Zabbix agent will be installed simultaneously.

@ricardoklein
Copy link
Author

OK, it's my second PR for formulas, and, I need to admit that it was indeed not a "clean" work.
Thank you for your time, I will fix this and reopen it.

@myii
Copy link
Contributor

myii commented Jun 16, 2020

Thanks for all of the feedback.

@kleinstuff For the PostgreSQL stuff, I reckon we should put your stuff in a test suite specific to PostgreSQL -- we don't have that right now. So don't feel like you have to throw out the baby with that bathwater! It's still useful stuff, we just need to use it the right way. If you need a hand with that, feel free to ping me and I'll give you some assistance with that.

@ghormoon
Copy link
Contributor

I suggest closing this and consider it resolved by #146

@hatifnatt
Copy link
Collaborator

As suggested closed in favor of #146

@hatifnatt hatifnatt closed this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants