Skip to content

Manage service only if managed #688

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

Merged
merged 1 commit into from
Mar 16, 2015
Merged

Manage service only if managed #688

merged 1 commit into from
Mar 16, 2015

Conversation

mremy
Copy link

@mremy mremy commented Mar 16, 2015

In the case of an unmanaged mysql service, defined with:

class {'::mysql::server':
[...]
  service_manage => false,
[...]
}

We have the following error:

Undefined variable "service_ensure"

In this case, we don't want to have it "started" nor "stopped", as it is managed by another application (in our case by pacemaker).

This patch resolve this issue, by setting service_ensure to undef, in the case of an unmanaged service.

In the case of an unmanaged mysql service, defined with:
class {'::mysql::server':
[...]
  service_manage => false,
[...]
}

We have the following error:
Undefined variable "service_ensure"

In this case, we don't want to have it "started" or "stopped", as it is
managed by another application (in our case by pacemaker).

This patch resolve this issue, by setting service_ensure to undef, in the
case of an unmanaged service.
@mremy
Copy link
Author

mremy commented Mar 16, 2015

The described issue occurs only with "strict_variable" enabled.

@igalic
Copy link
Contributor

igalic commented Mar 16, 2015

we should add strict_variables to our .travis.yaml

igalic added a commit that referenced this pull request Mar 16, 2015
Manage service only if managed
@igalic igalic merged commit b09d233 into puppetlabs:master Mar 16, 2015
@igalic
Copy link
Contributor

igalic commented Mar 16, 2015

thank you @mremy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants