Inspec test failing on virtualization.virtual_system
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 8.2k
- Forks
- 2.5k
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 23
Description
Description
In a cookbook compliance/inspec test, "virtualization.virtual_system?" is failing. Appears to be returning nothing (nil) on Redhat
Code works fine in chef-client-17 but is failing on chef-client-18
Chef Version
18.1.0
Platform Version
Running on vmware: Redhat 6.10, Redhat 7.9, & Redhat 8.4
Replication Case
I've a cookbook compliance test that works fine via chef-client-17 but suddenly failing on chef-client-18
For debugging, I put in code into my test.rb file:
if virtualization.virtual_system?
puts "============== YES virtualization.virtual_system? "
else
puts "============== NOT virtualization.virtual_system? "
end
puts "NAME=" + virtualization.system
Client Output
Output from my debug lines running chef-client-18 are:
============== NOT virtualization.virtual_system?
no implicit conversion of nil into String
when I run the same code on chef-client-17.10.3 I see what I expect to see of:
============== YES virtualization.virtual_system?
NAME=vmware
Stacktrace
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the virtualization.virtual_system? call in the cookbook compliance/Inspec test and compare its behavior between chef-client 17.10.3 and 18.1.0. Reproduce on VMware with Red Hat 6.10, 7.9, or 8.4, and inspect the reported nil value and virtualization.system output. Done means the predicate and system name behave as expected on chef-client 18.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100