Thanks for filing the bug.  I believe this issue has been resolved in
this commit:

commit a8dcad9ac62bb1d2a4f7489960395bad6cac9382
Author: Scott Moser <smo...@ubuntu.com>
Date:   Wed Sep 5 16:02:25 2018 +0000

    tests: Disallow use of util.subp except for where needed.
    
    In many cases, cloud-init uses 'util.subp' to run a subprocess.
    This is not really desirable in our unit tests as it makes the tests
    dependent upon existance of those utilities.
    
    The change here is to modify the base test case class (CiTestCase) to
    raise exception any time subp is called.  Then, fix all callers.
    For cases where subp is necessary or actually desired, we can use it
    via
      a.) context hander CiTestCase.allow_subp(value)
      b.) class level self.allowed_subp = value
    
    Both cases the value is a list of acceptable executable names that
    will be called (essentially argv[0]).
    
    Some cleanups in AltCloud were done as the code was being updated.


** Changed in: cloud-init
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1788960

Title:
  rhevm related cloud-init integration test fail for cloud-init v18.3

Status in cloud-init:
  Fix Released

Bug description:
  There are 3 of the rhevm related integration test failure:
  test_mount_cb_fails, test_no_udevadm_cmd test_no_udevadm_cmd, seems
  all related to "user_data_rhevm()"

  
  OS:  Ubuntu 16.04 Xenial
  cloud-init: v18.3 dab59087155d3963849a36b3f63ee662047f708b

  
  log snip:
  peter@U1604CloudinitTools:~/cloud-init$  tox -e citest -- run --verbose \
  > --preserve-data --data-dir ./debug \
  > 
  GLOB sdist-make: /home/peter/cloud-init/setup.py
  citest create: /home/peter/cloud-init/.tox/citest
  citest installdeps: -r/home/peter/cloud-init/integration-requirements.txt
  citest inst: /home/peter/cloud-init/.tox/dist/cloud-init-18.3.zip
  citest installed: 
asn1crypto==0.24.0,bcrypt==3.1.4,boto3==1.5.9,botocore==1.8.50,certifi==2018.8.24,cffi==1.11.5,chardet==3.0.4,cloud-init==18.3,configobj==5.0.6,cryptography==2.3.1,docutils==0.14,idna==2.7,Jinja2==2.10,jmespath==0.9.3,jsonpatch==1.23,jsonpointer==2.0,jsonschema==2.6.0,MarkupSafe==1.0,oauthlib==2.1.0,paramiko==2.4.1,pbr==4.2.0,pyasn1==0.4.4,pycparser==2.18,pylxd==2.2.7,PyNaCl==1.2.1,python-dateutil==2.7.3,python-simplestreams==0.1.0,PyYAML==3.13,requests==2.19.1,requests-toolbelt==0.8.0,requests-unixsocket==0.1.5,s3transfer==0.1.13,six==1.11.0,urllib3==1.23,ws4py==0.5.1
  citest runtests: PYTHONHASHSEED='2994029421'
  citest runtests: commands[0] | /home/peter/cloud-init/.tox/citest/bin/python 
-m tests.cloud_tests run --verbose --preserve-data --data-dir debug

  
  ======================================================================
  ERROR: Test user_data_rhevm() where mount_cb fails.
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File 
"/home/peter/cloud-init/tests/unittests/test_datasource/test_altcloud.py", line 
296, in test_mount_cb_fails
      self.assertEqual(False, dsrc.user_data_rhevm())
    File "/home/peter/cloud-init/cloudinit/sources/DataSourceAltCloud.py", line 
198, in user_data_rhevm
      (cmd_out, _err) = util.udevadm_settle(exists=floppy_dev, timeout=5)
  TypeError: 'NoneType' object is not iterable
  -------------------- >> begin captured logging << --------------------
  cloudinit.util: DEBUG: Running command ['true'] with allowed return codes [0] 
(shell=False, capture=True)
  cloudinit.sources.DataSourceAltCloud: DEBUG: Command: true
  Output
  --------------------- >> end captured logging << ---------------------

  ======================================================================
  ERROR: Test user_data_rhevm() with no udevadm command.
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File 
"/home/peter/cloud-init/tests/unittests/test_datasource/test_altcloud.py", line 
324, in test_no_udevadm_cmd
      self.assertEqual(False, dsrc.user_data_rhevm())
    File "/home/peter/cloud-init/cloudinit/sources/DataSourceAltCloud.py", line 
198, in user_data_rhevm
      (cmd_out, _err) = util.udevadm_settle(exists=floppy_dev, timeout=5)
  TypeError: 'NoneType' object is not iterable
  -------------------- >> begin captured logging << --------------------
  cloudinit.util: DEBUG: Running command ['modprobe', 'floppy'] with allowed 
return codes [0] (shell=False, capture=True)
  cloudinit.sources.DataSourceAltCloud: DEBUG: Command: modprobe floppy
  Output
  --------------------- >> end captured logging << ---------------------

  ======================================================================
  ERROR: Test user_data_rhevm() where udevadm fails.
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File 
"/home/peter/cloud-init/tests/unittests/test_datasource/test_altcloud.py", line 
317, in test_udevadm_fails
      self.assertEqual(False, dsrc.user_data_rhevm())
    File "/home/peter/cloud-init/cloudinit/sources/DataSourceAltCloud.py", line 
198, in user_data_rhevm
      (cmd_out, _err) = util.udevadm_settle(exists=floppy_dev, timeout=5)
  TypeError: 'NoneType' object is not iterable
  -------------------- >> begin captured logging << --------------------
  cloudinit.util: DEBUG: Running command ['modprobe', 'floppy'] with allowed 
return codes [0] (shell=False, capture=True)
  cloudinit.sources.DataSourceAltCloud: DEBUG: Command: modprobe floppy
  Output
  --------------------- >> end captured logging << ---------------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1788960/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to