GithubHelp home page GithubHelp logo

Comments (6)

andrewGarson avatar andrewGarson commented on June 2, 2024

@AdallomRoy what was the issue you saw?

I can install from source with
node[:zabbix][:server][:configure_options] = ["--with-libcurl", "--with-net-snmp"] without losing those options.

from zabbix.

AdallomRoy avatar AdallomRoy commented on June 2, 2024

Hi,

This could be since I'm using chef client 11.4.2 (have you tested it
against this version?)

The error I'm getting is "Node attributes are read-only when you do not
specify which precedence level to set (To set an attribute use code like
`node.default["key"] = "value"')" ...
This happens due to this line:
configure_options = (node['zabbix']['server']['configure_options'] || Array.
new).delete_if do |option|

If the configure_options are not empty, it will put the node object as the
configure options -> but node objects are immutable, which will cause an
error (either when attempting to delete, or later when attempting to append).

Cheers.

from zabbix.

andrewGarson avatar andrewGarson commented on June 2, 2024

I see. I'm still using chef 10 at this point. So the problem is trying to persist it back to the chef-server. Maybe we don't even need to do that given that we are only removing "--prefix", we can do that each time.

@laradji When server_source runs (agent_source will have this problem too) the "--prefix" option gets removed from the options array and then we try to persist it back to the chef-server. We can either update the code to persist properly for Chef 10 and Chef 11 or just not persist it back. The check has to happen on each run anyway. What do you think?

from zabbix.

AdallomRoy avatar AdallomRoy commented on June 2, 2024

It's a bit more problematic than that, because the new code uses configure_options to add other parameters later (e.g. mysql stuff) so even if you remove that delete_if, you will still have trouble..

from zabbix.

andrewGarson avatar andrewGarson commented on June 2, 2024

good point. So we need to change all of the node.set calls (and the delete_if) to set at a particular precedence level.

from zabbix.

laradji avatar laradji commented on June 2, 2024

Hello guys,

maybe we can remove the cleaning of prefix with delete_if. it was put to help migration from older version of the cookbook prior 0.0.18.

from zabbix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.