Git Product home page Git Product logo

Comments (17)

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024 1

I could help with it.

from s2i-perl-container.

phracek avatar phracek commented on September 28, 2024 1

@yselkowitz Can you please provide us more information about hot-deploy? Any documentation? How it should work in a container? The issue is related only to RHEL7 images, right? And even, how can we set up and test it?

Thank you

CC: @michal-josef-spacek @pkubatrh @hhorak

from s2i-perl-container.

LorbusChris avatar LorbusChris commented on September 28, 2024

/cc @phracek

from s2i-perl-container.

yselkowitz avatar yselkowitz commented on September 28, 2024

The links above show the enablement of hot config and the application being tested. In short, it is relying on setting PERL_APACHE2_RELOAD to control this, which means it's relying on Apache2::Reload with mod_perl. UBI 8 uses mod_fcgid, so that won't do anything. I think the solution might be plackup -r but does that require changing the s2i glue to conditionally pass -r to plackup based on a new environment variable? Or is there a better way to handle this?

from s2i-perl-container.

phracek avatar phracek commented on September 28, 2024

The links above show the enablement of hot config and the application being tested. In short, it is relying on setting PERL_APACHE2_RELOAD to control this, which means it's relying on Apache2::Reload with mod_perl. UBI 8 uses mod_fcgid, so that won't do anything. I think the solution might be plackup -r but does that require changing the s2i glue to conditionally pass -r to plackup based on a new environment variable? Or is there a better way to handle this?

@michal-josef-spacek Does it help you @yselkowitz comment to implement it and test it?

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

@phracek @yselkowitz
plackup -r -R __DIRS_WHICH_MONITOR__ is working, preparing PR for it.

Some questions which i am trying to understand:

  • This plackup -r working only to specified directories and check across inotify all changes in them. Is it expected usage? This not affect e.g. installed rpms.
  • How is this Apache2::Reload working? When i changed file or included file, reload was done without this Apache2::Reload usage too.

from s2i-perl-container.

yselkowitz avatar yselkowitz commented on September 28, 2024
  1. Yes, see https://metacpan.org/dist/Plack/view/script/plackup#-r,-reload
  2. Apache2::Reload is only included in the mod_perl-based rhel7 builder image, not the mod_fcgid-based ubi8 ones. It is triggered in the run script.

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

@yselkowitz I know this answers. My questions are more deeply in both scenes. ok, i will prepare PR and will discuss more after.

from s2i-perl-container.

phracek avatar phracek commented on September 28, 2024

I have filed a Bugzilla for this issue. https://bugzilla.redhat.com/show_bug.cgi?id=2023278

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

@yselkowitz First thing:

  • When we have application for hot plug "https://github.com/openshift/origin/tree/master/test/extended/testdata/image_ecosystem/perl-hotdeploy"
  • This mean, that moving from container based on mod_perl to container based on mod_fcgi means that application changes from mod_perl app to classic cgi app. This mean that each request call full application again.
  • This mean that we need deliver new application. Possibilities are:
    • PSGI application (configuration is present by $PSGI_FILE env variable)
    • FCGI application (configuration is present for each *.fcgi script)

For me the best example application is counter application, which stores state of counter. This is nice example to test if application is loaded again and again or running.

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

PSGI application for hot-deploy PR: openshift/origin#26607

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

btw: On old containers this PSGI application hasn't possiblity of this kind of reload.

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

Support for this in s2i-perl container: #221

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

@yselkowitz @phracek I added tests for PSGI_RELOAD functionality

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

Rebase PR again: #236

from s2i-perl-container.

phracek avatar phracek commented on September 28, 2024

This is fixed by #236

from s2i-perl-container.

michal-josef-spacek avatar michal-josef-spacek commented on September 28, 2024

@yselkowitz If you need some other help from me, ping me, please.

from s2i-perl-container.

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.