Skip to content

(maint) Package was renamed in server::install - As a result of rename several underlying dependencies broke this is to update the require dependencies #727

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
Jun 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/server/installdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
creates => "${datadir}/mysql",
logoutput => on_failure,
path => '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin',
require => Package[$mysql::server::package_name],
require => Package['mysql-server'],
Copy link
Contributor

Choose a reason for hiding this comment

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

This will still fail if $mysql::server::package_manage is false, since the package resource won't be in the catalog.

Copy link
Contributor

Choose a reason for hiding this comment

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

But if $mysql::server::package_manage is false or undef and the package resource isn't created, then this should rightfully fail right? But looking at the code, it is set from $mysql::params::server_package_name which should always be set.

Copy link
Contributor

Choose a reason for hiding this comment

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

installdb itself is also wrapped in a if $mysql::server::package_manage. While this does make that var's name questionable, it does keep it from failing.

The service does not have that protection, and should have a similar construct as the if $mysql::server::manage_config_file at https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/server/service.pp#L39

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As it should fail if the server package is not installed. Perhaps a rework of required with a

notify{'mysql-server': }
...
package{$mysql::package_name:
  before => Notify['mysql-server']
}

this way others can subscribe to the class and have ordering

}

if $mysql::server::restart {
Expand Down
2 changes: 1 addition & 1 deletion manifests/server/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
name => $mysql::server::service_name,
enable => $mysql::server::real_service_enabled,
provider => $mysql::server::service_provider,
require => Package[$mysql::server::package_name],
require => Package['mysql-server'],
}

# only establish ordering between config file and service if
Expand Down