-
Notifications
You must be signed in to change notification settings - Fork 90
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
UUID from Chef fails on RHEL 7.3 #292
Comments
@djdees , could you tell us a bit more:
Thanks! |
C. -
- Chef is not actively managing the machine. It's used as part of the
initial build, but not beyond that. Nothing unusual with that path, the
file is there and accessible by my management account.
- Nope.
- Sudo is enabled and the service account I use has passwordless sudo.
…On Mon, Apr 30, 2018 at 11:49 AM, Clinton Wolfe ***@***.***> wrote:
@djdees <https://github.com/djdees> , could you tell us a bit more:
- Are you using Chef to manage the machine? If so, anything unusual
about the path /var/chef/cache/data_collector_metadata.json?
- Are you using SElinux, or any other secondary RBAC system which
might result in being able to detect but not read the above path?
- Are you connecting to the machine with sudo enabled?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#292 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AIWF7WJySpl2j-d1SYWX-NXSe9_dtu9lks5tt0CogaJpZM4Ts4FT>
.
--
Derek
=========
[email protected]
There is no frigate like a book to take us lands away. Nor any Coursers
like a page of prancing poetry. This traverse may the poorest take without
oppress of toll. How frugal is the chariot that bears the Human Soul? -
Emily Dickinson
|
I am seeing this as well consistently now on centos-69 and latest chefdk 3.0.36. I am using test-kitchen ec2 driver on a hardened centos image. I have verified
I was thinking of adding a debugging print statement in train, but not sure how that would work with my local chefdk install and gems. What would my nodes be missing to not be able to generate a uuid? |
@rojomisin The implementation of that features is located here: train/lib/train/platforms/detect/helpers/os_common.rb Lines 91 to 121 in 16f70fc
Essentially we try to read the following files:
@rojomisin could you help us understand if your system has none of those files? This in addition to the issue that the machine-id is not always unique (cloned vms), we may add an easy mechanism to override that? |
This is a odd one. This error should not be hurting your setup unless your trying to use the A2 report with a non-chef node. We try to attach a UUID here: https://github.com/inspec/inspec/blob/master/lib/inspec/formatters/base.rb#L192 but if we cannot find one we set to |
The error message |
@djdees @clintoncwolfe What I assume is happening is we have a empty "/var/chef/cache/data_collector_metadata.json" file from the chef startup. We should add a check in train to make sure the file has data before we try to parse it. |
hi @chris-rock @jquick thanks for info. I'm using test-kitchen + chef-zero so those files are not there. That being said if I do a straight Could it be that the test-kitchen method of generating the uuid on my workstation (os x el cap 10.11.6 ... kinda old)? train/lib/train/platforms/detect/specifications/os.rb Lines 439 to 496 in de3ec80
I've been querying this issue in the test-kitchen slack channel a bit too, because it doesn't seem to be inspec. will post debug output in a bit
|
Description
Reported on inspec/inspec#2985 by @djdees
When trying to read a Chef-generated UUID, the file content detection logic fails and passes a
nil
to the JSON parser, throwing an exception.Looks like it's this line:
(https://github.com/chef/train/blame/master/lib/train/platforms/detect/helpers/os_common.rb#L102)
Offhand that seems fine; perhaps there are SELinux constraints preventing us from reading the file?
Train and Platform Version
1.4.1 targeting RHEL 7.3
Introduced on #270
Unknown SELinux status
Replication Case
See inspec/inspec#2985
Possible Solutions
Could check
nil?
on the file contentCheck to verify that the file is really a file (not a dir)
Stacktrace
The text was updated successfully, but these errors were encountered: