Giter Site home page Giter Site logo

Comments (11)

remkade avatar remkade commented on May 29, 2024 1

I actually figured this one out. Because the LWRP only sets node variables and doesn't generate a conf.d style file (HAProxy doesn't support that), you have to call all of your LWRPs first then make sure you run the haproxy::default recipe after all your LWRPs have been run. This means you can't include_recipe 'haproxy' at the top of your recipes either. In order to make it pull in haproxy but no generate the config, do include_recipe 'haproxy::YOURINSTALLMETHOD'.

This reallly should be documented.

from haproxy.

remkade avatar remkade commented on May 29, 2024

I have this same issue, but the log line doesn't fix it for me.

The haproxy_lb just doesn't seem to do anything at all once I've disable the default http servers.

Chef 11.8.2 using chef server.

from haproxy.

thegreenrobot avatar thegreenrobot commented on May 29, 2024

Yeah this was frustrating to find. I tried v1.6.2, v1.6.0 and 1.5.0 and it was always the same.

This is on Chef 11.10

from haproxy.

dennybaa avatar dennybaa commented on May 29, 2024

The LWRP and cookbook implementations are buggy. The resource definitions in this case of course should precede the actual haproxy::default recipe include)
There's lazy attribute evaluation and there are also many more ways to to fix this race condition. The result of a good library cookbook must not rely on the run_list recipes order.
There's nothing to document, it's better the cookbook is fixed.

from haproxy.

kplimack avatar kplimack commented on May 29, 2024

@remkade's solution worked for me. Running the LWRPs before running the haproxy (default for me) recipe fixes this. My wrapper worked perfectly in vagrant with chef-solo, went to a real box and it broke here.

from haproxy.

remkade avatar remkade commented on May 29, 2024

@dennybaa From what I understand this is more of a drawback of HAProxy, since you can't currently do a proxy.d/*.conf style include, which is really the way chef is best equipped to do this. Because of that it ought to be documented since there isn't likely to be a fix anytime soon. I'll submit a pull request.

from haproxy.

slyness avatar slyness commented on May 29, 2024

Taking a big crack right now at making this cookbook more functional. I've struggled with this cookbook myself in many configuration scenarios. https://github.com/slyness/haproxy/compare/refactor
Hopefully we'll release a more usable cookbook soon.

Note: default.rb will be a noop recipe soon with other function recipes to supply main functionality but with the intention that it can also be used as a resource cookbook to drive wrapper cookbook custom configuration.

from haproxy.

calebhailey avatar calebhailey commented on May 29, 2024

@slyness: is this still our top priority for cookbook maintenance? Will you have time for this this week?

from haproxy.

slyness avatar slyness commented on May 29, 2024

@calebhailey This particular change set has definitely fallen off my immediate to do list. But I am willing to get back at it. I'll review the current state of things this week.

from haproxy.

damacus avatar damacus commented on May 29, 2024

I'm going to close this off now as we're working towards a custom resources rewrite.

If #164 doesn't meet your needs we'd love your feedback.

from haproxy.

lock avatar lock commented on May 29, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from haproxy.

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.