Giter Club home page Giter Club logo

Comments (9)

smbambling avatar smbambling commented on July 28, 2024

My current 'hack' work around is this. Definitely not the best but seems to work

wildfly::util::exec_cli { 'Reload if necessary':
    command => 'reload',
    onlyif  => '(result == reload-required) of read-attribute server-state'
  } ->
  exec { 'Test Wildfly Management Interface is UP':
    command     => "sleep 2  && curl ${::wildfly::mgmt_bind}:${::wildfly::mgmt_http_port}",
    path        => '/bin:/usr/bin:/sbin:/usr/sbin:',
    subscribe   => Wildfly::Util::Exec_cli['Reload if necessary'],
    refreshonly => true,
    try_sleep   => '2',
  }

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

Reload is a very expensive operation that leaves the server unavailable. If you send a reload command, server will send an ack, http connection will be closed and reload process will start. (i.e. reload is asynchronous)

I always try to use reload as the last operation in my manifest, but not sure if it's enough.

Maybe we need a special treatment for async operations (only know reload and restart). What do you think?

As a matter of fact, imperative operations are hard to map to a resource and will always looks strange in a manitest for me.

from puppet-wildfly.

smbambling avatar smbambling commented on July 28, 2024

Putting it last in a manifest isn't enough for my tasks. Because I'm removing the ExampleDS ..and the EE module that references it it requires a reload. If this is not done before my WAR attempts to deploy it will fail.

Yeah having some kind of special treatment for async operation would be beneficial for sure. The exec 'hack' I have printed above just seem dirty.

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

@smbambling I was taking a look at puppetlabs-reboot. It seems feasible to implement a wildly_reload or wildfly_restart.

What do you think?

from puppet-wildfly.

smbambling avatar smbambling commented on July 28, 2024

I don't understand the need or methodology for rebooting the entire system. Would you mind explaining your thinking behind using this module and the requirement for it ?

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

I was thinking about using the same concept behind puppetlabs-reboot to reload/restart wildfly. (i.e. subscribe/notify)

For example:

wildfly_cli { 'do something that requires a reload': }
~>
wildfly_reload { 'after': } #reload and queries wildly for X time (i.e. polling) to check if it's 'running'

Got it?

from puppet-wildfly.

smbambling avatar smbambling commented on July 28, 2024

I like the concept, how would you handle multiple CLI commands that require a reload ?

I'm assuming you'll have to declare the relationship in your manifest just like you do currently with the reload example (wildfly::util::exec_cli { 'Reload if necessary':)

from puppet-wildfly.

jairojunior avatar jairojunior commented on July 28, 2024

@smbambling Just pushed a feasible solution for this issue:

wildfly::modcluster::config { 'Modcluster mybalancer':
  balancer => 'mybalancer',
  load_balancing_group => 'demolb',
  proxy_url => '/',
  proxy_list => '127.0.0.1:6666'
}
~>
wildfly::util::reload { 'after Modcluster':
  retries => 3,
  wait    => 5,
}

It's mostly based in our discussion here. Hope you still can provide me some feedback.

Thank you.

from puppet-wildfly.

smbambling avatar smbambling commented on July 28, 2024

Cool I have this marked to get this done this week. Thanks for all the work on this module !

from puppet-wildfly.

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.