-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix/environ correction #60
Fix/environ correction #60
Conversation
Developed environ.sh.jinja and added test pillar data to default Corrected prometheus.config.environ ref saltstack-formulas#59 Switched default test pillar to use none archive - due to deployment of custom service Disabled a number of exporters following switch from archive due to failing - to be reviewed Corrected prometheus environ_file location Resolves: saltstack-formulas#59
The previous additions to environ.sh.jinja were fixing something that wasnt broken.
Added inspec checks for environment files and specifically prometheus and node_exporter args. Provided comments throughout the key reference points for users to signpost the differing approaches to args used along with more clearly identifying the difference between archive and repo approach. Tests appear to be working on both approaches though updates have been focused at repo install method. Fixes: saltstack-formulas#59
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.
If null args is passed then ARGS=""
.. is that valid configuration?
environ:
args: {}
```
Debian issue appears to be due to the --collector.systemd config argument being unavailable in the older packages. The formula handles either scenario so switching it out from the test pillar for --log.level=debug instead |
Yes, that's the configuration that ships with the package. |
The --collector.systemd config argument is unavailable in the older packages. The formula handles either scenario so switching the check out from the test pillar for --log.level=debug instead Resolved issue identified in pull request check for debian
@noelmcloughlin ah its not the required entry for oracle linux! It appears to be ALERTMANAGER_OPTS="" format for oracle linux, hence the failing tests |
Same with contos. The previous formula passed obviously because it didn't actually change the arguments file, leaving the repo provided file but not allowing arguments to be used in the pillar. Leaving two approaches then: Thoughts or any better approach? |
I guess adding support involves creating a custom pillar file in
tests/salt/pillars (or equivalent), updating kitchen.yaml with specific for
each custom args needed. It's probably not major work, just something
needed here.
I don't understand why particular distros are changing format of
configuration files, complicating things.
…On Fri, Jun 25, 2021 at 1:36 PM B1ue-W01f ***@***.***> wrote:
Same with contos. The previous formula passed obviously because it didn't
actually change the arguments file, leaving the repo provided file but not
allowing arguments to be used in the pillar.
Leaving two approaches then:
Add support for centos/oracle-linux - could do with guidance on that as it
makes it a lot more complex.
Exclude centos/oracle from deploying the args file and note the lack of
feature support.
Thoughts or any better approach?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#60 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADFUUQSXCHU2P3IXXNTFFEDTURZ6JANCNFSM47JSWSSA>
.
|
Yeah, unfortunately, its a different name for each file though i.e. ALERTMANAGER_OPTS, PROMETHEUS_OPTS etc which is going to have to be passed into the file. Going to need something like:
for centos and:
for default, I guess, per component. Pretty annoying. Ill take a look later on tonight. |
Centos and oraclelinux repositories for prometheus include bespoke headers in the environment files (e.g. Debian: ARGS=, Centos: PROMETHEUS_OPTS= ALERTMANAGER_OPTS=). This has been added as a default pillar with osmap variances. Additionally archlinux repo install was failing so added basic support - an issue still remains for the prometheus app itself due to the service file included in the arch repo hardcoding some config options - resulting in the possibility to duplicate arguments resulting in a service error. The prometheus service currently does not start due to permissions not being applied to a data folder. The added config.storage begins to solve this and ensures alignment on all platforms but would result in a duplicate config entry as above. Prometheus on arch therefore needs more work but the exporter installs now work. Resolves: saltstack-formulas#59
@noelmcloughlin let me know if you want anything changed but that's the handling for contos and oraclelinux added. Also part fix for arch linux failing previously - enough to get exporters going and be close to a fix for the main server. IMO there's a few issues with the source package and can see part is identified as a bug here so likely best to leave it as is for now. |
commit appears to fully comply with the failing lint error so intending to leave as is. |
CI is failing:
What is the intention with |
I cant identify the actual reason the CI failed there, the footer had a preceding blank line? The storage.sls is to ensure correct user control of the data directory from storage.tsdb.path ; I don't believe the formula does this previously / couldn't find it, and the arch linux build partially fails for that reason currently. For the most part, it doesn't affect anything but it would avoid failures if the parameter is specified but ownership was not otherwise assigned. |
Dash was incorrectly left alongside squid_exporter entry in osfamilymap. Resolves: saltstack-formulas#59
The commit probably has some sequence of chars which is breaking commit lint: conventional-changelog/commitlint#896 Can you rebase and edit that commit, otherwise, it fails CI every time. Just simplify it if necessary |
Developed environ.sh.jinja and added test pillar data to default Corrected prometheus.config.environ Switched default test pillar to use none archive - due to deployment of custom service Disabled a number of exporters following switch from archive due to failing - to be reviewed Corrected prometheus environ_file location Resolves: saltstack-formulas#59
The previous additions to environ.sh.jinja were fixing something that wasnt broken.
Added inspec checks for environment files and specifically prometheus and node_exporter args. Provided comments throughout the key reference points for users to signpost the differing approaches to args used along with more clearly identifying the difference between archive and repo approach. Tests appear to be working on both approaches though updates have been focused at repo install method. Fixes: saltstack-formulas#59
The --collector.systemd config argument is unavailable in the older packages. The formula handles either scenario so switching the check out from the test pillar for --log.level=debug instead Resolved issue identified in pull request check for debian
Centos and oraclelinux repositories for prometheus include bespoke headers in the environment files (e.g. Debian: ARGS=, Centos: PROMETHEUS_OPTS= ALERTMANAGER_OPTS=). This has been added as a default pillar with osmap variances. Additionally archlinux repo install was failing so added basic support - an issue still remains for the prometheus app itself due to the service file included in the arch repo hardcoding some config options - resulting in the possibility to duplicate arguments resulting in a service error. The prometheus service currently does not start due to permissions not being applied to a data folder. The added config.storage begins to solve this and ensures alignment on all platforms but would result in a duplicate config entry as above. Prometheus on arch therefore needs more work but the exporter installs now work. Resolves: saltstack-formulas#59
Dash was incorrectly left alongside squid_exporter entry in osfamilymap. Resolves: saltstack-formulas#59
…/prometheus-formula into fix/environ_correction
@noelmcloughlin Hey, are you happy to accept? Or anything else I can do to improve? |
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.
LGTM
thanks @B1ue-W01f |
🎉 This PR is included in version 5.5.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
@B1ue-W01f I've got a question for you: is there a specific reason why you added Line 15 in 2c572d0
This file is managed across ~100 formulas in our organisation so it will end up being reset when the next standardisation takes place -- unless there's a good reason for it, of course. I'm not sure how YAML files will end up under |
@myii Quite possibly not a good reason, first time working with your template. But without that yamlint was going down into the bundle directory, such as: Which does appear to contain .yml files across a large number of bundles. |
@B1ue-W01f That's an excellent justification for it, I'll add that to the list of ignores across the org. Personally, I use Appreciate your time taken to explain that! |
Justification given here: * saltstack-formulas/prometheus-formula#60 (comment)
# [1.291.0](v1.290.0...v1.291.0) (2021-07-18) ### Features * **gitlab-ci:** implement `allow_failure` to be used for instances ([87e4244](87e4244)) * **gitlab-ci:** use `allow_failure` for instances that should work soon ([4029161](4029161)) * **proftpd:** add `yamllint` ignore for Debian 11 support ([9645758](9645758)) * **prometheus:** review PR 67 ([e16d3a4](e16d3a4)) * **saltimages:** update with latest changes from `salt-image-builder` ([767cb2b](767cb2b)) * **saltimages:** update with latest changes from `salt-image-builder` ([ee6a49b](ee6a49b)) * **yamllint:** add `.bundle/` to the default `ignore` list ([8d4cdf0](8d4cdf0)), closes [/github.com/saltstack-formulas/prometheus-formula/pull/60#issuecomment-880428271](https://github.com//github.com/saltstack-formulas/prometheus-formula/pull/60/issues/issuecomment-880428271)
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
#59
Describe the changes you're proposing
Theres a few commits and some of them undo changes made that I later realised weren't neccesary, apologies.
Primarily its regarding an update to the
concat_environ
used in the config.environ state.Comments have been added across the default/pillar.example files to guide users to the differences in approach between archive and repo install methods. Comments have been added to the default and repo pillar files to highlight the different intent.
Tests added to ensure the environ args are being added to the required files for node_exporter and prometheus, along with pillar values being added to the repo pillar.
Pillar / config required to test the proposed changes
The salt/pillar/repo.sls is ultimately the only pillar file with pillar changes and includes those required to identify the correction.
Debug log showing how the proposed changes work
Tests added to the repo inspec check. Ive verified through the deployed prometheus server the log.level=debug is being passed to its command line flags.
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context
None.