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

Remove defaults for AIX and Solaris as we can't verify/maintain these #100

Conversation

h-haaks
Copy link
Contributor

@h-haaks h-haaks commented May 24, 2024

Since all settings in the params class are now defaults for class parameters I'll remove the defaults for AIX and Solaris as we have no way to verify their correctness.
AIX and Solaris users can still use the module by providing their own parameters.

Builds on #99

@h-haaks h-haaks force-pushed the remove-defaults-for-OSes-we-can-not-test branch from aff77d3 to 4dc564c Compare May 24, 2024 23:03
"operatingsystemrelease": [
"7.2",
"7.3"
]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added AIX in a previous PR, but dropped Solaris...

Copy link
Member

Choose a reason for hiding this comment

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

Wait, if we remove the default from params.pp because the same value is already in the main class:

  • This is not a backwards-incompatble change;
  • There is no reason to drop support of OS.

I do not use these systems nor this module, but if I did I would consider this removal as an intention from the maintainers to not maintain compatibility with these OS anymore. If the OS is said to be supported, any failure would be considered a bug and would possibly be fixed (e.g. by providing fixed default values in Hiera).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@smortex AIX and Solaris has never been mentioned as supported in any release of this module.
see https://forge.puppetlabs.com/modules/pcfens/ca_cert/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the PR title a bit.
About backwards-incompatible i added the label in case anyone uses those defaults.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an example for custom certificates handling

@@ -17,7 +22,7 @@
$cert_dir_mode = '2665'
}
default: {
fail("Unsupported operatingsystem (${facts['os']['name']})")
$cert_dir_mode = '0755'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I remove all "Unsupported os" fails as that's hard to fit when moving to hiera.
Given that all settings here are now class parameters I really think the module supports any Linux OS out there.

@h-haaks h-haaks force-pushed the remove-defaults-for-OSes-we-can-not-test branch 4 times, most recently from dec185e to d2617cf Compare May 25, 2024 08:47
#
# === Parameters
# class { 'ca_cert':
Copy link
Member

Choose a reason for hiding this comment

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

you need another @example something something above each codeblock.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, manage_all_user_CAs is not even a param any more ...
I'll fix this :)

String[1] $package_name = $ca_cert::params::package_name,
String[1] $update_cmd = $ca_cert::params::update_cmd,
String[1] $trusted_cert_dir = $ca_cert::params::trusted_cert_dir,
Optional[String[1]] $distrusted_cert_dir = $ca_cert::params::distrusted_cert_dir,
Copy link
Member

Choose a reason for hiding this comment

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

I think it makes more sense to just assign undef as default value here:

Suggested change
Optional[String[1]] $distrusted_cert_dir = $ca_cert::params::distrusted_cert_dir,
Optional[String[1]] $distrusted_cert_dir = undef,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I do that I'll have to add code in the class again to use it.
It will be changed to undef when I move from params class to hiera.

My plan is to create one more PR to align Debian defaults with package defaults before moving to hiera.

String[1] $cert_dir_mode = $ca_cert::params::cert_dir_mode,
String[1] $ca_file_mode = $ca_cert::params::ca_file_mode,
String[1] $ca_file_extension = $ca_cert::params::ca_file_extension,
String[1] $package_ensure = 'installed',
Copy link
Member

Choose a reason for hiding this comment

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

I think https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/types/ensure/package.pp would be good here

Suggested change
String[1] $package_ensure = 'installed',
Stdlib::Ensure::Package $package_ensure = 'installed',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll fix and add Stdlib::Absolutepath usage as well

String[1] $cert_dir_group = $ca_cert::params::cert_dir_group,
String[1] $ca_file_group = $ca_cert::params::ca_file_group,
String[1] $cert_dir_mode = $ca_cert::params::cert_dir_mode,
String[1] $ca_file_mode = $ca_cert::params::ca_file_mode,
Copy link
Member

Choose a reason for hiding this comment

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

https://github.com/puppetlabs/puppetlabs-stdlib/blob/main/types/filemode.pp

Suggested change
String[1] $ca_file_mode = $ca_cert::params::ca_file_mode,
Stdlib::Filemode $ca_file_mode = '0644',

@h-haaks h-haaks changed the title Remove defaults for OSes we can not test Remove defaults for AIX and Solaris as we can't verify/maintain these May 26, 2024
@h-haaks h-haaks force-pushed the remove-defaults-for-OSes-we-can-not-test branch from d2617cf to af71aea Compare May 26, 2024 10:41
@h-haaks h-haaks force-pushed the remove-defaults-for-OSes-we-can-not-test branch from 2558fbc to 2cba40b Compare May 26, 2024 11:11
@h-haaks h-haaks requested review from smortex and bastelfreak May 26, 2024 11:21
@TheMeier
Copy link
Contributor

Since the fail() for unsupported os/os-versions is removed I think it's fair to drop those defaults

@h-haaks h-haaks merged commit 4e2b5b8 into voxpupuli:master May 27, 2024
23 checks passed
@h-haaks h-haaks deleted the remove-defaults-for-OSes-we-can-not-test branch May 27, 2024 06:10
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