★ wanayoo — archive 1999 https://github.com/dev-sec/linux-patch-baseline/issues/3Nouvelle recherche | Portail wanayoo
Skip to content
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

nil exception on scanning CentOS 7.2 #3

Closed
alexpop opened this issue Nov 18, 2016 · 3 comments
Closed

nil exception on scanning CentOS 7.2 #3

alexpop opened this issue Nov 18, 2016 · 3 comments
Labels
bug

Comments

@alexpop
Copy link
Contributor

@alexpop alexpop commented Nov 18, 2016

Attaching the screenshot received from the user:

screen_shot_2016-11-18_at_11 44 52_am

I was not able to reproduce on CentOS 6 & 7 and created this profile branch for the user to run and give us more output:
https://github.com/dev-sec/linux-patch-benchmark/tree/ap/nil-fix

@alexpop alexpop added the bug label Nov 18, 2016
@noloc
Copy link

@noloc noloc commented Dec 1, 2016

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?

@noloc
Copy link

@noloc noloc commented Dec 1, 2016

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.

@chris-rock
Copy link
Member

@chris-rock chris-rock commented Dec 1, 2016

@noloc Could you try #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.