Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Register mistral actions" fails on staging-unstable. #103

Closed
dzimine opened this issue Jan 28, 2017 · 6 comments · Fixed by #105
Closed

"Register mistral actions" fails on staging-unstable. #103

dzimine opened this issue Jan 28, 2017 · 6 comments · Fixed by #105
Labels

Comments

@dzimine
Copy link

dzimine commented Jan 28, 2017

Installation of staging-unstable breaks on Ubuntu with the following exception:

Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?

Yes, git IS installed on the box.

After it happens, re-running the playbook skips the Register mistral actions step.

TASK [st2mistral : Register mistral actions] ***********************************
skipping: [st2]

Playbook:

---
- name: Install StackStorm
  hosts: st2
  strategy: debug
  vars:
    st2_pkg_repo: staging-unstable

  roles:
    - mongodb
    - rabbitmq
    - postgresql
    - st2repos
    - st2
    - st2mistral
    - nginx
    - st2web
    - st2smoketests
TASK [st2mistral : Register mistral actions] ***********************************
fatal: [st2]: FAILED! => {"changed": true, "cmd": "/opt/stackstorm/mistral/bin/mistral-db-manage --config-file /etc/mistral/mistral.conf populate && touch /etc/mistral/mistral-db-manage.populate.ansible.has.run", "delta": "0:00:02.174987", "end": "2017-01-28 00:50:31.550711", "failed": true, "rc": 1, "start": "2017-01-28 00:50:29.375724", "stderr": "Traceback (most recent call last):\n  File \"/opt/stackstorm/mistral/bin/mistral-db-manage\", line 11, in <module>\n    sys.exit(main())\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/cli.py\", line 130, in main\n    CONF.command.func(config, CONF.command.name)\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/mistral/db/sqlalchemy/migration/cli.py\", line 71, in do_populate\n    action_manager.sync_db()\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/mistral/services/action_manager.py\", line 82, in sync_db\n    register_action_classes()\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/mistral/services/action_manager.py\", line 128, in register_action_classes\n    _register_dynamic_action_classes()\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/mistral/services/action_manager.py\", line 87, in _register_dynamic_action_classes\n    for generator in generator_factory.all_generators():\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/mistral/actions/generator_factory.py\", line 32, in all_generators\n    mod_action_cls = importutils.import_class(mod_cls_name)\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/oslo_utils/importutils.py\", line 30, in import_class\n    __import__(mod_str)\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/mistral/actions/openstack/actions.py\", line 37, in <module>\n    muranoclient = importutils.try_import('muranoclient.v1.client')\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/oslo_utils/importutils.py\", line 103, in try_import\n    return import_module(import_str)\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/oslo_utils/importutils.py\", line 73, in import_module\n    __import__(import_str)\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/muranoclient/v1/client.py\", line 17, in <module>\n    from muranoclient.v1 import artifact_packages\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/muranoclient/v1/artifact_packages.py\", line 22, in <module>\n    from muranoclient.common import utils\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/muranoclient/common/utils.py\", line 20, in <module>\n    from muranopkgcheck import manager as check_manager\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/muranopkgcheck/__init__.py\", line 19, in <module>\n    'muranopkgcheck').version_string()\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/pbr/version.py\", line 457, in version_string\n    return self.semantic_version().brief_string()\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/pbr/version.py\", line 452, in semantic_version\n    self._semantic = self._get_version_from_pkg_resources()\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/pbr/version.py\", line 439, in _get_version_from_pkg_resources\n    result_string = packaging.get_version(self.package)\n  File \"/opt/stackstorm/mistral/local/lib/python2.7/site-packages/pbr/packaging.py\", line 671, in get_version\n    raise Exception(\"Versioning for this project requires either an sdist\"\nException: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?", "stdout": "", "stdout_lines": [], "warnings": []}
@dzimine dzimine added the bug label Jan 28, 2017
@dzimine
Copy link
Author

dzimine commented Jan 28, 2017

Took a closer look:

  1. this seems wrong as it marks the file regardless of exit code /success/failure of the mistral script https://github.com/StackStorm/ansible-st2/blame/master/roles/st2mistral/tasks/main.yml#L77

  2. The mistral script that registers the action and the three types of actions are bundled together: mistral standard actions (we need them), stevedore plugins (our st2mistral action is the one, so we need it) and openstack actions (we don't need it). It is the openstack actions that we don't need, and any bug with them and their dependent libraries puts us at risk.

If this place where openstack actions are loaded is made optional via arguments?

@dzimine
Copy link
Author

dzimine commented Jan 28, 2017

Works fine with st2_pkg_repo: stable. Makes me say "we must CI unstable".

@arm4b
Copy link
Member

arm4b commented Jan 28, 2017

@dzimine This is fresh st2mistral bug which as I understand appeared after synchronizing https://github.com/StackStorm/mistral with recent upstream mistral.

@m4dcoder knows the details, there is a hack as temporary workaround: StackStorm/st2-packages#411

@arm4b
Copy link
Member

arm4b commented Jan 28, 2017

After it happens, re-running the playbook skips the Register mistral actions step.

And yes, this is wrong behavior. Re-running playbook should try to register mistral actions again if they failed before. Will fix it.


Talking about upstream mistral bug, I'll wait for a while and if there won't be any better solution instead of StackStorm/st2-packages#411, - I'll include same changes @m4dcoder applied for st2-packages curl|bash install script.

@arm4b
Copy link
Member

arm4b commented Jan 31, 2017

Ansible re-run behavior is fixed #105.

Re-opening to keep this issue with upstream mistral bug and StackStorm/st2-packages#411 in mind (decide: wait for upstream changes or use that hotfix).

@arm4b
Copy link
Member

arm4b commented Feb 2, 2017

Fixed by #109

Proposal to include unstable repo in the build matrix is implemented in #110

@arm4b arm4b closed this as completed Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants