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/fix dependency issue in freebsd with log error file creation from 10.0.0 #1221

Conversation

rick-pri
Copy link
Contributor

Change relationship between the log-error file and the mysql datadir. In FreeBSD this file needs to be present before trying to create the datadir and running the initdb step but will only be created if the option exists.

We should probably also have a require on the log-error file resource for Package[ $mysql::server::package_name ] so that the user and group are present, however, this is probably ensured by the chaining elsewhere.

@smortex
Copy link
Contributor

smortex commented Jul 31, 2019

You have two unrelated commit in the PR (the 2 last).

I think you can fix this situation by:

git reset --hard 6fbd5a8
git push -f

@smortex
Copy link
Contributor

smortex commented Jul 31, 2019

Regarding dependency on user, group, the file resource will autorequire them.

@rick-pri rick-pri force-pushed the fix/fix-dependency-issue-in-freebsd-with-log-error-file-creation-from-10.0.0 branch from 5259475 to 6fbd5a8 Compare August 1, 2019 07:33
@rick-pri
Copy link
Contributor Author

rick-pri commented Aug 1, 2019

You have two unrelated commit in the PR (the 2 last).

I think you can fix this situation by:

git reset --hard 6fbd5a8
git push -f

Thanks for that, that's done.

Regarding dependency on user, group, the file resource will autorequire them.

I know that puppet normally does a good job of autorequiring things like this, however, I think that the user and group are created by the package and that's outside of the realm of what puppet knows about.
Quite often these service accounts created through the packages will actually have things like nologin set as the shell, and a specific home dir, which puppet wouldn't setup with an autorequired user account and I don't know what the package does if it encounters an existing account.

@smortex
Copy link
Contributor

smortex commented Aug 1, 2019

I know that puppet normally does a good job of autorequiring things like this, however, I think that the user and group are created by the package and that's outside of the realm of what puppet knows about.

Oh, I see… Yes, that totally makes sense!

Copy link
Contributor

@smortex smortex left a comment

Choose a reason for hiding this comment

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

As you said, the user and group will be created by the package, so we should require it.

@rick-pri
Copy link
Contributor Author

rick-pri commented Aug 5, 2019

As you said, the user and group will be created by the package, so we should require it.

I don't think that this is required. The chaining in the manifests/server.pp ensures that the package is installed before this manifest.

Here's the full chain from the server.pp for reference:

  Anchor['mysql::server::start']
  -> Class['mysql::server::config']
  -> Class['mysql::server::install']
  -> Class['mysql::server::binarylog']
  -> Class['mysql::server::installdb']
  -> Class['mysql::server::service']
  -> Class['mysql::server::root_password']
  -> Class['mysql::server::providers']
-> Anchor['mysql::server::end']

Copy link
Contributor

@ThoughtCrhyme ThoughtCrhyme left a comment

Choose a reason for hiding this comment

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

@rick-pri thanks for the PR, looks good to us.

@ThoughtCrhyme ThoughtCrhyme merged commit fb4aa1d into puppetlabs:master Aug 12, 2019
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.

4 participants