Skip to content
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

fwv #2

Merged
merged 10 commits into from
Oct 19, 2023
Merged

fwv #2

merged 10 commits into from
Oct 19, 2023

Conversation

jhoblitt
Copy link
Member

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

@jhoblitt jhoblitt added the enhancement New feature or request label Aug 28, 2023
.fixtures.yml Outdated Show resolved Hide resolved
@jhoblitt
Copy link
Member Author

Questions:

  • Are the parameter names reasonable? hosts::hosts from hiera looks a bit awkward. Would hosts::host (without the s) be any better? Maybe hosts::entry or hosts::entries would be better?
  • Is the default set of /etc/hosts entries for loopback/etc. reasonable?
  • Should we use the core hosts type? It does not correctly handle duplicate ip address entries.

@jcpunk
Copy link

jcpunk commented Aug 30, 2023

I've got a number of dual stack hosts, how would I use this module for them?

@jhoblitt
Copy link
Member Author

@jcpunk are you creating /etc/hosts entries for networking.ip6 ?

@jhoblitt
Copy link
Member Author

How about hosts::host_entries ?

@jhoblitt
Copy link
Member Author

jhoblitt commented Oct 19, 2023

I'm not really sure how to build dual stack support while using puppetlabs/host_core, as that module's parser doesn't seem to fully handle the nuances of mixed ipv4 and ipv6 addresses.

I think for the moment I'm going to going to leave the default behavior as ipv4 only, so something can be shipped, as I believe the only way forward for dual-stack to replace puppetlabs/host_core and that's more effort than I can I can afford to invest at the moment.

manifests/init.pp Outdated Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
@@ -7,8 +7,8 @@
"source": "https://github.com/voxpupuli/puppet-hosts",
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 8.0.0 < 10.0.0"
"name": "puppetlabs/host_core",
Copy link
Member

Choose a reason for hiding this comment

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

please don't add the core module. They are supposed to be always available so we never add them to metadata.json.

Copy link
Member Author

Choose a reason for hiding this comment

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

I deeply disagree with this. For starters, it isn't always available. It is only available when using the AIO packaging and AFAIK, there is no official vox policy of only support AIO. puppetlabs/host_core is a dependency and it has a version string. If we don't put it in the metadata.json then we have to do extra work to setup the acceptance tests, which is just shooting ourselves by causing extra work for no benefit.

Copy link
Member

@bastelfreak bastelfreak Oct 19, 2023

Choose a reason for hiding this comment

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

Even non AIO packages should include those core modules or pull them in as a dependency. Debian for example does that: https://packages.debian.org/bookworm/puppet-agent. Same on ubuntu: https://packages.ubuntu.com/lunar/puppet-agent. Arch vendors them into the puppet package: https://gitlab.archlinux.org/archlinux/packaging/packages/puppet/-/blob/main/PKGBUILD?ref_type=heads#L38-46

because of that, we don't need to explicitly install them in our acceptance tests. If a distro builds their own package but doens't pull in the core modules, the package is broken (that's a statement from Puppet, but I agree with this).

Copy link
Member Author

Choose a reason for hiding this comment

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

These are modules that have versions. They are released on the forge so they can be updated independently from the core.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me turn this around, what is broken by this module's metadata declaring its full dependency chain?

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, it needs to be documented that this module has a dep on host_core as when someone copies into into the Puppetfile for the control repo, host_core also needs to be declared in the Puppetfile for rspec-puppet to work.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm going to ship this as-is as I'm in a rush. We can continue this discussion if needed.

@jhoblitt jhoblitt merged commit c80ba26 into master Oct 19, 2023
11 checks passed
@jhoblitt jhoblitt deleted the feature/fwv branch October 19, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants