# Kitchen inpect test cannot recognize the resource "firewalld" (CentOS 7)

**URL:** <https://discourse.chef.io/t/kitchen-inpect-test-cannot-recognize-the-resource-firewalld-centos-7/12569>\
**Category:** Chef Infra (archive)\
**Created:** [February 10, 2018, 6:22am UTC](https://discourse.chef.io/t/kitchen-inpect-test-cannot-recognize-the-resource-firewalld-centos-7/12569 "2018-02-10T06:22:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lovelyBlue](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lovelyBlue](https://discourse.chef.io/u/lovelyBlue)\
**Post date:** [February 10, 2018, 6:22am UTC](https://discourse.chef.io/t/kitchen-inpect-test-cannot-recognize-the-resource-firewalld-centos-7/12569/1 "2018-02-10T06:22:21Z")

</div>

I have a inspec test rb file:

```auto
describe firewalld do
  it { should be_running }
end

```

After run it gives the error:

```auto
$ kitchen verify
-----> Starting Kitchen (v1.17.0)
-----> Verifying <default-generic-rhel7>...
       Loaded tests from test/smoke/default 
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Failed to complete #verify action: [undefined local variable or method `firewalld' for #<#<Class:0x00000000046df570>:0x00000000046de530>] on default-generic-rhel7
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

```

While I run other resources such as “iptables” it is successful.

Why the inspect in kitchen cannot recognize the resource **firewalld**? I am running a CentOS 7 VM for testing.

---

<div class="post-metadata">

**Author:** ![coderanger](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/coderanger/32/5_2.png) [@coderanger](https://discourse.chef.io/u/coderanger)\
**Post date:** [February 10, 2018, 6:30am UTC](https://discourse.chef.io/t/kitchen-inpect-test-cannot-recognize-the-resource-firewalld-centos-7/12569/2 "2018-02-10T06:30:36Z")

</div>

Given your older version of Test Kitchen it is likely you are also running an older version of InSpec. It looks like the firewalld resource was added in InSpec 1.14: [https://github.com/chef/inspec/commit/7fc7942ab1d074820cdd8a7259a78e64ef2627f5#diff-7885e02d6d2ce9d3b89e8680446200d8](https://github.com/chef/inspec/commit/7fc7942ab1d074820cdd8a7259a78e64ef2627f5#diff-7885e02d6d2ce9d3b89e8680446200d8)

---

<div class="post-metadata">

**Author:** ![lovelyBlue](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lovelyBlue](https://discourse.chef.io/u/lovelyBlue)\
**Post date:** [February 10, 2018, 6:32am UTC](https://discourse.chef.io/t/kitchen-inpect-test-cannot-recognize-the-resource-firewalld-centos-7/12569/3 "2018-02-10T06:32:01Z")

</div>

@coderanger, I am running latest inspec 1.51.0. Did you successfully run this resource on your computer?

---

<div class="post-metadata">

**Author:** ![coderanger](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/coderanger/32/5_2.png) [@coderanger](https://discourse.chef.io/u/coderanger)\
**Post date:** [February 10, 2018, 6:32am UTC](https://discourse.chef.io/t/kitchen-inpect-test-cannot-recognize-the-resource-firewalld-centos-7/12569/4 "2018-02-10T06:32:52Z")

</div>

How are you judging that version of InSpec? For `kitchen-inspec` what matters is the version included with the ChefDK installer you used. Which version of ChefDK do you have (`chef --version`).

---

<div class="post-metadata">

**Author:** ![lovelyBlue](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lovelyBlue](https://discourse.chef.io/u/lovelyBlue)\
**Post date:** [February 10, 2018, 6:33am UTC](https://discourse.chef.io/t/kitchen-inpect-test-cannot-recognize-the-resource-firewalld-centos-7/12569/5 "2018-02-10T06:33:48Z")

</div>

```auto
xianlin@t470s-work:~/Code/sgdc-repo/gs_base$ chef --version
Chef Development Kit Version: 2.3.4
chef-client version: 13.4.19
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.1
kitchen version: 1.17.0
inspec version: 1.36.1

```
