Skip to content

support lbmethod modules #2268

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

Merged
merged 3 commits into from
Nov 7, 2022
Merged

Conversation

xorpaul
Copy link
Contributor

@xorpaul xorpaul commented Jul 28, 2022

mod_proxy_balancer depends on one of these load balancing scheduler algorithms:

See https://httpd.apache.org/docs/2.4/mod/mod_proxy_balancer.html

This adds support to include one of them via:

class { 'apache::mod::lbmethod_byrequests': }

Maybe apache::mod::lbmethod_byrequests should even fail if none of these 4 are included?

@xorpaul xorpaul requested a review from a team as a code owner July 28, 2022 12:40
@CLAassistant
Copy link

CLAassistant commented Jul 28, 2022

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

apache::mod::lbmethod_bybusyness is a class

that may have no external impact to Forge modules.

apache::mod::lbmethod_byrequests is a class

that may have no external impact to Forge modules.

apache::mod::lbmethod_bytraffic is a class

that may have no external impact to Forge modules.

apache::mod::lbmethod_heartbeat is a class

that may have no external impact to Forge modules.

This module is declared in 174 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to have some basic unit tests for these classes.

@xorpaul xorpaul force-pushed the add_lbmethod_modules branch from 2f90dcc to dfd4536 Compare July 28, 2022 13:06
Copy link
Collaborator

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimal specs in https://github.com/puppetlabs/puppetlabs-apache/tree/main/spec/classes/mod would be nice to have. That way at least the catalog is compiled and verified.

@xorpaul
Copy link
Contributor Author

xorpaul commented Jul 28, 2022

@ekohl Ok, thanks. I'll check it out.

@xorpaul
Copy link
Contributor Author

xorpaul commented Aug 3, 2022

Is there any way to trigger only my new tests and not the whole test suite which takes over 6 minutes on my workstation?

@david22swan
Copy link
Member

@xorpaul You can target specific test files as shown below:

bundle exec rspec spec/unit/puppet/provider/iptables_spec.rb

@david22swan
Copy link
Member

@xorpaul Hey, just checking in on how this is progressing

@xorpaul
Copy link
Contributor Author

xorpaul commented Sep 7, 2022

After upgrading my workstation to Ubuntu 22.04 the bundle commands do not work anymore.

I'm getting

$ bundle install
Could not find gem 'puppet-module-posix-default-r3.0 (~> 1.0)' in any of the gem sources listed in your Gemfile.
$ bundle exec rake parallel_spec
/usr/bin/env: ‘ruby2.5’: No such file or directory

Is there a way to make this work with more recent OS versions?

@david22swan
Copy link
Member

@xorpaul You could try deleting the gem folder and gemfile.lock file

@ekohl
Copy link
Collaborator

ekohl commented Sep 12, 2022

@xorpaul I recognize the pain you have. Sadly PDK is in a horrible place regarding modern Ruby support. https://tickets.puppetlabs.com/browse/MODULES-11161 has been open for a long time. I always end up hacking Gemfile and hardcode minor_version = '2.7' here:

minor_version = ruby_version_segments[0..1].join('.')

Or I just rely on CI to do testing.

@david22swan
Copy link
Member

@xorpaul The issue you were having should now be resolved.

Copy link
Member

@david22swan david22swan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@xorpaul Sorry for the wait, this just sort of slipped out of mind.
Thank's for getting the work done.

@david22swan david22swan merged commit 15c8686 into puppetlabs:main Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants