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

Fix systemd service filename #310

Closed
CallumBanbery opened this issue Apr 24, 2019 · 0 comments · Fixed by #309
Closed

Fix systemd service filename #310

CallumBanbery opened this issue Apr 24, 2019 · 0 comments · Fixed by #309

Comments

@CallumBanbery
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10.12
  • Ruby:
  • Distribution: Debian GNU/Linux 9.5 (stretch)
  • Module version: v4.0.0

How to reproduce (e.g Puppet code you use)

Set 'redis::manage_service_file: true' in hieradata.
Set 'redis::service_provider: "systemd"' in hieradata.

What are you seeing

When the config class creates the default instance it doesn't set the 'redis_server_name' variable, if the instance is set to manage the service file using systemd it creates the file as '/etc/systemd/system/.service'

if $title == 'default' {
$redis_file_name_orig = $config_file_orig
$redis_file_name = $config_file
} else {
$redis_server_name = "redis-server-${name}"
$redis_file_name_orig = sprintf('%s/%s.%s', dirname($config_file_orig), $redis_server_name, 'conf.puppet')
$redis_file_name = sprintf('%s/%s.%s', dirname($config_file), $redis_server_name, 'conf')
}

file { "/etc/systemd/system/${redis_server_name}.service":

What behaviour did you expect instead

It appears to be doing as the code says to do, however creating a service file just called '.service' is bad.

Output log

Any additional information you'd like to impart

CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.

As a part of adding the specs for manage_service_file I've added
a helper function that I was able to apply to existing tests.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 9, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.
CallumBanbery added a commit to CallumBanbery/puppet-redis that referenced this issue May 10, 2019
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.
cegeka-jenkins pushed a commit to cegeka/puppet-redis that referenced this issue Feb 16, 2021
Fixes voxpupuli#308
Fixes voxpupuli#310

The manage_service_file is configured incorrectly and doesn't
allow for overriding the value with hieradata.  Updaing the init.pp
class params allows the file to be passed in.

The filename for the systemd default service was incorrectly set
as the variable is undefined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant