Error

Instance i-71A6F360 got error state. search by Google

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

Traceback

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

    self : _Outcome
    <unittest.case._Outcome object at 0x7fb03a155550>
    test_case : InstancesGeneral
    test_tag_on_creation_run_instances (c2tests.ec2.instancesgeneral.InstancesGeneral)
    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 : InstancesGeneral
    test_tag_on_creation_run_instances (c2tests.ec2.instancesgeneral.InstancesGeneral)
    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 0x7fb03a155550>
    testMethod : method
    <bound method InstancesGeneral.test_tag_on_creation_run_instances of <c2tests.ec2.instancesgeneral.InstancesGeneral testMethod=test_tag_on_creation_run_instances>>

    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/c2tests/ec2/instancesgeneral.py in test_tag_on_creation_run_instances (arguments )

    self : InstancesGeneral
    test_tag_on_creation_run_instances (c2tests.ec2.instancesgeneral.InstancesGeneral)
    1. volume_tags = [{"key": "test1", "value": "value1"}]
    2. self.run_instances(template_id=template_id,
    3. min_count=2, max_count=2,
    4. instance_tags=instance_tags,
    5. volume_tags=volume_tags)
    6. instances = self.get_all_instances(filters={"tag:webserver": ["testing"]})
    7. self.assertEqual(len(instances), 2)

    Locals

    instance_tags : list
    [{'key': 'webserver', 'value': 'testing'}, {'key': 'test2', 'value': 'value2'}]
    snapshot : Snapshot
    Snapshot:snap-F14FA446
    template_id : str
    cmi-2512788C
    volume_tags : list
    [{'key': 'test1', 'value': 'value1'}]

    Globals

  4. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/utils.py in wrap (arguments )

    *args : tuple
    (<c2tests.ec2.instancesgeneral.InstancesGeneral testMethod=test_tag_on_creation_run_instances>,)
    **kwargs : dict
    {'template_id': 'cmi-2512788C', 'min_count': 2, 'max_count': 2, 'instance_tags': [{'key': 'webserver', 'value': 'testing'}, {'key': 'test2', 'value': 'value2'}], 'volume_tags': [{'key': 'test1', 'value': 'value1'}]}
    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'}]
  5. /root/c2tests/.venv/lib/python3.7/site-packages/c2tests/__init__.py in run_instances (arguments )

    self : InstancesGeneral
    test_tag_on_creation_run_instances (c2tests.ec2.instancesgeneral.InstancesGeneral)
    update_instance : bool
    True
    conn : EC2ConnectionLegacy
    <c2tests.profile.EC2ConnectionLegacy object at 0x7fb04217c310>
    **kwargs : dict
    {'min_count': 2, 'max_count': 2, 'instance_tags': [{'key': 'webserver', 'value': 'testing'}, {'key': 'test2', 'value': 'value2'}], 'volume_tags': [{'key': 'test1', 'value': 'value1'}], 'subnet_id': 'subnet-1FA25600'}
    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-2512788C

    Globals

    gethostbyname : builtin_function_or_method
    <built-in function gethostbyname>
    UNSIGNED : UNSIGNED
    <botocore.UNSIGNED object at 0x7fb043b6ef90>
  6. /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-2512788C
    reserved : bool
    False
    wait : bool
    True
    **kwargs : dict
    {'min_count': 2, 'max_count': 2, 'instance_tags': [{'key': 'webserver', 'value': 'testing'}, {'key': 'test2', 'value': 'value2'}], 'volume_tags': [{'key': 'test1', 'value': 'value1'}], 'subnet_id': 'subnet-1FA25600'}
    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-71A6F360', 'i-BE1F61C0']
    reservation : Reservation
    Reservation:r-71A6F360

    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'}]
  7. /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-2512788C
    reserved : bool
    False
    wait : bool
    True
    **kwargs : dict
    {'min_count': 2, 'max_count': 2, 'instance_tags': [{'key': 'webserver', 'value': 'testing'}, {'key': 'test2', 'value': 'value2'}], 'volume_tags': [{'key': 'test1', 'value': 'value1'}], 'subnet_id': 'subnet-1FA25600'}
    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-71A6F360', 'i-BE1F61C0']
    reservation : Reservation
    Reservation:r-71A6F360

    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/utils.py in wait_for_instance_states (arguments )

    conn : EC2ConnectionLegacy
    <c2tests.profile.EC2ConnectionLegacy object at 0x7fb04217c310>
    instance_ids : list
    ['i-71A6F360', 'i-BE1F61C0']
    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'}]
  9. /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 0x7fb03a11aa70>
    *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
    1713516993.913096
    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'}]
  10. /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-71A6F360'}
    instance : Instance
    Instance:i-71A6F360
    instance_ids : list
    ['i-71A6F360', 'i-BE1F61C0']
    reservation : Reservation
    Reservation:r-71A6F360

    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 11:52:28
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