Error

Instance i-20367140 got error state. search by Google

args : tuple
('Instance i-20367140 got error state.',)

Traceback

  1. /usr/local/lib/python3.7/unittest/case.py in testPartExecutor (arguments )

    self : _Outcome
    <unittest.case._Outcome object at 0x7fb039ea02d0>
    test_case : Instances
    test_snapshotting_with_tags_negative_standard_hvm-legacy (c2tests.ec2.instances.Instances)
    isTest : bool
    True
    1. @contextlib.contextmanager
    2. def testPartExecutor(self, test_case, isTest=False):
    3. old_success = self.success
    4. self.success = True
    5. try:
    6. yield
    7. except KeyboardInterrupt:
    8. raise
    9. except SkipTest as e:
    10. self.success = False

    Locals

    exc_info : NoneType
    None
    old_success : bool
    True

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  2. /usr/local/lib/python3.7/unittest/case.py in run (arguments )

    self : Instances
    test_snapshotting_with_tags_negative_standard_hvm-legacy (c2tests.ec2.instances.Instances)
    result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    1. with outcome.testPartExecutor(self):
    2. self.setUp()
    3. if outcome.success:
    4. outcome.expecting_failure = expecting_failure
    5. with outcome.testPartExecutor(self, isTest=True):
    6. testMethod()
    7. outcome.expecting_failure = False
    8. with outcome.testPartExecutor(self):
    9. self.tearDown()

    Locals

    expecting_failure : bool
    False
    expecting_failure_class : bool
    False
    expecting_failure_method : bool
    False
    orig_result : DiagnosticsTestResult
    <xmlrunner.extra.diagnosticstestrunner.DiagnosticsTestResult run=1 errors=0 failures=0>
    outcome : _Outcome
    <unittest.case._Outcome object at 0x7fb039ea02d0>
    testMethod : method
    <bound method Instances.test_snapshotting_with_tags_negative of <c2tests.ec2.instances.Instances testMethod=test_snapshotting_with_tags_negative_standard_hvm-legacy>>

    Globals

    __unittest : bool
    True
    _subtest_msg_sentinel : object
    <object object at 0x7fb0513c8fd0>
    DIFF_OMITTED : str
    Diff is %s characters long. Set self.maxDiff to None to see it.
  3. /root/c2tests/.venv/lib/python3.7/site-packages/parameterized/parameterized.py in standalone_func (arguments )

    *a : tuple
    (<c2tests.ec2.instances.Instances testMethod=test_snapshotting_with_tags_negative_standard_hvm-legacy>,)
    1. @classmethod
    2. def param_as_standalone_func(cls, p, func, name):
    3. @wraps(func)
    4. def standalone_func(*a):
    5. return func(*(a + p.args), **p.kwargs)
    6. standalone_func.__name__ = name
    7. # place_as is used by py.test to determine what source file should be
    8. # used for this test.

    Locals

    p : param
    param(*('standard', 'hvm-legacy'), **{})

    Globals

    PY2 : bool
    False
    PY3 : bool
    True
    string_types : tuple
    (<class 'str'>,)
  4. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/ec2/instances.py in test_snapshotting_with_tags_negative (arguments )

    self : Instances
    test_snapshotting_with_tags_negative_standard_hvm-legacy (c2tests.ec2.instances.Instances)
    volume_type : str
    standard
    virt_type : str
    hvm-legacy
    1. snapshot_tags = [
    2. {"key": "aws:test_tag_key1", "value": "test_tag_value"},
    3. {"key": "test_tag_key2_snapshot", "value": "test_tag_value2"},
    4. ]
    5. key_path, instance = self._create_instance(volume_type, virt_type)
    6. # Performs sync filesystems on all attached drives
    7. utils.ssh(instance.ip_address, key_path, "/bin/sync")
    8. utils.poweroff(self.conn, instance, key_path)

    Locals

    image_tags : list
    [{'key': 'test_tag_key_image', 'value': 'test_tag_value'}, {'key': 'aws:test_tag_key2', 'value': 'test_tag_value2'}]
    snapshot_tags : list
    [{'key': 'aws:test_tag_key1', 'value': 'test_tag_value'}, {'key': 'test_tag_key2_snapshot', 'value': 'test_tag_value2'}]

    Globals

  5. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/ec2/instances.py in _create_instance (arguments )

    self : Instances
    test_snapshotting_with_tags_negative_standard_hvm-legacy (c2tests.ec2.instances.Instances)
    volume_type : str
    standard
    virt_type : str
    hvm-legacy
    1. def _create_instance(self, volume_type, virt_type):
    2. """Helps run instance with specified type."""
    3. key_path, instance = self.run_instance_from_template(virtualization_type=virt_type,
    4. volume_type=volume_type)
    5. utils.wait_long(
    6. lambda: utils.ssh_test(instance.ip_address, key_path) == instance.id)
    7. return key_path, instance
  6. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in run_instance_from_template (arguments )

    self : Instances
    test_snapshotting_with_tags_negative_standard_hvm-legacy (c2tests.ec2.instances.Instances)
    **kwargs : dict
    {'placement': 'az-1', 'template_id': 'cmi-7233FCC3', 'key_name': 'saO7p1N', 'public_addressing': False}
    1. # associate eip by default, but some test cases don't need it
    2. associate_eip = kwargs.pop("associate_eip", True)
    3. # don't autoassign eip
    4. kwargs["public_addressing"] = False
    5. instance = self.run_instance(**kwargs)
    6. # allocates and associate public address
    7. if associate_eip:
    8. address = self.allocate_address()

    Locals

    associate_eip : bool
    True
    keypair : KeyPair
    KeyPair:saO7p1N
    keypair_path : str
    /tmp/tmpgaej9phf.pub
    snapshot : Snapshot
    Snapshot:snap-F14FA446

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7fb043b6ef90>
  7. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wrap (arguments )

    *args : tuple
    (<c2tests.ec2.instances.Instances testMethod=test_snapshotting_with_tags_negative_standard_hvm-legacy>,)
    **kwargs : dict
    {'placement': 'az-1', 'template_id': 'cmi-7233FCC3', 'key_name': 'saO7p1N', 'public_addressing': False}
    1. @functools.wraps(func)
    2. def wrap(*args, **kwargs):
    3. retries = 0
    4. while retries <= 10:
    5. try:
    6. return func(*args, **kwargs)
    7. except EC2ResponseError as e:
    8. if e.error_code == "RequestLimitExceeded":
    9. retries += 1
    10. time.sleep(0.1 * retries)

    Locals

    retries : int
    0

    Globals

    _DD : str
    /bin/dd
    _QEMU_IMG : str
    /usr/bin/qemu-img
    LOG : RootLogger
    <RootLogger root (DEBUG)>
    md5 : builtin_function_or_method
    <built-in function openssl_md5>
    RULES : list
    [{'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'tcp', 'from_port': '22', 'to_port': '22'}, {'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'icmp', 'from_port': '-1', 'to_port': '-1'}]
  8. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in run_instance (arguments )

    self : Instances
    test_snapshotting_with_tags_negative_standard_hvm-legacy (c2tests.ec2.instances.Instances)
    update_instance : bool
    True
    **kwargs : dict
    {'placement': 'az-1', 'template_id': 'cmi-7233FCC3', 'key_name': 'saO7p1N', 'public_addressing': False}
    1. return self.run_instances(
    2. update_instance=update_instance,
    3. min_count=kwargs.pop("min_count", 1),
    4. max_count=kwargs.pop("max_count", 1),
    5. **kwargs,
    6. )[0]
    7. def run_instance_micro(self, **kwargs):
    8. """Helper for micro instance running."""

    Locals

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7fb043b6ef90>
  9. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wrap (arguments )

    *args : tuple
    (<c2tests.ec2.instances.Instances testMethod=test_snapshotting_with_tags_negative_standard_hvm-legacy>,)
    **kwargs : dict
    {'update_instance': True, 'min_count': 1, 'max_count': 1, 'placement': 'az-1', 'template_id': 'cmi-7233FCC3', 'key_name': 'saO7p1N', 'public_addressing': False}
    1. @functools.wraps(func)
    2. def wrap(*args, **kwargs):
    3. retries = 0
    4. while retries <= 10:
    5. try:
    6. return func(*args, **kwargs)
    7. except EC2ResponseError as e:
    8. if e.error_code == "RequestLimitExceeded":
    9. retries += 1
    10. time.sleep(0.1 * retries)

    Locals

    retries : int
    0

    Globals

    _DD : str
    /bin/dd
    _QEMU_IMG : str
    /usr/bin/qemu-img
    LOG : RootLogger
    <RootLogger root (DEBUG)>
    md5 : builtin_function_or_method
    <built-in function openssl_md5>
    RULES : list
    [{'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'tcp', 'from_port': '22', 'to_port': '22'}, {'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'icmp', 'from_port': '-1', 'to_port': '-1'}]
  10. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in run_instances (arguments )

    self : Instances
    test_snapshotting_with_tags_negative_standard_hvm-legacy (c2tests.ec2.instances.Instances)
    update_instance : bool
    True
    conn : EC2ConnectionLegacy
    <c2tests.profile.EC2ConnectionLegacy object at 0x7fb04217c310>
    **kwargs : dict
    {'min_count': 1, 'max_count': 1, 'placement': 'az-1', 'key_name': 'saO7p1N', 'public_addressing': False, 'subnet_id': 'subnet-F9F7F860'}
    1. update_instance,
    2. template_id,
    3. kwargs,
    4. )
    5. instances = utils.run_instances(conn, template_id, **kwargs)
    6. self.log.warning("Instances: %s", common.pprint(instances))
    7. self.entities[resources.EC2_INSTANCES] += instances
    8. if update_instance:
    9. for instance in instances:

    Locals

    template_id : str
    cmi-7233FCC3

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7fb043b6ef90>
  11. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in run_instances (arguments )

    conn : EC2ConnectionLegacy
    <c2tests.profile.EC2ConnectionLegacy object at 0x7fb04217c310>
    template_id : str
    cmi-7233FCC3
    reserved : bool
    False
    wait : bool
    True
    **kwargs : dict
    {'min_count': 1, 'max_count': 1, 'placement': 'az-1', 'key_name': 'saO7p1N', 'public_addressing': False, 'subnet_id': 'subnet-F9F7F860'}
    1. [constants.INSTANCE_STATE_DELETED],
    2. check_for_errors=False)
    3. except Exception as e:
    4. LOG.error("Failed to terminate instances %s: %s.", instance_ids, e)
    5. raise exc
    6. def ssh(ip, keypath, *remote_args, user="root", **kwargs):
    7. """Run SSH client"""

    Locals

    instance_ids : list
    ['i-20367140']
    reservation : Reservation
    Reservation:r-20367140

    Globals

    _DD : str
    /bin/dd
    _QEMU_IMG : str
    /usr/bin/qemu-img
    LOG : RootLogger
    <RootLogger root (DEBUG)>
    md5 : builtin_function_or_method
    <built-in function openssl_md5>
    RULES : list
    [{'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'tcp', 'from_port': '22', 'to_port': '22'}, {'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'icmp', 'from_port': '-1', 'to_port': '-1'}]
  12. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in run_instances (arguments )

    conn : EC2ConnectionLegacy
    <c2tests.profile.EC2ConnectionLegacy object at 0x7fb04217c310>
    template_id : str
    cmi-7233FCC3
    reserved : bool
    False
    wait : bool
    True
    **kwargs : dict
    {'min_count': 1, 'max_count': 1, 'placement': 'az-1', 'key_name': 'saO7p1N', 'public_addressing': False, 'subnet_id': 'subnet-F9F7F860'}
    1. try:
    2. reservation = conn.run_instances(template_id, **kwargs)
    3. if wait:
    4. wait_for_instance_states(
    5. conn, [instance.id for instance in reservation.instances],
    6. [constants.INSTANCE_STATE_RUNNING])
    7. return [Instance(reservation, instance) for instance in reservation.instances]
    8. except Exception as exc:
    9. if reservation is not None:
    10. instance_ids = [instance.id for instance in reservation.instances]

    Locals

    instance_ids : list
    ['i-20367140']
    reservation : Reservation
    Reservation:r-20367140

    Globals

    _DD : str
    /bin/dd
    _QEMU_IMG : str
    /usr/bin/qemu-img
    LOG : RootLogger
    <RootLogger root (DEBUG)>
    md5 : builtin_function_or_method
    <built-in function openssl_md5>
    RULES : list
    [{'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'tcp', 'from_port': '22', 'to_port': '22'}, {'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'icmp', 'from_port': '-1', 'to_port': '-1'}]
  13. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wait_for_instance_states (arguments )

    conn : EC2ConnectionLegacy
    <c2tests.profile.EC2ConnectionLegacy object at 0x7fb04217c310>
    instance_ids : list
    ['i-20367140']
    states : list
    ['running']
    check_for_errors : bool
    True
    1. raise Error("Instance {0} has disappeared.",
    2. set(instance_ids).difference(got_ids).pop())
    3. return True
    4. wait(10 * constants.MINUTE_SECONDS, check_state)
    5. def wait_for_extnet_attached(conn, *extnets):
    6. """Wait for External Network attached state."""

    Locals

    aws_error_states : list
    ['error', 'failed', 'crashed']
    aws_states : list
    ['running']

    Globals

    _DD : str
    /bin/dd
    _QEMU_IMG : str
    /usr/bin/qemu-img
    LOG : RootLogger
    <RootLogger root (DEBUG)>
    md5 : builtin_function_or_method
    <built-in function openssl_md5>
    RULES : list
    [{'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'tcp', 'from_port': '22', 'to_port': '22'}, {'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'icmp', 'from_port': '-1', 'to_port': '-1'}]
  14. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wait (arguments )

    timeout : int
    600
    func : function
    <function wait_for_instance_states.<locals>.check_state at 0x7fb039d60170>
    *args : tuple
    ()
    **kwargs : dict
    {}
    1. def wait(timeout, func, *args, **kwargs):
    2. """Fail unless func return success within specified number of seconds"""
    3. endtime = time.time() + float(timeout)
    4. while time.time() < endtime:
    5. result = func(*args, **kwargs)
    6. if result:
    7. return result
    8. time.sleep(min(timeout, 0.1))

    Locals

    endtime : float
    1713521408.654461
    result : bool
    False

    Globals

    _DD : str
    /bin/dd
    _QEMU_IMG : str
    /usr/bin/qemu-img
    LOG : RootLogger
    <RootLogger root (DEBUG)>
    md5 : builtin_function_or_method
    <built-in function openssl_md5>
    RULES : list
    [{'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'tcp', 'from_port': '22', 'to_port': '22'}, {'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'icmp', 'from_port': '-1', 'to_port': '-1'}]
  15. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in check_state (arguments )

    1. for reservation in conn.get_all_instances(instance_ids):
    2. for instance in reservation.instances:
    3. got_ids.add(instance.id)
    4. if check_for_errors and instance.state in aws_error_states:
    5. raise Error("Instance {0} got {1} state.",
    6. instance.id, instance.state)
    7. if instance.state not in aws_states:
    8. return False
    9. if got_ids != set(instance_ids):

    Locals

    aws_error_states : list
    ['error', 'failed', 'crashed']
    aws_states : list
    ['running']
    check_for_errors : bool
    True
    conn : EC2ConnectionLegacy
    <c2tests.profile.EC2ConnectionLegacy object at 0x7fb04217c310>
    got_ids : set
    {'i-20367140'}
    instance : Instance
    Instance:i-20367140
    instance_ids : list
    ['i-20367140']
    reservation : Reservation
    Reservation:r-20367140

    Globals

    _DD : str
    /bin/dd
    _QEMU_IMG : str
    /usr/bin/qemu-img
    LOG : RootLogger
    <RootLogger root (DEBUG)>
    md5 : builtin_function_or_method
    <built-in function openssl_md5>
    RULES : list
    [{'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'tcp', 'from_port': '22', 'to_port': '22'}, {'cidr_ip': '0.0.0.0/0', 'ip_protocol': 'icmp', 'from_port': '-1', 'to_port': '-1'}]

Environment

Time of report generation
2024-04-19 13:05:34
Python version
3.7.9 (default, Sep 21 2022, 19:11:27) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Path to executable
/root/c2tests/.venv/bin/python
Working directory
/root/c2tests
Arguments vector
  1. /root/c2tests/.venv/bin/c2tests
  2. run
  3. -s
  4. ec2