Skip to content
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

feat(config) remove interfering users.conf #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alxwr
Copy link
Member

@alxwr alxwr commented Dec 29, 2020

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

None.

Describe the changes you're proposing

Under FreeBSD 12, the package for Icinga 2.12.3 users.conf contains a user group (icingaadmins) which interferes with commonly used config. Removing this unmanaged file resolves this conflict.

Pillar / config required to test the proposed changes

None.

Debug log showing how the proposed changes work

┌─[salt-master@salt]─[~]
└─╼ % salt --state-output=changes --state-verbose=False 'minion' state.apply icinga2
minion:
----------
ID: /usr/local/etc/icinga2/conf.d/users.conf
Function: file.absent
Result: True
Comment: Removed file /usr/local/etc/icinga2/conf.d/users.conf
Started: 15:43:53.571146
Duration: 0.89 ms
Changes:
----------
removed:
/usr/local/etc/icinga2/conf.d/users.conf
----------
ID: icinga2_service_restart
Function: service.running
Name: icinga2
Result: True
Comment: Service icinga2 is already enabled, and is running
Started: 15:43:53.603166
Duration: 1413.839 ms
Changes:
----------
icinga2:
True

Summary for minion
--------------
Succeeded: 183 (changed=2)
Failed:      0
--------------
Total states run:     183
Total run time:     2.092 s

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

@alxwr alxwr requested a review from myii December 29, 2020 14:55
@alxwr alxwr force-pushed the feat-remove-interfering-users-conf branch from 13d8159 to 0cbed8f Compare December 29, 2020 23:24
@baby-gnu
Copy link
Contributor

The inspec is not run by the pipeline because no platform is enable in .gitlab-ci.yml.

Copy link
Contributor

@baby-gnu baby-gnu left a comment

Choose a reason for hiding this comment

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

Thanks.

Copy link
Member

@myii myii left a comment

Choose a reason for hiding this comment

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

I've been working on reintroducing the CI for this formula, using GitHub Actions (thanks to @dafyddj). It's working:

However, when I push this commit on top, it fails during the kitchen converge stage:

@alxwr Would you care to have a look at the logs there, to figure out what's going on? By the time you do that, I should have GitHub Actions running here, so you'll be able to rebase and get the CI running for this PR.

@alxwr alxwr force-pushed the feat-remove-interfering-users-conf branch from 0cbed8f to 66ba863 Compare March 10, 2021 09:51
@myii
Copy link
Member

myii commented Mar 10, 2021

@alxwr Ran this locally to see what's preventing the service from running and this is what I've found (using journalctl -xe):

icinga2[6551]: [] critical/config: Error: Validation failed for object 'alice' of type 'User'; Attribute 'groups': Object 
icinga2[6551]: Location: in /etc/icinga2/conf.d/users/alice.conf: 4:3-4:29
icinga2[6551]: /etc/icinga2/conf.d/users/alice.conf(2): object User "alice" {
icinga2[6551]: /etc/icinga2/conf.d/users/alice.conf(3):   email = "[email protected]"
icinga2[6551]: /etc/icinga2/conf.d/users/alice.conf(4):   groups = [ "icingaadmins" ]
icinga2[6551]:                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
icinga2[6551]: /etc/icinga2/conf.d/users/alice.conf(5):   vars.jabber = "[email protected]"
icinga2[6551]: /etc/icinga2/conf.d/users/alice.conf(6): }
icinga2[6551]: [] critical/config: 1 error
icinga2[6551]: [] critical/cli: Config validation failed. Re-run with 'icinga2 daemon -C' after fixing the config.

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.

3 participants