Skip to content

[Bug]: puppet resource service NoMethodError on FreeBSD #290

@backerman

Description

@backerman

Is this a critical security issue?

  • This is not a security issue.

Describe the Bug

puppet resource service errors out when listing all services:

Error: Could not run: undefined method `gsub' for nil

Expected Behavior

puppet resource service should display the usual list of service stanzas for all available services.

Steps to Reproduce

  1. On FreeBSD, run puppet resource service.
  2. Observe that it fails.
  3. Run puppet resource service jail (picked at random) to demonstrate it's a specific service causing the issue.

Environment

Version 8.24.1 (same behavior on 8.22.0)
Platform FreeBSD 14.3p7

Additional Context

The NoMethodError is thrown at lib/puppet/provider/service/freebsd.rb:27 when parsing the output of service dumpon rcvar. For some reason that lists zero rcvars (there is in fact one), which appears to be the problem.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions