cablelabs / snaps-openstack

OpenStack installer for SNAPS
Apache License 2.0
9 stars 10 forks source link

Ansible fix and addition of playbook for executing snaps-oo tests. #100

Closed spisarski closed 6 years ago

spisarski commented 6 years ago

What does this PR do?

Fix a bug in an ansible playbook and adds a playbook to execute snaps-oo tests.

Do you have any concerns with this PR?

no

How can the reviewer verify this PR?

It won't break anything but they could execute the snaps_os_tmplt.yaml with the snaps-oo launcher

Any background context you want to provide?

CI

Screenshots or logs (if appropriate)

Questions:

spisarski commented 6 years ago

Do not merge. There may have been some merge issues. Have not been able to recreate a successful deployment even after merging in sections that were missing from the original patch. Do not review until the next patch has been pushed which should also have better outputs for debugging.

spisarski commented 6 years ago

Uploaded files that were not rebased as expected. Still continuing testing... Added debug lines to playbooks for long-running processes

spisarski commented 6 years ago

Do not merge until the following SNAPS-OO patch has been merged: https://gerrit.opnfv.org/gerrit/#/c/54133/1

spisarski commented 6 years ago

VM instances all go to error.

    "", 
    "======================================================================", 
    "ERROR: snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceVolumeTests.test_add_remove_volume (subunit.RemotedTestCase)", 
    "snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceVolumeTests.test_add_remove_volume", 
    "----------------------------------------------------------------------", 
    "_StringException: Traceback (most recent call last):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/utils/tests/nova_utils_tests.py\", line 420, in setUp", 
    "    self.instance_creator.create(block=True)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 103, in create", 
    "    self.__create_vm(block)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 151, in __create_vm", 
    "    if not self.vm_active(block=True):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 522, in vm_active", 
    "    poll_interval):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 549, in __vm_status_check", 
    "    status = self.__status(expected_status_code)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 584, in __status", 
    "    'Instance had an error during deployment')", 
    "snaps.openstack.create_instance.VmInstanceCreationError: Instance had an error during deployment", 
    "", 
    "", 
    "======================================================================", 
    "ERROR: snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceVolumeTests.test_detach_volume_nowait (subunit.RemotedTestCase)", 
    "snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceVolumeTests.test_detach_volume_nowait", 
    "----------------------------------------------------------------------", 
    "_StringException: Traceback (most recent call last):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/utils/tests/nova_utils_tests.py\", line 420, in setUp", 
    "    self.instance_creator.create(block=True)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 103, in create", 
    "    self.__create_vm(block)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 151, in __create_vm", 
    "    if not self.vm_active(block=True):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 522, in vm_active", 
    "    poll_interval):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 549, in __vm_status_check", 
    "    status = self.__status(expected_status_code)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 584, in __status", 
    "    'Instance had an error during deployment')", 
    "snaps.openstack.create_instance.VmInstanceCreationError: Instance had an error during deployment", 
    "", 
    "", 
    "======================================================================", 
    "ERROR: snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceVolumeTests.test_attach_volume_nowait (subunit.RemotedTestCase)", 
    "snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceVolumeTests.test_attach_volume_nowait", 
    "----------------------------------------------------------------------", 
    "_StringException: Traceback (most recent call last):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/utils/tests/nova_utils_tests.py\", line 420, in setUp", 
    "    self.instance_creator.create(block=True)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 103, in create", 
    "    self.__create_vm(block)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 151, in __create_vm", 
    "    if not self.vm_active(block=True):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 522, in vm_active", 
    "    poll_interval):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 549, in __vm_status_check", 
    "    status = self.__status(expected_status_code)", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/create_instance.py\", line 584, in __status", 
    "    'Instance had an error during deployment')", 
    "snaps.openstack.create_instance.VmInstanceCreationError: Instance had an error during deployment", 
    "", 
    "", 
    "======================================================================", 
    "ERROR: snaps.openstack.utils.tests.heat_utils_tests.HeatUtilsCreateComplexStackTests.test_get_settings_from_stack (subunit.RemotedTestCase)", 
    "snaps.openstack.utils.tests.heat_utils_tests.HeatUtilsCreateComplexStackTests.test_get_settings_from_stack", 
    "----------------------------------------------------------------------", 
    "_StringException: Traceback (most recent call last):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/utils/tests/heat_utils_tests.py\", line 288, in setUp", 
    "    self.assertTrue(stack_active(self.heat_client, self.stack))", 
    "  File \"/usr/lib/python2.7/unittest/case.py\", line 422, in assertTrue", 
    "    raise self.failureException(msg)", 
    "AssertionError: False is not true", 
    "", 
    "", 
    "======================================================================", 
    "FAIL: snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceTests.test_create_instance (subunit.RemotedTestCase)", 
    "snaps.openstack.utils.tests.nova_utils_tests.NovaUtilsInstanceTests.test_create_instance", 
    "----------------------------------------------------------------------", 
    "_StringException: Traceback (most recent call last):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/utils/tests/nova_utils_tests.py\", line 354, in test_create_instance", 
    "    self.assertTrue(active)", 
    "  File \"/usr/lib/python2.7/unittest/case.py\", line 422, in assertTrue", 
    "    raise self.failureException(msg)", 
    "AssertionError: False is not true", 
    "", 
    "", 
    "======================================================================", 
    "FAIL: snaps.openstack.utils.tests.heat_utils_tests.HeatUtilsCreateSimpleStackTests.test_create_stack (subunit.RemotedTestCase)", 
    "snaps.openstack.utils.tests.heat_utils_tests.HeatUtilsCreateSimpleStackTests.test_create_stack", 
    "----------------------------------------------------------------------", 
    "_StringException: Traceback (most recent call last):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/utils/tests/heat_utils_tests.py\", line 178, in test_create_stack", 
    "    self.assertTrue(stack_active(self.heat_client, self.stack1))", 
    "  File \"/usr/lib/python2.7/unittest/case.py\", line 422, in assertTrue", 
    "    raise self.failureException(msg)", 
    "AssertionError: False is not true", 
    "", 
    "", 
    "======================================================================", 
    "FAIL: snaps.openstack.utils.tests.heat_utils_tests.HeatUtilsCreateSimpleStackTests.test_create_stack_x2 (subunit.RemotedTestCase)", 
    "snaps.openstack.utils.tests.heat_utils_tests.HeatUtilsCreateSimpleStackTests.test_create_stack_x2", 
    "----------------------------------------------------------------------", 
    "_StringException: Traceback (most recent call last):", 
    "  File \"/home/ubuntu/snaps-oo/snaps/openstack/utils/tests/heat_utils_tests.py\", line 220, in test_create_stack_x2", 
    "    self.assertTrue(stack_active(self.heat_client, self.stack1))", 
    "  File \"/usr/lib/python2.7/unittest/case.py\", line 422, in assertTrue", 
    "    raise self.failureException(msg)", 
    "AssertionError: False is not true", 
    "", 
    "", 
    "----------------------------------------------------------------------", 
    "Ran 94 tests in 549.940s", 
    "", 
    "FAILED (failures=3, errors=4)", 
spisarski commented 6 years ago

Please note that the following task was not merged into multinode_kolla_controller_pike.yaml:

- name: Flush bridg-ex IP
  command: ip addr flush br-ex
  ignore_errors: True

- pause:
    seconds: 5

This block would probably end up being inserted above line 342 is it is necessary.

spisarski commented 6 years ago

+1, lets call it good! Thanks Bo for adding those back.