Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `ext_conf_dir' when using mariadb 2.0.0 cookbook #225

Closed
aalmenar opened this issue Nov 2, 2018 · 6 comments
Closed

undefined method `ext_conf_dir' when using mariadb 2.0.0 cookbook #225

aalmenar opened this issue Nov 2, 2018 · 6 comments
Assignees

Comments

@aalmenar
Copy link

aalmenar commented Nov 2, 2018

Cookbook version

2.0.0 (Or head from github)

Chef-client version

14.6.47

Platform Details

Debian 9 and Debian 10

Scenario:

When trying to set some variable not included in the list of mariadb_server_configuration:

mariadb_configuration 'extra_innodb' do
section 'mysqld'
option :innodb_thread_concurrency => 8,
:innodb_commit_concurrency => 8,
:innodb_read_io_threads => 8,
:innodb_flush_log_at_trx_commit => 1
end

Steps to Reproduce:

Include the scenario inside a cookbook recipe.

Expected Result:

Create a file inside /etc/mysql/conf.d/extra_innodb.cnf with the values:

[mysqld]
innodb_thread_concurrency = 8
innodb_commit_concurrency = 8
innodb_read_io_threads = 8
innodb_flush_log_at_trx_commit = 1

Actual Result:

An error from chef client stating:

NoMethodError: undefined method `ext_conf_dir' for Custom resource mariadb_configuration from cookbook mariadb

@askz
Copy link

askz commented Jan 8, 2019

Same here.
Is there any fix I should be aware of?

@JohnRoesler
Copy link
Contributor

We're short on maintainers for mariadb at the moment, sadly. We'd welcome a PR if you wanted to take a crack at it!

@josephholsten
Copy link
Contributor

@aalmenar @askz here's the first use of the ext_conf_dir helper: 3d1850f.

I suspect the issue is that resources/configuration.rb doesn't have the line include MariaDBCookbook::Helpers like resources/server_configuration.rb:19. Someone want to try adding the line and seeing if it works?

@sinfomicien
Copy link
Contributor

Good guess @josephholsten ! My bad, i forget it while rewriting the whole cookbook for 2.0.0 version. The ext_conf_dir is a method of the helper, and so you need to include the helper to use that method there. Will submit a PR to correct, and add tests so that i won't forget it next time.

sinfomicien added a commit that referenced this issue Apr 2, 2019
- Add tests
- Add entry in CHANGELOG
@sinfomicien sinfomicien mentioned this issue Apr 2, 2019
2 tasks
@sinfomicien sinfomicien self-assigned this Apr 2, 2019
sinfomicien added a commit that referenced this issue Apr 3, 2019
- Add tests
- Add entry in CHANGELOG
sinfomicien added a commit that referenced this issue Apr 4, 2019
- Add tests
- Add entry in CHANGELOG
sinfomicien added a commit that referenced this issue Apr 9, 2019
- Add tests
- Add entry in CHANGELOG
@sinfomicien
Copy link
Contributor

Just merged the correction in master, @aalmenar could you test it in your case please ? If it's ok, you can close it :-D

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

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

No branches or pull requests

7 participants