Comments (9)
One of the forward looking things that align with this is the idea of having :optional
plugins which can be enabled via Ohai::Config
. However it is arguable easier to drop a hints file via Chef rather than updating config file via Chef.
from ohai.
That is true only if you are already running Chef on your box - doesn't help you in the bootstrapping use case.
Also, if there's pain in updating Chef's config file with Chef then that's arguably something we should look into fixing... for obvious reasons 😁
from ohai.
I think the way to update Chef's config file via Chef is to use the chef-client cookbook. If you're using that 👍 but otherwise you'll be :sadpanda:
I'm not clear on how the bootstrapping use case will work? Like below:
knife bootstrap my_node --ohai-hints ec2,azure
from ohai.
@sersut Yeah, that would work, 'cause is there any situation in which a hint isn't a boolean? We could then make the bootstrap template write out a line into the client.rb
with the hints turned on, e.g.
Ohai[:hints] = ['ec2', 'whatevs']
from ohai.
Makes sense... Probably config should co-exist with the hint files in order not to break backwards compat.
from ohai.
@juliandunn There are some plugins which rely on hints data to populate the plugin data. For example, the azure plugin only reads azure.json
.
On the surface, it seems hints serve a single function: to provide Ohai with information that it can't provide itself. But that largely breaks into two categories: a boolean stating presence of data Ohai can then go look for (e.g., ec2 plugin), or directly providing Ohai with data it can't find, or isn't finding, on its own (e.g., the azure plugin).
It's confusing to know when it's a boolean case and when it's a "provide the JSON" case. I think we need to distinguish between the two more concretely.
from ohai.
👍 to @mcquin on the purpose of hints being "to provide Ohai with information that it can't provide itself."
I've seen people want to use Ohai hints for purposes that we already have other mechanisms for like node attributes and tags. Hints were meant to be a last case scenario for detection of system information, not another path for user data. I wouldn't want to break the ability to pass in JSON data via hints to allow someone to easily trigger a hint from the command line. We knows that we want to be able to push in some cloud data now and then. See OHAI-267 for the original discussion.
Hints shouldn't be a configuration flag alone, because then anything else that wants to provide a hint to Ohai would need to edit the configuration file. The hints directory acts like a .d directory, allowing knife and other tools to drop data in without having to parse the configuration file.
from ohai.
Previously we needed hints for just about every cloud plugin as we lacked ways to properly detect the providers. For the last 8+ months we've had solid auto detection on all clouds except Azure which lacks a metadata endpoint. Rackspace, GCE, EC2, Openstack all auto detect and grab metadata. Ideally people just stop using the hints. If Azure gets a metadata endpoint we can move to a world where the hints are an optional fallback when things don't work as they should.
from ohai.
I'm going to close this out at this point. We've eliminated the main reason for using the hints and I don't see the return being worth the effort of refactoring at this point.
from ohai.
Related Issues (20)
- Darwin Hardware: Imparity between Intel and ARM/M1 (Apple Silicon) Apple devices HOT 3
- Ohai simultaneously detects EC2 and Azure clouds
- fips plugin does not detect host fips mode properly HOT 4
- CPU total is 0 when threads-per-core is 0 HOT 1
- lscpu parser doesn't parse Raspberry Pi 4 (ARM Cortex-A72) output HOT 4
- Custom Ohai plugin not functioning properly after Chef 17 upgrade.
- Metadata tags with spaces cause ohai ec2 to return an empty response
- Network Plugin intermittently unable to detect ipaddress
- fetching metadata on VMs with pre-defined user-data of Alibaba Cloud causing a never-end recursion, maybe other Cloud Service Providers are affected too HOT 1
- node['cloud'] = nil in AWS environment where full tunnel VPN is enabled
- Installation of version 17.9.0 fails with unavailable dependency HOT 5
- [BUG] Ohai passwd - segmentation fault at 0x0000000000000000 HOT 1
- Darwin virtualization plugin: potential for false positive HOT 1
- cloud plugin fail on Oracle Cloud Infrastructure (OCI) HOT 1
- Another instance of possible incorrect class comparison
- Incorrect/truncated CPU flags returned with later Linux kernels
- [17.9.0] EC2 metadata missing `network-card` information
- Plugin Cloud threw exception #<SystemStackError: stack level too deep> HOT 1
- lscpu on Debian VM on ARM system crashes CPU plugin HOT 1
- rubygems is showing ohai 18.1.3 as the latest version (from March 08, 2023
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 ohai.