diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..e3a97007e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +## Summary +Provide a detailed description of all the changes present in this pull request. + +## Additional Context +Add any additional context about the problem here. +- [ ] Root cause and the steps to reproduce. (If applicable) +- [ ] Thought process behind the implementation. + +## Related Issues (if any) +Mention any related issues or pull requests. + +## Checklist +- [ ] 🟢 Spec tests. +- [ ] 🟢 Acceptance tests. +- [ ] Manually verified. (For example `puppet apply`) \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70ee26273..4d80c53ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: - name: Setup Acceptance Test Matrix id: get-matrix run: | - bundle exec matrix_from_metadata_v2 + bundle exec matrix_from_metadata_v2 --exclude-platforms '["Ubuntu-22.04-arm", "RedHat-9-arm"]' Acceptance: name: "${{matrix.platforms.label}}, ${{matrix.collection}}" @@ -71,10 +71,12 @@ jobs: bundle env - name: "Disable mysqld apparmor profile" - if: matrix.platforms.provider == 'provision::docker' - run: | + if: ${{matrix.platforms.provider == 'docker'}} + run: | sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld + sudo systemctl disable apparmor + sudo systemctl stop apparmor - name: Provision test environment run: | @@ -99,4 +101,3 @@ jobs: continue-on-error: true run: | bundle exec rake 'litmus:tear_down' - diff --git a/.github/workflows/labeller.yml b/.github/workflows/labeller.yml index 5434d3fff..ee149bf52 100644 --- a/.github/workflows/labeller.yml +++ b/.github/workflows/labeller.yml @@ -1,22 +1,27 @@ -name: community-labeller +name: Labeller on: issues: types: - opened + - labeled + - unlabeled pull_request_target: types: - opened + - labeled + - unlabeled jobs: label: runs-on: ubuntu-latest steps: - - uses: puppetlabs/community-labeller@v0 + - uses: puppetlabs/community-labeller@v1.0.1 name: Label issues or pull requests with: label_name: community label_color: '5319e7' org_membership: puppetlabs + fail_if_member: 'true' token: ${{ secrets.IAC_COMMUNITY_LABELER }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 29f22a679..f14093117 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -38,7 +38,7 @@ jobs: - name: Setup Acceptance Test Matrix id: get-matrix run: | - bundle exec matrix_from_metadata_v2 + bundle exec matrix_from_metadata_v2 --exclude-platforms '["Ubuntu-22.04-arm", "RedHat-9-arm"]' Acceptance: name: "${{matrix.platforms.label}}, ${{matrix.collection}}" @@ -70,10 +70,12 @@ jobs: bundle env - name: "Disable mysqld apparmor profile" - if: matrix.platforms.provider == 'provision::docker' + if: ${{matrix.platforms.provider == 'docker'}} run: | sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld + sudo systemctl disable apparmor + sudo systemctl stop apparmor - name: Provision test environment run: | @@ -98,4 +100,3 @@ jobs: continue-on-error: true run: | bundle exec rake 'litmus:tear_down' - diff --git a/.gitignore b/.gitignore index 988dcbbe6..3f1551212 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ /log/ /pkg/ /spec/fixtures/manifests/ -/spec/fixtures/modules/ +/spec/fixtures/modules/* /tmp/ /vendor/ /convert_report.txt diff --git a/.pdkignore b/.pdkignore index c538bea8b..862847a72 100644 --- a/.pdkignore +++ b/.pdkignore @@ -16,7 +16,7 @@ /log/ /pkg/ /spec/fixtures/manifests/ -/spec/fixtures/modules/ +/spec/fixtures/modules/* /tmp/ /vendor/ /convert_report.txt @@ -26,20 +26,17 @@ .envrc /inventory.yaml /spec/fixtures/litmus_inventory.yaml -/appveyor.yml -/.editorconfig /.fixtures.yml /Gemfile /.gitattributes +/.github/ /.gitignore -/.gitlab-ci.yml /.pdkignore /.puppet-lint.rc /Rakefile /rakelib/ /.rspec -/.rubocop.yml -/.travis.yml +/..yml /.yardopts /spec/ /.vscode/ diff --git a/.rubocop.yml b/.rubocop.yml index a206e025c..70ff105a8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,8 +7,6 @@ require: AllCops: NewCops: enable DisplayCopNames: true - ExtraDetails: true - DisplayStyleGuide: true TargetRubyVersion: '2.7' Include: - "**/*.rb" @@ -84,5 +82,645 @@ Style/Documentation: - spec/**/* Style/WordArray: EnforcedStyle: brackets +Performance/AncestorsInclude: + Enabled: true +Performance/BigDecimalWithNumericArgument: + Enabled: true +Performance/BlockGivenWithExplicitBlock: + Enabled: true +Performance/CaseWhenSplat: + Enabled: true +Performance/ConstantRegexp: + Enabled: true +Performance/MethodObjectAsBlock: + Enabled: true +Performance/RedundantSortBlock: + Enabled: true +Performance/RedundantStringChars: + Enabled: true +Performance/ReverseFirst: + Enabled: true +Performance/SortReverse: + Enabled: true +Performance/Squeeze: + Enabled: true +Performance/StringInclude: + Enabled: true +Performance/Sum: + Enabled: true +Style/CollectionMethods: + Enabled: true +Style/MethodCalledOnDoEndBlock: + Enabled: true +Style/StringMethods: + Enabled: true +Bundler/GemFilename: + Enabled: false +Bundler/InsecureProtocolSource: + Enabled: false +Capybara/CurrentPathExpectation: + Enabled: false +Capybara/VisibilityMatcher: + Enabled: false +Gemspec/DuplicatedAssignment: + Enabled: false +Gemspec/OrderedDependencies: + Enabled: false +Gemspec/RequiredRubyVersion: + Enabled: false +Gemspec/RubyVersionGlobalsUsage: + Enabled: false +Layout/ArgumentAlignment: + Enabled: false +Layout/BeginEndAlignment: + Enabled: false +Layout/ClosingHeredocIndentation: + Enabled: false +Layout/EmptyComment: + Enabled: false +Layout/EmptyLineAfterGuardClause: + Enabled: false +Layout/EmptyLinesAroundArguments: + Enabled: false +Layout/EmptyLinesAroundAttributeAccessor: + Enabled: false +Layout/EndOfLine: + Enabled: false +Layout/FirstArgumentIndentation: + Enabled: false +Layout/HashAlignment: + Enabled: false +Layout/HeredocIndentation: + Enabled: false +Layout/LeadingEmptyLines: + Enabled: false +Layout/SpaceAroundMethodCallOperator: + Enabled: false +Layout/SpaceInsideArrayLiteralBrackets: + Enabled: false +Layout/SpaceInsideReferenceBrackets: + Enabled: false +Lint/BigDecimalNew: + Enabled: false +Lint/BooleanSymbol: + Enabled: false +Lint/ConstantDefinitionInBlock: + Enabled: false +Lint/DeprecatedOpenSSLConstant: + Enabled: false +Lint/DisjunctiveAssignmentInConstructor: + Enabled: false +Lint/DuplicateElsifCondition: + Enabled: false +Lint/DuplicateRequire: + Enabled: false +Lint/DuplicateRescueException: + Enabled: false +Lint/EmptyConditionalBody: + Enabled: false +Lint/EmptyFile: + Enabled: false +Lint/ErbNewArguments: + Enabled: false +Lint/FloatComparison: + Enabled: false +Lint/HashCompareByIdentity: + Enabled: false +Lint/IdentityComparison: + Enabled: false +Lint/InterpolationCheck: + Enabled: false +Lint/MissingCopEnableDirective: + Enabled: false +Lint/MixedRegexpCaptureTypes: + Enabled: false +Lint/NestedPercentLiteral: + Enabled: false +Lint/NonDeterministicRequireOrder: + Enabled: false +Lint/OrderedMagicComments: + Enabled: false +Lint/OutOfRangeRegexpRef: + Enabled: false +Lint/RaiseException: + Enabled: false +Lint/RedundantCopEnableDirective: + Enabled: false +Lint/RedundantRequireStatement: + Enabled: false +Lint/RedundantSafeNavigation: + Enabled: false +Lint/RedundantWithIndex: + Enabled: false +Lint/RedundantWithObject: + Enabled: false +Lint/RegexpAsCondition: + Enabled: false +Lint/ReturnInVoidContext: + Enabled: false +Lint/SafeNavigationConsistency: + Enabled: false +Lint/SafeNavigationWithEmpty: + Enabled: false +Lint/SelfAssignment: + Enabled: false +Lint/SendWithMixinArgument: + Enabled: false +Lint/ShadowedArgument: + Enabled: false +Lint/StructNewOverride: + Enabled: false +Lint/ToJSON: + Enabled: false +Lint/TopLevelReturnWithArgument: + Enabled: false +Lint/TrailingCommaInAttributeDeclaration: + Enabled: false +Lint/UnreachableLoop: + Enabled: false +Lint/UriEscapeUnescape: + Enabled: false +Lint/UriRegexp: + Enabled: false +Lint/UselessMethodDefinition: + Enabled: false +Lint/UselessTimes: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/BlockLength: + Enabled: false +Metrics/BlockNesting: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/ParameterLists: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Migration/DepartmentName: + Enabled: false +Naming/AccessorMethodName: + Enabled: false +Naming/BlockParameterName: + Enabled: false +Naming/HeredocDelimiterCase: + Enabled: false +Naming/HeredocDelimiterNaming: + Enabled: false +Naming/MemoizedInstanceVariableName: + Enabled: false +Naming/MethodParameterName: + Enabled: false +Naming/RescuedExceptionsVariableName: + Enabled: false +Naming/VariableNumber: + Enabled: false +Performance/BindCall: + Enabled: false +Performance/DeletePrefix: + Enabled: false +Performance/DeleteSuffix: + Enabled: false +Performance/InefficientHashSearch: + Enabled: false +Performance/UnfreezeString: + Enabled: false +Performance/UriDefaultParser: + Enabled: false +RSpec/Be: + Enabled: false +RSpec/Capybara/FeatureMethods: + Enabled: false +RSpec/ContainExactly: + Enabled: false +RSpec/ContextMethod: + Enabled: false +RSpec/ContextWording: + Enabled: false +RSpec/DescribeClass: + Enabled: false +RSpec/EmptyHook: + Enabled: false +RSpec/EmptyLineAfterExample: + Enabled: false +RSpec/EmptyLineAfterExampleGroup: + Enabled: false +RSpec/EmptyLineAfterHook: + Enabled: false +RSpec/ExampleLength: + Enabled: false +RSpec/ExampleWithoutDescription: + Enabled: false +RSpec/ExpectChange: + Enabled: false +RSpec/ExpectInHook: + Enabled: false +RSpec/FactoryBot/AttributeDefinedStatically: + Enabled: false +RSpec/FactoryBot/CreateList: + Enabled: false +RSpec/FactoryBot/FactoryClassName: + Enabled: false +RSpec/HooksBeforeExamples: + Enabled: false +RSpec/ImplicitBlockExpectation: + Enabled: false +RSpec/ImplicitSubject: + Enabled: false +RSpec/LeakyConstantDeclaration: + Enabled: false +RSpec/LetBeforeExamples: + Enabled: false +RSpec/MatchArray: + Enabled: false +RSpec/MissingExampleGroupArgument: + Enabled: false RSpec/MultipleExpectations: - Max: 3 + Enabled: false +RSpec/MultipleMemoizedHelpers: + Enabled: false +RSpec/MultipleSubjects: + Enabled: false +RSpec/NestedGroups: + Enabled: false +RSpec/PredicateMatcher: + Enabled: false +RSpec/ReceiveCounts: + Enabled: false +RSpec/ReceiveNever: + Enabled: false +RSpec/RepeatedExampleGroupBody: + Enabled: false +RSpec/RepeatedExampleGroupDescription: + Enabled: false +RSpec/RepeatedIncludeExample: + Enabled: false +RSpec/ReturnFromStub: + Enabled: false +RSpec/SharedExamples: + Enabled: false +RSpec/StubbedMock: + Enabled: false +RSpec/UnspecifiedException: + Enabled: false +RSpec/VariableDefinition: + Enabled: false +RSpec/VoidExpect: + Enabled: false +RSpec/Yield: + Enabled: false +Security/Open: + Enabled: false +Style/AccessModifierDeclarations: + Enabled: false +Style/AccessorGrouping: + Enabled: false +Style/BisectedAttrAccessor: + Enabled: false +Style/CaseLikeIf: + Enabled: false +Style/ClassEqualityComparison: + Enabled: false +Style/ColonMethodDefinition: + Enabled: false +Style/CombinableLoops: + Enabled: false +Style/CommentedKeyword: + Enabled: false +Style/Dir: + Enabled: false +Style/DoubleCopDisableDirective: + Enabled: false +Style/EmptyBlockParameter: + Enabled: false +Style/EmptyLambdaParameter: + Enabled: false +Style/Encoding: + Enabled: false +Style/EvalWithLocation: + Enabled: false +Style/ExpandPathArguments: + Enabled: false +Style/ExplicitBlockArgument: + Enabled: false +Style/ExponentialNotation: + Enabled: false +Style/FloatDivision: + Enabled: false +Style/FrozenStringLiteralComment: + Enabled: false +Style/GlobalStdStream: + Enabled: false +Style/HashAsLastArrayItem: + Enabled: false +Style/HashLikeCase: + Enabled: false +Style/HashTransformKeys: + Enabled: false +Style/HashTransformValues: + Enabled: false +Style/IfUnlessModifier: + Enabled: false +Style/KeywordParametersOrder: + Enabled: false +Style/MinMax: + Enabled: false +Style/MixinUsage: + Enabled: false +Style/MultilineWhenThen: + Enabled: false +Style/NegatedUnless: + Enabled: false +Style/NumericPredicate: + Enabled: false +Style/OptionalBooleanParameter: + Enabled: false +Style/OrAssignment: + Enabled: false +Style/RandomWithOffset: + Enabled: false +Style/RedundantAssignment: + Enabled: false +Style/RedundantCondition: + Enabled: false +Style/RedundantConditional: + Enabled: false +Style/RedundantFetchBlock: + Enabled: false +Style/RedundantFileExtensionInRequire: + Enabled: false +Style/RedundantRegexpCharacterClass: + Enabled: false +Style/RedundantRegexpEscape: + Enabled: false +Style/RedundantSelfAssignment: + Enabled: false +Style/RedundantSort: + Enabled: false +Style/RescueStandardError: + Enabled: false +Style/SingleArgumentDig: + Enabled: false +Style/SlicingWithRange: + Enabled: false +Style/SoleNestedConditional: + Enabled: false +Style/StderrPuts: + Enabled: false +Style/StringConcatenation: + Enabled: false +Style/Strip: + Enabled: false +Style/SymbolProc: + Enabled: false +Style/TrailingBodyOnClass: + Enabled: false +Style/TrailingBodyOnMethodDefinition: + Enabled: false +Style/TrailingBodyOnModule: + Enabled: false +Style/TrailingCommaInHashLiteral: + Enabled: false +Style/TrailingMethodEndStatement: + Enabled: false +Style/UnpackFirst: + Enabled: false +Capybara/MatchStyle: + Enabled: false +Capybara/NegationMatcher: + Enabled: false +Capybara/SpecificActions: + Enabled: false +Capybara/SpecificFinders: + Enabled: false +Capybara/SpecificMatcher: + Enabled: false +Gemspec/DeprecatedAttributeAssignment: + Enabled: false +Gemspec/DevelopmentDependencies: + Enabled: false +Gemspec/RequireMFA: + Enabled: false +Layout/LineContinuationLeadingSpace: + Enabled: false +Layout/LineContinuationSpacing: + Enabled: false +Layout/LineEndStringConcatenationIndentation: + Enabled: false +Layout/SpaceBeforeBrackets: + Enabled: false +Lint/AmbiguousAssignment: + Enabled: false +Lint/AmbiguousOperatorPrecedence: + Enabled: false +Lint/AmbiguousRange: + Enabled: false +Lint/ConstantOverwrittenInRescue: + Enabled: false +Lint/DeprecatedConstants: + Enabled: false +Lint/DuplicateBranch: + Enabled: false +Lint/DuplicateMagicComment: + Enabled: false +Lint/DuplicateRegexpCharacterClassElement: + Enabled: false +Lint/EmptyBlock: + Enabled: false +Lint/EmptyClass: + Enabled: false +Lint/EmptyInPattern: + Enabled: false +Lint/IncompatibleIoSelectWithFiberScheduler: + Enabled: false +Lint/LambdaWithoutLiteralBlock: + Enabled: false +Lint/NoReturnInBeginEndBlocks: + Enabled: false +Lint/NonAtomicFileOperation: + Enabled: false +Lint/NumberedParameterAssignment: + Enabled: false +Lint/OrAssignmentToConstant: + Enabled: false +Lint/RedundantDirGlobSort: + Enabled: false +Lint/RefinementImportMethods: + Enabled: false +Lint/RequireRangeParentheses: + Enabled: false +Lint/RequireRelativeSelfPath: + Enabled: false +Lint/SymbolConversion: + Enabled: false +Lint/ToEnumArguments: + Enabled: false +Lint/TripleQuotes: + Enabled: false +Lint/UnexpectedBlockArity: + Enabled: false +Lint/UnmodifiedReduceAccumulator: + Enabled: false +Lint/UselessRescue: + Enabled: false +Lint/UselessRuby2Keywords: + Enabled: false +Metrics/CollectionLiteralLength: + Enabled: false +Naming/BlockForwarding: + Enabled: false +Performance/CollectionLiteralInLoop: + Enabled: false +Performance/ConcurrentMonotonicTime: + Enabled: false +Performance/MapCompact: + Enabled: false +Performance/RedundantEqualityComparisonBlock: + Enabled: false +Performance/RedundantSplitRegexpArgument: + Enabled: false +Performance/StringIdentifierArgument: + Enabled: false +RSpec/BeEq: + Enabled: false +RSpec/BeNil: + Enabled: false +RSpec/ChangeByZero: + Enabled: false +RSpec/ClassCheck: + Enabled: false +RSpec/DuplicatedMetadata: + Enabled: false +RSpec/ExcessiveDocstringSpacing: + Enabled: false +RSpec/FactoryBot/ConsistentParenthesesStyle: + Enabled: false +RSpec/FactoryBot/FactoryNameStyle: + Enabled: false +RSpec/FactoryBot/SyntaxMethods: + Enabled: false +RSpec/IdenticalEqualityAssertion: + Enabled: false +RSpec/NoExpectationExample: + Enabled: false +RSpec/PendingWithoutReason: + Enabled: false +RSpec/Rails/AvoidSetupHook: + Enabled: false +RSpec/Rails/HaveHttpStatus: + Enabled: false +RSpec/Rails/InferredSpecType: + Enabled: false +RSpec/Rails/MinitestAssertions: + Enabled: false +RSpec/Rails/TravelAround: + Enabled: false +RSpec/RedundantAround: + Enabled: false +RSpec/SkipBlockInsideExample: + Enabled: false +RSpec/SortMetadata: + Enabled: false +RSpec/SubjectDeclaration: + Enabled: false +RSpec/VerifiedDoubleReference: + Enabled: false +Security/CompoundHash: + Enabled: false +Security/IoMethods: + Enabled: false +Style/ArgumentsForwarding: + Enabled: false +Style/ArrayIntersect: + Enabled: false +Style/CollectionCompact: + Enabled: false +Style/ComparableClamp: + Enabled: false +Style/ConcatArrayLiterals: + Enabled: false +Style/DirEmpty: + Enabled: false +Style/DocumentDynamicEvalDefinition: + Enabled: false +Style/EmptyHeredoc: + Enabled: false +Style/EndlessMethod: + Enabled: false +Style/EnvHome: + Enabled: false +Style/FetchEnvVar: + Enabled: false +Style/FileEmpty: + Enabled: false +Style/FileRead: + Enabled: false +Style/FileWrite: + Enabled: false +Style/HashConversion: + Enabled: false +Style/HashExcept: + Enabled: false +Style/IfWithBooleanLiteralBranches: + Enabled: false +Style/InPatternThen: + Enabled: false +Style/MagicCommentFormat: + Enabled: false +Style/MapCompactWithConditionalBlock: + Enabled: false +Style/MapToHash: + Enabled: false +Style/MapToSet: + Enabled: false +Style/MinMaxComparison: + Enabled: false +Style/MultilineInPatternThen: + Enabled: false +Style/NegatedIfElseCondition: + Enabled: false +Style/NestedFileDirname: + Enabled: false +Style/NilLambda: + Enabled: false +Style/NumberedParameters: + Enabled: false +Style/NumberedParametersLimit: + Enabled: false +Style/ObjectThen: + Enabled: false +Style/OpenStructUse: + Enabled: false +Style/OperatorMethodCall: + Enabled: false +Style/QuotedSymbols: + Enabled: false +Style/RedundantArgument: + Enabled: false +Style/RedundantConstantBase: + Enabled: false +Style/RedundantDoubleSplatHashBraces: + Enabled: false +Style/RedundantEach: + Enabled: false +Style/RedundantHeredocDelimiterQuotes: + Enabled: false +Style/RedundantInitialize: + Enabled: false +Style/RedundantSelfAssignmentBranch: + Enabled: false +Style/RedundantStringEscape: + Enabled: false +Style/SelectByRegexp: + Enabled: false +Style/StringChars: + Enabled: false +Style/SwapValues: + Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4aca98123..153e14bfa 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,86 +1,12 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-04-12 10:15:38 UTC using RuboCop version 1.48.1. +# on 2023-12-05 10:38:45 UTC using RuboCop version 1.48.1. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -Lint/FloatComparison: - Exclude: - - 'spec/spec_helper_acceptance_local.rb' - -# Offense count: 18 -Lint/ReturnInVoidContext: - Exclude: - - 'lib/puppet/provider/mysql_database/mysql.rb' - - 'lib/puppet/provider/mysql_user/mysql.rb' - -# Offense count: 18 -# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. -Metrics/AbcSize: - Max: 64 - -# Offense count: 12 -# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode. -# AllowedMethods: refine -Metrics/BlockLength: - Max: 210 - -# Offense count: 4 -# Configuration parameters: CountComments, CountAsOne. -Metrics/ClassLength: - Max: 170 - -# Offense count: 11 -# Configuration parameters: AllowedMethods, AllowedPatterns. -Metrics/CyclomaticComplexity: - Max: 15 - -# Offense count: 23 -# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. -Metrics/MethodLength: - Max: 75 - -# Offense count: 10 -# Configuration parameters: AllowedMethods, AllowedPatterns. -Metrics/PerceivedComplexity: - Max: 18 - -# Offense count: 24 -# Configuration parameters: MinSize. -Performance/CollectionLiteralInLoop: - Exclude: - - 'lib/puppet/type/mysql_grant.rb' - - 'spec/classes/mysql_backup_mysqldump_spec.rb' - - 'spec/classes/mysql_backup_xtrabackup_spec.rb' - - 'spec/classes/mysql_server_account_security_spec.rb' - - 'spec/classes/mysql_server_backup_spec.rb' - - 'spec/defines/mysql_db_spec.rb' - -# Offense count: 64 -# Configuration parameters: Prefixes, AllowedPatterns. -# Prefixes: when, with, without -RSpec/ContextWording: - Enabled: false - -# Offense count: 35 -# Configuration parameters: IgnoredMetadata. -RSpec/DescribeClass: - Enabled: false - -# Offense count: 33 -# Configuration parameters: CountAsOne. -RSpec/ExampleLength: - Max: 32 - -# Offense count: 36 -# Configuration parameters: AllowSubject. -RSpec/MultipleMemoizedHelpers: - Max: 8 - -# Offense count: 121 +# Offense count: 143 # Configuration parameters: EnforcedStyle, IgnoreSharedExamples. # SupportedStyles: always, named_only RSpec/NamedSubject: @@ -94,35 +20,6 @@ RSpec/NamedSubject: - 'spec/classes/mysql_server_backup_spec.rb' - 'spec/classes/mysql_server_spec.rb' - 'spec/defines/mysql_db_spec.rb' + - 'spec/functions/mysql_innobackupex_args_spec.rb' - 'spec/functions/mysql_normalise_and_deepmerge_spec.rb' - 'spec/functions/mysql_strip_hash_spec.rb' - -# Offense count: 45 -# Configuration parameters: AllowedGroups. -RSpec/NestedGroups: - Max: 5 - -# Offense count: 64 -# Configuration parameters: AllowedPatterns. -# AllowedPatterns: ^expect_, ^assert_ -RSpec/NoExpectationExample: - Enabled: false - -# Offense count: 61 -RSpec/StubbedMock: - Exclude: - - 'spec/unit/puppet/provider/mysql_database/mysql_spec.rb' - - 'spec/unit/puppet/provider/mysql_plugin/mysql_spec.rb' - - 'spec/unit/puppet/provider/mysql_user/mysql_spec.rb' - -# Offense count: 1 -# Configuration parameters: MinBranchesCount. -Style/HashLikeCase: - Exclude: - - 'lib/puppet/provider/mysql_login_path/inifile.rb' - -# Offense count: 2 -Style/MixinUsage: - Exclude: - - 'spec/spec_helper.rb' - - 'spec/spec_helper_local.rb' diff --git a/.sync.yml b/.sync.yml index b6014356d..383ce5c94 100644 --- a/.sync.yml +++ b/.sync.yml @@ -3,19 +3,15 @@ delete: true appveyor.yml: delete: true +rubocop.yml: + include_todos: true + -Gemfile: - optional: - ":development": - - gem: github_changelog_generator - version: '= 1.15.2' spec/spec_helper.rb: spec_overrides: - require 'spec_helper_local' coverage_report: true "  changelog_user": puppetlabs -Rakefile: - changelog_max_issues: 500 .gitpod.Dockerfile: unmanaged: false .gitpod.yml: @@ -32,6 +28,7 @@ Rakefile: delete: true changelog_since_tag: 'v11.0.3' Rakefile: + changelog_max_issues: 500 extra_disabled_lint_checks: - anchor_resource - params_empty_string_assignment diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aa5aa675..67b6e2f53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,1400 +1,1258 @@ -# Change log + +# Changelog -All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). +All notable changes to this project will be documented in this file. -## [v14.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.3.0) (2023-04-17) +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). -[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v13.3.0...v13.3.0) +## [v15.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v15.0.0) - 2023-06-19 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v14.0.0...v15.0.0) + +### Added + +- (CONT-576) allow deferred function for token & secrets [#1569](https://github.com/puppetlabs/puppetlabs-mysql/pull/1569) ([Ramesh7](https://github.com/Ramesh7)) ### Changed +- pdksync - (MAINT) - Require Stdlib 9.x [#1572](https://github.com/puppetlabs/puppetlabs-mysql/pull/1572) ([LukasAud](https://github.com/LukasAud)) + +### Fixed + +- Fix broken sensitive parameter for mysql::password [#1564](https://github.com/puppetlabs/puppetlabs-mysql/pull/1564) ([cruelsmith](https://github.com/cruelsmith)) -- \(CONT-789\) Add Support for Puppet 8 / Drop Support for Puppet 6 [\#1557](https://github.com/puppetlabs/puppetlabs-mysql/pull/1557) ([david22swan](https://github.com/david22swan)) +## [v14.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v14.0.0) - 2023-04-17 -## [v13.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.3.0) (2023-04-11) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v13.3.0...v14.0.0) + +### Changed +- (CONT-789) Add Support for Puppet 8 / Drop Support for Puppet 6 [#1557](https://github.com/puppetlabs/puppetlabs-mysql/pull/1557) ([david22swan](https://github.com/david22swan)) + +## [v13.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.3.0) - 2023-04-11 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v13.2.0...v13.3.0) ### Added -- mysql::server: Implement reload\_on\_config\_change [\#1551](https://github.com/puppetlabs/puppetlabs-mysql/pull/1551) ([bastelfreak](https://github.com/bastelfreak)) +- mysql::server: Implement reload_on_config_change [#1551](https://github.com/puppetlabs/puppetlabs-mysql/pull/1551) ([bastelfreak](https://github.com/bastelfreak)) ### Fixed -- move static data from params to server class [\#1552](https://github.com/puppetlabs/puppetlabs-mysql/pull/1552) ([bastelfreak](https://github.com/bastelfreak)) +- move static data from params to server class [#1552](https://github.com/puppetlabs/puppetlabs-mysql/pull/1552) ([bastelfreak](https://github.com/bastelfreak)) -## [v13.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.2.0) (2023-02-24) +## [v13.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.2.0) - 2023-02-24 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v13.1.0...v13.2.0) ### Added -- \(CONT-359\) Syntax update [\#1532](https://github.com/puppetlabs/puppetlabs-mysql/pull/1532) ([LukasAud](https://github.com/LukasAud)) +- (CONT-359) Syntax update [#1532](https://github.com/puppetlabs/puppetlabs-mysql/pull/1532) ([LukasAud](https://github.com/LukasAud)) ### Fixed -- xtrabackup.sh only touch when backup\_success\_file\_path is set [\#1522](https://github.com/puppetlabs/puppetlabs-mysql/pull/1522) ([JvGinkel](https://github.com/JvGinkel)) +- xtrabackup.sh only touch when backup_success_file_path is set [#1522](https://github.com/puppetlabs/puppetlabs-mysql/pull/1522) ([JvGinkel](https://github.com/JvGinkel)) -## [v13.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.1.0) (2022-12-20) +## [v13.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.1.0) - 2022-12-20 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v13.0.1...v13.1.0) ### Added -- mysql::db sql parameter support filenames with multiple dots [\#1505](https://github.com/puppetlabs/puppetlabs-mysql/pull/1505) ([skn-bvdh](https://github.com/skn-bvdh)) +- mysql::db sql parameter support filenames with multiple dots [#1505](https://github.com/puppetlabs/puppetlabs-mysql/pull/1505) ([skn-bvdh](https://github.com/skn-bvdh)) ### Fixed -- \(GH-1518\) Declare minimum Puppet version 6.24.0 [\#1519](https://github.com/puppetlabs/puppetlabs-mysql/pull/1519) ([pmcmaw](https://github.com/pmcmaw)) -- \(GH-1516\) Update sql example to use array [\#1517](https://github.com/puppetlabs/puppetlabs-mysql/pull/1517) ([pmcmaw](https://github.com/pmcmaw)) -- do not emit other ssl directives when ssl = false [\#1513](https://github.com/puppetlabs/puppetlabs-mysql/pull/1513) ([kjetilho](https://github.com/kjetilho)) -- \(GH-1491\) Fix for Ubuntu 22.04 [\#1508](https://github.com/puppetlabs/puppetlabs-mysql/pull/1508) ([david22swan](https://github.com/david22swan)) +- (GH-1518) Declare minimum Puppet version 6.24.0 [#1519](https://github.com/puppetlabs/puppetlabs-mysql/pull/1519) ([pmcmaw](https://github.com/pmcmaw)) +- (GH-1516) Update sql example to use array [#1517](https://github.com/puppetlabs/puppetlabs-mysql/pull/1517) ([pmcmaw](https://github.com/pmcmaw)) +- do not emit other ssl directives when ssl = false [#1513](https://github.com/puppetlabs/puppetlabs-mysql/pull/1513) ([kjetilho](https://github.com/kjetilho)) +- (GH-1491) Fix for Ubuntu 22.04 [#1508](https://github.com/puppetlabs/puppetlabs-mysql/pull/1508) ([david22swan](https://github.com/david22swan)) -## [v13.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.0.1) (2022-10-24) +## [v13.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.0.1) - 2022-10-24 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v13.0.0...v13.0.1) ### Fixed -- \(CONT-173\) - Updating deprecated facter instances [\#1501](https://github.com/puppetlabs/puppetlabs-mysql/pull/1501) ([jordanbreen28](https://github.com/jordanbreen28)) -- pdksync - \(CONT-189\) Remove support for RedHat6 / OracleLinux6 / Scientific6 [\#1498](https://github.com/puppetlabs/puppetlabs-mysql/pull/1498) ([david22swan](https://github.com/david22swan)) -- pdksync - \(CONT-130\) - Dropping Support for Debian 9 [\#1495](https://github.com/puppetlabs/puppetlabs-mysql/pull/1495) ([jordanbreen28](https://github.com/jordanbreen28)) -- MySQL 8.0: Grant required privileges to xtrabackup user [\#1478](https://github.com/puppetlabs/puppetlabs-mysql/pull/1478) ([jan-win1993](https://github.com/jan-win1993)) +- (CONT-173) - Updating deprecated facter instances [#1501](https://github.com/puppetlabs/puppetlabs-mysql/pull/1501) ([jordanbreen28](https://github.com/jordanbreen28)) +- pdksync - (CONT-189) Remove support for RedHat6 / OracleLinux6 / Scientific6 [#1498](https://github.com/puppetlabs/puppetlabs-mysql/pull/1498) ([david22swan](https://github.com/david22swan)) +- pdksync - (CONT-130) - Dropping Support for Debian 9 [#1495](https://github.com/puppetlabs/puppetlabs-mysql/pull/1495) ([jordanbreen28](https://github.com/jordanbreen28)) +- MySQL 8.0: Grant required privileges to xtrabackup user [#1478](https://github.com/puppetlabs/puppetlabs-mysql/pull/1478) ([jan-win1993](https://github.com/jan-win1993)) -## [v13.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.0.0) (2022-08-25) +## [v13.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v13.0.0) - 2022-08-25 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v12.0.3...v13.0.0) -### Changed - -- Harden db defined type [\#1484](https://github.com/puppetlabs/puppetlabs-mysql/pull/1484) ([chelnak](https://github.com/chelnak)) - ### Added -- pdksync - \(GH-cat-11\) Certify Support for Ubuntu 22.04 [\#1483](https://github.com/puppetlabs/puppetlabs-mysql/pull/1483) ([david22swan](https://github.com/david22swan)) -- \[Compatibility\] Add Raspbian OS to provider configuration [\#1481](https://github.com/puppetlabs/puppetlabs-mysql/pull/1481) ([jordi-upc](https://github.com/jordi-upc)) -- Allow excludedatabases when using file\_per\_database [\#1480](https://github.com/puppetlabs/puppetlabs-mysql/pull/1480) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB)) -- pdksync - \(GH-cat-12\) Add Support for Redhat 9 [\#1477](https://github.com/puppetlabs/puppetlabs-mysql/pull/1477) ([david22swan](https://github.com/david22swan)) +- pdksync - (GH-cat-11) Certify Support for Ubuntu 22.04 [#1483](https://github.com/puppetlabs/puppetlabs-mysql/pull/1483) ([david22swan](https://github.com/david22swan)) +- [Compatibility] Add Raspbian OS to provider configuration [#1481](https://github.com/puppetlabs/puppetlabs-mysql/pull/1481) ([jordi-upc](https://github.com/jordi-upc)) +- Allow excludedatabases when using file_per_database [#1480](https://github.com/puppetlabs/puppetlabs-mysql/pull/1480) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB)) +- pdksync - (GH-cat-12) Add Support for Redhat 9 [#1477](https://github.com/puppetlabs/puppetlabs-mysql/pull/1477) ([david22swan](https://github.com/david22swan)) + +### Changed +- Harden db defined type [#1484](https://github.com/puppetlabs/puppetlabs-mysql/pull/1484) ([chelnak](https://github.com/chelnak)) ### Fixed -- Harden config class [\#1487](https://github.com/puppetlabs/puppetlabs-mysql/pull/1487) ([chelnak](https://github.com/chelnak)) -- Harden service class [\#1486](https://github.com/puppetlabs/puppetlabs-mysql/pull/1486) ([chelnak](https://github.com/chelnak)) -- Harden root password class [\#1485](https://github.com/puppetlabs/puppetlabs-mysql/pull/1485) ([chelnak](https://github.com/chelnak)) -- Use MariaDB for Ubuntu 20.04 [\#1449](https://github.com/puppetlabs/puppetlabs-mysql/pull/1449) ([treydock](https://github.com/treydock)) -- Add support for mariabackup [\#1447](https://github.com/puppetlabs/puppetlabs-mysql/pull/1447) ([rsynnest](https://github.com/rsynnest)) +- Harden config class [#1487](https://github.com/puppetlabs/puppetlabs-mysql/pull/1487) ([chelnak](https://github.com/chelnak)) +- Harden service class [#1486](https://github.com/puppetlabs/puppetlabs-mysql/pull/1486) ([chelnak](https://github.com/chelnak)) +- Harden root password class [#1485](https://github.com/puppetlabs/puppetlabs-mysql/pull/1485) ([chelnak](https://github.com/chelnak)) +- Use MariaDB for Ubuntu 20.04 [#1449](https://github.com/puppetlabs/puppetlabs-mysql/pull/1449) ([treydock](https://github.com/treydock)) +- Add support for mariabackup [#1447](https://github.com/puppetlabs/puppetlabs-mysql/pull/1447) ([rsynnest](https://github.com/rsynnest)) -## [v12.0.3](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.3) (2022-05-25) +## [v12.0.3](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.3) - 2022-05-25 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v12.0.2...v12.0.3) ### Fixed -- \(IAC-1595\) MySQL maintenance [\#1472](https://github.com/puppetlabs/puppetlabs-mysql/pull/1472) ([LukasAud](https://github.com/LukasAud)) -- Solve issue with repeated restarts if ssl-disable is true [\#1425](https://github.com/puppetlabs/puppetlabs-mysql/pull/1425) ([markasammut](https://github.com/markasammut)) +- (IAC-1595) MySQL maintenance [#1472](https://github.com/puppetlabs/puppetlabs-mysql/pull/1472) ([LukasAud](https://github.com/LukasAud)) +- Solve issue with repeated restarts if ssl-disable is true [#1425](https://github.com/puppetlabs/puppetlabs-mysql/pull/1425) ([markasammut](https://github.com/markasammut)) -## [v12.0.2](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.2) (2022-04-19) +## [v12.0.2](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.2) - 2022-04-19 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v12.0.1...v12.0.2) ### Added -- pdksync - \(IAC-1753\) - Add Support for AlmaLinux 8 [\#1444](https://github.com/puppetlabs/puppetlabs-mysql/pull/1444) ([david22swan](https://github.com/david22swan)) -- pdksync - \(IAC-1751\) - Add Support for Rocky 8 [\#1442](https://github.com/puppetlabs/puppetlabs-mysql/pull/1442) ([david22swan](https://github.com/david22swan)) +- pdksync - (IAC-1753) - Add Support for AlmaLinux 8 [#1444](https://github.com/puppetlabs/puppetlabs-mysql/pull/1444) ([david22swan](https://github.com/david22swan)) +- pdksync - (IAC-1751) - Add Support for Rocky 8 [#1442](https://github.com/puppetlabs/puppetlabs-mysql/pull/1442) ([david22swan](https://github.com/david22swan)) ### Fixed -- \(Bugfix\) Grant privileges idempotency Fix [\#1466](https://github.com/puppetlabs/puppetlabs-mysql/pull/1466) ([LukasAud](https://github.com/LukasAud)) -- pdksync - \(GH-iac-334\) Remove Support for Ubuntu 16.04 [\#1457](https://github.com/puppetlabs/puppetlabs-mysql/pull/1457) ([david22swan](https://github.com/david22swan)) -- pdksync - \(IAC-1787\) Remove Support for CentOS 6 [\#1450](https://github.com/puppetlabs/puppetlabs-mysql/pull/1450) ([david22swan](https://github.com/david22swan)) -- add mysql\_native\_password plugin to authentication\_string vs password [\#1441](https://github.com/puppetlabs/puppetlabs-mysql/pull/1441) ([Heidistein](https://github.com/Heidistein)) -- fix Error: Transaction store file transactionstore.yaml is corrupt [\#1429](https://github.com/puppetlabs/puppetlabs-mysql/pull/1429) ([andeman](https://github.com/andeman)) -- Combine multiple grants into one while checking state [\#1428](https://github.com/puppetlabs/puppetlabs-mysql/pull/1428) ([fuyar](https://github.com/fuyar)) +- (Bugfix) Grant privileges idempotency Fix [#1466](https://github.com/puppetlabs/puppetlabs-mysql/pull/1466) ([LukasAud](https://github.com/LukasAud)) +- pdksync - (GH-iac-334) Remove Support for Ubuntu 16.04 [#1457](https://github.com/puppetlabs/puppetlabs-mysql/pull/1457) ([david22swan](https://github.com/david22swan)) +- pdksync - (IAC-1787) Remove Support for CentOS 6 [#1450](https://github.com/puppetlabs/puppetlabs-mysql/pull/1450) ([david22swan](https://github.com/david22swan)) +- add mysql_native_password plugin to authentication_string vs password [#1441](https://github.com/puppetlabs/puppetlabs-mysql/pull/1441) ([Heidistein](https://github.com/Heidistein)) +- fix Error: Transaction store file transactionstore.yaml is corrupt [#1429](https://github.com/puppetlabs/puppetlabs-mysql/pull/1429) ([andeman](https://github.com/andeman)) +- Combine multiple grants into one while checking state [#1428](https://github.com/puppetlabs/puppetlabs-mysql/pull/1428) ([fuyar](https://github.com/fuyar)) -## [v12.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.1) (2021-08-26) +## [v12.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.1) - 2021-08-26 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v12.0.0...v12.0.1) ### Fixed -- \(IAC-1741\) Allow stdlib v8.0.0 [\#1433](https://github.com/puppetlabs/puppetlabs-mysql/pull/1433) ([david22swan](https://github.com/david22swan)) -- MODULES-8373 Fix mysql\_grant resource to be idempodent on MySQL 8+ [\#1427](https://github.com/puppetlabs/puppetlabs-mysql/pull/1427) ([theq86](https://github.com/theq86)) +- (IAC-1741) Allow stdlib v8.0.0 [#1433](https://github.com/puppetlabs/puppetlabs-mysql/pull/1433) ([david22swan](https://github.com/david22swan)) +- MODULES-8373 Fix mysql_grant resource to be idempodent on MySQL 8+ [#1427](https://github.com/puppetlabs/puppetlabs-mysql/pull/1427) ([theq86](https://github.com/theq86)) -## [v12.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.0) (2021-07-27) +## [v12.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v12.0.0) - 2021-07-27 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v11.1.0...v12.0.0) ### Changed +- Deprecate mysql::server::mysqltuner and show it as an example [#1409](https://github.com/puppetlabs/puppetlabs-mysql/pull/1409) ([ghoneycutt](https://github.com/ghoneycutt)) +- Deprecate mysql::server::monitor and show as an example [#1408](https://github.com/puppetlabs/puppetlabs-mysql/pull/1408) ([ghoneycutt](https://github.com/ghoneycutt)) +- Remove EOL platforms Debian 8 and Ubuntu 14.04 [#1406](https://github.com/puppetlabs/puppetlabs-mysql/pull/1406) ([ghoneycutt](https://github.com/ghoneycutt)) -- Deprecate mysql::server::mysqltuner and show it as an example [\#1409](https://github.com/puppetlabs/puppetlabs-mysql/pull/1409) ([ghoneycutt](https://github.com/ghoneycutt)) -- Deprecate mysql::server::monitor and show as an example [\#1408](https://github.com/puppetlabs/puppetlabs-mysql/pull/1408) ([ghoneycutt](https://github.com/ghoneycutt)) -- Remove EOL platforms Debian 8 and Ubuntu 14.04 [\#1406](https://github.com/puppetlabs/puppetlabs-mysql/pull/1406) ([ghoneycutt](https://github.com/ghoneycutt)) - -## [v11.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.1.0) (2021-07-05) +## [v11.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.1.0) - 2021-07-05 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v11.0.3...v11.1.0) ### Added -- \(MODULES-11115\) add Rocky Linux 8 compatibility [\#1405](https://github.com/puppetlabs/puppetlabs-mysql/pull/1405) ([vchepkov](https://github.com/vchepkov)) -- Use Puppet-Datatype Sensitive [\#1400](https://github.com/puppetlabs/puppetlabs-mysql/pull/1400) ([cocker-cc](https://github.com/cocker-cc)) +- (MODULES-11115) add Rocky Linux 8 compatibility [#1405](https://github.com/puppetlabs/puppetlabs-mysql/pull/1405) ([vchepkov](https://github.com/vchepkov)) +- Use Puppet-Datatype Sensitive [#1400](https://github.com/puppetlabs/puppetlabs-mysql/pull/1400) ([cocker-cc](https://github.com/cocker-cc)) ### Fixed -- Fix mysql\_user parameters update on modern MySQL [\#1415](https://github.com/puppetlabs/puppetlabs-mysql/pull/1415) ([weastur](https://github.com/weastur)) -- \(IAC-1677\) Fix issue with deprecated rspec [\#1414](https://github.com/puppetlabs/puppetlabs-mysql/pull/1414) ([ghoneycutt](https://github.com/ghoneycutt)) -- Fix broken link and style in documentation [\#1403](https://github.com/puppetlabs/puppetlabs-mysql/pull/1403) ([ghoneycutt](https://github.com/ghoneycutt)) +- Fix mysql_user parameters update on modern MySQL [#1415](https://github.com/puppetlabs/puppetlabs-mysql/pull/1415) ([weastur](https://github.com/weastur)) +- (IAC-1677) Fix issue with deprecated rspec [#1414](https://github.com/puppetlabs/puppetlabs-mysql/pull/1414) ([ghoneycutt](https://github.com/ghoneycutt)) +- Fix broken link and style in documentation [#1403](https://github.com/puppetlabs/puppetlabs-mysql/pull/1403) ([ghoneycutt](https://github.com/ghoneycutt)) -## v11.0.3 +## [v11.0.3](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.0.3) - 2021-06-21 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v11.0.2...v11.0.3) ### Fixed -- \(IAC-1430\) - Minor docs updating [\#1401](https://github.com/puppetlabs/puppetlabs-mysql/pull/1401) ([pmcmaw](https://github.com/pmcmaw)) +- (IAC-1430) - Minor docs updating [#1401](https://github.com/puppetlabs/puppetlabs-mysql/pull/1401) ([pmcmaw](https://github.com/pmcmaw)) -## [v11.0.2](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.0.2) (2021-06-07) +## [v11.0.2](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.0.2) - 2021-06-07 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v11.0.1...v11.0.2) ### Fixed -- \(bugfix\) - Pull python3-mysqldb in Debian Bullseye [\#1396](https://github.com/puppetlabs/puppetlabs-mysql/pull/1396) ([thomasgoirand](https://github.com/thomasgoirand)) -- Update xtrabackup package name for Ubuntu 20.04 [\#1387](https://github.com/puppetlabs/puppetlabs-mysql/pull/1387) ([rsynnest](https://github.com/rsynnest)) +- (bugfix) - Pull python3-mysqldb in Debian Bullseye [#1396](https://github.com/puppetlabs/puppetlabs-mysql/pull/1396) ([thomasgoirand](https://github.com/thomasgoirand)) +- Update xtrabackup package name for Ubuntu 20.04 [#1387](https://github.com/puppetlabs/puppetlabs-mysql/pull/1387) ([rsynnest](https://github.com/rsynnest)) -## [v11.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.0.1) (2021-04-19) +## [v11.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.0.1) - 2021-04-19 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v11.0.0...v11.0.1) ### Fixed -- Fix: Puppet Unknown variable: 'mysql::params::exec\_path' [\#1378](https://github.com/puppetlabs/puppetlabs-mysql/pull/1378) ([JvGinkel](https://github.com/JvGinkel)) -- \(IAC-1497\) - Removal of unsupported `translate` dependency [\#1375](https://github.com/puppetlabs/puppetlabs-mysql/pull/1375) ([david22swan](https://github.com/david22swan)) -- \(MODULES-10926\) Fix Java binding package for Ubuntu 20.04 [\#1373](https://github.com/puppetlabs/puppetlabs-mysql/pull/1373) ([treydock](https://github.com/treydock)) +- Fix: Puppet Unknown variable: 'mysql::params::exec_path' [#1378](https://github.com/puppetlabs/puppetlabs-mysql/pull/1378) ([JvGinkel](https://github.com/JvGinkel)) +- (IAC-1497) - Removal of unsupported `translate` dependency [#1375](https://github.com/puppetlabs/puppetlabs-mysql/pull/1375) ([david22swan](https://github.com/david22swan)) +- (MODULES-10926) Fix Java binding package for Ubuntu 20.04 [#1373](https://github.com/puppetlabs/puppetlabs-mysql/pull/1373) ([treydock](https://github.com/treydock)) -## [v11.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.0.0) (2021-03-01) +## [v11.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v11.0.0) - 2021-03-01 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.10.0...v11.0.0) -### Changed +### Added -- pdksync - \(MAINT\) Remove SLES 11 support [\#1370](https://github.com/puppetlabs/puppetlabs-mysql/pull/1370) ([sanfrancrisko](https://github.com/sanfrancrisko)) -- pdksync - \(MAINT\) Remove RHEL 5 family support [\#1369](https://github.com/puppetlabs/puppetlabs-mysql/pull/1369) ([sanfrancrisko](https://github.com/sanfrancrisko)) -- pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0 [\#1366](https://github.com/puppetlabs/puppetlabs-mysql/pull/1366) ([carabasdaniel](https://github.com/carabasdaniel)) +- Support compression command and extension [#1363](https://github.com/puppetlabs/puppetlabs-mysql/pull/1363) ([dploeger](https://github.com/dploeger)) -### Added +### Changed +- pdksync - Remove Puppet 5 from testing and bump minimal version to 6.0.0 [#1366](https://github.com/puppetlabs/puppetlabs-mysql/pull/1366) ([carabasdaniel](https://github.com/carabasdaniel)) + +### Fixed -- Support compression command and extension [\#1363](https://github.com/puppetlabs/puppetlabs-mysql/pull/1363) ([dploeger](https://github.com/dploeger)) +- pdksync - (MAINT) Remove SLES 11 support [#1370](https://github.com/puppetlabs/puppetlabs-mysql/pull/1370) ([sanfrancrisko](https://github.com/sanfrancrisko)) +- pdksync - (MAINT) Remove RHEL 5 family support [#1369](https://github.com/puppetlabs/puppetlabs-mysql/pull/1369) ([sanfrancrisko](https://github.com/sanfrancrisko)) -## [v10.10.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.10.0) (2021-02-11) +## [v10.10.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.10.0) - 2021-02-12 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.9.1...v10.10.0) ### Added -- Set default MySQL version for FreeBSD [\#1360](https://github.com/puppetlabs/puppetlabs-mysql/pull/1360) ([olevole](https://github.com/olevole)) +- Set default MySQL version for FreeBSD [#1360](https://github.com/puppetlabs/puppetlabs-mysql/pull/1360) ([olevole](https://github.com/olevole)) -## [v10.9.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.9.1) (2021-01-06) +## [v10.9.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.9.1) - 2021-01-07 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.9.0...v10.9.1) ### Fixed -- Repair check of logbindir [\#1348](https://github.com/puppetlabs/puppetlabs-mysql/pull/1348) ([qha](https://github.com/qha)) +- Repair check of logbindir [#1348](https://github.com/puppetlabs/puppetlabs-mysql/pull/1348) ([qha](https://github.com/qha)) -## [v10.9.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.9.0) (2020-12-16) +## [v10.9.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.9.0) - 2020-12-16 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.8.0...v10.9.0) ### Added -- \(FEAT\) Add support for Puppet 7 [\#1347](https://github.com/puppetlabs/puppetlabs-mysql/pull/1347) ([daianamezdrea](https://github.com/daianamezdrea)) -- \(IAC-996\) Removal of inappropriate terminology [\#1340](https://github.com/puppetlabs/puppetlabs-mysql/pull/1340) ([pmcmaw](https://github.com/pmcmaw)) +- (FEAT) Add support for Puppet 7 [#1347](https://github.com/puppetlabs/puppetlabs-mysql/pull/1347) ([daianamezdrea](https://github.com/daianamezdrea)) +- (IAC-996) Removal of inappropriate terminology [#1340](https://github.com/puppetlabs/puppetlabs-mysql/pull/1340) ([pmcmaw](https://github.com/pmcmaw)) + +## [v10.8.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.8.0) - 2020-11-04 -## [v10.8.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.8.0) (2020-11-03) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/"v10.8.0"...v10.8.0) -[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.7.1...v10.8.0) +## ["v10.8.0"](https://github.com/puppetlabs/puppetlabs-mysql/tree/"v10.8.0") - 2020-11-04 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.7.1..."v10.8.0") ### Added -- Add compatibility for Amazon Linux 2 [\#1328](https://github.com/puppetlabs/puppetlabs-mysql/pull/1328) ([greno2](https://github.com/greno2)) +- Add compatibility for Amazon Linux 2 [#1328](https://github.com/puppetlabs/puppetlabs-mysql/pull/1328) ([greno2](https://github.com/greno2)) ### Fixed -- \(IAC-1137\) Ensure curl package is installed for xtrabackup tests [\#1338](https://github.com/puppetlabs/puppetlabs-mysql/pull/1338) ([pmcmaw](https://github.com/pmcmaw)) -- \(MODULES-10788\) - fix for password prompt when creating mysql\_login\_path resource [\#1334](https://github.com/puppetlabs/puppetlabs-mysql/pull/1334) ([andeman](https://github.com/andeman)) -- \(MODULES-10790\) - Setting logbin results in error Unknown variable: 'managed\_dirs\_path' [\#1325](https://github.com/puppetlabs/puppetlabs-mysql/pull/1325) ([pmcmaw](https://github.com/pmcmaw)) -- Fix package for python bindings on Ubuntu 20.04 [\#1323](https://github.com/puppetlabs/puppetlabs-mysql/pull/1323) ([tobias-urdin](https://github.com/tobias-urdin)) +- (IAC-1137) Ensure curl package is installed for xtrabackup tests [#1338](https://github.com/puppetlabs/puppetlabs-mysql/pull/1338) ([pmcmaw](https://github.com/pmcmaw)) +- (MODULES-10788) - fix for password prompt when creating mysql_login_path resource [#1334](https://github.com/puppetlabs/puppetlabs-mysql/pull/1334) ([andeman](https://github.com/andeman)) +- (MODULES-10790) - Setting logbin results in error Unknown variable: 'managed_dirs_path' [#1325](https://github.com/puppetlabs/puppetlabs-mysql/pull/1325) ([pmcmaw](https://github.com/pmcmaw)) +- Fix package for python bindings on Ubuntu 20.04 [#1323](https://github.com/puppetlabs/puppetlabs-mysql/pull/1323) ([tobias-urdin](https://github.com/tobias-urdin)) -## [v10.7.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.7.1) (2020-09-25) +## [v10.7.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.7.1) - 2020-09-28 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.7.0...v10.7.1) ### Fixed -- \(IAC-1175\) Pin percona-release to version 1.0-22 for Debian 8 [\#1329](https://github.com/puppetlabs/puppetlabs-mysql/pull/1329) ([pmcmaw](https://github.com/pmcmaw)) -- \[MODULES-10773\] Fix for rh-mysql80 [\#1322](https://github.com/puppetlabs/puppetlabs-mysql/pull/1322) ([carabasdaniel](https://github.com/carabasdaniel)) +- (IAC-1175) Pin percona-release to version 1.0-22 for Debian 8 [#1329](https://github.com/puppetlabs/puppetlabs-mysql/pull/1329) ([pmcmaw](https://github.com/pmcmaw)) +- [MODULES-10773] Fix for rh-mysql80 [#1322](https://github.com/puppetlabs/puppetlabs-mysql/pull/1322) ([carabasdaniel](https://github.com/carabasdaniel)) -## [v10.7.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.7.0) (2020-08-12) +## [v10.7.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.7.0) - 2020-08-13 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.6.0...v10.7.0) ### Added -- pdksync - \(IAC-973\) - Update travis/appveyor to run on new default branch `main` [\#1316](https://github.com/puppetlabs/puppetlabs-mysql/pull/1316) ([david22swan](https://github.com/david22swan)) -- add package provider and source [\#1314](https://github.com/puppetlabs/puppetlabs-mysql/pull/1314) ([fe80](https://github.com/fe80)) +- pdksync - (IAC-973) - Update travis/appveyor to run on new default branch `main` [#1316](https://github.com/puppetlabs/puppetlabs-mysql/pull/1316) ([david22swan](https://github.com/david22swan)) +- add package provider and source [#1314](https://github.com/puppetlabs/puppetlabs-mysql/pull/1314) ([fe80](https://github.com/fe80)) ### Fixed -- Remove non printable characters [\#1315](https://github.com/puppetlabs/puppetlabs-mysql/pull/1315) ([elmobp](https://github.com/elmobp)) -- Remove control character from manifests/server.pp [\#1312](https://github.com/puppetlabs/puppetlabs-mysql/pull/1312) ([tomkrouper](https://github.com/tomkrouper)) +- Remove non printable characters [#1315](https://github.com/puppetlabs/puppetlabs-mysql/pull/1315) ([elmobp](https://github.com/elmobp)) +- Remove control character from manifests/server.pp [#1312](https://github.com/puppetlabs/puppetlabs-mysql/pull/1312) ([tomkrouper](https://github.com/tomkrouper)) -## [v10.6.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.6.0) (2020-06-23) +## [v10.6.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.6.0) - 2020-06-23 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.5.0...v10.6.0) ### Added -- Handle cron package from different module [\#1306](https://github.com/puppetlabs/puppetlabs-mysql/pull/1306) ([ashish1099](https://github.com/ashish1099)) -- \(IAC-746\) - Add ubuntu 20.04 support [\#1303](https://github.com/puppetlabs/puppetlabs-mysql/pull/1303) ([david22swan](https://github.com/david22swan)) -- \(MODULES-1550\) add new Feature MySQL login paths [\#1295](https://github.com/puppetlabs/puppetlabs-mysql/pull/1295) ([andeman](https://github.com/andeman)) +- Handle cron package from different module [#1306](https://github.com/puppetlabs/puppetlabs-mysql/pull/1306) ([ashish1099](https://github.com/ashish1099)) +- (IAC-746) - Add ubuntu 20.04 support [#1303](https://github.com/puppetlabs/puppetlabs-mysql/pull/1303) ([david22swan](https://github.com/david22swan)) +- (MODULES-1550) add new Feature MySQL login paths [#1295](https://github.com/puppetlabs/puppetlabs-mysql/pull/1295) ([andeman](https://github.com/andeman)) ### Fixed -- Add managed\_dirs parameter [\#1305](https://github.com/puppetlabs/puppetlabs-mysql/pull/1305) ([evgenkisel](https://github.com/evgenkisel)) -- change split on whitespace to split on tab in mysql\_user [\#1233](https://github.com/puppetlabs/puppetlabs-mysql/pull/1233) ([koshatul](https://github.com/koshatul)) +- Add managed_dirs parameter [#1305](https://github.com/puppetlabs/puppetlabs-mysql/pull/1305) ([evgenkisel](https://github.com/evgenkisel)) +- change split on whitespace to split on tab in mysql_user [#1233](https://github.com/puppetlabs/puppetlabs-mysql/pull/1233) ([koshatul](https://github.com/koshatul)) -## [v10.5.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.5.0) (2020-05-13) +## [v10.5.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.5.0) - 2020-05-13 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.4.0...v10.5.0) ### Added -- Support mariadb's ed25519-based authentication [\#1292](https://github.com/puppetlabs/puppetlabs-mysql/pull/1292) ([dciabrin](https://github.com/dciabrin)) -- Allow changing the mysql-config-file group-ownership [\#1284](https://github.com/puppetlabs/puppetlabs-mysql/pull/1284) ([unki](https://github.com/unki)) +- Support mariadb's ed25519-based authentication [#1292](https://github.com/puppetlabs/puppetlabs-mysql/pull/1292) ([dciabrin](https://github.com/dciabrin)) +- Allow changing the mysql-config-file group-ownership [#1284](https://github.com/puppetlabs/puppetlabs-mysql/pull/1284) ([unki](https://github.com/unki)) ### Fixed -- Remove legacy \(old API\) `mysql_password` function [\#1299](https://github.com/puppetlabs/puppetlabs-mysql/pull/1299) ([alexjfisher](https://github.com/alexjfisher)) -- Improve differences between generated mysql service id values [\#1293](https://github.com/puppetlabs/puppetlabs-mysql/pull/1293) ([ryaner](https://github.com/ryaner)) -- \(MODULES-10023\) Fix multiple xtrabackup regressions [\#1245](https://github.com/puppetlabs/puppetlabs-mysql/pull/1245) ([fraenki](https://github.com/fraenki)) -- Fix binarylog by allowing users to specify managed directories [\#1194](https://github.com/puppetlabs/puppetlabs-mysql/pull/1194) ([elfranne](https://github.com/elfranne)) +- Remove legacy (old API) `mysql_password` function [#1299](https://github.com/puppetlabs/puppetlabs-mysql/pull/1299) ([alexjfisher](https://github.com/alexjfisher)) +- Improve differences between generated mysql service id values [#1293](https://github.com/puppetlabs/puppetlabs-mysql/pull/1293) ([ryaner](https://github.com/ryaner)) +- (MODULES-10023) Fix multiple xtrabackup regressions [#1245](https://github.com/puppetlabs/puppetlabs-mysql/pull/1245) ([fraenki](https://github.com/fraenki)) +- Fix binarylog by allowing users to specify managed directories [#1194](https://github.com/puppetlabs/puppetlabs-mysql/pull/1194) ([elfranne](https://github.com/elfranne)) -## [v10.4.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.4.0) (2020-03-02) +## [v10.4.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.4.0) - 2020-03-03 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.3.0...v10.4.0) ### Added -- Allow adapting MySQL configuration file's permissions mode [\#1278](https://github.com/puppetlabs/puppetlabs-mysql/pull/1278) ([unki](https://github.com/unki)) -- pdksync - \(FM-8581\) - Debian 10 added to travis and provision file refactored [\#1275](https://github.com/puppetlabs/puppetlabs-mysql/pull/1275) ([david22swan](https://github.com/david22swan)) -- Allow backupcompress for xtrabackup profile [\#1196](https://github.com/puppetlabs/puppetlabs-mysql/pull/1196) ([Spuffnduff](https://github.com/Spuffnduff)) -- Enable module to not use default options [\#1192](https://github.com/puppetlabs/puppetlabs-mysql/pull/1192) ([morremeyer](https://github.com/morremeyer)) +- Allow adapting MySQL configuration file's permissions mode [#1278](https://github.com/puppetlabs/puppetlabs-mysql/pull/1278) ([unki](https://github.com/unki)) +- pdksync - (FM-8581) - Debian 10 added to travis and provision file refactored [#1275](https://github.com/puppetlabs/puppetlabs-mysql/pull/1275) ([david22swan](https://github.com/david22swan)) +- Allow backupcompress for xtrabackup profile [#1196](https://github.com/puppetlabs/puppetlabs-mysql/pull/1196) ([Spuffnduff](https://github.com/Spuffnduff)) +- Enable module to not use default options [#1192](https://github.com/puppetlabs/puppetlabs-mysql/pull/1192) ([morremeyer](https://github.com/morremeyer)) -## [v10.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.3.0) (2019-12-11) +## [v10.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.3.0) - 2019-12-11 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.2.1...v10.3.0) ### Added -- \(FM-8677\) - Support added for CentOS 8 [\#1254](https://github.com/puppetlabs/puppetlabs-mysql/pull/1254) ([david22swan](https://github.com/david22swan)) +- (FM-8677) - Support added for CentOS 8 [#1254](https://github.com/puppetlabs/puppetlabs-mysql/pull/1254) ([david22swan](https://github.com/david22swan)) ### Fixed -- Fix java and ruby binding packages for Debian 10 [\#1264](https://github.com/puppetlabs/puppetlabs-mysql/pull/1264) ([treydock](https://github.com/treydock)) -- \(MODULES-10114\) Confine fact for only when mysql is in PATH [\#1256](https://github.com/puppetlabs/puppetlabs-mysql/pull/1256) ([bFekete](https://github.com/bFekete)) +- Fix java and ruby binding packages for Debian 10 [#1264](https://github.com/puppetlabs/puppetlabs-mysql/pull/1264) ([treydock](https://github.com/treydock)) +- (MODULES-10114) Confine fact for only when mysql is in PATH [#1256](https://github.com/puppetlabs/puppetlabs-mysql/pull/1256) ([bFekete](https://github.com/bFekete)) -## [v10.2.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.1) (2019-10-30) +## [v10.2.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.1) - 2019-10-31 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.2.0...v10.2.1) ### Fixed -- Fix mysql::sql task error message [\#1243](https://github.com/puppetlabs/puppetlabs-mysql/pull/1243) ([alexjfisher](https://github.com/alexjfisher)) -- Fix xtrabackup regression introduced in \#1207 [\#1242](https://github.com/puppetlabs/puppetlabs-mysql/pull/1242) ([fraenki](https://github.com/fraenki)) -- Repair mysql\_grant docs and diagnostics [\#1237](https://github.com/puppetlabs/puppetlabs-mysql/pull/1237) ([qha](https://github.com/qha)) +- Fix mysql::sql task error message [#1243](https://github.com/puppetlabs/puppetlabs-mysql/pull/1243) ([alexjfisher](https://github.com/alexjfisher)) +- Fix xtrabackup regression introduced in #1207 [#1242](https://github.com/puppetlabs/puppetlabs-mysql/pull/1242) ([fraenki](https://github.com/fraenki)) +- Repair mysql_grant docs and diagnostics [#1237](https://github.com/puppetlabs/puppetlabs-mysql/pull/1237) ([qha](https://github.com/qha)) -## [v10.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.0) (2019-09-24) +## [v10.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.0) - 2019-09-24 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.1.0...v10.2.0) ### Added -- FM-8406 add support on Debian10 [\#1230](https://github.com/puppetlabs/puppetlabs-mysql/pull/1230) ([lionce](https://github.com/lionce)) -- Make backup success file path configurable [\#1207](https://github.com/puppetlabs/puppetlabs-mysql/pull/1207) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB)) +- FM-8406 add support on Debian10 [#1230](https://github.com/puppetlabs/puppetlabs-mysql/pull/1230) ([lionce](https://github.com/lionce)) +- Make backup success file path configurable [#1207](https://github.com/puppetlabs/puppetlabs-mysql/pull/1207) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB)) ### Fixed -- No package under FreeBSD [\#1227](https://github.com/puppetlabs/puppetlabs-mysql/pull/1227) ([jas01](https://github.com/jas01)) -- Fix group on FreeBSD [\#1226](https://github.com/puppetlabs/puppetlabs-mysql/pull/1226) ([jas01](https://github.com/jas01)) -- Don't run fact when you can't find mysqld [\#1224](https://github.com/puppetlabs/puppetlabs-mysql/pull/1224) ([jstewart612](https://github.com/jstewart612)) -- Bugfix on Debian 9 : ruby\_package\_name must be ruby-mysql2 [\#1223](https://github.com/puppetlabs/puppetlabs-mysql/pull/1223) ([leopoiroux](https://github.com/leopoiroux)) -- Fix errors for /bin/sh with the xtrabackup cron [\#1222](https://github.com/puppetlabs/puppetlabs-mysql/pull/1222) ([baldurmen](https://github.com/baldurmen)) -- Fix/fix dependency issue in freebsd with log error file creation from 10.0.0 [\#1221](https://github.com/puppetlabs/puppetlabs-mysql/pull/1221) ([rick-pri](https://github.com/rick-pri)) +- No package under FreeBSD [#1227](https://github.com/puppetlabs/puppetlabs-mysql/pull/1227) ([jas01](https://github.com/jas01)) +- Fix group on FreeBSD [#1226](https://github.com/puppetlabs/puppetlabs-mysql/pull/1226) ([jas01](https://github.com/jas01)) +- Don't run fact when you can't find mysqld [#1224](https://github.com/puppetlabs/puppetlabs-mysql/pull/1224) ([jstewart612](https://github.com/jstewart612)) +- Bugfix on Debian 9 : ruby_package_name must be ruby-mysql2 [#1223](https://github.com/puppetlabs/puppetlabs-mysql/pull/1223) ([leopoiroux](https://github.com/leopoiroux)) +- Fix errors for /bin/sh with the xtrabackup cron [#1222](https://github.com/puppetlabs/puppetlabs-mysql/pull/1222) ([baldurmen](https://github.com/baldurmen)) +- Fix/fix dependency issue in freebsd with log error file creation from 10.0.0 [#1221](https://github.com/puppetlabs/puppetlabs-mysql/pull/1221) ([rick-pri](https://github.com/rick-pri)) -## [v10.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.1.0) (2019-07-30) +## [v10.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.1.0) - 2019-07-31 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.0.0...v10.1.0) ### Added -- Allow backup::mysqldump::time to accept monthday, month, weekday [\#1214](https://github.com/puppetlabs/puppetlabs-mysql/pull/1214) ([malakai97](https://github.com/malakai97)) +- Allow backup::mysqldump::time to accept monthday, month, weekday [#1214](https://github.com/puppetlabs/puppetlabs-mysql/pull/1214) ([malakai97](https://github.com/malakai97)) -## [v10.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.0.0) (2019-06-26) +## [v10.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.0.0) - 2019-06-26 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.1.0...v10.0.0) ### Added -- add support for rh-mariadb102 [\#1209](https://github.com/puppetlabs/puppetlabs-mysql/pull/1209) ([martin-schlossarek](https://github.com/martin-schlossarek)) -- Freebsd compat [\#1208](https://github.com/puppetlabs/puppetlabs-mysql/pull/1208) ([kapouik](https://github.com/kapouik)) +- add support for rh-mariadb102 [#1209](https://github.com/puppetlabs/puppetlabs-mysql/pull/1209) ([martin-schlossarek](https://github.com/martin-schlossarek)) +- Freebsd compat [#1208](https://github.com/puppetlabs/puppetlabs-mysql/pull/1208) ([kapouik](https://github.com/kapouik)) ### Fixed -- FM-7982 - update provisioner to docker\_exp [\#1205](https://github.com/puppetlabs/puppetlabs-mysql/pull/1205) ([lionce](https://github.com/lionce)) +- FM-7982 - update provisioner to docker_exp [#1205](https://github.com/puppetlabs/puppetlabs-mysql/pull/1205) ([lionce](https://github.com/lionce)) -## [v9.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.1.0) (2019-06-10) +## [v9.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.1.0) - 2019-06-11 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.0.0...v9.1.0) ### Added -- Add option to specify $backupdir as a symlink target, for use with dm… [\#1200](https://github.com/puppetlabs/puppetlabs-mysql/pull/1200) ([comport3](https://github.com/comport3)) -- \(FM-8029\) Add RedHat 8 support [\#1199](https://github.com/puppetlabs/puppetlabs-mysql/pull/1199) ([eimlav](https://github.com/eimlav)) -- Allow own Xtrabackup script [\#1189](https://github.com/puppetlabs/puppetlabs-mysql/pull/1189) ([SaschaDoering](https://github.com/SaschaDoering)) -- Litmus conversion [\#1175](https://github.com/puppetlabs/puppetlabs-mysql/pull/1175) ([pmcmaw](https://github.com/pmcmaw)) +- Add option to specify $backupdir as a symlink target, for use with dm… [#1200](https://github.com/puppetlabs/puppetlabs-mysql/pull/1200) ([comport3](https://github.com/comport3)) +- (FM-8029) Add RedHat 8 support [#1199](https://github.com/puppetlabs/puppetlabs-mysql/pull/1199) ([eimlav](https://github.com/eimlav)) +- Allow own Xtrabackup script [#1189](https://github.com/puppetlabs/puppetlabs-mysql/pull/1189) ([SaschaDoering](https://github.com/SaschaDoering)) +- Litmus conversion [#1175](https://github.com/puppetlabs/puppetlabs-mysql/pull/1175) ([pmcmaw](https://github.com/pmcmaw)) ### Fixed -- \(MODULES-6875,MODULES-7487\) - Fix mariadb mysql\_user password idempotency [\#1195](https://github.com/puppetlabs/puppetlabs-mysql/pull/1195) ([alexjfisher](https://github.com/alexjfisher)) +- (MODULES-6875,MODULES-7487) - Fix mariadb mysql_user password idempotency [#1195](https://github.com/puppetlabs/puppetlabs-mysql/pull/1195) ([alexjfisher](https://github.com/alexjfisher)) -## [v9.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.0.0) (2019-05-21) +## [v9.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.0.0) - 2019-05-22 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.1.0...v9.0.0) -### Changed - -- pdksync - \(MODULES-8444\) - Raise lower Puppet bound [\#1184](https://github.com/puppetlabs/puppetlabs-mysql/pull/1184) ([david22swan](https://github.com/david22swan)) - ### Added -- Make incremental backups deactivable [\#1188](https://github.com/puppetlabs/puppetlabs-mysql/pull/1188) ([SaschaDoering](https://github.com/SaschaDoering)) -- Allow multiple backupmethods [\#1187](https://github.com/puppetlabs/puppetlabs-mysql/pull/1187) ([SaschaDoering](https://github.com/SaschaDoering)) +- Make incremental backups deactivable [#1188](https://github.com/puppetlabs/puppetlabs-mysql/pull/1188) ([SaschaDoering](https://github.com/SaschaDoering)) +- Allow multiple backupmethods [#1187](https://github.com/puppetlabs/puppetlabs-mysql/pull/1187) ([SaschaDoering](https://github.com/SaschaDoering)) + +### Changed +- pdksync - (MODULES-8444) - Raise lower Puppet bound [#1184](https://github.com/puppetlabs/puppetlabs-mysql/pull/1184) ([david22swan](https://github.com/david22swan)) ### Fixed -- Fix the contribution guide URL [\#1190](https://github.com/puppetlabs/puppetlabs-mysql/pull/1190) ([mauricemeyer](https://github.com/mauricemeyer)) -- \(MODULES-8886\) Revert removal of deepmerge function [\#1181](https://github.com/puppetlabs/puppetlabs-mysql/pull/1181) ([eimlav](https://github.com/eimlav)) -- Fixed Changelog links for 8.1.0 [\#1180](https://github.com/puppetlabs/puppetlabs-mysql/pull/1180) ([mauricemeyer](https://github.com/mauricemeyer)) +- Fix the contribution guide URL [#1190](https://github.com/puppetlabs/puppetlabs-mysql/pull/1190) ([morremeyer](https://github.com/morremeyer)) +- (MODULES-8886) Revert removal of deepmerge function [#1181](https://github.com/puppetlabs/puppetlabs-mysql/pull/1181) ([eimlav](https://github.com/eimlav)) +- Fixed Changelog links for 8.1.0 [#1180](https://github.com/puppetlabs/puppetlabs-mysql/pull/1180) ([morremeyer](https://github.com/morremeyer)) -## [8.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.1.0) (2019-04-03) +## [8.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.1.0) - 2019-04-03 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.0.1...8.1.0) ### Added -- Rotate option for xtrabackup script [\#1176](https://github.com/puppetlabs/puppetlabs-mysql/pull/1176) ([elfranne](https://github.com/elfranne)) -- Add support for dynamic backupmethods/mariabackup [\#1171](https://github.com/puppetlabs/puppetlabs-mysql/pull/1171) ([danquack](https://github.com/danquack)) +- Rotate option for xtrabackup script [#1176](https://github.com/puppetlabs/puppetlabs-mysql/pull/1176) ([elfranne](https://github.com/elfranne)) ### Fixed -- \(MODULES-6627\) Remove unused --host flags from mysqlcaller [\#1174](https://github.com/puppetlabs/puppetlabs-mysql/pull/1174) ([david22swan](https://github.com/david22swan)) -- Set correct packagename for ruby\_mysql on Ubuntu 18.04 [\#1163](https://github.com/puppetlabs/puppetlabs-mysql/pull/1163) ([datty](https://github.com/datty)) -- \[MODULES-8779\] Set proper python\_package\_name for RHEL/CentOS 8 [\#1161](https://github.com/puppetlabs/puppetlabs-mysql/pull/1161) ([javierpena](https://github.com/javierpena)) -- fix install ordering for innodb data size [\#1160](https://github.com/puppetlabs/puppetlabs-mysql/pull/1160) ([fe80](https://github.com/fe80)) +- (MODULES-6627) Remove unused --host flags from mysqlcaller [#1174](https://github.com/puppetlabs/puppetlabs-mysql/pull/1174) ([david22swan](https://github.com/david22swan)) +- Set correct packagename for ruby_mysql on Ubuntu 18.04 [#1163](https://github.com/puppetlabs/puppetlabs-mysql/pull/1163) ([datty](https://github.com/datty)) +- [MODULES-8779] Set proper python_package_name for RHEL/CentOS 8 [#1161](https://github.com/puppetlabs/puppetlabs-mysql/pull/1161) ([javierpena](https://github.com/javierpena)) +- fix install ordering for innodb data size [#1160](https://github.com/puppetlabs/puppetlabs-mysql/pull/1160) ([fe80](https://github.com/fe80)) -## [8.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.1) (2019-03-20) +## [8.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.1) - 2019-03-20 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.0.0...8.0.1) +### Added + +- Add support for dynamic backupmethods/mariabackup [#1171](https://github.com/puppetlabs/puppetlabs-mysql/pull/1171) ([danquack](https://github.com/danquack)) + ### Fixed -- \(MODULES-8684\) - Removing private tags from Puppet Types [\#1170](https://github.com/puppetlabs/puppetlabs-mysql/pull/1170) ([david22swan](https://github.com/david22swan)) +- (MODULES-8684) - Removing private tags from Puppet Types [#1170](https://github.com/puppetlabs/puppetlabs-mysql/pull/1170) ([david22swan](https://github.com/david22swan)) -## [8.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.0) (2019-01-18) +## [8.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.0) - 2019-01-23 [Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/7.0.0...8.0.0) +### Added + +- (MODULES-3539) Allow @ in username [#1155](https://github.com/puppetlabs/puppetlabs-mysql/pull/1155) ([Fogelholk](https://github.com/Fogelholk)) +- (MODULES-8144) - Add support for SLES 15 [#1146](https://github.com/puppetlabs/puppetlabs-mysql/pull/1146) ([eimlav](https://github.com/eimlav)) +- Added support for RHSCL mysql versions and support for .mylogin.cnf for MySQL 5.6.6+ [#1061](https://github.com/puppetlabs/puppetlabs-mysql/pull/1061) ([DJMuggs](https://github.com/DJMuggs)) + +### Changed +- (MODULES-8193) - Removal of inbuilt deepmerge and dirname functions [#1145](https://github.com/puppetlabs/puppetlabs-mysql/pull/1145) ([david22swan](https://github.com/david22swan)) + +### Fixed + +- (MODULES-8193) - Wrapper methods created for inbuilt 4.x functions [#1151](https://github.com/puppetlabs/puppetlabs-mysql/pull/1151) ([david22swan](https://github.com/david22swan)) +- pdksync - (FM-7655) Fix rubygems-update for ruby < 2.3 [#1150](https://github.com/puppetlabs/puppetlabs-mysql/pull/1150) ([tphoney](https://github.com/tphoney)) +- Add includedir for Gentoo [#1147](https://github.com/puppetlabs/puppetlabs-mysql/pull/1147) ([baurmatt](https://github.com/baurmatt)) +- add mysql_native_password for mariadb 10.2 in password_hash [#1117](https://github.com/puppetlabs/puppetlabs-mysql/pull/1117) ([mlk-89](https://github.com/mlk-89)) +- Removing query_cache ops that are no longer supported in MySQL >= 8.0 [#1107](https://github.com/puppetlabs/puppetlabs-mysql/pull/1107) ([ernstae](https://github.com/ernstae)) + +## [7.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/7.0.0) - 2018-10-25 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.2.0...7.0.0) + +### Added + +- (MODULES-7857) Support user creation on galera [#1130](https://github.com/puppetlabs/puppetlabs-mysql/pull/1130) ([MaxFedotov](https://github.com/MaxFedotov)) +- MySQL 8 compatibility in user management [#1092](https://github.com/puppetlabs/puppetlabs-mysql/pull/1092) ([zpetr](https://github.com/zpetr)) + ### Changed +- (MODULES-6923) remove staging module [#1115](https://github.com/puppetlabs/puppetlabs-mysql/pull/1115) ([tphoney](https://github.com/tphoney)) + +### Fixed + +- (MODULES-7487) Check authentication string for user password on MariaDB 10.2.16+ [#1135](https://github.com/puppetlabs/puppetlabs-mysql/pull/1135) ([gguillotte](https://github.com/gguillotte)) -- \(MODULES-8193\) - Removal of inbuilt deepmerge and dirname functions [\#1145](https://github.com/puppetlabs/puppetlabs-mysql/pull/1145) ([david22swan](https://github.com/david22swan)) +## [6.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.2.0) - 2018-09-28 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.1.0...6.2.0) ### Added -- \(MODULES-3539\) Allow @ in username [\#1155](https://github.com/puppetlabs/puppetlabs-mysql/pull/1155) ([Fogelholk](https://github.com/Fogelholk)) -- \(MODULES-8144\) - Add support for SLES 15 [\#1146](https://github.com/puppetlabs/puppetlabs-mysql/pull/1146) ([eimlav](https://github.com/eimlav)) -- Added support for RHSCL mysql versions and support for .mylogin.cnf for MySQL 5.6.6+ [\#1061](https://github.com/puppetlabs/puppetlabs-mysql/pull/1061) ([DJMuggs](https://github.com/DJMuggs)) +- pdksync - (MODULES-6805) metadata.json shows support for puppet 6 [#1127](https://github.com/puppetlabs/puppetlabs-mysql/pull/1127) ([tphoney](https://github.com/tphoney)) ### Fixed -- \(MODULES-8193\) - Wrapper methods created for inbuilt 4.x functions [\#1151](https://github.com/puppetlabs/puppetlabs-mysql/pull/1151) ([david22swan](https://github.com/david22swan)) -- pdksync - \(FM-7655\) Fix rubygems-update for ruby \< 2.3 [\#1150](https://github.com/puppetlabs/puppetlabs-mysql/pull/1150) ([tphoney](https://github.com/tphoney)) -- Add includedir for Gentoo [\#1147](https://github.com/puppetlabs/puppetlabs-mysql/pull/1147) ([baurmatt](https://github.com/baurmatt)) -- add mysql\_native\_password for mariadb 10.2 in password\_hash [\#1117](https://github.com/puppetlabs/puppetlabs-mysql/pull/1117) ([mlk-89](https://github.com/mlk-89)) -- Removing query\_cache ops that are no longer supported in MySQL \>= 8.0 [\#1107](https://github.com/puppetlabs/puppetlabs-mysql/pull/1107) ([ernstae](https://github.com/ernstae)) +- (maint) - Change versioning comparison [#1123](https://github.com/puppetlabs/puppetlabs-mysql/pull/1123) ([eimlav](https://github.com/eimlav)) -## [7.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/7.0.0) (2018-10-25) +## [6.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.1.0) - 2018-09-13 -[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.2.0...7.0.0) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.0.0...6.1.0) + +### Fixed + +- pdksync - (MODULES-7705) - Bumping stdlib dependency from < 5.0.0 to < 6.0.0 [#1114](https://github.com/puppetlabs/puppetlabs-mysql/pull/1114) ([pmcmaw](https://github.com/pmcmaw)) +- (MODULES-6981) Do not try to read ~root/.my.cnf when calling "mysqld -V" [#1063](https://github.com/puppetlabs/puppetlabs-mysql/pull/1063) ([simondeziel](https://github.com/simondeziel)) + +## [6.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.0.0) - 2018-08-02 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.4.0...6.0.0) + +### Added + +- (FM-5985) - Addition of support for Ubuntu 18.04 to mysql [#1104](https://github.com/puppetlabs/puppetlabs-mysql/pull/1104) ([david22swan](https://github.com/david22swan)) +- (MODULES-7439) - Implementing beaker-testmode_switcher [#1095](https://github.com/puppetlabs/puppetlabs-mysql/pull/1095) ([pmcmaw](https://github.com/pmcmaw)) +- Support for optional__args and prescript to mysqldump backup provider [#1083](https://github.com/puppetlabs/puppetlabs-mysql/pull/1083) ([eputnam](https://github.com/eputnam)) +- Allow empty user passwords [#1075](https://github.com/puppetlabs/puppetlabs-mysql/pull/1075) ([ThoTischner](https://github.com/ThoTischner)) +- Add user tls_options and grant options to mysql::db [#1065](https://github.com/puppetlabs/puppetlabs-mysql/pull/1065) ([edestecd](https://github.com/edestecd)) +- Use puppet4 functions-api [#1044](https://github.com/puppetlabs/puppetlabs-mysql/pull/1044) ([juliantodt](https://github.com/juliantodt)) ### Changed +- [FM-6962] Removal of unsupported OS from mysql [#1086](https://github.com/puppetlabs/puppetlabs-mysql/pull/1086) ([david22swan](https://github.com/david22swan)) + +### Fixed + +- (MODULES-7353) Enable service for Debian 9 [#1094](https://github.com/puppetlabs/puppetlabs-mysql/pull/1094) ([david22swan](https://github.com/david22swan)) +- Update locales test for Debian 9 [#1091](https://github.com/puppetlabs/puppetlabs-mysql/pull/1091) ([HelenCampbell](https://github.com/HelenCampbell)) +- [FM-7045] Fix to allow Debian 9 test's to run clean [#1088](https://github.com/puppetlabs/puppetlabs-mysql/pull/1088) ([david22swan](https://github.com/david22swan)) +- (MODULES-7198) Fix DROP USER IF EXISTS on mariadb [#1082](https://github.com/puppetlabs/puppetlabs-mysql/pull/1082) ([hunner](https://github.com/hunner)) -- \(MODULES-6923\) remove staging module [\#1115](https://github.com/puppetlabs/puppetlabs-mysql/pull/1115) ([tphoney](https://github.com/tphoney)) +## [5.4.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/5.4.0) - 2018-05-23 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.3.0...5.4.0) ### Added -- \(MODULES-7857\) Support user creation on galera [\#1130](https://github.com/puppetlabs/puppetlabs-mysql/pull/1130) ([MaxFedotov](https://github.com/MaxFedotov)) -- MySQL 8 compatibility in user management [\#1092](https://github.com/puppetlabs/puppetlabs-mysql/pull/1092) ([zpetr](https://github.com/zpetr)) +- (PDOC-210) add Puppet Strings documentation [#1068](https://github.com/puppetlabs/puppetlabs-mysql/pull/1068) ([hunner](https://github.com/hunner)) +- (PDOC-210) add Puppet Strings documentation [#1062](https://github.com/puppetlabs/puppetlabs-mysql/pull/1062) ([eputnam](https://github.com/eputnam)) +- (MODULES-5618) Hide logging of password_hash changes in mysql::user [#993](https://github.com/puppetlabs/puppetlabs-mysql/pull/993) ([jhriggs](https://github.com/jhriggs)) +- Replaced 'DROP USER' with 'DROP USER IF EXISTS' [#942](https://github.com/puppetlabs/puppetlabs-mysql/pull/942) ([xelmido](https://github.com/xelmido)) ### Fixed -- \(MODULES-7487\) Check authentication string for user password on MariaDB 10.2.16+ [\#1135](https://github.com/puppetlabs/puppetlabs-mysql/pull/1135) ([gguillotte](https://github.com/gguillotte)) +- (MODULES-6627) Removes unused --host flag from mysqlcaller [#1064](https://github.com/puppetlabs/puppetlabs-mysql/pull/1064) ([HelenCampbell](https://github.com/HelenCampbell)) +- fix archlinux compatibility [#1057](https://github.com/puppetlabs/puppetlabs-mysql/pull/1057) ([bastelfreak](https://github.com/bastelfreak)) +- changed input param option in export.json from sql to file [#1054](https://github.com/puppetlabs/puppetlabs-mysql/pull/1054) ([cgoswami](https://github.com/cgoswami)) +- PROCESS is now required [#958](https://github.com/puppetlabs/puppetlabs-mysql/pull/958) ([elmobp](https://github.com/elmobp)) -## [6.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.2.0) (2018-09-27) +## [5.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/5.3.0) - 2018-02-20 -[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.1.0...6.2.0) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.2.1...5.3.0) + +## [5.2.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/5.2.1) - 2018-02-02 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.2.0...5.2.1) + +## [5.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/5.2.0) - 2018-01-19 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.1.0...5.2.0) + +### Added + +- (MODULES-4794) Add paths for RHSC [#1039](https://github.com/puppetlabs/puppetlabs-mysql/pull/1039) ([hunner](https://github.com/hunner)) +- (MODULES-3623) Centralise MySQL calls... [#1036](https://github.com/puppetlabs/puppetlabs-mysql/pull/1036) ([hunner](https://github.com/hunner)) +- #puppethack allow undef value for bind-address [#1035](https://github.com/puppetlabs/puppetlabs-mysql/pull/1035) ([JvGinkel](https://github.com/JvGinkel)) +- Add Export database task [#1018](https://github.com/puppetlabs/puppetlabs-mysql/pull/1018) ([slenky](https://github.com/slenky)) +- Add support for `GRANTS FUNCTION` [#1005](https://github.com/puppetlabs/puppetlabs-mysql/pull/1005) ([joshuaspence](https://github.com/joshuaspence)) +- Allow authentication plugin to be changed [#1004](https://github.com/puppetlabs/puppetlabs-mysql/pull/1004) ([joshuaspence](https://github.com/joshuaspence)) + +### Changed +- (maint) - Removing Debian 9 [#1020](https://github.com/puppetlabs/puppetlabs-mysql/pull/1020) ([pmcmaw](https://github.com/pmcmaw)) + +## [5.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/5.1.0) - 2017-10-11 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.0.0...5.1.0) + +## [5.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/5.0.0) - 2017-10-05 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/4.0.1...5.0.0) ### Added -- pdksync - \(MODULES-6805\) metadata.json shows support for puppet 6 [\#1127](https://github.com/puppetlabs/puppetlabs-mysql/pull/1127) ([tphoney](https://github.com/tphoney)) +- Updating PO file to match strings in POT file and code base. [#1010](https://github.com/puppetlabs/puppetlabs-mysql/pull/1010) ([pmcmaw](https://github.com/pmcmaw)) ### Fixed -- \(maint\) - Change versioning comparison [\#1123](https://github.com/puppetlabs/puppetlabs-mysql/pull/1123) ([eimlav](https://github.com/eimlav)) +- refactor php_package_name default for Debian/Ubuntu [#969](https://github.com/puppetlabs/puppetlabs-mysql/pull/969) ([mmoll](https://github.com/mmoll)) -## [6.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.1.0) (2018-09-13) +## [4.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/4.0.1) - 2017-09-09 -[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.0.0...6.1.0) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/4.0.0...4.0.1) + +### Added + +- (MODULES-5528) mysql_install_db change to optional [#990](https://github.com/puppetlabs/puppetlabs-mysql/pull/990) ([HelenCampbell](https://github.com/HelenCampbell)) ### Fixed -- pdksync - \(MODULES-7705\) - Bumping stdlib dependency from \< 5.0.0 to \< 6.0.0 [\#1114](https://github.com/puppetlabs/puppetlabs-mysql/pull/1114) ([pmcmaw](https://github.com/pmcmaw)) -- \(MODULES-6981\) Do not try to read ~root/.my.cnf when calling "mysqld -V" [\#1063](https://github.com/puppetlabs/puppetlabs-mysql/pull/1063) ([simondeziel](https://github.com/simondeziel)) +- (MODULES-5602) remove superfluous backslashes from regular expressions [#989](https://github.com/puppetlabs/puppetlabs-mysql/pull/989) ([DavidS](https://github.com/DavidS)) -## [6.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.0.0) (2018-08-01) +## [4.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/4.0.0) - 2017-09-07 -[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.4.0...6.0.0) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.11.0...4.0.0) ### Changed +- replace validate_* with datatypes in db.pp [#930](https://github.com/puppetlabs/puppetlabs-mysql/pull/930) ([bastelfreak](https://github.com/bastelfreak)) + +### Fixed + +- MODULES-5405 interpolation for puppet strings [#984](https://github.com/puppetlabs/puppetlabs-mysql/pull/984) ([tphoney](https://github.com/tphoney)) +- interpolation for ruby & puppet code. [#983](https://github.com/puppetlabs/puppetlabs-mysql/pull/983) ([tphoney](https://github.com/tphoney)) +- Updated pot file, decorated simple strings [#978](https://github.com/puppetlabs/puppetlabs-mysql/pull/978) ([tphoney](https://github.com/tphoney)) +- Fixing empty user/password issue [#972](https://github.com/puppetlabs/puppetlabs-mysql/pull/972) ([ajardan](https://github.com/ajardan)) +- (MODULES-4604) move name validation in mysql_grant type [#961](https://github.com/puppetlabs/puppetlabs-mysql/pull/961) ([eputnam](https://github.com/eputnam)) +- (MODULES-4115) Invalid parameter provider on Mysql_user[user@localhost] in mysql::db [#912](https://github.com/puppetlabs/puppetlabs-mysql/pull/912) ([ryanb-hc](https://github.com/ryanb-hc)) -- \[FM-6962\] Removal of unsupported OS from mysql [\#1086](https://github.com/puppetlabs/puppetlabs-mysql/pull/1086) ([david22swan](https://github.com/david22swan)) +## [3.11.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.11.0) - 2017-05-08 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.10.0...3.11.0) ### Added -- \(FM-5985\) - Addition of support for Ubuntu 18.04 to mysql [\#1104](https://github.com/puppetlabs/puppetlabs-mysql/pull/1104) ([david22swan](https://github.com/david22swan)) -- \(MODULES-7439\) - Implementing beaker-testmode\_switcher [\#1095](https://github.com/puppetlabs/puppetlabs-mysql/pull/1095) ([pmcmaw](https://github.com/pmcmaw)) -- Support for optional\_\_args and prescript to mysqldump backup provider [\#1083](https://github.com/puppetlabs/puppetlabs-mysql/pull/1083) ([eputnam](https://github.com/eputnam)) -- Allow empty user passwords [\#1075](https://github.com/puppetlabs/puppetlabs-mysql/pull/1075) ([ThoTischner](https://github.com/ThoTischner)) -- Add user tls\_options and grant options to mysql::db [\#1065](https://github.com/puppetlabs/puppetlabs-mysql/pull/1065) ([edestecd](https://github.com/edestecd)) -- Use puppet4 functions-api [\#1044](https://github.com/puppetlabs/puppetlabs-mysql/pull/1044) ([juliantodt](https://github.com/juliantodt)) -- Replaced 'DROP USER' with 'DROP USER IF EXISTS' [\#942](https://github.com/puppetlabs/puppetlabs-mysql/pull/942) ([libertamohamed](https://github.com/libertamohamed)) +- (#4534) Add PROXY grant support to mysql_grant [#934](https://github.com/puppetlabs/puppetlabs-mysql/pull/934) ([jhriggs](https://github.com/jhriggs)) +- Add a file in /tmp to check when the last backup was successful [#907](https://github.com/puppetlabs/puppetlabs-mysql/pull/907) ([ampersand8](https://github.com/ampersand8)) ### Fixed -- \(MODULES-7353\) Enable service for Debian 9 [\#1094](https://github.com/puppetlabs/puppetlabs-mysql/pull/1094) ([david22swan](https://github.com/david22swan)) -- Update locales test for Debian 9 [\#1091](https://github.com/puppetlabs/puppetlabs-mysql/pull/1091) ([HelenCampbell](https://github.com/HelenCampbell)) -- \[FM-7045\] Fix to allow Debian 9 test's to run clean [\#1088](https://github.com/puppetlabs/puppetlabs-mysql/pull/1088) ([david22swan](https://github.com/david22swan)) -- \(MODULES-7198\) Fix DROP USER IF EXISTS on mariadb [\#1082](https://github.com/puppetlabs/puppetlabs-mysql/pull/1082) ([hunner](https://github.com/hunner)) +- Do not wait for mysql socket to open if service_ensure is stopped [#948](https://github.com/puppetlabs/puppetlabs-mysql/pull/948) ([sw0x2A](https://github.com/sw0x2A)) +- (MODULES-4743) mysql : cannot initialize database dir not empty [#945](https://github.com/puppetlabs/puppetlabs-mysql/pull/945) ([shawnferry](https://github.com/shawnferry)) +- Only install bzip2 if backupcompress [#933](https://github.com/puppetlabs/puppetlabs-mysql/pull/933) ([edestecd](https://github.com/edestecd)) +- Use gfind on solaris [#920](https://github.com/puppetlabs/puppetlabs-mysql/pull/920) ([marvin0815](https://github.com/marvin0815)) + +### Other + +- Enhancements to xtrabackup backup provider [#902](https://github.com/puppetlabs/puppetlabs-mysql/pull/902) ([fraenki](https://github.com/fraenki)) -## 5.4.0 +## [3.10.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.10.0) - 2016-11-07 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.9.0...3.10.0) ### Added -- \(PDOC-210\) Puppet Strings documentation [\#1068](https://github.com/puppetlabs/puppetlabs-mysql/pull/1068) ([hunner](https://github.com/hunner)) -- Compatibility for Alpine linux [\#1049](https://github.com/puppetlabs/puppetlabs-mysql/pull/1049) ([cisco87](https://github.com/cisco87)) +- Add support for setting tls options for mysql_user's [#896](https://github.com/puppetlabs/puppetlabs-mysql/pull/896) ([JAORMX](https://github.com/JAORMX)) +- MODULES-3907 Add MySQL/Percona 5.7 initialize on fresh deploy [#892](https://github.com/puppetlabs/puppetlabs-mysql/pull/892) ([QuentinMoss](https://github.com/QuentinMoss)) +- Add support for REQUIRE SSL|X509 option [#888](https://github.com/puppetlabs/puppetlabs-mysql/pull/888) ([edestecd](https://github.com/edestecd)) ### Fixed -- \(MODULES-6627\) Removed unused --host flag from mysqlcaller [\#1064](https://github.com/puppetlabs/puppetlabs-mysql/pull/1064) ([HelenCampbell](https://github.com/HelenCampbell)) -- Fixed archlinux compatibility [\#1057](https://github.com/puppetlabs/puppetlabs-mysql/pull/1057) ([bastelfreak](https://github.com/bastelfreak)) -- Changed input param option in export.json from sql to file [\#1054](https://github.com/puppetlabs/puppetlabs-mysql/pull/1054) ([cgoswami](https://github.com/cgoswami)) +- Revert "Add support for REQUIRE SSL|X509 option" [#895](https://github.com/puppetlabs/puppetlabs-mysql/pull/895) ([hunner](https://github.com/hunner)) +- fixes problem with package name change from php5-mysql to php-mysql on 16.04 [#889](https://github.com/puppetlabs/puppetlabs-mysql/pull/889) ([ppouliot](https://github.com/ppouliot)) + +### Other + +- Added parameter import_cat_cmd [#891](https://github.com/puppetlabs/puppetlabs-mysql/pull/891) ([jkroepke](https://github.com/jkroepke)) + +## [3.9.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.9.0) - 2016-09-06 -## Supported Release [5.3.0] -### Summary -This release uses the PDK convert functionality which in return makes the module PDK compliant. It also includes a roll up of maintenance changes, a new task and support for `GRANTS FUNCTION`. +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.8.0...3.9.0) ### Added -- Add support for `GRANTS FUNCTION` ([MODULES-2075](https://tickets.puppet.com/browse/MODULES-2075)). -- Add Export database task. -- PDK Convert mysql ([MODULES-6454](https://tickets.puppet.com/browse/MODULES-6454)). -### Changed -- Allow authentication plugin to be changed. -- Update mysql_user provider. -- Plugins don't exist before 5.5; password field name changed -- Fix helpful rubocops and disable hurtful cops. -- Addressing puppet-lint and rubocop errors -- Remove update bundler and add ignore .DS_Store -- Skip rubocop warning in task. -- Fix a typo in a classname in the changelog. +- (MODULES-3698) Updates defaults for SLES12 [#881](https://github.com/puppetlabs/puppetlabs-mysql/pull/881) ([bmjen](https://github.com/bmjen)) +- MODULES-3711 - Add limit to mysql server ID generated value [#872](https://github.com/puppetlabs/puppetlabs-mysql/pull/872) ([QuentinMoss](https://github.com/QuentinMoss)) +- parametrize xtradb package name [#860](https://github.com/puppetlabs/puppetlabs-mysql/pull/860) ([ndelic0](https://github.com/ndelic0)) +- add new backup dump parameter maxallowedpacket [#856](https://github.com/puppetlabs/puppetlabs-mysql/pull/856) ([cfasnacht](https://github.com/cfasnacht)) +- [MODULES-3441] Discover mysql version using facts [#852](https://github.com/puppetlabs/puppetlabs-mysql/pull/852) ([jtopper](https://github.com/jtopper)) + +### Fixed + +- revoking GRANT privilege fix [#880](https://github.com/puppetlabs/puppetlabs-mysql/pull/880) ([bodik](https://github.com/bodik)) +- Ensure that error log is writable by owner [#877](https://github.com/puppetlabs/puppetlabs-mysql/pull/877) ([runejuhl](https://github.com/runejuhl)) +- MODULES-3697 Changed puppet fail behaviour for mysql create user and grant if user name is longer than 16 chars [#871](https://github.com/puppetlabs/puppetlabs-mysql/pull/871) ([dn1s](https://github.com/dn1s)) +- (MODULES-3401) Fix for mysql version retrieval [#869](https://github.com/puppetlabs/puppetlabs-mysql/pull/869) ([HelenCampbell](https://github.com/HelenCampbell)) +- MODULES-3601 Move binary logging configuration to take place after pa… [#868](https://github.com/puppetlabs/puppetlabs-mysql/pull/868) ([QuentinMoss](https://github.com/QuentinMoss)) +- Resource fails when fqdn is not set. [#853](https://github.com/puppetlabs/puppetlabs-mysql/pull/853) ([ragonlan](https://github.com/ragonlan)) +- Fix global parameter usage in backup script [#840](https://github.com/puppetlabs/puppetlabs-mysql/pull/840) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB)) + +## [3.8.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.8.0) - 2016-05-31 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.7.0...3.8.0) + +### Added + +- Support mysql_install_db script on Gentoo [#838](https://github.com/puppetlabs/puppetlabs-mysql/pull/838) ([glorpen](https://github.com/glorpen)) +- (MODULES-2111) Add the system database to user related actions. [#830](https://github.com/puppetlabs/puppetlabs-mysql/pull/830) ([fvanboven](https://github.com/fvanboven)) +- Added bzip2 package support on mysqldump backup [#827](https://github.com/puppetlabs/puppetlabs-mysql/pull/827) ([lcrisci](https://github.com/lcrisci)) + +### Fixed + +- Revert "Use mariadb by default for Debian Jessie (#845)" [#847](https://github.com/puppetlabs/puppetlabs-mysql/pull/847) ([DavidS](https://github.com/DavidS)) +- Find MySQL 5.5 installation on CentOS [#842](https://github.com/puppetlabs/puppetlabs-mysql/pull/842) ([jjagodzinski](https://github.com/jjagodzinski)) +- Fixed an issue with Amazon linux major release 4 installation [#837](https://github.com/puppetlabs/puppetlabs-mysql/pull/837) ([megianni](https://github.com/megianni)) +- default group for logfiles on Debian/Ubuntu should be adm [#836](https://github.com/puppetlabs/puppetlabs-mysql/pull/836) ([fschndr](https://github.com/fschndr)) +- Check that /var/lib/mysql actually contains files. [#834](https://github.com/puppetlabs/puppetlabs-mysql/pull/834) ([jonnytdevops](https://github.com/jonnytdevops)) +- move out $options['mysqld']['log-error'] from service.pp into installdb.pp [#833](https://github.com/puppetlabs/puppetlabs-mysql/pull/833) ([ndelic0](https://github.com/ndelic0)) +- make sure we find mysqld on FreeBSD [#831](https://github.com/puppetlabs/puppetlabs-mysql/pull/831) ([fraenki](https://github.com/fraenki)) +- remove erroneous anchors to mysql::client from mysql::db [#829](https://github.com/puppetlabs/puppetlabs-mysql/pull/829) ([vicinus](https://github.com/vicinus)) +- Remove mysql regex when checking type [#828](https://github.com/puppetlabs/puppetlabs-mysql/pull/828) ([s-t-e-v-e-n-k](https://github.com/s-t-e-v-e-n-k)) +- Default mysqld_type should be "mysql" [#824](https://github.com/puppetlabs/puppetlabs-mysql/pull/824) ([ih84ds](https://github.com/ih84ds)) +- (FM-5050) Configure the base of includedir [#821](https://github.com/puppetlabs/puppetlabs-mysql/pull/821) ([DavidS](https://github.com/DavidS)) +- (MODULES-1256) Fix parameters on OpenSUSE 12 [#820](https://github.com/puppetlabs/puppetlabs-mysql/pull/820) ([hunner](https://github.com/hunner)) +- Remove mysql_table_exists() function [#815](https://github.com/puppetlabs/puppetlabs-mysql/pull/815) ([hunner](https://github.com/hunner)) +- Config before install [#813](https://github.com/puppetlabs/puppetlabs-mysql/pull/813) ([tomkrouper](https://github.com/tomkrouper)) +- Loosen MariaDB recognition to fix it on Debian 8 [#812](https://github.com/puppetlabs/puppetlabs-mysql/pull/812) ([koubas](https://github.com/koubas)) +- Fixed global parameters skipped [#811](https://github.com/puppetlabs/puppetlabs-mysql/pull/811) ([pashamesh](https://github.com/pashamesh)) +- Use mysql_install_db only with uniq defaults-extra-file [#809](https://github.com/puppetlabs/puppetlabs-mysql/pull/809) ([mmalchuk](https://github.com/mmalchuk)) + +## [3.7.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.7.0) - 2016-03-11 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.6.2...3.7.0) + +### Added + +- Ubuntu vivid should use systemd not upstart [#769](https://github.com/puppetlabs/puppetlabs-mysql/pull/769) ([gabriel403](https://github.com/gabriel403)) + +### Fixed -## Supported Release [5.2.1] -### Summary -This release fixes CVE-2018-6508 which is a potential arbitrary code execution via tasks. +- (#3028) Fix mysql_grant with MySQL ANSI_QUOTES mode [#796](https://github.com/puppetlabs/puppetlabs-mysql/pull/796) ([jhriggs](https://github.com/jhriggs)) +- Re-Add the ability to set a empty string as option parameter [#791](https://github.com/puppetlabs/puppetlabs-mysql/pull/791) ([roidelapluie](https://github.com/roidelapluie)) +- (MODULES-2676) Fixed new mysql_datadir provider on CentOS for MySQl 5.7.6 compatibility [#789](https://github.com/puppetlabs/puppetlabs-mysql/pull/789) ([elconas](https://github.com/elconas)) +- Fixing error when disabling service management and the service does not exist [#787](https://github.com/puppetlabs/puppetlabs-mysql/pull/787) ([obi11235](https://github.com/obi11235)) +- ensure if service restart to wait till mysql is up [#784](https://github.com/puppetlabs/puppetlabs-mysql/pull/784) ([vicinus](https://github.com/vicinus)) +- Fixes edge-case with dropping pre-existing users with grants [#779](https://github.com/puppetlabs/puppetlabs-mysql/pull/779) ([jmcclell](https://github.com/jmcclell)) + +## [3.6.2](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.6.2) - 2015-12-04 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.6.1...3.6.2) + +### Added + +- MODULES-2650 Add support for renamed password column [#760](https://github.com/puppetlabs/puppetlabs-mysql/pull/760) ([roman-mueller](https://github.com/roman-mueller)) + +### Fixed + +- Use temp cnf file instead of env variable. [#778](https://github.com/puppetlabs/puppetlabs-mysql/pull/778) ([mentat](https://github.com/mentat)) +- (MODULES-2767) fix mysql_table_exists: add check for args.size, fix rspec test [#777](https://github.com/puppetlabs/puppetlabs-mysql/pull/777) ([agadelshin](https://github.com/agadelshin)) +- (MODULES-2767) allow to check if table exists before grant [#776](https://github.com/puppetlabs/puppetlabs-mysql/pull/776) ([agadelshin](https://github.com/agadelshin)) +- (MODULES-2605) Use MYSQL_PWD to avoid mysqldump warnings. [#775](https://github.com/puppetlabs/puppetlabs-mysql/pull/775) ([abednarik](https://github.com/abednarik)) +- (MODULES-2787) Fixes for future parser [#773](https://github.com/puppetlabs/puppetlabs-mysql/pull/773) ([paco0x](https://github.com/paco0x)) +- (MODULES-2490) correct the daemon_dev_package_name for mariadb on redhat [#768](https://github.com/puppetlabs/puppetlabs-mysql/pull/768) ([DavidS](https://github.com/DavidS)) +- Fixes unique server_id within my.cnf Ticket/MODULES-2675 [#767](https://github.com/puppetlabs/puppetlabs-mysql/pull/767) ([jkarns87](https://github.com/jkarns87)) +- (MODULES-2683) fix version compare to properly suppress show_diff for… [#766](https://github.com/puppetlabs/puppetlabs-mysql/pull/766) ([DavidS](https://github.com/DavidS)) + +### Other + +- Using mariadb in OpenSuSE >= 13.1. [#572](https://github.com/puppetlabs/puppetlabs-mysql/pull/572) ([sharumpe](https://github.com/sharumpe)) + +## [3.6.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.6.1) - 2015-09-22 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.6.0...3.6.1) + +### Fixed + +- Fix when not managing config file [#751](https://github.com/puppetlabs/puppetlabs-mysql/pull/751) ([mcanevet](https://github.com/mcanevet)) +- Fixes improper use of function 'warn' in backup manifest of server. [#749](https://github.com/puppetlabs/puppetlabs-mysql/pull/749) ([Herr-Herner](https://github.com/Herr-Herner)) + +## [3.6.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.6.0) - 2015-08-11 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.5.0...3.6.0) + +### Added + +- (MODULES-2340) Implement script functionality for xtrabackup provider [#744](https://github.com/puppetlabs/puppetlabs-mysql/pull/744) ([danzilio](https://github.com/danzilio)) + +### Fixed + +- (PUP-5021) depend on package title, not name [#746](https://github.com/puppetlabs/puppetlabs-mysql/pull/746) ([hunner](https://github.com/hunner)) +- #2030 Only establish dependency between service and package if package is managed. [#745](https://github.com/puppetlabs/puppetlabs-mysql/pull/745) ([jonnytdevops](https://github.com/jonnytdevops)) +- Fix show_diff already set on .my.cnf [#743](https://github.com/puppetlabs/puppetlabs-mysql/pull/743) ([michaeltchapman](https://github.com/michaeltchapman)) +- Ensure idempotency between Puppet runs [#742](https://github.com/puppetlabs/puppetlabs-mysql/pull/742) ([EmilienM](https://github.com/EmilienM)) +- Dont print root [#739](https://github.com/puppetlabs/puppetlabs-mysql/pull/739) ([hunner](https://github.com/hunner)) +- [#puppethack] do not require mysql::server when using mysql::db [#736](https://github.com/puppetlabs/puppetlabs-mysql/pull/736) ([igalic](https://github.com/igalic)) +- Remove default install root password if set [#682](https://github.com/puppetlabs/puppetlabs-mysql/pull/682) ([JCotton1123](https://github.com/JCotton1123)) + +## [3.5.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.5.0) - 2015-07-29 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.4.0...3.5.0) + +### Added + +- Add Solaris support to MySQL module [#729](https://github.com/puppetlabs/puppetlabs-mysql/pull/729) ([drewfisher314](https://github.com/drewfisher314)) +- Add helper to install puppet/pe/puppet-agent [#725](https://github.com/puppetlabs/puppetlabs-mysql/pull/725) ([hunner](https://github.com/hunner)) +- length check for usernames should take mysql version into consideration [#722](https://github.com/puppetlabs/puppetlabs-mysql/pull/722) ([igalic](https://github.com/igalic)) + +### Fixed + +- Don't explode if macaddress isn't set [#730](https://github.com/puppetlabs/puppetlabs-mysql/pull/730) ([binford2k](https://github.com/binford2k)) +- fix Evaluation Error with future parser [#728](https://github.com/puppetlabs/puppetlabs-mysql/pull/728) ([timogoebel](https://github.com/timogoebel)) +- (MODULES-2077) Fixes wrong dependency variable [#719](https://github.com/puppetlabs/puppetlabs-mysql/pull/719) ([Spredzy](https://github.com/Spredzy)) +- Fixed server package name so it isn't hardcoded to mysql [#718](https://github.com/puppetlabs/puppetlabs-mysql/pull/718) ([igalic](https://github.com/igalic)) + +## [3.4.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.4.0) - 2015-05-19 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.3.0...3.4.0) + +### Added + +- Added options for including/excluding triggers and routines to the mysql::server::backup module [#705](https://github.com/puppetlabs/puppetlabs-mysql/pull/705) ([stevesaliman](https://github.com/stevesaliman)) +- Adds default values for parameters and align assignments [#699](https://github.com/puppetlabs/puppetlabs-mysql/pull/699) ([melan](https://github.com/melan)) +- Added server_id fact [#676](https://github.com/puppetlabs/puppetlabs-mysql/pull/676) ([igalic](https://github.com/igalic)) +- Add OpenBSD support. [#567](https://github.com/puppetlabs/puppetlabs-mysql/pull/567) ([buzzdeee](https://github.com/buzzdeee)) + +### Fixed + +- update to proper defaults for freebsd [#712](https://github.com/puppetlabs/puppetlabs-mysql/pull/712) ([sethlyons](https://github.com/sethlyons)) +- (fix) - Change default for mysql::server::backup to ignore_triggers =… [#711](https://github.com/puppetlabs/puppetlabs-mysql/pull/711) ([cyberious](https://github.com/cyberious)) +- (fix) - Fix issue where fact is unknown at start - Resolve issue where if known and failed versioncmp would result in idempotency issue on second run [#709](https://github.com/puppetlabs/puppetlabs-mysql/pull/709) ([cyberious](https://github.com/cyberious)) +- MODULES-1981: Revoke and grant difference of old and new privileges [#706](https://github.com/puppetlabs/puppetlabs-mysql/pull/706) ([agadelshin](https://github.com/agadelshin)) +- Bugfix on Xtrabackup crons [#700](https://github.com/puppetlabs/puppetlabs-mysql/pull/700) ([mvisonneau](https://github.com/mvisonneau)) +- fix FreeBSD support for backups [#697](https://github.com/puppetlabs/puppetlabs-mysql/pull/697) ([fraenki](https://github.com/fraenki)) +- Fix regression introduced by adding OpenBSD support. [#691](https://github.com/puppetlabs/puppetlabs-mysql/pull/691) ([buzzdeee](https://github.com/buzzdeee)) +- Manage service only if managed [#688](https://github.com/puppetlabs/puppetlabs-mysql/pull/688) ([mremy](https://github.com/mremy)) +- mysql backup: fix regression in mysql_user call [#687](https://github.com/puppetlabs/puppetlabs-mysql/pull/687) ([igalic](https://github.com/igalic)) +- Only set up ordering between the config file and the service if we're managing the config file. [#672](https://github.com/puppetlabs/puppetlabs-mysql/pull/672) ([timmooney](https://github.com/timmooney)) + +### Other + +- (fix) - Check for mysql_verison before assuming that triggers are a valid permission [#708](https://github.com/puppetlabs/puppetlabs-mysql/pull/708) ([cyberious](https://github.com/cyberious)) + +## [3.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.3.0) - 2015-03-03 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.2.0...3.3.0) + +### Added + +- (MODULES-1804) Allow override of log-error [#678](https://github.com/puppetlabs/puppetlabs-mysql/pull/678) ([hunner](https://github.com/hunner)) +- Use backup providers [#649](https://github.com/puppetlabs/puppetlabs-mysql/pull/649) ([dveeden](https://github.com/dveeden)) +- (MODULES-1143) Add package_manage parameters [#617](https://github.com/puppetlabs/puppetlabs-mysql/pull/617) ([juniorsysadmin](https://github.com/juniorsysadmin)) + +### Fixed + +- PR 654 was incorrectly using stdlib dirname [#677](https://github.com/puppetlabs/puppetlabs-mysql/pull/677) ([underscorgan](https://github.com/underscorgan)) +- Fix bug in 578 [#671](https://github.com/puppetlabs/puppetlabs-mysql/pull/671) ([aldavud](https://github.com/aldavud)) +- Check for full path for log-bin to stop puppet from managing directory “." [#654](https://github.com/puppetlabs/puppetlabs-mysql/pull/654) ([NoodlesNZ](https://github.com/NoodlesNZ)) + +## [3.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.2.0) - 2015-02-10 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.1.0...3.2.0) + +### Added + +- Support authentication plugins [#645](https://github.com/puppetlabs/puppetlabs-mysql/pull/645) ([dveeden](https://github.com/dveeden)) +- Add type & provider for managing plugins [#641](https://github.com/puppetlabs/puppetlabs-mysql/pull/641) ([dveeden](https://github.com/dveeden)) +- Support for authentication plugins [#640](https://github.com/puppetlabs/puppetlabs-mysql/pull/640) ([dveeden](https://github.com/dveeden)) +- mysql_install_db freebsd support [#616](https://github.com/puppetlabs/puppetlabs-mysql/pull/616) ([takumin](https://github.com/takumin)) +- Add new parameters create_root_user and create_root_my_cnf. [#578](https://github.com/puppetlabs/puppetlabs-mysql/pull/578) ([franzs](https://github.com/franzs)) + +### Fixed + +- MODULES-1759: Remove dependency on stdlib >=4.1.0 [#661](https://github.com/puppetlabs/puppetlabs-mysql/pull/661) ([underscorgan](https://github.com/underscorgan)) +- Bugfix: increase minimum stdlib [#660](https://github.com/puppetlabs/puppetlabs-mysql/pull/660) ([hunner](https://github.com/hunner)) +- Make grant autorequire user [#658](https://github.com/puppetlabs/puppetlabs-mysql/pull/658) ([hunner](https://github.com/hunner)) +- Revert "(#MODULES-1058) root_password.pp cannot create /root/.my.cnf due... [#656](https://github.com/puppetlabs/puppetlabs-mysql/pull/656) ([cyberious](https://github.com/cyberious)) +- (MODULES-1731) Invalid parameter 'provider' removed from mysql_user instance. [#655](https://github.com/puppetlabs/puppetlabs-mysql/pull/655) ([rnelson0](https://github.com/rnelson0)) +- (#MODULES-1058) root_password.pp cannot create /root/.my.cnf due to depe... [#651](https://github.com/puppetlabs/puppetlabs-mysql/pull/651) ([lodgenbd](https://github.com/lodgenbd)) +- Return an empty string for an empty input. [#646](https://github.com/puppetlabs/puppetlabs-mysql/pull/646) ([dveeden](https://github.com/dveeden)) +- Revert "Support for authentication plugins" [#644](https://github.com/puppetlabs/puppetlabs-mysql/pull/644) ([cmurphy](https://github.com/cmurphy)) +- Make sure the example is somewhat secure [#638](https://github.com/puppetlabs/puppetlabs-mysql/pull/638) ([dveeden](https://github.com/dveeden)) +- Do the right thing when fqdn==localhost [#637](https://github.com/puppetlabs/puppetlabs-mysql/pull/637) ([dveeden](https://github.com/dveeden)) +- Future parser fix in params.pp [#632](https://github.com/puppetlabs/puppetlabs-mysql/pull/632) ([underscorgan](https://github.com/underscorgan)) +- under Debian 8 package name for ruby mysql biding is called ruby-mysql, ... [#629](https://github.com/puppetlabs/puppetlabs-mysql/pull/629) ([Zouuup](https://github.com/Zouuup)) +- ensure mysql-config-file and server package is in place before trying to... [#615](https://github.com/puppetlabs/puppetlabs-mysql/pull/615) ([KlavsKlavsen](https://github.com/KlavsKlavsen)) + +## [3.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.1.0) - 2014-12-16 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/3.0.0...3.1.0) + +### Added + +- (MODULES-1338) Allow mysql::db to import several files [#574](https://github.com/puppetlabs/puppetlabs-mysql/pull/574) ([Spredzy](https://github.com/Spredzy)) + +### Fixed + +- Remove mysqltuner, fetch with staging instead [#624](https://github.com/puppetlabs/puppetlabs-mysql/pull/624) ([underscorgan](https://github.com/underscorgan)) +- Fix issues introduced in puppetlabs/puppetlabs-mysql#612 [#623](https://github.com/puppetlabs/puppetlabs-mysql/pull/623) ([underscorgan](https://github.com/underscorgan)) +- Use puppet() instead of shell() to install module dependencies [#622](https://github.com/puppetlabs/puppetlabs-mysql/pull/622) ([underscorgan](https://github.com/underscorgan)) +- Reworked all identifier quoting detections [#612](https://github.com/puppetlabs/puppetlabs-mysql/pull/612) ([lavoiesl](https://github.com/lavoiesl)) +- Fix operating system release fact for SLES [#611](https://github.com/puppetlabs/puppetlabs-mysql/pull/611) ([cmurphy](https://github.com/cmurphy)) +- Fix support for SLES 12 [#610](https://github.com/puppetlabs/puppetlabs-mysql/pull/610) ([cmurphy](https://github.com/cmurphy)) +- Default to MariaDB for SLES 12 [#608](https://github.com/puppetlabs/puppetlabs-mysql/pull/608) ([cyberious](https://github.com/cyberious)) +- Proper containment for mysql::client in mysql::db [#605](https://github.com/puppetlabs/puppetlabs-mysql/pull/605) ([slamont](https://github.com/slamont)) +- Fix regression in username validation [#602](https://github.com/puppetlabs/puppetlabs-mysql/pull/602) ([MasonM](https://github.com/MasonM)) +- Create log-bin directory if it doesn't exist [#596](https://github.com/puppetlabs/puppetlabs-mysql/pull/596) ([NoodlesNZ](https://github.com/NoodlesNZ)) + +## [3.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/3.0.0) - 2014-11-11 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.3.1...3.0.0) + +### Added + +- [MODULES-1484] Add support for install_options for all package resources... [#591](https://github.com/puppetlabs/puppetlabs-mysql/pull/591) ([damonconway](https://github.com/damonconway)) +- Improve checks for MySQL user's name. [#588](https://github.com/puppetlabs/puppetlabs-mysql/pull/588) ([maxenced](https://github.com/maxenced)) +- Add support for Gentoo [#585](https://github.com/puppetlabs/puppetlabs-mysql/pull/585) ([dev-zero](https://github.com/dev-zero)) +- [MODULES-1333] Add explicit dependencies for mysql_database and mysql_user types [#571](https://github.com/puppetlabs/puppetlabs-mysql/pull/571) ([jtopper](https://github.com/jtopper)) +- (MODULES-552) Add capability to specify column_privileges [#570](https://github.com/puppetlabs/puppetlabs-mysql/pull/570) ([fnerdwq](https://github.com/fnerdwq)) +- (MODULES-1330) Change order of revokation. [#569](https://github.com/puppetlabs/puppetlabs-mysql/pull/569) ([fnerdwq](https://github.com/fnerdwq)) +- Parametrize !includedir [#509](https://github.com/puppetlabs/puppetlabs-mysql/pull/509) ([xbezdick](https://github.com/xbezdick)) ### Fixed -- Fix export and mysql tasks for arbitrary remote code -## Supported Release [5.2.0] +- Fix escaped backslashes in grants [#594](https://github.com/puppetlabs/puppetlabs-mysql/pull/594) ([skroll](https://github.com/skroll)) +- The old regex requires something after the 'host' part. Fix this. [#587](https://github.com/puppetlabs/puppetlabs-mysql/pull/587) ([maxenced](https://github.com/maxenced)) +- Oracle 7 uses mariadb [#582](https://github.com/puppetlabs/puppetlabs-mysql/pull/582) ([cmurphy](https://github.com/cmurphy)) +- Install bzip2 on RHEL 7 and Fedora hosts [#580](https://github.com/puppetlabs/puppetlabs-mysql/pull/580) ([cmurphy](https://github.com/cmurphy)) +- Ensure error log is present before trying to manage ownership [#579](https://github.com/puppetlabs/puppetlabs-mysql/pull/579) ([cmurphy](https://github.com/cmurphy)) +- Change sql param to default to undef instead of empty string [#577](https://github.com/puppetlabs/puppetlabs-mysql/pull/577) ([cmurphy](https://github.com/cmurphy)) +- future parser converts explicit undef to empty string [#568](https://github.com/puppetlabs/puppetlabs-mysql/pull/568) ([edestecd](https://github.com/edestecd)) +- mysql_database: prevent syntax error with collate=>'binary' [#565](https://github.com/puppetlabs/puppetlabs-mysql/pull/565) ([mmonaco](https://github.com/mmonaco)) +- Fix issue with puppet_module_install, removed and using updated method f... [#564](https://github.com/puppetlabs/puppetlabs-mysql/pull/564) ([cyberious](https://github.com/cyberious)) +- (MODULES-1287) Pass the backup credentials to 'SHOW DATABASES' [#559](https://github.com/puppetlabs/puppetlabs-mysql/pull/559) ([nhinds](https://github.com/nhinds)) +- Fixes manage_service feature [#558](https://github.com/puppetlabs/puppetlabs-mysql/pull/558) ([paramite](https://github.com/paramite)) +- Remove all the deprecated code. [#553](https://github.com/puppetlabs/puppetlabs-mysql/pull/553) ([apenney](https://github.com/apenney)) +- Prevent ERROR 1008 in mysql_database provider [#547](https://github.com/puppetlabs/puppetlabs-mysql/pull/547) ([rayl](https://github.com/rayl)) +- Make sure we actually notify the service. [#546](https://github.com/puppetlabs/puppetlabs-mysql/pull/546) ([igalic](https://github.com/igalic)) +- Fix problem with GRANT not recognizing backslash [#540](https://github.com/puppetlabs/puppetlabs-mysql/pull/540) ([jsosic](https://github.com/jsosic)) +- Grants for the backupuser should be conditional [#539](https://github.com/puppetlabs/puppetlabs-mysql/pull/539) ([stevesaliman](https://github.com/stevesaliman)) + +## [2.3.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.3.1) - 2014-07-18 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.3.0...2.3.1) + +## [2.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.3.0) - 2014-07-11 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.2.3...2.3.0) ### Added -- Compatibility for puppet-staging 3.0.0 - -### Fixed -- Centralize all mysql command calls for providers -- Add paths to `mysql_datadir` provider for RedHat Software Collections - -## Supported Release [5.1.0] -### Summary -This release adds Tasks to the Mysql module. - -#### Added -- Adds the execute sql task. - -## Supported Release [5.0.0] -### Summary -This is a major release that adds support for string translation. Currently the only supported language besides -English is Japanese. - -#### Added -- Several gem dependencies required for translation. -- Wrapping of strings that require translation. Strings in ruby code are now wrapped with `_()` and strings in puppet code with `translate()`. -- Debian 9 support - -#### Changed -- The default php_package_name for Debian and Ubuntu to `php-mysql` - -## Supported Release 4.0.1 -### Summary -This is a small bugfix release that makes `mysql_install_db` optional and fixes some regular expression issues. - -#### Bugfixes -- ([MODULES-5528](https://tickets.puppet.com/browse/MODULES-5528)) Fixes the `mysql_install_db` command so that it is optional -- ([MODULES-5602](https://tickets.puppet.com/browse/MODULES-5602)) Removes superfluous backslashes in some regular expressions that were causing instability - -## Supported Release 4.0.0 -### Summary -This release sees the enablement of rubocop, also an update to the lib directory with rubocop fixes and several other changes and fixes. Also a bump to the Puppet version compatibility and several Puppet language updates. - -#### Added -- Updated README.md with example how to install MySQL Community Server 5.6 on Centos 7.3 -- Enabled Rubocop and addition of Rubocop fixes for /lib directory. - -#### Removed -- Dropped legacy tests for db.pp. - -#### Changed -- Replaced validate function calls with datatypes in db.pp. -- Bumped recommended puppet version to between 4.7.0 and 6.0.0. -- Conditionalize name validation in mysql_grant type. ([MODULES-4604](https://tickets.puppet.com/browse/MODULES-4604)) - -#### Fixed -- Removal of invalid parameter provider on Mysql_user[user@localhost] in mysql::db ([MODULES-4115](https://tickets.puppet.com/browse/MODULES-4115)) -- Fixed server_service_name for Debian/stretch. -- Spec fixes for Puppet 5. -- Test update for fix:create procedure, then grant ([MODULES-5390](https://tickets.puppet.com/browse/MODULES-5390)) -- Fixing empty user/password issue for xtrabackup. Now defaults as undef instead of ''. -- Remove unsupported Ubuntu versions ([MODULES-5501](https://tickets.puppet.com/browse/MODULES-5501)) - -## Supported Release 3.11.0 -### Summary -This release includes README and metadata translations to Japanese, as well as some enhancements and bugfixes. - -#### Added -- New flag for successful backups -- Solaris support improvements -- New parameter `optional_args` for extra innobackupex options -- Specify environment variables (e.g. https_proxy) for MySQLTuner download. -- Check to only install bzip2 if `$backupcompress` is `true` -- Debian 9 compatibility -- Japanese README - -#### Fixed -- Syntax errors -- Bug where error logs were being created before the datadir was initialized (MODULES-4743) - -## Supported Release 3.10.0 -### Summary -This release includes new features for setting TLS options on a mysql user, a new parameter to allow specifying tool to import sql files, as well as various bugfixes. - -#### Features -- (MODULES-3879) Adds `import_cat_cmd` parameter to specify the command to read sql files -- Adds support for setting `tls_options` in `mysql_user` - -#### Bugfixes -- (MODULES-3557) Adds Ubuntu 16.04 package names for language bindings -- (MODULES-3907) Adds MySQL/Percona 5.7 initialize on fresh deploy - -## Supported Release 3.9.0 -### Summary -This release adds Percona 5.7 support and compatibility with Ubuntu 16.04, in addition to various bugfixes. - -#### Features -- (MODULES-3441) Adds the `mysqld_version` fact -- (MODULES-3513) Adds a new backup dump parameter `maxallowedpacket` -- Adds new parameter `xtrabackup_package_name` to `mysql::backup::xtrabackup` class -- Adds ability to revoke GRANT privilege - -#### Bugfixes -- Fixes a bug where `mysql_user` fails if facter cannot retrieve fqdn. -- Fix global parameter usage in backup script -- Adds support for `puppet-staging` version `2.0.0` -- (MODULES-3601) Moves binary logging configuration to take place after package install -- (MODULES-3711) Add limit to mysql server ID generated value -- (MODULES-3698) Fixes defaults for SLES12 -- Updates user name length restrictions for MySQL version 5.7.8 and above. -- Fixes a bug where error log is not writable by owner - -## Supported Release 3.8.0 -### Summary -This release adds Percona 5.7 support and compatibility with Ubuntu 16.04, in addition to various bugfixes. - -#### Features -- Adds support for Percona 5.7 -- Adds support for Ubuntu 16.04 (Xenial) - -#### Known Limitations -- The mysqlbackup.sh script will not work on MySQL 5.7.0 and up. - -#### Bugfixes -- Use mysql_install_db only with uniq defaults-extra-file -- Updates mysqlbackup.sh to ensure backup directory exist -- Loosen MariaDB recognition to fix it on Debian 8 -- Allow mysql::backup::mysqldump to access root_group in tests -- Fixed problem with ignoring parameters from global configs -- Fixes ordering issue that initialized mysqld before config is set -- (MODULES-1256) Fix parameters on OpenSUSE 12 -- Fixes install errors on Debian-based OS by configuring the base of includedir -- Configure the configfile location for mariadb -- Default mysqld_type return value should be 'mysql' if another type is not detected -- Make sure that bzip2 is installed before setting up the cron tab job using mysqlbackup.sh -- Fixes path issue on FreeBSD -- Check that /var/lib/mysql actually contains files -- Removes mysql regex when checking type -- (MODULES-2111) Add the system database to user related actions -- Updates default group for logfiles on Debian-based OS to 'adm' -- Fixes an issue with Amazon linux major release 4 installation -- Fixes 'mysql_install_db' script support on Gentoo -- Removes erroneous anchors to mysql::client from mysql::db -- Adds path to be able to find MySQL 5.5 installation on CentOS - -## Supported Release 3.7.0 -### Summary - -A large release with several new features. Also includes a considerable amount of bugfixes, many around compatibility and improvements to current functionality. - -#### Features - -- Now uses mariadb in OpenSuSE >= 13.1. -- Switch to rspec-puppet-facts. -- Additional function to check if table exists before grant. -- Add ability to input password hash directly. -- Now checking major release instead of specific release. -- Debian 8 support. - -#### Bugfixes - -- Minor doc update. -- Fixes improper use of function `warn` in backup manifest of server. -- Fixes to Compatibility with PE 3.3. -- Fixes `when not managing config file` in `mysql_server_spec`. -- Improved user validation and munging. -- Fixes fetching the mysql_user password for MySQL >=5.7.6. -- Fixes unique server_id within my.cnf, the issue were the entire mac address was not being read in to generate the id. -- Corrects the daemon_dev_package_name for mariadb on redhat. -- Fix version compare to properly suppress show_diff for root password. -- Fixes to ensure compatibility with future parser. -- Solaris removed from PE in metadata as its not supported. -- Use MYSQL_PWD to avoid mysqldump warnings. -- Use temp cnf file instead of env variable which creates acceptance test failures. -- No longer hash passwords that are already hashed. -- Fix Gemfile to work with ruby 1.8.7. -- Fixed MySQL 5.7.6++ compatibility. -- Fixing error when disabling service management and the service does not exist. -- Ubuntu vivid should use systemd not upstart. -- Fixed new mysql_datadir provider on CentOS for MySQl 5.7.6 compatibility. -- Ensure if service restart to wait till mysql is up. -- Move all dependencies to not have them in case of service unmanaged. -- Re-Added the ability to set a empty string as option parameter. -- Fixes edge-case with dropping pre-existing users with grants. -- Fix logic for choosing rspec version. -- Refactored main acceptance suite. -- Skip idempotency tests on test cells that do have PUP-5016 unfixed. -- Fix tmpdir to be shared across examples. -- Update to current msync configs [006831f]. -- Fix mysql_grant with MySQL ANSI_QUOTES mode. -- Generate .my.cnf for all sections. - -## Supported Release 3.6.2 -### Summary - -Small release for support of newer PE versions. This increments the version of PE in the metadata.json file. - -## 2015-09-22 - Supported Release 3.6.1 -### Summary -This is a security and bugfix release that fixes incorrect username truncation in the munge for the mysql_user type, incorrect function used in `mysql::server::backup` and fixes compatibility issues with PE 3.3.x. - -#### Bugfixes -- Loosen the regex in mysql_user munging so the username is not unintentionally truncated. -- Use `warning()` not `warn()` -- Metadata had inadvertantly dropped 3.3.x support -- Some 3.3.x compatibility issues in `mysqltuner` were corrected - -## 2015-08-10 - Supported Release 3.6.0 -### Summary -This release adds the ability to use mysql::db and `mysql_*` types against unmanaged or external mysql instances. - -#### Features -- Add ability to use mysql::db WITHOUT mysql::server (ie, externally) -- Add prescript attribute to mysql::server::backup for xtrabackup -- Add postscript ability to xtrabackup provider. - -#### Bugfixes -- Fix default root passwords blocking puppet on mysql 5.8 -- Fix service dependency when package_manage is false -- Fix selinux permissions on my.cnf - -## 2015-07-23 - Supported Release 3.5.0 -### Summary -A small release to add explicit support to newer Puppet versions and accumulated patches. - -#### Features/Improvements -- Start running tests against puppet 4 -- Support longer usernames on newer MariaDB versions -- Add parameters for Solaris 11 and 12 - -#### Bugfixes -- Fix references to the mysql-server package -- mysql_server_id doesn't throw and error on machines without macaddress - -## 2015-05-19 - Supported Release 3.4.0 -### Summary -This release includes the addition of extra facts, OpenBSD compatibility, and a number of other features, improvements and bug fixes. - -#### Features/Improvements -- Added server_id fact which includes mac address for better uniqueness -- Added OpenBSD compatibility, only for 'OpenBSD -current' (due to the recent switch to mariadb) -- Added a $mysql_group parameter, and use that instead of the $root_group parameter to define the group membership of the mysql error log file. -- Updated tests for rspec-puppet 2 and future parser -- Further acceptance testing improvements -- MODULES-1928 - allow log-error to be undef -- Split package installation and database install -- README wording improvements -- Added options for including/excluding triggers and routines -- Made the 'TRIGGER' privilege of mysqldump backups depend on whether or not we are actually backing up triggers -- Cleaned up the privilege assignment in the mysqldump backup script -- Add a fact for capturing the mysql version installed - -#### Bugfixes -- mysql backup: fix regression in mysql_user call -- Set service_ensure to undef, in the case of an unmanaged service -- README Typos fixed -- Bugfix on Xtrabackup crons -- Fixed a permission problem that was preventing triggers from being backed up -- MODULES-1981: Revoke and grant difference of old and new privileges -- Fix an issue were we assume triggers work -- Change default for mysql::server::backup to ignore_triggers = false - -#### Deprecations -mysql::server::old_root_password property - -## 2015-03-03 - Supported Release 3.3.0 -### Summary -This release includes major README updates, the addition of backup providers, and a fix for managing the log-bin directory. - -#### Features -- Add package_manage parameters to `mysql::server` and `mysql::client` (MODULES-1143) -- README improvements -- Add `mysqldump`, `mysqlbackup`, and `xtrabackup` backup providers. - -#### Bugfixes -- log-error overrides were not being properly used (MODULES-1804) -- check for full path for log-bin to stop puppet from managing file '.' - -## 2015-02-09 - Supported Release 3.2.0 -### Summary -This release includes several new features and bugfixes, including support for various plugins, making the output from mysql_password more consistent when input is empty and improved username validation. - -#### Features -- Add type and provider to manage plugins -- Add support for authentication plugins -- Add support for mysql_install_db on freebsd -- Add `create_root_user` and `create_root_my_cnf` parameters to `mysql::server` - -#### Bugfixes -- Remove dependency on stdlib >= 4.1.0 (MODULES-1759) -- Make grant autorequire user -- Remove invalid parameter 'provider' from mysql_user instance (MODULES-1731) -- Return empty string for empty input in mysql_password -- Fix `mysql::account_security` when fqdn==localhost -- Update username validation (MODULES-1520) -- Future parser fix in params.pp -- Fix package name for debian 8 -- Don't start the service until the server package is installed and the config file is in place -- Test fixes -- Lint fixes - -## 2014-12-16 - Supported Release 3.1.0 -### Summary - -This release includes several new features, including SLES12 support, and a number of bug fixes. - -#### Notes - -`mysql::server::mysqltuner` has been refactored to fetch the mysqltuner script from github by default. If you are running on a non-network-connected system, you will need to download that file and have it available to your node at a path specified by the `source` parameter to the `mysqltuner` class. - -#### Features -- Add support for install_options for all package resources (MODULES-1484) -- Add log-bin directory creation -- Allow mysql::db to import multiple files (MODULES-1338) -- SLES12 support -- Improved identifier quoting detections -- Reworked `mysql::server::mysqltuner` so that we are no longer packaging the script as it is licensed under the GPL. - -#### Bugfixes -- Fix regression in username validation -- Proper containment for mysql::client in mysql::db -- Support quoted usernames of length 15 and 16 chars - -## 2014-11-11 - Supported Release 3.0.0 -### Summary - -Added several new features including MariaDB support and future parser - -#### Backwards-incompatible Changes -* Remove the deprecated `database`, `database_user`, and `database_grant` resources. The correct resources to use are `mysql`, `mysql_user`, and `mysql_grant` respectively. - -#### Features -* Add MariaDB Support -* The mysqltuner perl script has been updated to 1.3.0 based on work at http://github.com/major/MySQLTuner-perl -* Add future parse support, fixed issues with undef to empty string -* Pass the backup credentials to 'SHOW DATABASES' -* Ability to specify the Includedir for `mysql::server` -* `mysql::db` now has an import\_timeout feature that defaults to 300 -* The `mysql` class has been removed -* `mysql::server` now takes an `override_options` hash that will affect the installation -* Ability to install both dev and client dev - -#### BugFix -* `mysql::server::backup` now passes `ensure` param to the nested `mysql_grant` -* `mysql::server::service` now properly requires the presence of the `log_error` file -* `mysql::config` now occurs before `mysql::server::install_db` correctly - -## 2014-07-15 - Supported Release 2.3.1 -### Summary - -This release merely updates metadata.json so the module can be uninstalled and -upgraded via the puppet module command. - -## 2014-05-14 - Supported Release 2.3.0 - -This release primarily adds support for RHEL7 and Ubuntu 14.04 but it -also adds a couple of new parameters to allow for further customization, -as well as ensuring backups can backup stored procedures properly. - -#### Features -Added `execpath` to allow a custom executable path for non-standard mysql installations. -Added `dbname` to mysql::db and use ensure_resource to create the resource. -Added support for RHEL7 and Fedora Rawhide. -Added support for Ubuntu 14.04. -Create a warning for if you disable SSL. -Ensure the error logfile is owned by MySQL. -Disable ssl on FreeBSD. -Add PROCESS privilege for backups. - -#### Bugfixes - -#### Known Bugs -* No known bugs - -## 2014-03-04 - Supported Release 2.2.3 -### Summary - -This is a supported release. This release removes a testing symlink that can -cause trouble on systems where /var is on a seperate filesystem from the -modulepath. - -#### Features -#### Bugfixes -#### Known Bugs -* No known bugs -## 2014-03-04 - Supported Release 2.2.2 -### Summary -This is a supported release. Mostly comprised of enhanced testing, plus a -bugfix for Suse. +- Install MySQL client and daemon dev libraries. [#510](https://github.com/puppetlabs/puppetlabs-mysql/pull/510) ([Aethylred](https://github.com/Aethylred)) +- Add quotes to backup password to be able to use more complex passwords. [#495](https://github.com/puppetlabs/puppetlabs-mysql/pull/495) ([mauerj](https://github.com/mauerj)) +- Allow to use different name for db resource other than db name [#489](https://github.com/puppetlabs/puppetlabs-mysql/pull/489) ([xcompass](https://github.com/xcompass)) + +### Fixed + +- Handle changing the datadir properly. [#536](https://github.com/puppetlabs/puppetlabs-mysql/pull/536) ([apenney](https://github.com/apenney)) +- Change grant provider to ignore grants for non existing users. [#530](https://github.com/puppetlabs/puppetlabs-mysql/pull/530) ([spil-jaak](https://github.com/spil-jaak)) +- (MODULES-1096) Fix double quote / single quote issue in params.pp. [#526](https://github.com/puppetlabs/puppetlabs-mysql/pull/526) ([spil-jaak](https://github.com/spil-jaak)) +- fix param client_package_ensure [#523](https://github.com/puppetlabs/puppetlabs-mysql/pull/523) ([davidmmiller](https://github.com/davidmmiller)) +- Require title of mysql_grant resource to match form user/table [#522](https://github.com/puppetlabs/puppetlabs-mysql/pull/522) ([cmurphy](https://github.com/cmurphy)) +- Change the package name in the manifest, too! [#513](https://github.com/puppetlabs/puppetlabs-mysql/pull/513) ([underscorgan](https://github.com/underscorgan)) +- Package rename in Ubuntu 14.04. [#512](https://github.com/puppetlabs/puppetlabs-mysql/pull/512) ([underscorgan](https://github.com/underscorgan)) +- Rhel7 fixes [#511](https://github.com/puppetlabs/puppetlabs-mysql/pull/511) ([underscorgan](https://github.com/underscorgan)) +- Improve this so it works on Ubuntu 14.04. [#507](https://github.com/puppetlabs/puppetlabs-mysql/pull/507) ([apenney](https://github.com/apenney)) +- lowercase hostname values in qualified usernames [#505](https://github.com/puppetlabs/puppetlabs-mysql/pull/505) ([larsks](https://github.com/larsks)) +- Replaced database_user with mysql_user [#501](https://github.com/puppetlabs/puppetlabs-mysql/pull/501) ([ryansechrest](https://github.com/ryansechrest)) +- User needs PROCESS privilege when doing file-per-database backup [#500](https://github.com/puppetlabs/puppetlabs-mysql/pull/500) ([nerdlich](https://github.com/nerdlich)) +- [BUG] [Critical] Removing extra space after slash in mysqlbackup.sh [#490](https://github.com/puppetlabs/puppetlabs-mysql/pull/490) ([seocam](https://github.com/seocam)) +- fix #487 mysql not starting if ssl is not disabled [#488](https://github.com/puppetlabs/puppetlabs-mysql/pull/488) ([globin](https://github.com/globin)) +- backup script test: Actually loop through a list [#479](https://github.com/puppetlabs/puppetlabs-mysql/pull/479) ([igalic](https://github.com/igalic)) +- handle mysql compiled without ssl [#477](https://github.com/puppetlabs/puppetlabs-mysql/pull/477) ([globin](https://github.com/globin)) +- mysqlbackup.sh should be able to find mysql [#457](https://github.com/puppetlabs/puppetlabs-mysql/pull/457) ([igalic](https://github.com/igalic)) + +## [2.2.3](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.2.3) - 2014-03-04 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.2.2...2.2.3) + +### Fixed + +- Replace the symlink with the actual file to resolve a PMT issue. [#484](https://github.com/puppetlabs/puppetlabs-mysql/pull/484) ([apenney](https://github.com/apenney)) + +## [2.2.2](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.2.2) - 2014-03-03 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.2.1...2.2.2) + +### Added -#### Bugfixes -- PHP bindings on Suse -- Test fixes +- Add unsupported infrastructure for excluding OSes we can't test on. [#470](https://github.com/puppetlabs/puppetlabs-mysql/pull/470) ([apenney](https://github.com/apenney)) -#### Known Bugs -* No known bugs +### Fixed -## 2014-02-19 - Version 2.2.1 +- Last SLES fix, don't use the deprecated parameter name. [#469](https://github.com/puppetlabs/puppetlabs-mysql/pull/469) ([apenney](https://github.com/apenney)) +- This fixes: [#467](https://github.com/puppetlabs/puppetlabs-mysql/pull/467) ([apenney](https://github.com/apenney)) +- As we're deleting /etc/my.cnf, lets not restart MySQL in the middle [#466](https://github.com/puppetlabs/puppetlabs-mysql/pull/466) ([apenney](https://github.com/apenney)) +- Fix the case of this, ARGH. [#465](https://github.com/puppetlabs/puppetlabs-mysql/pull/465) ([apenney](https://github.com/apenney)) +- Make this work in SLES as well As RedHat. [#464](https://github.com/puppetlabs/puppetlabs-mysql/pull/464) ([apenney](https://github.com/apenney)) -### Summary +## [2.2.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.2.1) - 2014-02-19 -Minor release that repairs mysql_database{} so that it sees the correct -collation settings (it was only checking the global mysql ones, not the -actual database and constantly setting it over and over since January 22nd). +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.2.0...2.2.1) -Also fixes a bunch of tests on various platforms. +### Fixed +- Fix this test for Debian. This is a total hack for now. [#455](https://github.com/puppetlabs/puppetlabs-mysql/pull/455) ([apenney](https://github.com/apenney)) +- Fixes for Ubuntu/Debian. [#454](https://github.com/puppetlabs/puppetlabs-mysql/pull/454) ([apenney](https://github.com/apenney)) +- Repair this by ensuring calls to mysql include the database name. [#452](https://github.com/puppetlabs/puppetlabs-mysql/pull/452) ([apenney](https://github.com/apenney)) -## 2014-02-13 - Version 2.2.0 +## [2.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.2.0) - 2014-02-13 -### Summary +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.1.0...2.2.0) -#### Features -- Add `backupdirmode`, `backupdirowner`, `backupdirgroup` to - mysql::server::backup to allow customizing the mysqlbackupdir. -- Support multiple options of the same name, allowing you to - do 'replicate-do-db' => ['base1', 'base2', 'base3'] in order to get three - lines of replicate-do-db = base1, replicate-do-db = base2 etc. +### Added -#### Bugfixes -- Fix `restart` so it actually stops mysql restarting if set to false. -- DRY out the defaults_file functionality in the providers. -- mysql_grant fixed to work with root@localhost/@. -- mysql_grant fixed for WITH MAX_QUERIES_PER_HOUR -- mysql_grant fixed so revoking all privileges accounts for GRANT OPTION -- mysql_grant fixed to remove duplicate privileges. -- mysql_grant fixed to handle PROCEDURES when removing privileges. -- mysql_database won't try to create existing databases, breaking replication. -- bind_address renamed bind-address in 'mysqld' options. -- key_buffer renamed to key_buffer_size. -- log_error renamed to log-error. -- pid_file renamed to pid-file. -- Ensure mysql::server::root_password runs before mysql::server::backup -- Fix options_override -> override_options in the README. -- Extensively rewrite the README to be accurate and awesome. -- Move to requiring stdlib 3.2.0, shipped in PE3.0 -- Add many new tests. +- Add check for puppet rpm before trying to install [#445](https://github.com/puppetlabs/puppetlabs-mysql/pull/445) ([Phil0xF7](https://github.com/Phil0xF7)) +- Add logic to ignore mysql.events [#435](https://github.com/puppetlabs/puppetlabs-mysql/pull/435) ([b4ldr](https://github.com/b4ldr)) +- option to specify a script that runs after backups [#413](https://github.com/puppetlabs/puppetlabs-mysql/pull/413) ([igalic](https://github.com/igalic)) +- Restart [#401](https://github.com/puppetlabs/puppetlabs-mysql/pull/401) ([apenney](https://github.com/apenney)) +- Support multiple lines of the same option [#398](https://github.com/puppetlabs/puppetlabs-mysql/pull/398) ([fridim](https://github.com/fridim)) +- Added [if not exists] to [create database] clause. [#397](https://github.com/puppetlabs/puppetlabs-mysql/pull/397) ([srinathman](https://github.com/srinathman)) +- Parameterize backup directory mode and ownership [#375](https://github.com/puppetlabs/puppetlabs-mysql/pull/375) ([ezheidtmann](https://github.com/ezheidtmann)) +### Fixed -## 2013-11-13 - Version 2.1.0 +- Fix this so it installs PE appropriately. [#447](https://github.com/puppetlabs/puppetlabs-mysql/pull/447) ([apenney](https://github.com/apenney)) +- mysql_deepmerge should treat underscore and dash equivalently, as mysql does [#428](https://github.com/puppetlabs/puppetlabs-mysql/pull/428) ([radford](https://github.com/radford)) +- Allow override_options set to undef to completely remove the corresponding key reverting to the mysql default [#427](https://github.com/puppetlabs/puppetlabs-mysql/pull/427) ([radford](https://github.com/radford)) +- Allow an option with a value of false to override something that mysql defaults to true rather than eliding it [#426](https://github.com/puppetlabs/puppetlabs-mysql/pull/426) ([radford](https://github.com/radford)) +- Actually use upstart on Ubuntu by fixing misspelled variable name [#425](https://github.com/puppetlabs/puppetlabs-mysql/pull/425) ([radford](https://github.com/radford)) +- fixed a problem with the mysql_database provider [#422](https://github.com/puppetlabs/puppetlabs-mysql/pull/422) ([stevesaliman](https://github.com/stevesaliman)) +- Remove duplicate service_provider description [#421](https://github.com/puppetlabs/puppetlabs-mysql/pull/421) ([lboynton](https://github.com/lboynton)) +- mysql_grant fixed to properly handle PROCEDURE grants [#412](https://github.com/puppetlabs/puppetlabs-mysql/pull/412) ([dgolja](https://github.com/dgolja)) +- my.cnf: typo fix (bind-address) + migrate key_buffer (deprecated) to key_buffer_size [#395](https://github.com/puppetlabs/puppetlabs-mysql/pull/395) ([doc75](https://github.com/doc75)) +- Mysql grant fixes [#391](https://github.com/puppetlabs/puppetlabs-mysql/pull/391) ([vicinus](https://github.com/vicinus)) +- Fix missing mysql::config when including mysql [#385](https://github.com/puppetlabs/puppetlabs-mysql/pull/385) ([liwo](https://github.com/liwo)) +- Type mysql_grant fixed, spec test created [#376](https://github.com/puppetlabs/puppetlabs-mysql/pull/376) ([w32-blaster](https://github.com/w32-blaster)) +- Fix having wildcards (%) in hostnames of grants [#366](https://github.com/puppetlabs/puppetlabs-mysql/pull/366) ([liwo](https://github.com/liwo)) -### Summary +### Other -The most important changes in 2.1.0 are improvements to the my.cnf creation, -as well as providers. Setting options to = true strips them to be just the -key name itself, which is required for some options. +- changed log_error to log-error and pid_file to pid-file to match the mys... [#394](https://github.com/puppetlabs/puppetlabs-mysql/pull/394) ([danielfoglio](https://github.com/danielfoglio)) -The provider updates fix a number of bugs, from lowercase privileges to -deprecation warnings. +## [2.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.1.0) - 2013-11-13 -Last, the new hiera integration functionality should make it easier to -externalize all your grants, users, and, databases. Another great set of -community submissions helped to make this release. +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.0.1-rc1...2.1.0) -#### Features -- Some options can not take a argument. Gets rid of the '= true' when an -option is set to true. -- Easier hiera integration: Add hash parameters to mysql::server to allow -specifying grants, users, and databases. +### Added -#### Bugfixes -- Fix an issue with lowercase privileges in mysql_grant{} causing them to be reapplied needlessly. -- Changed defaults-file to defaults-extra-file in providers. -- Ensure /root/.my.cnf is 0600 and root owned. -- database_user deprecation warning was incorrect. -- Add anchor pattern for client.pp -- Documentation improvements. -- Various test fixes. +- added * for table name in title to match documented usage [#355](https://github.com/puppetlabs/puppetlabs-mysql/pull/355) ([tekenny](https://github.com/tekenny)) +- Add Anchor pattern to client.pp [#343](https://github.com/puppetlabs/puppetlabs-mysql/pull/343) ([Bit-Doctor](https://github.com/Bit-Doctor)) +- Adds example to set root password [#341](https://github.com/puppetlabs/puppetlabs-mysql/pull/341) ([spuder](https://github.com/spuder)) +- Further improvements to our matching - stop trying to guess what [#319](https://github.com/puppetlabs/puppetlabs-mysql/pull/319) ([apenney](https://github.com/apenney)) +- Improve mysql_grant to work with IPv6. [#308](https://github.com/puppetlabs/puppetlabs-mysql/pull/308) ([apenney](https://github.com/apenney)) +- Extend coverage to the contents of /etc/my.cnf. [#302](https://github.com/puppetlabs/puppetlabs-mysql/pull/302) ([apenney](https://github.com/apenney)) +### Fixed -## 2013-10-21 - Version 2.0.1 +- Method for loading .my.cnf file is changed from "defaults-file" to "defaults-extra-file" (mysql option) [#367](https://github.com/puppetlabs/puppetlabs-mysql/pull/367) ([w32-blaster](https://github.com/w32-blaster)) +- Some options can not take a argument. [#364](https://github.com/puppetlabs/puppetlabs-mysql/pull/364) ([jglenn9k](https://github.com/jglenn9k)) +- Fix the broken anchoring. [#358](https://github.com/puppetlabs/puppetlabs-mysql/pull/358) ([apenney](https://github.com/apenney)) +- fix for the fix: database -> database_user [#353](https://github.com/puppetlabs/puppetlabs-mysql/pull/353) ([igalic](https://github.com/igalic)) +- database_user gives the wrong deprecation warning [#345](https://github.com/puppetlabs/puppetlabs-mysql/pull/345) ([igalic](https://github.com/igalic)) +- Fix an issue with lowercase privileges. [#342](https://github.com/puppetlabs/puppetlabs-mysql/pull/342) ([apenney](https://github.com/apenney)) +- Fix ordering causing mysql_grant to reapply. [#332](https://github.com/puppetlabs/puppetlabs-mysql/pull/332) ([apenney](https://github.com/apenney)) +- Updated my.cnf template to support items with no values [#316](https://github.com/puppetlabs/puppetlabs-mysql/pull/316) ([tekenny](https://github.com/tekenny)) +- Previously we were matching to ensure that usernames matched [#312](https://github.com/puppetlabs/puppetlabs-mysql/pull/312) ([apenney](https://github.com/apenney)) +- Fix mysql::server::monitor mysql_grant privileges [#303](https://github.com/puppetlabs/puppetlabs-mysql/pull/303) ([treydock](https://github.com/treydock)) +- Duplicate parameter removed. [#298](https://github.com/puppetlabs/puppetlabs-mysql/pull/298) ([apenney](https://github.com/apenney)) -### Summary +## [2.0.1-rc1](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.0.1-rc1) - 2013-10-03 -This is a bugfix release to handle an issue where unsorted mysql_grant{} -privileges could cause Puppet to incorrectly reapply the permissions on -each run. +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/2.0.0-rc1...2.0.1-rc1) -#### Bugfixes -- Mysql_grant now sorts privileges in the type and provider for comparison. -- Comment and test tweak for PE3.1. +## [2.0.0-rc1](https://github.com/puppetlabs/puppetlabs-mysql/tree/2.0.0-rc1) - 2013-10-03 +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/1.0.0...2.0.0-rc1) -## 2013-10-14 - Version 2.0.0 +### Added -### Summary +- Add all the params here as undef to make it clear what the intent is. [#296](https://github.com/puppetlabs/puppetlabs-mysql/pull/296) ([apenney](https://github.com/apenney)) +- Add collation with the create statement [#291](https://github.com/puppetlabs/puppetlabs-mysql/pull/291) ([inkblot](https://github.com/inkblot)) +- Improvements to mysql_grant. [#276](https://github.com/puppetlabs/puppetlabs-mysql/pull/276) ([apenney](https://github.com/apenney)) +- Update mysqltuner.pp [#273](https://github.com/puppetlabs/puppetlabs-mysql/pull/273) ([davidcollom](https://github.com/davidcollom)) +- Support Fedora's rolling development "release", Rawhide [#241](https://github.com/puppetlabs/puppetlabs-mysql/pull/241) ([judge-red](https://github.com/judge-red)) -(Previously detailed in the changelog for 2.0.0-rc1) +### Changed +- Completely redesign the MySQL module. [#258](https://github.com/puppetlabs/puppetlabs-mysql/pull/258) ([apenney](https://github.com/apenney)) -This module has been completely refactored and works significantly different. -The changes are broad and touch almost every piece of the module. +### Fixed -See the README.md for full details of all changes and syntax. -Please remain on 1.0.0 if you don't have time to fully test this in dev. +- Use mysql::server::root_password instead of @options. [#288](https://github.com/puppetlabs/puppetlabs-mysql/pull/288) ([apenney](https://github.com/apenney)) +- Add 3.3, strip down the excludes. [#286](https://github.com/puppetlabs/puppetlabs-mysql/pull/286) ([apenney](https://github.com/apenney)) +- Fix mysql::client. [#285](https://github.com/puppetlabs/puppetlabs-mysql/pull/285) ([apenney](https://github.com/apenney)) +- Fixes issue #274 by using recursive hash merge. [#282](https://github.com/puppetlabs/puppetlabs-mysql/pull/282) ([jburnham](https://github.com/jburnham)) +- Removing the bindings compat stuff. [#280](https://github.com/puppetlabs/puppetlabs-mysql/pull/280) ([apenney](https://github.com/apenney)) +- Remove mysql::globals. [#278](https://github.com/puppetlabs/puppetlabs-mysql/pull/278) ([apenney](https://github.com/apenney)) -* mysql::server, mysql::client, and mysql::bindings are the primary interface -classes. -* mysql::server takes an `override_options` parameter to set my.cnf options, -with the hash format: { 'section' => { 'thing' => 'value' }} -* mysql attempts backwards compatibility by forwarding all parameters to -mysql::server. +## [1.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/1.0.0) - 2013-09-23 +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.9.0...1.0.0) -## 2013-10-09 - Version 2.0.0-rc5 +### Added -### Summary +- Add option so mysql::backup to dump each database to its own file [#253](https://github.com/puppetlabs/puppetlabs-mysql/pull/253) ([treydock](https://github.com/treydock)) +- Add HOME environment variable for .my.cnf to mysqladmin command [#245](https://github.com/puppetlabs/puppetlabs-mysql/pull/245) ([embeepea](https://github.com/embeepea)) +- Added support to back up specified databases only with 'mysqlbackup' [#244](https://github.com/puppetlabs/puppetlabs-mysql/pull/244) ([cfeskens](https://github.com/cfeskens)) +- Add environment variable for .my.cnf and specs [#243](https://github.com/puppetlabs/puppetlabs-mysql/pull/243) ([hunner](https://github.com/hunner)) +- Add compatibility classes to handle the backwards incompatible changes. [#237](https://github.com/puppetlabs/puppetlabs-mysql/pull/237) ([apenney](https://github.com/apenney)) -Hopefully the final rc! Further fixes to mysql_grant (stripping out the -cleverness so we match a much wider range of input.) +### Changed +- WIP: database_user and database refactoring [#248](https://github.com/puppetlabs/puppetlabs-mysql/pull/248) ([apenney](https://github.com/apenney)) -#### Bugfixes -- Make mysql_grant accept '.*'@'.*' in terms of input for user@host. +### Fixed +- Fix this so we don't list dates or versions yet. [#238](https://github.com/puppetlabs/puppetlabs-mysql/pull/238) ([apenney](https://github.com/apenney)) +- Fix puppet 2.6 compatibility [#235](https://github.com/puppetlabs/puppetlabs-mysql/pull/235) ([ekohl](https://github.com/ekohl)) +- Refactor MySQL bindings and client packages. [#232](https://github.com/puppetlabs/puppetlabs-mysql/pull/232) ([apenney](https://github.com/apenney)) +- Update my.cnf.pass.erb to allow custom socket support [#227](https://github.com/puppetlabs/puppetlabs-mysql/pull/227) ([hunner](https://github.com/hunner)) -## 2013-10-09 - Version 2.0.0-rc4 +## [0.9.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.9.0) - 2013-07-15 -### Summary +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.8.1...0.9.0) -Bugfixes to mysql_grant and mysql_user form the bulk of this rc, as well as -ensuring that values in the override_options hash that contain a value of '' -are created as just "key" in the conf rather than "key =" or "key = false". +### Fixed -#### Bugfixes -- Improve mysql_grant to work with IPv6 addresses (both long and short). -- Ensure @host users work as well as user@host users. -- Updated my.cnf template to support items with no values. +- Remove redundant hard coded replication parameters [#224](https://github.com/puppetlabs/puppetlabs-mysql/pull/224) ([3flex](https://github.com/3flex)) +- include mysql_client package as a requirement for the db creation [#222](https://github.com/puppetlabs/puppetlabs-mysql/pull/222) ([wolfspyre](https://github.com/wolfspyre)) +- Fixes suggested by RubyMine (just playing around with it) [#219](https://github.com/puppetlabs/puppetlabs-mysql/pull/219) ([apenney](https://github.com/apenney)) +## [0.8.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.8.1) - 2013-07-10 -## 2013-10-07 - Version 2.0.0-rc3 +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.8.0...0.8.1) -### Summary -Fix mysql::server::monitor's use of mysql_user{}. +## [0.8.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.8.0) - 2013-07-10 -#### Bugfixes -- Fix myql::server::monitor's use of mysql_user{} to grant the proper -permissions. Add specs as well. (Thanks to treydock!) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.7.0...0.8.0) +### Added -## 2013-10-03 - Version 2.0.0-rc2 +- Support max_user_connections in database_user [#215](https://github.com/puppetlabs/puppetlabs-mysql/pull/215) ([mbakke](https://github.com/mbakke)) +- Use $root_home for .my.cnf [#214](https://github.com/puppetlabs/puppetlabs-mysql/pull/214) ([paramite](https://github.com/paramite)) +- Add basic specs for database provider. [#211](https://github.com/puppetlabs/puppetlabs-mysql/pull/211) ([apenney](https://github.com/apenney)) +- add a maximum connection parameter and set the default to 1000 [#198](https://github.com/puppetlabs/puppetlabs-mysql/pull/198) ([mhellmic](https://github.com/mhellmic)) +- add mysql::perl helper class [#187](https://github.com/puppetlabs/puppetlabs-mysql/pull/187) ([rsrchboy](https://github.com/rsrchboy)) +- Implement character_set and other options [#167](https://github.com/puppetlabs/puppetlabs-mysql/pull/167) ([abraham1901](https://github.com/abraham1901)) +- handling of my.cnf config file is now optional [#132](https://github.com/puppetlabs/puppetlabs-mysql/pull/132) ([savar](https://github.com/savar)) -### Summary -Bugfixes +### Fixed -#### Bugfixes -- Fix a duplicate parameter in mysql::server +- Fixed PID file location for SLES 11 SP2. [#216](https://github.com/puppetlabs/puppetlabs-mysql/pull/216) ([vakuum](https://github.com/vakuum)) +- Cover Fedora 19's move from mysql to mariadb packages [#210](https://github.com/puppetlabs/puppetlabs-mysql/pull/210) ([judge-red](https://github.com/judge-red)) +- Database user refactor/tests [#208](https://github.com/puppetlabs/puppetlabs-mysql/pull/208) ([apenney](https://github.com/apenney)) +- (WIP) #20562: Minor fix for ordering [#186](https://github.com/puppetlabs/puppetlabs-mysql/pull/186) ([apenney](https://github.com/apenney)) +- Harden mysqlbackup.sh script [#170](https://github.com/puppetlabs/puppetlabs-mysql/pull/170) ([omalashenko](https://github.com/omalashenko)) +- Quote the password [#166](https://github.com/puppetlabs/puppetlabs-mysql/pull/166) ([ekohl](https://github.com/ekohl)) +- add ft_min_word_len and ft_max_word_len config options [#165](https://github.com/puppetlabs/puppetlabs-mysql/pull/165) ([leinaddm](https://github.com/leinaddm)) +- fixes #19744 - no restart on root/.my.cnf change [#162](https://github.com/puppetlabs/puppetlabs-mysql/pull/162) ([frimik](https://github.com/frimik)) +## [0.7.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.7.0) - 2013-06-25 -## 2013-10-03 - Version 2.0.0-rc1 +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.6.1...0.7.0) -### Summary +### Added -This module has been completely refactored and works significantly different. -The changes are broad and touch almost every piece of the module. +- Parameterized max_allowed_packet my.conf config setting, because it is needed to setup puppet-dashboard. [#179](https://github.com/puppetlabs/puppetlabs-mysql/pull/179) ([msmithgu](https://github.com/msmithgu)) -See the README.md for full details of all changes and syntax. -Please remain on 1.0.0 if you don't have time to fully test this in dev. +### Fixed -* mysql::server, mysql::client, and mysql::bindings are the primary interface -classes. -* mysql::server takes an `override_options` parameter to set my.cnf options, -with the hash format: { 'section' => { 'thing' => 'value' }} -* mysql attempts backwards compatibility by forwarding all parameters to -mysql::server. +- Update template for #179 [#201](https://github.com/puppetlabs/puppetlabs-mysql/pull/201) ([hunner](https://github.com/hunner)) +- make tmpdir configurable [#200](https://github.com/puppetlabs/puppetlabs-mysql/pull/200) ([hunner](https://github.com/hunner)) +- Fix SQL when ANSI_QUOTES is enabled in mysql config. [#199](https://github.com/puppetlabs/puppetlabs-mysql/pull/199) ([hunner](https://github.com/hunner)) +- change the distribution osfamily from Redhat into RedHat [#197](https://github.com/puppetlabs/puppetlabs-mysql/pull/197) ([mhellmic](https://github.com/mhellmic)) +- fix puppet warning default_engine [#188](https://github.com/puppetlabs/puppetlabs-mysql/pull/188) ([gimler](https://github.com/gimler)) +- fix variables in templates [#185](https://github.com/puppetlabs/puppetlabs-mysql/pull/185) ([ChrisRut](https://github.com/ChrisRut)) +- python_package_name parameter missing [#178](https://github.com/puppetlabs/puppetlabs-mysql/pull/178) ([wolfspyre](https://github.com/wolfspyre)) +- [Important] Fix default-storage-engine default value [#171](https://github.com/puppetlabs/puppetlabs-mysql/pull/171) ([ctrlaltdel](https://github.com/ctrlaltdel)) +- Refactor to put a knob on all parameters [#169](https://github.com/puppetlabs/puppetlabs-mysql/pull/169) ([wolfspyre](https://github.com/wolfspyre)) +- Puppet 2.6 fix [#163](https://github.com/puppetlabs/puppetlabs-mysql/pull/163) ([domcleal](https://github.com/domcleal)) +- Restrict the versions and add 3.1 [#155](https://github.com/puppetlabs/puppetlabs-mysql/pull/155) ([richardc](https://github.com/richardc)) +- Fix issue with redeclaration of database_user via mysql::db [#154](https://github.com/puppetlabs/puppetlabs-mysql/pull/154) ([pbrit](https://github.com/pbrit)) +- Update travis config file [#148](https://github.com/puppetlabs/puppetlabs-mysql/pull/148) ([blkperl](https://github.com/blkperl)) ---- -## 2013-09-23 - Version 1.0.0 +## [0.6.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.6.1) - 2013-01-11 -### Summary +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.6.0...0.6.1) -This release introduces a number of new type/providers, to eventually -replace the database_ ones. The module has been converted to call the -new providers rather than the previous ones as they have a number of -fixes, additional options, and work with puppet resource. - -This 1.0.0 release precedes a large refactoring that will be released -almost immediately after as 2.0.0. - -#### Features -- Added mysql_grant, mysql_database, and mysql_user. -- Add `mysql::bindings` class and refactor all other bindings to be contained underneath mysql::bindings:: namespace. -- Added support to back up specified databases only with 'mysqlbackup' parameter. -- Add option to mysql::backup to set the backup script to perform a mysqldump on each database to its own file - -#### Bugfixes -- Update my.cnf.pass.erb to allow custom socket support -- Add environment variable for .my.cnf in mysql::db. -- Add HOME environment variable for .my.cnf to mysqladmin command when -(re)setting root password - ---- -## 2013-07-15 - Version 0.9.0 -#### Features -- Add `mysql::backup::backuprotate` parameter -- Add `mysql::backup::delete_before_dump` parameter -- Add `max_user_connections` attribute to `database_user` type - -#### Bugfixes -- Add client package dependency for `mysql::db` -- Remove duplicate `expire_logs_days` and `max_binlog_size` settings -- Make root's `.my.cnf` file path dynamic -- Update pidfile path for Suse variants -- Fixes for lint - -## 2013-07-05 - Version 0.8.1 -#### Bugfixes - - Fix a typo in the Fedora 19 support. - -## 2013-07-01 - Version 0.8.0 -#### Features - - mysql::perl class to install perl-DBD-mysql. - - minor improvements to the providers to improve reliability - - Install the MariaDB packages on Fedora 19 instead of MySQL. - - Add new `mysql` class parameters: - - `max_connections`: The maximum number of allowed connections. - - `manage_config_file`: Opt out of puppetized control of my.cnf. - - `ft_min_word_len`: Fine tune the full text search. - - `ft_max_word_len`: Fine tune the full text search. - - Add new `mysql` class performance tuning parameters: - - `key_buffer` - - `thread_stack` - - `thread_cache_size` - - `myisam-recover` - - `query_cache_limit` - - `query_cache_size` - - `max_connections` - - `tmp_table_size` - - `table_open_cache` - - `long_query_time` - - Add new `mysql` class replication parameters: - - `server_id` - - `sql_log_bin` - - `log_bin` - - `max_binlog_size` - - `binlog_do_db` - - `expire_logs_days` - - `log_bin_trust_function_creators` - - `replicate_ignore_table` - - `replicate_wild_do_table` - - `replicate_wild_ignore_table` - - `expire_logs_days` - - `max_binlog_size` - -#### Bugfixes - - No longer restart MySQL when /root/.my.cnf changes. - - Ensure mysql::config runs before any mysql::db defines. - -## 2013-06-26 - Version 0.7.1 -#### Bugfixes -- Single-quote password for special characters -- Update travis testing for puppet 3.2.x and missing Bundler gems - -## 2013-06-25 - Version 0.7.0 -This is a maintenance release for community bugfixes and exposing -configuration variables. - -* Add new `mysql` class parameters: - - `basedir`: The base directory mysql uses - - `bind_address`: The IP mysql binds to - - `client_package_name`: The name of the mysql client package - - `config_file`: The location of the server config file - - `config_template`: The template to use to generate my.cnf - - `datadir`: The directory MySQL's datafiles are stored - - `default_engine`: The default engine to use for tables - - `etc_root_password`: Whether or not to add the mysql root password to - /etc/my.cnf - - `java_package_name`: The name of the java package containing the java - connector - - `log_error`: Where to log errors - - `manage_service`: Boolean dictating if mysql::server should manage the - service - - `max_allowed_packet`: Maximum network packet size mysqld will accept - - `old_root_password`: Previous root user password - - `php_package_name`: The name of the phpmysql package to install - - `pidfile`: The location mysql will expect the pidfile to be - - `port`: The port mysql listens on - - `purge_conf_dir`: Value fed to recurse and purge parameters of the - /etc/mysql/conf.d resource - - `python_package_name`: The name of the python mysql package to install - - `restart`: Whether to restart mysqld - - `root_group`: Use specified group for root-owned files - - `root_password`: The root MySQL password to use - - `ruby_package_name`: The name of the ruby mysql package to install - - `ruby_package_provider`: The installation suite to use when installing the - ruby package - - `server_package_name`: The name of the server package to install - - `service_name`: The name of the service to start - - `service_provider`: The name of the service provider - - `socket`: The location of the MySQL server socket file - - `ssl_ca`: The location of the SSL CA Cert - - `ssl_cert`: The location of the SSL Certificate to use - - `ssl_key`: The SSL key to use - - `ssl`: Whether or not to enable ssl - - `tmpdir`: The directory MySQL's tmpfiles are stored -* Deprecate `mysql::package_name` parameter in favor of -`mysql::client_package_name` -* Fix local variable template deprecation -* Fix dependency ordering in `mysql::db` -* Fix ANSI quoting in queries -* Fix travis support (but still messy) -* Fix typos - -## 2013-01-11 - Version 0.6.1 -* Fix providers when /root/.my.cnf is absent - -## 2013-01-09 - Version 0.6.0 -* Add `mysql::server::config` define for specific config directives -* Add `mysql::php` class for php support -* Add `backupcompress` parameter to `mysql::backup` -* Add `restart` parameter to `mysql::config` -* Add `purge_conf_dir` parameter to `mysql::config` -* Add `manage_service` parameter to `mysql::server` -* Add syslog logging support via the `log_error` parameter -* Add initial SuSE support -* Fix remove non-localhost root user when fqdn != hostname -* Fix dependency in `mysql::server::monitor` -* Fix .my.cnf path for root user and root password -* Fix ipv6 support for users -* Fix / update various spec tests -* Fix typos -* Fix lint warnings - -## 2012-08-23 - Version 0.5.0 -* Add puppetlabs/stdlib as requirement -* Add validation for mysql privs in provider -* Add `pidfile` parameter to mysql::config -* Add `ensure` parameter to mysql::db -* Add Amazon linux support -* Change `bind_address` parameter to be optional in my.cnf template -* Fix quoting root passwords - -## 2012-07-24 - Version 0.4.0 -* Fix various bugs regarding database names -* FreeBSD support -* Allow specifying the storage engine -* Add a backup class -* Add a security class to purge default accounts - -## 2012-05-03 - Version 0.3.0 -* 14218 Query the database for available privileges -* Add mysql::java class for java connector installation -* Use correct error log location on different distros -* Fix set_mysql_rootpw to properly depend on my.cnf - -## 2012-04-11 - Version 0.2.0 - -## 2012-03-19 - William Van Hevelingen -* (#13203) Add ssl support (f7e0ea5) - -## 2012-03-18 - Nan Liu -* Travis ci before script needs success exit code. (0ea463b) - -## 2012-03-18 - Nan Liu -* Fix Puppet 2.6 compilation issues. (9ebbbc4) - -## 2012-03-16 - Nan Liu -* Add travis.ci for testing multiple puppet versions. (33c72ef) - -## 2012-03-15 - William Van Hevelingen -* (#13163) Datadir should be configurable (f353fc6) - -## 2012-03-16 - Nan Liu -* Document create_resources dependency. (558a59c) - -## 2012-03-16 - Nan Liu -* Fix spec test issues related to error message. (eff79b5) - -## 2012-03-16 - Nan Liu -* Fix mysql service on Ubuntu. (72da2c5) - -## 2012-03-16 - Dan Bode -* Add more spec test coverage (55e399d) +### Fixed -## 2012-03-16 - Nan Liu -* (#11963) Fix spec test due to path changes. (1700349) +- Patch providers for absent my.cnf [#141](https://github.com/puppetlabs/puppetlabs-mysql/pull/141) ([hunner](https://github.com/hunner)) -## 2012-03-07 - François Charlier -* Add a test to check path for 'mysqld-restart' (b14c7d1) +## [0.6.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.6.0) - 2013-01-09 -## 2012-03-07 - François Charlier -* Fix path for 'mysqld-restart' (1a9ae6b) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.5.0...0.6.0) -## 2012-03-15 - Dan Bode -* Add rspec-puppet tests for mysql::config (907331a) +### Added -## 2012-03-15 - Dan Bode -* Moved class dependency between sever and config to server (da62ad6) +- Add php support [#137](https://github.com/puppetlabs/puppetlabs-mysql/pull/137) ([hunner](https://github.com/hunner)) +- Added SuSE support to puppetlabs-mysql [#136](https://github.com/puppetlabs/puppetlabs-mysql/pull/136) ([deadpoint](https://github.com/deadpoint)) +- add parameter to remove old files in conf.d dir [#131](https://github.com/puppetlabs/puppetlabs-mysql/pull/131) ([saz](https://github.com/saz)) +- allow logging via syslog [#130](https://github.com/puppetlabs/puppetlabs-mysql/pull/130) ([saz](https://github.com/saz)) +- Optionally manage the mysqld service [#122](https://github.com/puppetlabs/puppetlabs-mysql/pull/122) ([hunner](https://github.com/hunner)) +- Mysql::backup Compression Optional [#117](https://github.com/puppetlabs/puppetlabs-mysql/pull/117) ([hunner](https://github.com/hunner)) +- Add show view privilege for backup user [#108](https://github.com/puppetlabs/puppetlabs-mysql/pull/108) ([pbrit](https://github.com/pbrit)) +- new config define and a small bugfix [#93](https://github.com/puppetlabs/puppetlabs-mysql/pull/93) ([savar](https://github.com/savar)) -## 2012-03-14 - Dan Bode -* Notify mysql restart from set_mysql_rootpw exec (0832a2c) +### Fixed -## 2012-03-15 - Nan Liu -* Add documentation related to osfamily fact. (8265d28) +- Update manifests/server/monitor.pp [#134](https://github.com/puppetlabs/puppetlabs-mysql/pull/134) ([nikolavp](https://github.com/nikolavp)) +- fixed character-set detection regex [#133](https://github.com/puppetlabs/puppetlabs-mysql/pull/133) ([obilodeau](https://github.com/obilodeau)) +- account security should not fail if hostname == fqdn [#128](https://github.com/puppetlabs/puppetlabs-mysql/pull/128) ([bodepd](https://github.com/bodepd)) +- fix mysql bug [#126](https://github.com/puppetlabs/puppetlabs-mysql/pull/126) ([bodepd](https://github.com/bodepd)) +- Create /root/.my.cnf even when root passwd is not managed [#125](https://github.com/puppetlabs/puppetlabs-mysql/pull/125) ([bodepd](https://github.com/bodepd)) +- Root credentials [#123](https://github.com/puppetlabs/puppetlabs-mysql/pull/123) ([hunner](https://github.com/hunner)) +- Restart optional and minor doc fix [#115](https://github.com/puppetlabs/puppetlabs-mysql/pull/115) ([frimik](https://github.com/frimik)) +- Don't assign to hash after creation [#114](https://github.com/puppetlabs/puppetlabs-mysql/pull/114) ([dalen](https://github.com/dalen)) +- Update mysql::backup privs for #108 [#112](https://github.com/puppetlabs/puppetlabs-mysql/pull/112) ([hunner](https://github.com/hunner)) -## 2012-03-14 - Dan Bode -* Mention osfamily value in failure message (e472d3b) +## [0.5.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.5.0) - 2012-08-23 -## 2012-03-14 - Dan Bode -* Fix bug when querying for all database users (015490c) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.4.0...0.5.0) -## 2012-02-09 - Nan Liu -* Major refactor of mysql module. (b1f90fd) +### Added -## 2012-01-11 - Justin Ellison -* Ruby and Python's MySQL libraries are named differently on different distros. (1e926b4) +- Add bind address unset [#106](https://github.com/puppetlabs/puppetlabs-mysql/pull/106) ([hunner](https://github.com/hunner)) +- Added an option to specify db status. [#101](https://github.com/puppetlabs/puppetlabs-mysql/pull/101) ([martasd](https://github.com/martasd)) +- Add support for Amazon Linux. [#94](https://github.com/puppetlabs/puppetlabs-mysql/pull/94) ([hunner](https://github.com/hunner)) +- Add priv validation to database_grant provider [#91](https://github.com/puppetlabs/puppetlabs-mysql/pull/91) ([reidmv](https://github.com/reidmv)) +- Add a bunch of new parameters [#90](https://github.com/puppetlabs/puppetlabs-mysql/pull/90) ([emonty](https://github.com/emonty)) -## 2012-01-11 - Justin Ellison -* Per @ghoneycutt, we should fail explicitly and explain why. (09af083) +### Fixed -## 2012-01-11 - Justin Ellison -* Removing duplicate declaration (7513d03) +- Change list passed into validate_re to a stringe [#105](https://github.com/puppetlabs/puppetlabs-mysql/pull/105) ([derekhiggins](https://github.com/derekhiggins)) +- Parameterized pidfile; critical for successful first restart [#102](https://github.com/puppetlabs/puppetlabs-mysql/pull/102) ([jkff](https://github.com/jkff)) +- Clarify how to grant specific privileges with database_grant [#100](https://github.com/puppetlabs/puppetlabs-mysql/pull/100) ([mcary](https://github.com/mcary)) +- Revert "Merge pull request #90 from emonty/master" [#97](https://github.com/puppetlabs/puppetlabs-mysql/pull/97) ([bodepd](https://github.com/bodepd)) +- Put that curly brace in the right place this time [#96](https://github.com/puppetlabs/puppetlabs-mysql/pull/96) ([branan](https://github.com/branan)) +- Add a missing curly brace [#95](https://github.com/puppetlabs/puppetlabs-mysql/pull/95) ([branan](https://github.com/branan)) +- Escape $root_password during execs. [#73](https://github.com/puppetlabs/puppetlabs-mysql/pull/73) ([razorsedge](https://github.com/razorsedge)) -## 2012-01-10 - Justin Ellison -* Use socket value from params class instead of hardcoding. (663e97c) +## [0.4.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.4.0) - 2012-07-24 -## 2012-01-10 - Justin Ellison -* Instead of hardcoding the config file target, pull it from mysql::params (031a47d) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.3.0...0.4.0) -## 2012-01-10 - Justin Ellison -* Moved $socket to within the case to toggle between distros. Added a $config_file variable to allow per-distro config file destinations. (360eacd) +### Added -## 2012-01-10 - Justin Ellison -* Pretty sure this is a bug, 99% of Linux distros out there won't ever hit the default. (3462e6b) +- Add enabled parameter to mysql::server [#81](https://github.com/puppetlabs/puppetlabs-mysql/pull/81) ([bodepd](https://github.com/bodepd)) +- Allow consumer to specify default storage engine for MySQL server. [#74](https://github.com/puppetlabs/puppetlabs-mysql/pull/74) ([jmchilton](https://github.com/jmchilton)) +- Added mysql::backup class. [#64](https://github.com/puppetlabs/puppetlabs-mysql/pull/64) ([razorsedge](https://github.com/razorsedge)) +- Added mysql::server::account_security class. [#63](https://github.com/puppetlabs/puppetlabs-mysql/pull/63) ([razorsedge](https://github.com/razorsedge)) -## 2012-02-09 - William Van Hevelingen -* Changed the README to use markdown (3b7dfeb) +### Fixed -## 2012-02-04 - Daniel Black -* (#12412) mysqltuner.pl update (b809e6f) +- add missing db param to database_grant [#83](https://github.com/puppetlabs/puppetlabs-mysql/pull/83) ([agerlic](https://github.com/agerlic)) +- escape database name [#82](https://github.com/puppetlabs/puppetlabs-mysql/pull/82) ([agerlic](https://github.com/agerlic)) +- Default types hacks not needed. [#76](https://github.com/puppetlabs/puppetlabs-mysql/pull/76) ([rdrgmnzs](https://github.com/rdrgmnzs)) +- Fixed regex of database user. [#71](https://github.com/puppetlabs/puppetlabs-mysql/pull/71) ([razorsedge](https://github.com/razorsedge)) -## 2011-11-17 - Matthias Pigulla -* (#11363) Add two missing privileges to grant: event_priv, trigger_priv (d15c9d1) +## [0.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.3.0) - 2012-05-04 -## 2011-12-20 - Jeff McCune -* (minor) Fixup typos in Modulefile metadata (a0ed6a1) +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/0.2.0...0.3.0) -## 2011-12-19 - Carl Caum -* Only notify Exec to import sql if sql is given (0783c74) +### Added -## 2011-12-19 - Carl Caum -* (#11508) Only load sql_scripts on DB creation (e3b9fd9) +- Allow wildcard host assignment with sql. [#68](https://github.com/puppetlabs/puppetlabs-mysql/pull/68) ([razorsedge](https://github.com/razorsedge)) +- Query the database for possible permissions [#65](https://github.com/puppetlabs/puppetlabs-mysql/pull/65) ([branan](https://github.com/branan)) +- Java [#61](https://github.com/puppetlabs/puppetlabs-mysql/pull/61) ([razorsedge](https://github.com/razorsedge)) -## 2011-12-13 - Justin Ellison -* Require not needed due to implicit dependencies (3058feb) +### Fixed -## 2011-12-13 - Justin Ellison -* Bug #11375: puppetlabs-mysql fails on CentOS/RHEL (a557b8d) +- (#14316) Make privileges case-insensitive [#69](https://github.com/puppetlabs/puppetlabs-mysql/pull/69) ([branan](https://github.com/branan)) +- I noticed the following message whilst provisioning using this module: [#60](https://github.com/puppetlabs/puppetlabs-mysql/pull/60) ([geogdog](https://github.com/geogdog)) +- set platform dependent error logfile location [#58](https://github.com/puppetlabs/puppetlabs-mysql/pull/58) ([derekhiggins](https://github.com/derekhiggins)) -## 2011-06-03 - Dan Bode - 0.0.1 -* initial commit +## [0.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/0.2.0) - 2012-04-11 -[5.4.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/5.3.0...5.4.0 -[5.3.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/5.2.1...5.3.0 -[5.2.1]:https://github.com/puppetlabs/puppetlabs-mysql/compare/5.2.0...5.2.1 -[5.2.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/5.1.0...5.2.0 -[5.1.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/5.0.0...5.1.0 -[5.0.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/4.0.1...5.0.0 +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v0.0.1...0.2.0) +### Added -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* +- (#13203) Add ssl support [#54](https://github.com/puppetlabs/puppetlabs-mysql/pull/54) ([blkperl](https://github.com/blkperl)) +### Fixed -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* +- Fix mysql service on Ubuntu. [#50](https://github.com/puppetlabs/puppetlabs-mysql/pull/50) ([nanliu](https://github.com/nanliu)) +- (#13163) Datadir should be configurable [#47](https://github.com/puppetlabs/puppetlabs-mysql/pull/47) ([blkperl](https://github.com/blkperl)) +- Fix issues from nans massive pull request [#45](https://github.com/puppetlabs/puppetlabs-mysql/pull/45) ([bodepd](https://github.com/bodepd)) +- #11963 In the mysql module the Exec[mysqld-restart] should have more in path [#42](https://github.com/puppetlabs/puppetlabs-mysql/pull/42) ([fcharlier](https://github.com/fcharlier)) +- Refactor mysql module. [#41](https://github.com/puppetlabs/puppetlabs-mysql/pull/41) ([nanliu](https://github.com/nanliu)) +- (#12412) mysqltuner.pl update [#38](https://github.com/puppetlabs/puppetlabs-mysql/pull/38) ([grooverdan](https://github.com/grooverdan)) +- (#11508) Only load sql_scripts on DB creation [#28](https://github.com/puppetlabs/puppetlabs-mysql/pull/28) ([ccaum](https://github.com/ccaum)) +- Bug #11375: puppetlabs-mysql fails on CentOS/RHEL [#27](https://github.com/puppetlabs/puppetlabs-mysql/pull/27) ([justintime](https://github.com/justintime)) +## [v0.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v0.0.1) - 2011-12-13 -\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* +[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/d28f0e0327d73dde80331494d2abb5562d0ff144...v0.0.1) diff --git a/CODEOWNERS b/CODEOWNERS index a5d109e99..0c01db322 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,2 @@ # Setting ownership to the modules team -* @puppetlabs/modules +* @puppetlabs/modules @alexjfisher @bastelfreak diff --git a/Gemfile b/Gemfile index 6235e42e1..ca0e773ec 100644 --- a/Gemfile +++ b/Gemfile @@ -14,31 +14,36 @@ def location_for(place_or_version, fake_version = nil) end group :development do - gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) - gem "voxpupuli-puppet-lint-plugins", '~> 4.0', require: false - gem "facterdb", '~> 1.18', require: false - gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false - gem "puppetlabs_spec_helper", '~> 5.0', require: false - gem "rspec-puppet-facts", '~> 2.0', require: false - gem "codecov", '~> 0.2', require: false - gem "dependency_checker", '~> 0.2', require: false - gem "parallel_tests", '= 3.12.1', require: false - gem "pry", '~> 0.10', require: false - gem "simplecov-console", '~> 0.5', require: false - gem "puppet-debugger", '~> 1.0', require: false - gem "rubocop", '= 1.48.1', require: false - gem "rubocop-performance", '= 1.16.0', require: false - gem "rubocop-rspec", '= 2.19.0', require: false - gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] - gem "github_changelog_generator", '= 1.15.2', require: false + gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "racc", '~> 1.4.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) + gem "voxpupuli-puppet-lint-plugins", '~> 5.0', require: false + gem "facterdb", '~> 1.18', require: false + gem "metadata-json-lint", '~> 3.0', require: false + gem "puppetlabs_spec_helper", '~> 6.0', require: false + gem "rspec-puppet-facts", '~> 2.0', require: false + gem "codecov", '~> 0.2', require: false + gem "dependency_checker", '~> 1.0.0', require: false + gem "parallel_tests", '= 3.12.1', require: false + gem "pry", '~> 0.10', require: false + gem "simplecov-console", '~> 0.5', require: false + gem "puppet-debugger", '~> 1.0', require: false + gem "rubocop", '= 1.48.1', require: false + gem "rubocop-performance", '= 1.16.0', require: false + gem "rubocop-rspec", '= 2.19.0', require: false + gem "puppet-strings", '~> 4.0', require: false + gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] end group :system_tests do gem "puppet_litmus", '~> 1.0', require: false, platforms: [:ruby, :x64_mingw] - gem "serverspec", '~> 2.41', require: false + gem "serverspec", '~> 2.41', require: false +end +group :release_prep do + gem "puppet-strings", '~> 4.0', require: false + gem "puppetlabs_spec_helper", '~> 6.0', require: false end puppet_version = ENV['PUPPET_GEM_VERSION'] diff --git a/README.md b/README.md index 8a681d960..c4bbdc6f6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,8 @@ * [Use Percona XtraBackup](#use-percona-xtrabackup) 4. [Reference - An under-the-hood peek at what the module is doing and how](REFERENCE.md) 5. [Limitations - OS compatibility, etc.](#limitations) -6. [Development - Guide for contributing to the module](#development) +6. [License](#license) +7. [Development - Guide for contributing to the module](#development) ## Module Description @@ -658,10 +659,14 @@ The MySQL module has an example task that allows a user to execute arbitary SQL ## Limitations -For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-mysql/blob/main/metadata.json) +This module lacks compatibility with the ARM architecture, for an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-mysql/blob/main/metadata.json) **Note:** The mysqlbackup.sh does not work and is not supported on MySQL 5.7 and greater. +## License + +This codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of [AGPL](https://opensource.org/license/agpl-v3/), [BSD-2](https://opensource.org/license/bsd-2-clause/), [BSD-3](https://opensource.org/license/bsd-3-clause/), [GPL2.0](https://opensource.org/license/gpl-2-0/), [LGPL](https://opensource.org/license/lgpl-3-0/), [MIT](https://opensource.org/license/mit/) and [MPL](https://opensource.org/license/mpl-2-0/) Licensing. + ## Development We are experimenting with a new tool for running acceptance tests. Its name is [puppet_litmus](https://github.com/puppetlabs/puppet_litmus) this replaces beaker as the test runner. To run the acceptance tests follow the [instructions](https://puppetlabs.github.io/litmus/Running-acceptance-tests.html) from the Litmus documentation. diff --git a/REFERENCE.md b/REFERENCE.md index 7a30e9c31..481f1903c 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -44,14 +44,14 @@ #### Public Resource types -* [`mysql_grant`](#mysql_grant): @summary Manage a MySQL user's rights. +* [`mysql_database`](#mysql_database): Manage a MySQL database. +* [`mysql_grant`](#mysql_grant): Manage a MySQL user's rights. * [`mysql_login_path`](#mysql_login_path): Manage a MySQL login path. * [`mysql_plugin`](#mysql_plugin): Manage MySQL plugins. -* [`mysql_user`](#mysql_user): @summary Manage a MySQL user. This includes management of users password as well as privileges. +* [`mysql_user`](#mysql_user): Manage a MySQL user. This includes management of users password as well as privileges. #### Private Resource types -* `mysql_database`: Manage a MySQL database. * `mysql_datadir`: Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above). ### Functions @@ -1158,8 +1158,8 @@ The following parameters are available in the `mysql::db` defined type: ##### `name` The name of the database to create. Database names must: - * be longer than 64 characters. - * not contain / \ or . characters. + * not be longer than 64 characters. + * not contain '/' '\' or '.' characters. * not contain characters that are not permitted in file names. * not end with space characters. @@ -1281,9 +1281,58 @@ Default value: `undef` ## Resource types +### `mysql_database` + +Manage a MySQL database. + +#### Properties + +The following properties are available in the `mysql_database` type. + +##### `charset` + +Valid values: `%r{^\S+$}` + +The CHARACTER SET setting for the database + +Default value: `utf8` + +##### `collate` + +Valid values: `%r{^\S+$}` + +The COLLATE setting for the database + +Default value: `utf8_general_ci` + +##### `ensure` + +Valid values: `present`, `absent` + +The basic property that the resource should be in. + +Default value: `present` + +#### Parameters + +The following parameters are available in the `mysql_database` type. + +* [`name`](#-mysql_database--name) +* [`provider`](#-mysql_database--provider) + +##### `name` + +namevar + +The name of the MySQL database to manage. + +##### `provider` + +The specific backend to use for this `mysql_database` resource. You will seldom need to specify this --- Puppet will +usually discover the appropriate provider for your platform. + ### `mysql_grant` -@summary Manage a MySQL user's rights. #### Properties @@ -1483,7 +1532,6 @@ usually discover the appropriate provider for your platform. ### `mysql_user` -@summary Manage a MySQL user. This includes management of users password as well as privileges. #### Properties diff --git a/Rakefile b/Rakefile index 5ec5f1789..32f4fa9e1 100644 --- a/Rakefile +++ b/Rakefile @@ -1,91 +1,11 @@ # frozen_string_literal: true require 'bundler' -require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any? +require 'puppet_litmus/rake_tasks' if Gem.loaded_specs.key? 'puppet_litmus' require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-syntax/tasks/puppet-syntax' -require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any? -require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any? - -def changelog_user - return unless Rake.application.top_level_tasks.include? "changelog" - returnVal = nil || JSON.load(File.read('metadata.json'))['author'] - raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil? - puts "GitHubChangelogGenerator user:#{returnVal}" - returnVal -end - -def changelog_project - return unless Rake.application.top_level_tasks.include? "changelog" - - returnVal = nil - returnVal ||= begin - metadata_source = JSON.load(File.read('metadata.json'))['source'] - metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z}) - - metadata_source_match && metadata_source_match[1] - end - - raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil? - - puts "GitHubChangelogGenerator project:#{returnVal}" - returnVal -end - -def changelog_future_release - return unless Rake.application.top_level_tasks.include? "changelog" - returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version'] - raise "unable to find the future_release (version) in metadata.json" if returnVal.nil? - puts "GitHubChangelogGenerator future_release:#{returnVal}" - returnVal -end +require 'puppet-strings/tasks' if Gem.loaded_specs.key? 'puppet-strings' PuppetLint.configuration.send('disable_relative') PuppetLint.configuration.send('disable_anchor_resource') PuppetLint.configuration.send('disable_params_empty_string_assignment') - - -if Bundler.rubygems.find_name('github_changelog_generator').any? - GitHubChangelogGenerator::RakeTask.new :changelog do |config| - raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil? - config.user = "#{changelog_user}" - config.project = "#{changelog_project}" - config.since_tag = "v11.0.3" - config.future_release = "#{changelog_future_release}" - config.exclude_labels = ['maintenance'] - config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)." - config.add_pr_wo_labels = true - config.issues = false - config.merge_prefix = "### UNCATEGORIZED PRS; LABEL THEM ON GITHUB" - config.configure_sections = { - "Changed" => { - "prefix" => "### Changed", - "labels" => ["backwards-incompatible"], - }, - "Added" => { - "prefix" => "### Added", - "labels" => ["enhancement", "feature"], - }, - "Fixed" => { - "prefix" => "### Fixed", - "labels" => ["bug", "documentation", "bugfix"], - }, - } - end -else - desc 'Generate a Changelog from GitHub' - task :changelog do - raise < 1.15' - condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.3.0')" -EOM - end -end - diff --git a/lib/puppet/functions/mysql/innobackupex_args.rb b/lib/puppet/functions/mysql/innobackupex_args.rb new file mode 100644 index 000000000..e9cc12064 --- /dev/null +++ b/lib/puppet/functions/mysql/innobackupex_args.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# @summary this function populates and returns the string of arguments which later gets injected in template. +# arguments that return string holds is conditional and decided by the the input given to function. + +Puppet::Functions.create_function(:'mysql::innobackupex_args') do + # @param args + # String backupuser + # Boolean backupcompress + # String backuppassword_unsensitive + # Array backupdatabases + # Array optional_args + # + # @return String + # Generated on the basis of provided values. + # + dispatch :innobackupex_args do + required_param 'Optional[String]', :backupuser + required_param 'Boolean', :backupcompress + required_param 'Optional[Variant[String, Sensitive[String]]]', :backuppassword_unsensitive + required_param 'Array[String[1]]', :backupdatabases + required_param 'Array[String[1]]', :optional_args + return_type 'Variant[String]' + end + + def innobackupex_args(backupuser, backupcompress, backuppassword_unsensitive, backupdatabases, optional_args) + innobackupex_args = '' + innobackupex_args = "--user=\"#{backupuser}\" --password=\"#{backuppassword_unsensitive}\"" if backupuser && backuppassword_unsensitive + + innobackupex_args = "#{innobackupex_args} --compress" if backupcompress + + innobackupex_args = "#{innobackupex_args} --databases=\"#{backupdatabases.join(' ')}\"" if backupdatabases.is_a?(Array) && !backupdatabases.empty? + + if optional_args.is_a?(Array) + optional_args.each do |arg| + innobackupex_args = "#{innobackupex_args} #{arg}" + end + end + innobackupex_args + end +end diff --git a/lib/puppet/functions/mysql/password.rb b/lib/puppet/functions/mysql/password.rb index ab541219f..5fb5941d3 100644 --- a/lib/puppet/functions/mysql/password.rb +++ b/lib/puppet/functions/mysql/password.rb @@ -19,7 +19,7 @@ return_type 'Variant[String, Sensitive[String]]' end - def password(password, sensitive = false) # rubocop:disable Style/OptionalBooleanParameter + def password(password, sensitive = false) password = password.unwrap if password.is_a?(Puppet::Pops::Types::PSensitiveType::Sensitive) result_string = if %r{\*[A-F0-9]{40}$}.match?(password) diff --git a/lib/puppet/functions/mysql_password.rb b/lib/puppet/functions/mysql_password.rb index 35d7af2b0..cf14f07fa 100644 --- a/lib/puppet/functions/mysql_password.rb +++ b/lib/puppet/functions/mysql_password.rb @@ -15,7 +15,7 @@ return_type 'Variant[String, Sensitive[String]]' end - def mysql_password(password, sensitive = false) # rubocop:disable Style/OptionalBooleanParameter + def mysql_password(password, sensitive = false) call_function('deprecation', 'mysql_password', "This method has been deprecated, please use the namespaced version 'mysql::password' instead.") call_function('mysql::password', password, sensitive) end diff --git a/lib/puppet/provider/mysql_grant/mysql.rb b/lib/puppet/provider/mysql_grant/mysql.rb index de97a69c0..20af17151 100644 --- a/lib/puppet/provider/mysql_grant/mysql.rb +++ b/lib/puppet/provider/mysql_grant/mysql.rb @@ -68,6 +68,15 @@ def self.instances 'CREATE VIEW', 'DELETE', 'DROP', 'DROP ROLE', 'EVENT', 'EXECUTE', 'FILE', 'INDEX', 'INSERT', 'LOCK TABLES', 'PROCESS', 'REFERENCES', 'RELOAD', 'REPLICATION CLIENT', 'REPLICATION SLAVE', 'SELECT', 'SHOW DATABASES', 'SHOW VIEW', 'SHUTDOWN', 'SUPER', 'TRIGGER', 'UPDATE'] + + # ndbcluster has its own set for ALL + mysqlcluster_v8_privileges = ['ALL', 'APPLICATION_PASSWORD_ADMIN', 'AUDIT_ABORT_EXEMPT', 'AUDIT_ADMIN', 'AUTHENTICATION_POLICY_ADMIN', 'BACKUP_ADMIN', 'BINLOG_ADMIN', + 'BINLOG_ENCRYPTION_ADMIN', 'CLONE_ADMIN', 'CONNECTION_ADMIN', 'ENCRYPTION_KEY_ADMIN', 'FIREWALL_EXEMPT', 'FLUSH_OPTIMIZER_COSTS', 'FLUSH_STATUS', 'FLUSH_TABLES', + 'FLUSH_USER_RESOURCES', 'GROUP_REPLICATION_ADMIN', 'GROUP_REPLICATION_STREAM', 'INNODB_REDO_LOG_ARCHIVE', 'INNODB_REDO_LOG_ENABLE', 'NDB_STORED_USER', + 'PASSWORDLESS_USER_ADMIN', 'PERSIST_RO_VARIABLES_ADMIN', 'REPLICATION_APPLIER', 'REPLICATION_SLAVE_ADMIN', 'RESOURCE_GROUP_ADMIN', 'RESOURCE_GROUP_USER', + 'ROLE_ADMIN', 'SENSITIVE_VARIABLES_OBSERVER', 'SERVICE_CONNECTION_ADMIN', 'SESSION_VARIABLES_ADMIN', 'SET_USER_ID', 'SHOW_ROUTINE', 'SYSTEM_USER', + 'SYSTEM_VARIABLES_ADMIN', 'TABLE_ENCRYPTION_ADMIN', 'XA_RECOVER_ADMIN'] + # The following two compare blocks are a workaround for issue #1474. mysql_pre_v8_privileges_one = ['ALL', 'APPLICATION_PASSWORD_ADMIN', 'AUDIT_ABORT_EXEMPT', 'AUDIT_ADMIN', 'AUTHENTICATION_POLICY_ADMIN', 'BACKUP_ADMIN', 'BINLOG_ADMIN', 'BINLOG_ENCRYPTION_ADMIN', 'CLONE_ADMIN', 'CONNECTION_ADMIN', 'ENCRYPTION_KEY_ADMIN', 'FLUSH_OPTIMIZER_COSTS', 'FLUSH_STATUS', @@ -81,9 +90,12 @@ def self.instances 'INNODB_REDO_LOG_ENABLE', 'PASSWORDLESS_USER_ADMIN', 'PERSIST_RO_VARIABLES_ADMIN', 'REPLICATION_APPLIER', 'REPLICATION_SLAVE_ADMIN', 'RESOURCE_GROUP_ADMIN', 'RESOURCE_GROUP_USER', 'ROLE_ADMIN', 'SENSITIVE_VARIABLES_OBSERVER', 'SERVICE_CONNECTION_ADMIN', 'SESSION_VARIABLES_ADMIN', 'SET_USER_ID', 'SHOW_ROUTINE', 'SYSTEM_USER', 'SYSTEM_VARIABLES_ADMIN', 'TABLE_ENCRYPTION_ADMIN', 'XA_RECOVER_ADMIN'] - if (newer_than('mysql' => '8.0.0') && sorted_privileges == mysql_v8_privileges) || sorted_privileges == mysql_pre_v8_privileges_one || sorted_privileges == mysql_pre_v8_privileges_two + + # rubocop:disable Layout/LineLength + if (newer_than('mysql' => '8.0.0') && (sorted_privileges == mysql_v8_privileges || sorted_privileges == mysqlcluster_v8_privileges)) || sorted_privileges == mysql_pre_v8_privileges_one || sorted_privileges == mysql_pre_v8_privileges_two sorted_privileges = ['ALL'] end + # rubocop:enable Layout/LineLength instance_configs[name] = { privileges: sorted_privileges, diff --git a/lib/puppet/type/mysql_database.rb b/lib/puppet/type/mysql_database.rb index 916caf62a..2335a55a5 100644 --- a/lib/puppet/type/mysql_database.rb +++ b/lib/puppet/type/mysql_database.rb @@ -2,10 +2,7 @@ Puppet::Type.newtype(:mysql_database) do @doc = <<-PUPPET - @summary - Manage a MySQL database. - - @api private + @summary Manage a MySQL database. PUPPET ensurable diff --git a/lib/puppet/type/mysql_datadir.rb b/lib/puppet/type/mysql_datadir.rb index f2bfe782d..0dcc8490f 100644 --- a/lib/puppet/type/mysql_datadir.rb +++ b/lib/puppet/type/mysql_datadir.rb @@ -2,8 +2,7 @@ Puppet::Type.newtype(:mysql_datadir) do @doc = <<-PUPPET - @summary - Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above). + @summary Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above). @api private PUPPET diff --git a/lib/puppet/type/mysql_grant.rb b/lib/puppet/type/mysql_grant.rb index 92db6d935..34b025cdd 100644 --- a/lib/puppet/type/mysql_grant.rb +++ b/lib/puppet/type/mysql_grant.rb @@ -2,8 +2,7 @@ Puppet::Type.newtype(:mysql_grant) do @doc = <<-PUPPET - @summary - Manage a MySQL user's rights. + @summary Manage a MySQL user's rights. PUPPET ensurable diff --git a/lib/puppet/type/mysql_login_path.rb b/lib/puppet/type/mysql_login_path.rb index 2fea37e03..84c8b06c6 100644 --- a/lib/puppet/type/mysql_login_path.rb +++ b/lib/puppet/type/mysql_login_path.rb @@ -6,8 +6,7 @@ name: 'mysql_login_path', docs: <<-DESCRIPTION, - @summary - Manage a MySQL login path. + @summary Manage a MySQL login path. @see https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html @example diff --git a/lib/puppet/type/mysql_plugin.rb b/lib/puppet/type/mysql_plugin.rb index b52539bbf..cf69fcc60 100644 --- a/lib/puppet/type/mysql_plugin.rb +++ b/lib/puppet/type/mysql_plugin.rb @@ -2,8 +2,7 @@ Puppet::Type.newtype(:mysql_plugin) do @doc = <<-PUPPET - @summary - Manage MySQL plugins. + @summary Manage MySQL plugins. @example mysql_plugin { 'some_plugin': diff --git a/lib/puppet/type/mysql_user.rb b/lib/puppet/type/mysql_user.rb index 6a69478e4..6540823d3 100644 --- a/lib/puppet/type/mysql_user.rb +++ b/lib/puppet/type/mysql_user.rb @@ -3,8 +3,7 @@ # This has to be a separate type to enable collecting Puppet::Type.newtype(:mysql_user) do @doc = <<-PUPPET - @summary - Manage a MySQL user. This includes management of users password as well as privileges. + @summary Manage a MySQL user. This includes management of users password as well as privileges. PUPPET ensurable diff --git a/manifests/backup/mysqlbackup.pp b/manifests/backup/mysqlbackup.pp index 9bf5366cf..5d1427627 100644 --- a/manifests/backup/mysqlbackup.pp +++ b/manifests/backup/mysqlbackup.pp @@ -75,9 +75,9 @@ if $install_cron { if $facts['os']['family'] == 'RedHat' { - ensure_packages('cronie') + stdlib::ensure_packages('cronie') } elsif $facts['os']['family'] != 'FreeBSD' { - ensure_packages('cron') + stdlib::ensure_packages('cron') } } diff --git a/manifests/backup/mysqldump.pp b/manifests/backup/mysqldump.pp index ab9236564..2fba423c5 100644 --- a/manifests/backup/mysqldump.pp +++ b/manifests/backup/mysqldump.pp @@ -43,7 +43,7 @@ unless $facts['os']['family'] == 'FreeBSD' { if $backupcompress and $compression_command == 'bzcat -zc' { - ensure_packages(['bzip2']) + stdlib::ensure_packages(['bzip2']) Package['bzip2'] -> File['mysqlbackup.sh'] } } @@ -70,9 +70,9 @@ if $install_cron { if $facts['os']['family'] == 'RedHat' { - ensure_packages('cronie') + stdlib::ensure_packages('cronie') } elsif $facts['os']['family'] != 'FreeBSD' { - ensure_packages('cron') + stdlib::ensure_packages('cron') } } @@ -88,6 +88,30 @@ require => File['mysqlbackup.sh'], } + $parameters = { + 'backupuser'=> $backupuser, + 'backuppassword_unsensitive'=> $backuppassword_unsensitive, + 'maxallowedpacket'=> $maxallowedpacket, + 'backupdir'=> $backupdir, + 'backuprotate'=> $backuprotate, + 'prescript'=> $prescript, + 'ignore_events'=> $ignore_events, + 'backupdatabases'=> $backupdatabases, + 'include_triggers'=> $include_triggers, + 'optional_args'=> $optional_args, + 'execpath'=> $execpath, + 'delete_before_dump'=> $delete_before_dump, + 'excludedatabases'=> $excludedatabases, + 'backupmethod'=> $backupmethod, + 'backupcompress'=> $backupcompress, + 'compression_command'=> $compression_command, + 'compression_extension'=> $compression_extension, + 'backup_success_file_path'=> $backup_success_file_path, + 'postscript'=> $postscript, + 'file_per_database'=> $file_per_database, + 'include_routines' => $include_routines, + } + # TODO: use EPP instead of ERB, as EPP can handle Data of Type Sensitive without further ado file { 'mysqlbackup.sh': ensure => $ensure, @@ -95,7 +119,7 @@ mode => '0700', owner => 'root', group => $mysql::params::root_group, - content => template('mysql/mysqlbackup.sh.erb'), + content => epp('mysql/mysqlbackup.sh.epp',$parameters), } if $mysqlbackupdir_target { diff --git a/manifests/backup/xtrabackup.pp b/manifests/backup/xtrabackup.pp index 73df05af8..c73831f38 100644 --- a/manifests/backup/xtrabackup.pp +++ b/manifests/backup/xtrabackup.pp @@ -13,7 +13,7 @@ String[1] $backupdirgroup = $mysql::params::root_group, Boolean $backupcompress = true, Variant[Integer, String[1]] $backuprotate = 30, - String[1] $backupscript_template = 'mysql/xtrabackup.sh.erb', + String[1] $backupscript_template = 'mysql/xtrabackup.sh.epp', Optional[String[1]] $backup_success_file_path = undef, Boolean $ignore_events = true, Boolean $delete_before_dump = false, @@ -35,7 +35,7 @@ String[1] $backupmethod_package = $mysql::params::xtrabackup_package_name, Array[String] $excludedatabases = [], ) inherits mysql::params { - ensure_packages($backupmethod_package) + stdlib::ensure_packages($backupmethod_package) $backuppassword_unsensitive = if $backuppassword =~ Sensitive { $backuppassword.unwrap @@ -110,9 +110,9 @@ if $install_cron { if $facts['os']['family'] == 'RedHat' { - ensure_packages('cronie') + stdlib::ensure_packages('cronie') } elsif $facts['os']['family'] != 'FreeBSD' { - ensure_packages('cron') + stdlib::ensure_packages('cron') } } @@ -176,12 +176,23 @@ } # TODO: use EPP instead of ERB, as EPP can handle Data of Type Sensitive without further ado + $parameters = { + 'innobackupex_args' => mysql::innobackupex_args($backupuser, $backupcompress, $backuppassword_unsensitive, $backupdatabases, $optional_args), + 'backuprotate' => $backuprotate, + 'backupdir' => $backupdir, + 'backupmethod' => $backupmethod, + 'delete_before_dump' => $delete_before_dump, + 'prescript' => $prescript, + 'backup_success_file_path'=> $backup_success_file_path, + 'postscript'=> $postscript, + } + file { 'xtrabackup.sh': ensure => $ensure, path => '/usr/local/sbin/xtrabackup.sh', mode => '0700', owner => 'root', group => $mysql::params::root_group, - content => template($backupscript_template), + content => epp($backupscript_template,$parameters), } } diff --git a/manifests/db.pp b/manifests/db.pp index 4e54bef5b..d0a880b0d 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -11,8 +11,8 @@ # # @param name # The name of the database to create. Database names must: -# * be longer than 64 characters. -# * not contain / \ or . characters. +# * not be longer than 64 characters. +# * not contain '/' '\' or '.' characters. # * not contain characters that are not permitted in file names. # * not end with space characters. # @param user @@ -68,8 +68,8 @@ # Ensure that the database name is valid. if $dbname !~ /^[^\/?%*:|\""<>.\s;]{1,64}$/ { $message = "The database name '${dbname}' is invalid. Values must: - * be longer than 64 characters. - * not contain // \\ or . characters. + * not be longer than 64 characters. + * not contain '/' '\\' or '.' characters. * not contain characters that are not permitted in file names. * not end with space characters." fail($message) diff --git a/manifests/params.pp b/manifests/params.pp index 21bc0477f..ab495a3ef 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -400,21 +400,6 @@ } } - case $facts['os']['name'] { - 'Ubuntu': { - $server_service_provider = 'systemd' - } - 'Alpine': { - $server_service_provider = 'rc-service' - } - 'FreeBSD': { - $server_service_provider = 'freebsd' - } - default: { - $server_service_provider = undef - } - } - $default_options = { 'client' => { 'port' => '3306', @@ -485,7 +470,7 @@ } ## Additional graceful failures - if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '4' and $facts['os']['name'] != 'Amazon' { - fail("Unsupported platform: puppetlabs-${module_name} only supports RedHat 6.0 and beyond.") + if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] < '7' and $facts['os']['name'] != 'Amazon' { + fail("Unsupported platform: puppetlabs-${module_name} only supports RedHat 7.0 and beyond.") } } diff --git a/manifests/server.pp b/manifests/server.pp index 85a50db87..8748e33bc 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -117,7 +117,7 @@ Variant[Boolean, String[1]] $service_enabled = true, Variant[Boolean, String[1]] $service_manage = true, String[1] $service_name = $mysql::params::server_service_name, - Optional[String[1]] $service_provider = $mysql::params::server_service_provider, + Optional[String[1]] $service_provider = undef, Boolean $create_root_user = true, Boolean $create_root_my_cnf = true, Boolean $create_root_login_file = false, @@ -183,13 +183,6 @@ ~> Class['mysql::server::service'] } - if $_options['mysqld']['ssl-disable'] { - notify { 'ssl-disable': - message => 'Disabling SSL is evil! You should never ever do this except - if you are forced to use a mysql version compiled without SSL support', - } - } - Anchor['mysql::server::start'] -> Class['mysql::server::config'] -> Class['mysql::server::install'] diff --git a/manifests/server/config.pp b/manifests/server/config.pp index 6827d085a..d45ccf4d1 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -41,8 +41,8 @@ $dir = $options['mysqld']["${entry}"] if ( $dir and $dir != '/usr' and $dir != '/tmp' ) { - $clean_dir = shell_escape($dir) - $clean_package_name = shell_escape($mysql::server::package_name) + $clean_dir = stdlib::shell_escape($dir) + $clean_package_name = stdlib::shell_escape($mysql::server::package_name) exec { "${entry}-managed_dir-mkdir": command => ['/bin/mkdir', '-p', $clean_dir], @@ -61,10 +61,15 @@ default: {} } + $parameters= { + 'options' => $options, + 'includedir' => $includedir, + } + if $mysql::server::manage_config_file { file { 'mysql-config-file': path => $mysql::server::config_file, - content => template('mysql/my.cnf.erb'), + content => epp('mysql/my.cnf.epp', $parameters), mode => $mysql::server::config_file_mode, owner => $mysql::server::mycnf_owner, group => $mysql::server::mycnf_group, diff --git a/manifests/server/root_password.pp b/manifests/server/root_password.pp index a182f6787..91b047626 100644 --- a/manifests/server/root_password.pp +++ b/manifests/server/root_password.pp @@ -37,10 +37,16 @@ } } + $parameters = { + 'root_password_set' => $root_password_set, + 'root_password' => $root_password, + 'options' => $options, + } + if $mysql::server::create_root_my_cnf and $root_password_set { # TODO: use EPP instead of ERB, as EPP can handle Data of Type Sensitive without further ado file { "${facts['root_home']}/.my.cnf": - content => template('mysql/my.cnf.pass.erb'), + content => epp('mysql/my.cnf.pass.epp',$parameters), owner => 'root', mode => '0600', } diff --git a/manifests/server/service.pp b/manifests/server/service.pp index d15c05094..5d37e66e4 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -56,7 +56,7 @@ $mysqlsocket = $options['mysqld']['socket'] } - $test_command = ['test', '-S', shell_escape($mysqlsocket)] + $test_command = ['test', '-S', stdlib::shell_escape($mysqlsocket)] if $service_ensure != 'stopped' { exec { 'wait_for_mysql_socket_to_open': command => $test_command, diff --git a/metadata.json b/metadata.json index d28272250..52a1b70aa 100644 --- a/metadata.json +++ b/metadata.json @@ -1,16 +1,16 @@ { "name": "puppetlabs-mysql", - "version": "14.0.0", + "version": "15.0.0", "author": "puppetlabs", "summary": "Installs, configures, and manages the MySQL service.", "license": "Apache-2.0", "source": "git://github.com/puppetlabs/puppetlabs-mysql", "project_page": "http://github.com/puppetlabs/puppetlabs-mysql", - "issues_url": "https://tickets.puppetlabs.com/browse/MODULES", + "issues_url": "https://github.com/puppetlabs/puppetlabs-mysql/issues", "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 8.4.0 < 9.0.0" + "version_requirement": ">= 9.0.0 < 10.0.0" } ], "operatingsystem_support": [ @@ -84,6 +84,6 @@ ], "description": "MySQL module", "template-url": "https://github.com/puppetlabs/pdk-templates#main", - "template-ref": "heads/main-0-ge5b0114", - "pdk-version": "2.7.1" + "template-ref": "heads/main-0-g79a2f93", + "pdk-version": "3.0.0" } diff --git a/provision.yaml b/provision.yaml index d78d6c41a..a0b1a1140 100644 --- a/provision.yaml +++ b/provision.yaml @@ -8,29 +8,29 @@ vagrant: images: - centos/7 - generic/ubuntu1804 -travis_deb: +docker_deb: provisioner: docker images: - litmusimage/debian:9 - litmusimage/debian:10 -travis_ub_5: +docker_ub_5: provisioner: docker images: - litmusimage/ubuntu:16.04 - litmusimage/ubuntu:18.04 -travis_ub_6: +docker_ub_6: provisioner: docker images: - litmusimage/ubuntu:16.04 - litmusimage/ubuntu:18.04 - litmusimage/ubuntu:20.04 -travis_el7: +docker_el7: provisioner: docker_exp images: - litmusimage/centos:7 - litmusimage/oraclelinux:7 - litmusimage/scientificlinux:7 -travis_el8: +docker_el8: provisioner: docker images: - litmusimage/centos:8 diff --git a/spec/acceptance/05_mysql_xtrabackup_spec.rb b/spec/acceptance/05_mysql_xtrabackup_spec.rb index 4245c2d6c..aa4e7788f 100644 --- a/spec/acceptance/05_mysql_xtrabackup_spec.rb +++ b/spec/acceptance/05_mysql_xtrabackup_spec.rb @@ -23,10 +23,10 @@ class { 'mysql::server': root_password => 'password' } ensure => present, source => $source_url, } - ensure_packages('gnupg') - ensure_packages('gnupg2') - ensure_packages('curl') - ensure_packages('percona-release',{ + stdlib::ensure_packages('gnupg') + stdlib::ensure_packages('gnupg2') + stdlib::ensure_packages('curl') + stdlib::ensure_packages('percona-release',{ ensure => present, provider => 'dpkg', source => '/tmp/percona-release_latest.deb', @@ -40,19 +40,19 @@ class { 'mysql::server': root_password => 'password' } /RedHat/: { # RHEL/CentOS 5 is no longer supported by Percona, but older versions # of the repository are still available. - if versioncmp($facts['os']['release']['major'], '6') >= 0 { + if versioncmp($facts['os']['release']['major'], '7') >= 0 { $percona_url = 'http://repo.percona.com/yum/percona-release-latest.noarch.rpm' $epel_url = "https://download.fedoraproject.org/pub/epel/epel-release-latest-${facts['os']['release']['major']}.noarch.rpm" } else { $percona_url = 'http://repo.percona.com/yum/release/5/os/noarch/percona-release-0.1-3.noarch.rpm' $epel_url = 'https://archives.fedoraproject.org/pub/archive/epel/epel-release-latest-5.noarch.rpm' } - ensure_packages('percona-release',{ + stdlib::ensure_packages('percona-release',{ ensure => present, provider => 'rpm', source => $percona_url, }) - ensure_packages('epel-release',{ + stdlib::ensure_packages('epel-release',{ ensure => present, provider => 'rpm', source => $epel_url, @@ -141,9 +141,9 @@ class { 'mysql::server': root_password => 'password' } ensure => present, source => $source_url, } - ensure_packages('gnupg') - ensure_packages('gnupg2') - ensure_packages('percona-release',{ + stdlib::ensure_packages('gnupg') + stdlib::ensure_packages('gnupg2') + stdlib::ensure_packages('percona-release',{ ensure => present, provider => 'dpkg', source => '/tmp/percona-release_latest.deb', @@ -157,12 +157,12 @@ class { 'mysql::server': root_password => 'password' } /RedHat/: { $percona_url = 'http://repo.percona.com/yum/percona-release-latest.noarch.rpm' $epel_url = "https://download.fedoraproject.org/pub/epel/epel-release-latest-${facts['os']['release']['major']}.noarch.rpm" - ensure_packages('percona-release',{ + stdlib::ensure_packages('percona-release',{ ensure => present, provider => 'rpm', source => $percona_url, }) - ensure_packages('epel-release',{ + stdlib::ensure_packages('epel-release',{ ensure => present, provider => 'rpm', source => $epel_url, diff --git a/spec/acceptance/types/mysql_plugin_spec.rb b/spec/acceptance/types/mysql_plugin_spec.rb index 1cf074a89..8e7f90086 100644 --- a/spec/acceptance/types/mysql_plugin_spec.rb +++ b/spec/acceptance/types/mysql_plugin_spec.rb @@ -9,11 +9,6 @@ case os[:family] when 'redhat' case os[:release].to_i - when 5 - plugin = nil # Plugins not supported on mysql on RHEL 5 - when 6 - plugin = 'example' - plugin_lib = 'ha_example.so' when 7 plugin = 'pam' plugin_lib = 'auth_pam.so' diff --git a/spec/classes/mysql_backup_xtrabackup_spec.rb b/spec/classes/mysql_backup_xtrabackup_spec.rb index 7463d5c56..3232d686f 100644 --- a/spec/classes/mysql_backup_xtrabackup_spec.rb +++ b/spec/classes/mysql_backup_xtrabackup_spec.rb @@ -40,10 +40,8 @@ class { 'mysql::server': } package = if facts[:os]['family'] == 'RedHat' if Puppet::Util::Package.versioncmp(facts[:os]['release']['major'], '8') >= 0 'percona-xtrabackup-24' - elsif Puppet::Util::Package.versioncmp(facts[:os]['release']['major'], '7') >= 0 - 'percona-xtrabackup' else - 'percona-xtrabackup-20' + 'percona-xtrabackup' end elsif facts[:os]['name'] == 'Debian' 'percona-xtrabackup-24' @@ -195,10 +193,8 @@ class { 'mysql::server': } package = if facts[:os]['family'] == 'RedHat' if Puppet::Util::Package.versioncmp(facts[:os]['release']['major'], '8') >= 0 'percona-xtrabackup-24' - elsif Puppet::Util::Package.versioncmp(facts[:os]['release']['major'], '7') >= 0 - 'percona-xtrabackup' else - 'percona-xtrabackup-20' + 'percona-xtrabackup' end elsif facts[:os]['name'] == 'Debian' 'percona-xtrabackup-24' diff --git a/spec/classes/mysql_server_account_security_spec.rb b/spec/classes/mysql_server_account_security_spec.rb index 238124f8d..ec27e1ad3 100644 --- a/spec/classes/mysql_server_account_security_spec.rb +++ b/spec/classes/mysql_server_account_security_spec.rb @@ -3,7 +3,8 @@ require 'spec_helper' describe 'mysql::server::account_security' do - on_supported_os.each do |os, facts| + on_supported_os.each do |os, os_facts| + let(:facts) { os_facts } context "on #{os}" do let(:pre_condition) do <<-MANIFEST @@ -13,14 +14,19 @@ context 'with fqdn==myhost.mydomain' do let(:facts) do - facts.merge(root_home: '/root', - networking: { - fqdn: 'myhost.mydomain', - hostname: 'myhost' - }) + override_facts( + super(), + 'root_home' => '/root', + 'networking' => { + 'fqdn' => 'myhost.mydomain', + 'hostname' => 'myhost', + }, + ) end - ['root@myhost.mydomain', + ['root@localhost.localdomain', + '@localhost.localdomain', + 'root@myhost.mydomain', 'root@127.0.0.1', 'root@::1', '@myhost.mydomain', @@ -47,11 +53,14 @@ context 'with fqdn==localhost' do let(:facts) do - facts.merge(root_home: '/root', - networking: { - fqdn: 'localhost', - hostname: 'localhost' - }) + override_facts( + super(), + 'root_home' => '/root', + 'networking' => { + 'fqdn' => 'localhost', + 'hostname' => 'localhost', + }, + ) end ['root@127.0.0.1', @@ -68,11 +77,14 @@ context 'with fqdn==localhost.localdomain' do let(:facts) do - facts.merge(root_home: '/root', - networking: { - fqdn: 'localhost.localdomain', - hostname: 'localhost' - }) + override_facts( + super(), + 'root_home' => '/root', + 'networking' => { + 'fqdn' => 'localhost.localdomain', + 'hostname' => 'localhost', + }, + ) end ['root@127.0.0.1', diff --git a/spec/default_facts.yml b/spec/default_facts.yml index f777abfc9..3346c394d 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -2,7 +2,8 @@ # # Facts specified here will override the values provided by rspec-puppet-facts. --- -ipaddress: "172.16.254.254" -ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" +networking: + ip: "172.16.254.254" + ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" + mac: "AA:AA:AA:AA:AA:AA" is_pe: false -macaddress: "AA:AA:AA:AA:AA:AA" diff --git a/spec/functions/mysql_innobackupex_args_spec.rb b/spec/functions/mysql_innobackupex_args_spec.rb new file mode 100644 index 000000000..36be79ca7 --- /dev/null +++ b/spec/functions/mysql_innobackupex_args_spec.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'mysql::innobackupex_args' do + it 'exists' do + expect(subject).not_to be_nil + end + + it 'accepts empty strings as puppet undef' do + expect(subject).to run.with_params('', true, '', [], []) + end + + context 'should work with username and password' do + it 'returns args with username and password' do + expect(subject).to run.with_params('root', false, '12345', [], []).and_return('--user="root" --password="12345"') + end + + it 'returns args with database lists' do + expect(subject).to run.with_params('root', false, '12345', ['db1', 'db2'], []).and_return('--user="root" --password="12345" --databases="db1 db2"') + end + + it 'returns args with backup compress only' do + expected_results = '--user="root" --password="12345" --compress' + expect(subject).to run.with_params('root', true, '12345', [], []).and_return(expected_results) + end + + it 'returns args with backup compress, database list and optional_args' do + expected_results = '--user="root" --password="12345" --compress --databases="db1 db2" tst_arg_1 tst_arg_2' + expect(subject).to run.with_params('root', true, '12345', ['db1', 'db2'], ['tst_arg_1', 'tst_arg_2']).and_return(expected_results) + end + end + + context 'should work without database args' do + it 'returns args without database list' do + expect(subject).to run.with_params('root', false, '12345', [], []).and_return('--user="root" --password="12345"') + end + end + + it 'returns args without backup compress' do + expect(subject).to run.with_params('root', false, '12345', [], []).and_return('--user="root" --password="12345"') + end + + it 'returns args with backup compress and database list' do + expected_results = '--user="root" --password="12345" --compress --databases="db1 db2"' + expect(subject).to run.with_params('root', true, '12345', ['db1', 'db2'], []).and_return(expected_results) + end + + it 'returns args without backup compress database list and optional_args' do + expected_results = '--user="root" --password="12345" --databases="db1 db2" tst_arg_1 tst_arg_2' + expect(subject).to run.with_params('root', false, '12345', ['db1', 'db2'], ['tst_arg_1', 'tst_arg_2']).and_return(expected_results) + end + + it 'returns args without backup compress database list and with optional_args' do + expected_results = '--user="root" --password="12345" tst_arg_1 tst_arg_2' + expect(subject).to run.with_params('root', false, '12345', [], ['tst_arg_1', 'tst_arg_2']).and_return(expected_results) + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f96e1efa5..4d7abc00f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -13,7 +13,7 @@ default_facts = { puppetversion: Puppet.version, - facterversion: Facter.version + facterversion: Facter.version, } default_fact_files = [ @@ -25,7 +25,7 @@ next unless File.exist?(f) && File.readable?(f) && File.size?(f) begin - default_facts.merge!(YAML.safe_load(File.read(f), [], [], true)) + default_facts.merge!(YAML.safe_load(File.read(f), permitted_classes: [], permitted_symbols: [], aliases: true)) rescue StandardError => e RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}" end diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 1896fc458..5cad805a4 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -11,7 +11,7 @@ def mysql_version shell_output = LitmusHelper.instance.run_shell('mysql --version', expect_failures: true) if shell_output.stdout.match(%r{\d+\.\d+\.\d+}).nil? # mysql is not yet installed, so we apply this class to install it - LitmusHelper.instance.apply_manifest('include mysql::server', debug: true, catch_failures: true) + LitmusHelper.instance.apply_manifest('include mysql::server', catch_failures: true) shell_output = LitmusHelper.instance.run_shell('mysql --version') raise _('unable to get mysql version') if shell_output.stdout.match(%r{\d+\.\d+\.\d+}).nil? end diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb index 937b686f3..cc4d9f5c7 100644 --- a/spec/spec_helper_local.rb +++ b/spec/spec_helper_local.rb @@ -31,3 +31,39 @@ end end end + +# Override facts +# Taken from: https://github.com/voxpupuli/voxpupuli-test/blob/master/lib/voxpupuli/test/facts.rb +# +# This doesn't use deep_merge because that's highly unpredictable. It can merge +# nested hashes in place, modifying the original. It's also unable to override +# true to false. +# +# A deep copy is obtained by using Marshal so it can be modified in place. Then +# it recursively overrides values. If the result is a hash, it's recursed into. +# +# A typical example: +# +# let(:facts) do +# override_facts(super(), os: {'selinux' => {'enabled' => false}}) +# end +def override_facts(base_facts, **overrides) + facts = Marshal.load(Marshal.dump(base_facts)) + apply_overrides!(facts, overrides, false) + facts +end + +# A private helper to override_facts +def apply_overrides!(facts, overrides, enforce_strings) + overrides.each do |key, value| + # Nested facts are strings + key = key.to_s if enforce_strings + + if value.is_a?(Hash) + facts[key] = {} unless facts.key?(key) + apply_overrides!(facts[key], value, true) + else + facts[key] = value + end + end +end diff --git a/templates/my.cnf.epp b/templates/my.cnf.epp new file mode 100644 index 000000000..7371164c3 --- /dev/null +++ b/templates/my.cnf.epp @@ -0,0 +1,25 @@ +### MANAGED BY PUPPET ### + +<% sort($options.map |$key, $value| { [$key, $value] }).map |$v| { -%> +<% if type($v[1]) =~ Type[Hash] { -%> +[<%= $v[0] %>] +<%sort($v[1].map |$key, $value| { [$key, $value] }).map |$vi| { -%> +<%- if ($vi[0] == 'ssl-disable') or ($vi[0] =~ /^ssl/ and $v[1]['ssl-disable'] == true) or ($vi[0] =~ /^ssl-/ and $v[1]['ssl'] == false) { -%> +<%- next -%> +<%- } elsif $vi[1] == true or $vi[1] == '' { -%> +<%= $vi[0] -%> +<%- } elsif type($vi[1]) =~ Type[Array] { -%> +<%- $vi[1].each |$vii| { -%> +<%-$base = $vi[0]-%> +<%= $base %> = <%= $vii %> +<%- } -%> +<%- } elsif !($vi[1] ==nil or $vi[1]=='' or $vi[1]==undef) { -%> +<%-$base = $vi[0]-%> +<%= $base %> = <%= $vi[1] -%> +<% } %> +<% } %> +<% } %> +<% } %> +<% if $includedir and $includedir != '' { -%> +!includedir <%= $includedir %> +<% } -%> diff --git a/templates/my.cnf.erb b/templates/my.cnf.erb deleted file mode 100644 index 3680d81d0..000000000 --- a/templates/my.cnf.erb +++ /dev/null @@ -1,24 +0,0 @@ -### MANAGED BY PUPPET ### - -<% @options.sort.map do |k,v| -%> -<% if v.is_a?(Hash) -%> -[<%= k %>] -<% v.sort.map do |ki, vi| -%> -<% if ki == 'ssl-disable' or (ki =~ /^ssl/ and v['ssl-disable'] == true) or (ki =~ /^ssl-/ and v['ssl'] == false) -%> -<% next %> -<% elsif vi == true or vi == '' -%> -<%= ki %> -<% elsif vi.is_a?(Array) -%> -<% vi.each do |vii| -%> -<%= ki %> = <%= vii %> -<% end -%> -<% elsif ![nil, '', :undef].include?(vi) -%> -<%= ki %> = <%= vi %> -<% end -%> -<% end -%> -<% end %> -<% end -%> - -<% if @includedir and @includedir != '' %> -!includedir <%= @includedir %> -<% end %> diff --git a/templates/my.cnf.pass.epp b/templates/my.cnf.pass.epp new file mode 100644 index 000000000..1c59732ac --- /dev/null +++ b/templates/my.cnf.pass.epp @@ -0,0 +1,9 @@ +<%['mysql', 'client', 'mysqldump', 'mysqladmin', 'mysqlcheck'].each |$section| { %> +[<%= $section -%>] +user=root +host=localhost +<% if $root_password_set { -%> +password='<%= $root_password %>' +<% } -%> +socket=<%= $options['client']['socket'] %> +<% } %> diff --git a/templates/my.cnf.pass.erb b/templates/my.cnf.pass.erb deleted file mode 100644 index 9f9d03890..000000000 --- a/templates/my.cnf.pass.erb +++ /dev/null @@ -1,11 +0,0 @@ -### MANAGED BY PUPPET ### - -<% %w(mysql client mysqldump mysqladmin mysqlcheck).each do |section| %> -[<%= section -%>] -user=root -host=localhost -<% if @root_password_set -%> -password='<%= @root_password %>' -<% end -%> -socket=<%= @options['client']['socket'] %> -<% end %> diff --git a/templates/mysqlbackup.sh.epp b/templates/mysqlbackup.sh.epp new file mode 100644 index 000000000..f1301043b --- /dev/null +++ b/templates/mysqlbackup.sh.epp @@ -0,0 +1,121 @@ +<%- if $kernel == 'Linux' { -%> +#!/bin/bash +<%- } else { -%> +#!/bin/sh +<%- } -%> +# +# MySQL Backup Script +# Dumps mysql databases to a file for another backup tool to pick up. +# +# MySQL code: +# GRANT SELECT, RELOAD, LOCK TABLES ON *.* TO 'user'@'localhost' +# IDENTIFIED BY 'password'; +# FLUSH PRIVILEGES; +# +##### START CONFIG ################################################### + +USER=<%= $backupuser %> +PASS='<%= $backuppassword_unsensitive %>' +MAX_ALLOWED_PACKET=<%= $maxallowedpacket %> +DIR=<%= $backupdir %> +ROTATE=<%= [ Integer($backuprotate) - 1, 0 ].max %> + +# Create temporary mysql cnf file. +TMPFILE=`mktemp /tmp/backup.XXXXXX` || exit 1 +echo -e "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACKET" > $TMPFILE + +<% if $prescript { -%> +<%- [$prescript].flatten().filter |$value| {$value}.each |$script| { %> +<%= $script %> +<%- } -%> +<% } -%> + +# Ensure backup directory exist. +mkdir -p $DIR + +PREFIX=mysql_backup_ +<% if $ignore_events { %> +ADDITIONAL_OPTIONS="--ignore-table=mysql.event" +<% } else { %> +ADDITIONAL_OPTIONS="--events" +<% } %> + +<%# Only include routines or triggers if we're doing a file per database -%> +<%# backup. This happens if we named databases, or if we explicitly set -%> +<%# file per database mode -%> +<% if !$backupdatabases.empty or $file_per_database { -%> +<% if $include_triggers { -%> +ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --triggers" +<% } else { -%> +ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --skip-triggers" +<% } -%> +<% if $include_routines { -%> +ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --routines" +<% } else { -%> +ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --skip-routines" +<% } -%> +<% } -%> + +<%- if $optional_args and type($optional_args) =~ Type(Array) { -%> +<% $optional_args.each |$arg| { -%> +ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS <%= $arg %>" +<%- } -%> +<%- } -%> +##### STOP CONFIG #################################################### +PATH=<%= $execpath %> + +<%- if $kernel == 'Linux' { -%> +set -o pipefail +<%- } -%> + + + +cleanup() +{ + find "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f +} + +<% if $delete_before_dump { -%> +cleanup + +<% } -%> +<% if $backupdatabases.empty { -%> +<% if $file_per_database { -%> +<% if $excludedatabases.empty { -%> +mysql --defaults-extra-file=$TMPFILE -s -r -N -e 'SHOW DATABASES' | while read dbname +<%} else {-%> +mysql --defaults-extra-file=$TMPFILE -s -r -N -e 'SHOW DATABASES' | grep -v '^\(<%= $excludedatabases.join('|') %>\)$' | while read dbname +<% } -%> +do + <%= $backupmethod %> --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \ + ${ADDITIONAL_OPTIONS} \ + ${dbname} <% if $backupcompress { %>| <%= $compression_command %> <% } %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if $backupcompress { %><%= $compression_extension %><% } %> +done +<% } else { -%> +<%= $backupmethod %> --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \ + ${ADDITIONAL_OPTIONS} \ + --all-databases <% if $backupcompress { %>| <%= $compression_command %> <% } %>> ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql<% if $backupcompress { %><%= $compression_extension %><% } %> +<% } -%> +<% } else { -%> +<% $backupdatabases.each |$db| { -%> +<%= $backupmethod %> --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \ + ${ADDITIONAL_OPTIONS} \ + <%= $db %><% if $backupcompress { %>| <%= $compression_command %> <% } %>> ${DIR}/${PREFIX}<%= $db %>_`date +%Y%m%d-%H%M%S`.sql<% if $backupcompress { %><%= $compression_extension %><% } %> +<% } -%> +<% } -%> + +<% unless $delete_before_dump { -%> +if [ $? -eq 0 ] ; then + cleanup + touch <%= $backup_success_file_path %> +fi +<% } -%> + +<% if $postscript { -%> + <%- [$postscript].flatten().filter |$value| { $value }.each |$script| { %> +<%= $script %> + <%- } -%> +<% } -%> + +# Remove temporary file +rm -f $TMPFILE diff --git a/templates/mysqlbackup.sh.erb b/templates/mysqlbackup.sh.erb deleted file mode 100755 index 1fccc981f..000000000 --- a/templates/mysqlbackup.sh.erb +++ /dev/null @@ -1,121 +0,0 @@ -<%- if @kernel == 'Linux' -%> -#!/bin/bash -<%- else -%> -#!/bin/sh -<%- end -%> -# -# MySQL Backup Script -# Dumps mysql databases to a file for another backup tool to pick up. -# -# MySQL code: -# GRANT SELECT, RELOAD, LOCK TABLES ON *.* TO 'user'@'localhost' -# IDENTIFIED BY 'password'; -# FLUSH PRIVILEGES; -# -##### START CONFIG ################################################### - -USER=<%= @backupuser %> -PASS='<%= @backuppassword_unsensitive %>' -MAX_ALLOWED_PACKET=<%= @maxallowedpacket %> -DIR=<%= @backupdir %> -ROTATE=<%= [ Integer(@backuprotate) - 1, 0 ].max %> - -# Create temporary mysql cnf file. -TMPFILE=`mktemp /tmp/backup.XXXXXX` || exit 1 -echo -e "[client]\npassword=$PASS\nuser=$USER\nmax_allowed_packet=$MAX_ALLOWED_PACKET" > $TMPFILE - -<% if @prescript -%> -<%- [@prescript].flatten.compact.each do |script|%> -<%= script %> -<%- end -%> -<% end -%> - -# Ensure backup directory exist. -mkdir -p $DIR - -PREFIX=mysql_backup_ -<% if @ignore_events %> -ADDITIONAL_OPTIONS="--ignore-table=mysql.event" -<% else %> -ADDITIONAL_OPTIONS="--events" -<% end %> -<%# Only include routines or triggers if we're doing a file per database -%> -<%# backup. This happens if we named databases, or if we explicitly set -%> -<%# file per database mode -%> -<% if !@backupdatabases.empty? || @file_per_database -%> -<% if @include_triggers -%> -ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --triggers" -<% else -%> -ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --skip-triggers" -<% end -%> -<% if @include_routines -%> -ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --routines" -<% else -%> -ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS --skip-routines" -<% end -%> -<% end -%> - -<%- if @optional_args and @optional_args.is_a?(Array) -%> -<%- @optional_args.each do |arg| -%> -ADDITIONAL_OPTIONS="$ADDITIONAL_OPTIONS <%= arg %>" -<%- end -%> -<%- end -%> - -##### STOP CONFIG #################################################### -PATH=<%= @execpath %> - - - -<%- if @kernel == 'Linux' -%> -set -o pipefail -<%- end -%> - -cleanup() -{ - find "${DIR}/" -maxdepth 1 -type f -name "${PREFIX}*.sql*" -mtime +${ROTATE} -print0 | xargs -0 -r rm -f -} - -<% if @delete_before_dump -%> -cleanup - -<% end -%> -<% if @backupdatabases.empty? -%> -<% if @file_per_database -%> -<% if @excludedatabases.empty? -%> -mysql --defaults-extra-file=$TMPFILE -s -r -N -e 'SHOW DATABASES' | while read dbname -<% else -%> -mysql --defaults-extra-file=$TMPFILE -s -r -N -e 'SHOW DATABASES' | grep -v '^\(<%= @excludedatabases.join('|') %>\)$' | while read dbname -<% end -%> -do - <%= @backupmethod -%> --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \ - ${ADDITIONAL_OPTIONS} \ - ${dbname} <% if @backupcompress %>| <%= @compression_command %> <% end %>> ${DIR}/${PREFIX}${dbname}_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %><%= @compression_extension %><% end %> -done -<% else -%> -<%= @backupmethod -%> --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \ - ${ADDITIONAL_OPTIONS} \ - --all-databases <% if @backupcompress %>| <%= @compression_command %> <% end %>> ${DIR}/${PREFIX}`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %><%= @compression_extension %><% end %> -<% end -%> -<% else -%> -<% @backupdatabases.each do |db| -%> -<%= @backupmethod -%> --defaults-extra-file=$TMPFILE --opt --flush-logs --single-transaction \ - ${ADDITIONAL_OPTIONS} \ - <%= db %><% if @backupcompress %>| <%= @compression_command %> <% end %>> ${DIR}/${PREFIX}<%= db %>_`date +%Y%m%d-%H%M%S`.sql<% if @backupcompress %><%= @compression_extension %><% end %> -<% end -%> -<% end -%> - -<% unless @delete_before_dump -%> -if [ $? -eq 0 ] ; then - cleanup - touch <%= @backup_success_file_path %> -fi -<% end -%> - -<% if @postscript -%> - <%- [@postscript].flatten.compact.each do |script|%> -<%= script %> - <%- end -%> -<% end -%> - -# Remove temporary file -rm -f $TMPFILE diff --git a/templates/xtrabackup.sh.epp b/templates/xtrabackup.sh.epp new file mode 100644 index 000000000..dae476513 --- /dev/null +++ b/templates/xtrabackup.sh.epp @@ -0,0 +1,50 @@ +<%- if $kernel == 'Linux' {-%> +#!/bin/bash +<%-} else {-%> +#!/bin/sh +<%- } -%> +# +# A wrapper for Xtrabackup + +ROTATE=<%= [ Integer($backuprotate) - 1, 0 ].max %> +DIR=<%= $backupdir %> + +# Ensure backup directory exist. +mkdir -p $DIR + +<%- if $kernel == 'Linux' {-%> +set -o pipefail +<%- } -%> + +<% if $prescript {-%> +<%- [$prescript].flatten().filter |$value| {$value}.each |$script| { -%> + +<%= $script %> +<%- } -%> +<% } -%> + +cleanup() +{ + find "${DIR}/" -mindepth 1 -maxdepth 1 -mtime +${ROTATE} -print0 | xargs -0 -r rm -rf +} + +<% if $delete_before_dump { -%> +cleanup +<% } -%> + +<%= $backupmethod %> <%= $innobackupex_args %> $@ + +<% unless $delete_before_dump {-%> +if [ $? -eq 0 ] ; then + cleanup + <% if $backup_success_file_path { -%> + touch <%= $backup_success_file_path %> + <% } -%> +fi +<% } -%> + +<% if $postscript { -%> + <%- [$postscript].flatten().filter |$value| {$value}.each |$script| {%> +<%= $script %> + <%- } -%> +<% } -%> diff --git a/templates/xtrabackup.sh.erb b/templates/xtrabackup.sh.erb deleted file mode 100644 index 11093b077..000000000 --- a/templates/xtrabackup.sh.erb +++ /dev/null @@ -1,73 +0,0 @@ -<%- if @kernel == 'Linux' -%> -#!/bin/bash -<%- else -%> -#!/bin/sh -<%- end -%> -# -# A wrapper for Xtrabackup - -ROTATE=<%= [ Integer(@backuprotate) - 1, 0 ].max %> -DIR=<%= @backupdir %> - -# Ensure backup directory exist. -mkdir -p $DIR - -<%- if @kernel == 'Linux' -%> -set -o pipefail -<%- end -%> - -<% if @prescript -%> - <%- [@prescript].flatten.compact.each do |script| %> -<%= script %> - <%- end -%> -<% end -%> - - -cleanup() -{ - find "${DIR}/" -mindepth 1 -maxdepth 1 -mtime +${ROTATE} -print0 | xargs -0 -r rm -rf -} - -<% if @delete_before_dump -%> -cleanup -<% end -%> - - -<%- _innobackupex_args = '' -%> - -<%- if @backupuser and @backuppassword_unsensitive -%> - <%- _innobackupex_args = '--user="' + @backupuser + '" --password="' + @backuppassword_unsensitive + '"' -%> -<%- end -%> - -<%- if @backupcompress -%> - <%- _innobackupex_args = _innobackupex_args + ' --compress' -%> -<%- end -%> - -<%- if @backupdatabases and @backupdatabases.is_a?(Array) and !@backupdatabases.empty? -%> - <%- _innobackupex_args = _innobackupex_args + ' --databases="' + @backupdatabases.join(' ') + '"' -%> -<%- end -%> - -<%- if @optional_args and @optional_args.is_a?(Array) -%> - <%- @optional_args.each do |arg| -%> - <%- _innobackupex_args = _innobackupex_args + ' ' + arg -%> - <%- end -%> -<%- end -%> - -<%= @backupmethod -%> <%= _innobackupex_args %> $@ - - -<% unless @delete_before_dump -%> -if [ $? -eq 0 ] ; then - cleanup - <% if @backup_success_file_path -%> - touch <%= @backup_success_file_path %> - <% end -%> -fi -<% end -%> - - -<% if @postscript -%> - <%- [@postscript].flatten.compact.each do |script| %> -<%= script %> - <%- end -%> -<% end -%>