Unittest/test_target_admin cinder-rootwrap: command not found

Bug #1400780 reported by Nikolas Hermanns
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
John Griffith

Bug Description

The unittest IetAdmAutoIOTestCase/IetAdmBlockIOTestCase/IetAdmFileIOTestCase/IetAdmTestCase will fail if /etc/iet/ietd.conf is present. This file belongs to iSCSI Enterprise Target (IET). So if the testing maschine has this installed the unittest will fail.

======================================================================
FAIL: cinder.tests.test_iscsi.IetAdmAutoIOTestCase.test_target_admin
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
Failed to create iscsi target for volume id:volume-blaa: Unexpected error while running command.
Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf chown 1001 /etc/iet/ietd.conf
Exit code: 1
Stdout: ''
Stderr: 'sudo: cinder-rootwrap: command not found\n'
}}}

pythonlogging:''-1: {{{
found extension EntryPoint.parse('qpid = oslo.messaging._drivers.impl_qpid:QpidDriver')
found extension EntryPoint.parse('amqp = oslo.messaging._drivers.protocols.amqp.driver:ProtonDriver')
found extension EntryPoint.parse('kombu = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
found extension EntryPoint.parse('rabbit = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
found extension EntryPoint.parse('fake = oslo.messaging._drivers.impl_fake:FakeDriver')
found extension EntryPoint.parse('zmq = oslo.messaging._drivers.impl_zmq:ZmqDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver')
found extension EntryPoint.parse('log = oslo.messaging.notify._impl_log:LogDriver')
found extension EntryPoint.parse('messagingv2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
found extension EntryPoint.parse('noop = oslo.messaging.notify._impl_noop:NoOpDriver')
found extension EntryPoint.parse('routing = oslo.messaging.notify._impl_routing:RoutingDriver')
found extension EntryPoint.parse('test = oslo.messaging.notify._impl_test:TestDriver')
found extension EntryPoint.parse('messaging = oslo.messaging.notify._impl_messaging:MessagingDriver')
}}}

Traceback (most recent call last):
  File "/home/cloudci/workspace/cinder-gerrit-unittests/cinder/tests/test_iscsi.py", line 103, in test_target_admin
    self.run_commands()
  File "/home/cloudci/workspace/cinder-gerrit-unittests/cinder/tests/test_iscsi.py", line 96, in run_commands
    self.lun, self.path)
  File "/home/cloudci/workspace/cinder-gerrit-unittests/cinder/brick/iscsi/iscsi.py", line 394, in create_iscsi_target
    raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-blaa.

Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
Failed to create iscsi target for volume id:volume-blaa: Unexpected error while running command.
Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf chown 1001 /etc/iet/ietd.conf
Exit code: 1
Stdout: ''
Stderr: 'sudo: cinder-rootwrap: command not found\n'
}}}

pythonlogging:''-1: {{{
found extension EntryPoint.parse('qpid = oslo.messaging._drivers.impl_qpid:QpidDriver')
found extension EntryPoint.parse('amqp = oslo.messaging._drivers.protocols.amqp.driver:ProtonDriver')
found extension EntryPoint.parse('kombu = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
found extension EntryPoint.parse('rabbit = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
found extension EntryPoint.parse('fake = oslo.messaging._drivers.impl_fake:FakeDriver')
found extension EntryPoint.parse('zmq = oslo.messaging._drivers.impl_zmq:ZmqDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
found extension EntryPoint.parse('cinder.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver')
found extension EntryPoint.parse('log = oslo.messaging.notify._impl_log:LogDriver')
found extension EntryPoint.parse('messagingv2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
found extension EntryPoint.parse('noop = oslo.messaging.notify._impl_noop:NoOpDriver')
found extension EntryPoint.parse('routing = oslo.messaging.notify._impl_routing:RoutingDriver')
found extension EntryPoint.parse('test = oslo.messaging.notify._impl_test:TestDriver')
found extension EntryPoint.parse('messaging = oslo.messaging.notify._impl_messaging:MessagingDriver')
}}}

Traceback (most recent call last):
  File "/home/cloudci/workspace/cinder-gerrit-unittests/cinder/tests/test_iscsi.py", line 103, in test_target_admin
    self.run_commands()
  File "/home/cloudci/workspace/cinder-gerrit-unittests/cinder/tests/test_iscsi.py", line 96, in run_commands
    self.lun, self.path)
  File "/home/cloudci/workspace/cinder-gerrit-unittests/cinder/brick/iscsi/iscsi.py", line 394, in create_iscsi_target
    raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-blaa.

Changed in cinder:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/143229

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/143229
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=80bc025da4ee2b90f7ac9add5f5769c7cdd52bb2
Submitter: Jenkins
Branch: master

commit 80bc025da4ee2b90f7ac9add5f5769c7cdd52bb2
Author: John Griffith <email address hidden>
Date: Fri Dec 19 17:45:16 2014 -0700

    Set iet_conf to nonexistent file in unit test

    The Iet test in test_iscsi isn't setup to deal with
    an actual iet.conf file. The result is that if you happen
    to be on a system that has an iet.conf file the test will fail
    when it gets to the os.stat check.

    This patch just uses a tempdir with a bogus file name that is
    set as the iet_conf option to make sure the test never runs into
    a situation where the file is actually there.

    Change-Id: I5c8653a17250063660ca8aa369c537cc340bc4e9
    Closes-Bug: #1400780

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.