Skip to content

Maint/dnm/systemd service not found parameter #9256

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

Conversation

cthorn42
Copy link
Collaborator

This is a work in progress, to do:

  • Fix the commit b68b2b2, I have a binding.irb statement and some testing puts statements that shouldn't be there.
  • Determine if I need the negative case of testing the --no flag added to fail_if_resource_service_not_found is needed, or if the testing of the negating a flag is covered else where.
  • Evaluate if we want to go with the default setting, or if we want to just tie this parameter to the puppet resource service action.

… will now return error""

This reverts commit 1818d78.
Conflict in application resource.rb around a few Rubocop fixes
…resource service command

This commit adds in logic that looks for the `fail_if_resource_service_not_found` parameter, if that
is found and `puppet resource service <service_name>` does not exist, the command will fail and state
it couldn't manage the service.
@cthorn42 cthorn42 force-pushed the maint/DNM/systemd_service_not_found_parameter branch from 82deb70 to 32e851f Compare February 16, 2024 19:27
:type => :boolean,
:desc => "Fails the `puppet resource service` check on a given service if the service
is not found. Defaults to false",
},
Copy link
Contributor

@joshcooper joshcooper Feb 20, 2024

Choose a reason for hiding this comment

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

Since the behavior only affects the puppet resource application, I think making this an application option makes sense. Also could then be shorted to fail-when-not-found or similar? Also reminds me of the curl --fail option (to return non-zero exit code when the server returns HTTP 5xx).

@cthorn42
Copy link
Collaborator Author

Going with #9257 , using a command line option as suggested.

@cthorn42 cthorn42 closed this Feb 20, 2024
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.

2 participants