- 
                Notifications
    
You must be signed in to change notification settings  - Fork 118
 
Add suse support #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add suse support #140
Conversation
* 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
| 
          
 Best reviewed: commit by commit 
Optimal code review plan 
 | 
    
| 
           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...  | 
    
| 
           @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?  | 
    
There was a problem hiding this 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 | 
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 | 
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | 
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | 
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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: | 
There was a problem hiding this comment.
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.
| 
           OK, it's my second PR for formulas, and, I need to admit that it was indeed not a "clean" work.  | 
    
| 
           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.  | 
    
| 
           I suggest closing this and consider it resolved by #146  | 
    
| 
           As suggested closed in favor of #146  | 
    
PR progress checklist (to be filled in by reviewers)
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 testsDoes 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
README(e.g.Available states).pillar.example.Testing checklist
state_top).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