Giter VIP home page Giter VIP logo

Comments (3)

noloc avatar noloc commented on June 13, 2024

I have been using this branch in an attempt to get around the nil can't be coerced error and I don't get success with its usage. Here is the output generated from the Centos 7.2 instance I have been working with.

*** cmd.stdout='Loaded plugins: fastestmirror
'
*** cmd.stderr='usage: sudo [-D level] -h | -K | -k | -V
usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user
            name|#uid]
usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user
            name] [-u user name|#uid] [-g groupname|#gid] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C fd] [-D level] [-g
            groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid]
            [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C fd] [-D level] [-g
            groupname|#gid] [-p prompt] [-u user name|#uid] file ...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/share/yum-cli/cli.py", line 1381, in returnPkgLists
    ignore_case=True, repoid=repoid)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2979, in doPackageLists
    for (n,a,e,v,r) in self.up.getUpdatesList():
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1098, in <lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 844, in _getUpdates
    self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1079, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 784, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 344, in populateSack
    self.doSetup()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup
    self.retrieveAllMD()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 88, in retrieveAllMD
    dl = repo._async and repo._commonLoadRepoXML(repo)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1466, in _commonLoadRepoXML
    self._repoXML = self._parseRepoXML(result)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1268, in _parseRepoXML
    raise Errors.RepoError, 'Error importing repomd.xml from %s: %s' % (self.ui_id, e)
yum.Errors.RepoError: Error importing repomd.xml from base/7/x86_64: Unable to open /var/cache/yum/x86_64/7/base/repomd.xml
'
*** first=''
*** cmd.stdout.size='30'
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #verify action: [nil can't be coerced into Fixnum] on default-centos-72
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Here is a copy of my .kitchen.yml configuration file:

---
driver:
  name: vagrant

provisioner:
  name: chef_zero

verifier:
  name: inspec
  format: progress
  inspec_tests:
    - test/integration/default

platforms:
  - name: centos-7.2
    os_type: unix
    driver:
      provider: parallels
      box: parallels/centos-7.2
      network:
      - ["private_network", {ip: "192.168.33.3"}]
      synced_folders:
      - ["~/chef-repos/chef-sync-dir", "/chef-repo" ]

suites:
  - name: default
    run_list:
      - recipe[zero::default]
    verifier:
      format: progress
      inspec_tests:
        - test/recipes
        - test/integration/default
    attributes:
      chef_client:
        config:
          log_level: ":debug"

Any insights on how to proceed?

from linux-patch-baseline.

noloc avatar noloc commented on June 13, 2024

From the .kitchen.yml file (provided within the source tree) I added two parameters: privileged: true and run_command: /usr/sbin/init and also set use_sudo: false and achieved the same results.

from linux-patch-baseline.

chris-rock avatar chris-rock commented on June 13, 2024

@noloc Could you try #4

from linux-patch-baseline.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.