Comments (4)
What about mountpoint information, networking data, LSM settings, the ruby version, ssh hostkey information, and what have you? These are all data which can be changed by a Puppet agent run and still they are included in the list of facts.
from puppet-cups.
A Puppet fact - by definition - is a property that cannot be changed by a puppet agent run. Architecture, OS, physical network interfaces - those are facts. CUPS queues and there properties are not.
Also, IMHO your use case lies way beyond the intend scope of Puppet (i.e. provisioning nodes) and should therefore be solved with software tailored to the use case.
from puppet-cups.
@wiene This module offered the names of printers or classes as Puppet facts in versions 1.x.x
. That was a bad choice: If you really used those facts in one way or another in your manifests, you most certainly broke idempotence and had to run Puppet at least three times to get a Puppet run which did not apply changes. That's why the facts were removed for versions 2.x.x
.
from puppet-cups.
you most certainly broke idempotence
I fully agree that idempotence is a high and worthy goal. But with Puppet, it is sadly impossible to have idempotence in many cases without giving up other fundamentals, such as using even core facts altogether.
For example, https://github.com/cvmfs/puppet-cvmfs and https://github.com/desalvo/puppet-frontier can use mount points for caches and those packages at the same time need information on how much storage they are allowed to use.
Idempotence breaks if the mount itself is managed by Puppet, since it's then only part of the facts starting from the second run.
Another example are modules which detect system hardware and store that in external facts, e.g. https://github.com/jhoblitt/puppet-megaraid or https://github.com/treydock/puppet-infiniband . I'd clearly see this as a system property., so the term fact seems correct here - but they require lspci
which in turn is installed by a package resource managed by Puppet.
This can lead to a requirement for even more than two puppet runs if e.g. a filesystem mount requires Infiniband to be set up, and something else (e.g. a cache) depends on the total storage of that filesystem.
To cut a long story short: Idempotence is a high goal and we should strive for it whenever possible. But Puppet is designed in a way making that impossible for complex setups - unless you completely ignore facts and reimplement all that locally in each module's ruby code (yes, of course also lspci
can be emulated in Ruby that way). But that's rather impractical.
That's why I asked for this feature. I know idempotence is broken whenever most facts are used, that's by design whenever there are two phases and one may influence the other - but there are cases when this is better (as long as converging state is guaranteed) than reimplementing things in each module or breaking module boundaries by e.g. checking in a network file system if Infiniband hardware exists.
I also believe that puppet-cups could gain from using facts. Right now, I see 2-4 calls to lpoptions
for each queue, depending on how many options are configured. With 50 queues, the puppet run takes pretty long just from these multiple calls. Collecting this information once and storing it in a structured fact would remove those repeated calls to the external command.
But the decision is of course yours to take, that's just my 2 cents 😉.
from puppet-cups.
Related Issues (20)
- Module cannot be upgraded from 1.2.2 to 2.2.0 without first loading 2.0.x HOT 3
- /var/log/cups/error_log flooded with SSL errors HOT 4
- Add possibility to restrict queue usage based on IP addresses HOT 6
- Deprecation message prevents creation of queue HOT 4
- Could not prefetch cups_queue provider 'cups' on Ubuntu 18.04 HOT 14
- [Feature] Configurability for MaxJobs and PreserveJobHistory HOT 3
- Configuration for MaxSubscriptions (needed for > 100 clients)
- Depfu Error: Depfu is stuck and needs your help
- Depfu Error: Depfu is stuck and needs your help
- spec/acceptance/puppet/cups_issue_4766_spec.rb fails on centos7 HOT 2
- "Unable to connect" on slow restart (EL7) HOT 1
- Error on "purge_unmanaged_queues" with CUPS stopped HOT 2
- Depfu Error: Depfu is stuck and needs your help
- Depfu Error: Depfu is stuck and needs your help
- Please add an options hash
- Enhancement Request : need MaxJobsPerPrinter directive to be added in cupsd template file _directives.erb HOT 2
- AuthInfoRequired username,password setup HOT 2
- Ubuntu 20.04 - Could not prefetch cups_queue provider 'cups' HOT 4
- Failure to add IPP Everywhere queue HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-cups.