-
Notifications
You must be signed in to change notification settings - Fork 275
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
fix issues on nodes without lvm #308
Conversation
According to https://www.puppet.com/docs/puppet/7/fact_overview.html, there should not be code outside setcode
Also down the text
|
That's true and one more cause why these legacy facts should be deprecated, as pointed out in Slack discussion by @cruelsmith
They just need to work as long there is no alternative source for the particular information they provide and some time to migrate. |
The thing is as follows: TL;DR To me, all that sums up as the code as it is works for now, but cannot be tested thoroughly, and might break in near future. Any code, that can be tested and is future prove, won't be able to produce fact names programmatically - dispute me if I'm wrong. I'd propose the following solution:
|
Mhm what about a more radically approach here and reuse the existing So for the
|
Something like that might work in the wild, though, it doesn't solve any problems we are facing here:
Moreover, |
tested manually on nodes with and without lvm
rebased onto main |
Tested on Windows 2019 too and works fine. |
I defer to experts in Puppet's internals. As I stated earlier, v2.0.3 and updated code doesn't conform to the documentation, code in v2.0.2 did. |
@@ -346,6 +346,13 @@ Logical volume size can be extended, but not reduced -- this is for | |||
safety, as manual intervention is probably required for data | |||
migration, etc. | |||
|
|||
## Deprecation Notice | |||
|
|||
Some facts reported by this module are being deprecated in favor of upcomming structured facts. The following facts are being deprecated: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The below facts are the custom flat facts, so not sure if these are gonna deprecate as well?
AFAIK the custom facts (irrespective of flat or structured facts) these will not be deprecated and Puppet will allow them to define for long run as well. Only the legacy facts which will get deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Facter code generating fact names dynamically on the fly is problematic: violates coding rules, hard to maintain, even harder to test. That's why we should get rid of them.
Can we please have this released soon? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are moving with this change for now but for long term we need to review these facts with manifest use-case and update accordingly.
These changes have been released as part of |
Thank You. |
tested manually on nodes with and without lvm
Closes #307