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

Regression in opennebula cloud provider #36057

Closed
Inveracity opened this issue Sep 5, 2016 · 3 comments
Closed

Regression in opennebula cloud provider #36057

Inveracity opened this issue Sep 5, 2016 · 3 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 Regression The issue is a bug that breaks functionality known to work in previous releases. RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around ZRELEASED - 2016.3.4
Milestone

Comments

@Inveracity
Copy link
Contributor

Description of Issue/Question

When running the following command:

sudo salt-cloud -p one-test testing -l debug

with the following cloud.profile:

one-test:
  image: "Debian 8"
  provider: one

fails with this stacktrace:

[ERROR   ] There was a profile error: global name '__opts__' is not defined
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/cloud/cli.py", line 284, in run
    self.config.get('names')
  File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1451, in run_profile
    ret[name] = self.create(vm_)
  File "/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py", line 1281, in create
    output = self.clouds[func](vm_)
  File "/usr/lib/python2.7/dist-packages/salt/cloud/clouds/opennebula.py", line 956, in create
    ret = salt.utils.cloud.bootstrap(vm_, __opts__)
  File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 514, in bootstrap
    transport=opts.get('transport', 'zeromq')
  File "/usr/lib/python2.7/dist-packages/salt/utils/cloud.py", line 1721, in fire_event
    sock_dir = os.path.join(__opts__['sock_dir'], 'master')
NameError: global name '__opts__' is not defined

This was working in 2016.3.2 💥

Versions Report

Salt Version:
           Salt: 2016.3.3

Dependency Versions:
           cffi: 0.8.6
       cherrypy: 3.5.0
       dateutil: 2.2
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
         Jinja2: 2.7.3
        libgit2: Not Installed
        libnacl: 1.4.4
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.2
   mysql-python: 1.2.3
      pycparser: 2.10
       pycrypto: 2.6.1
         pygit2: Not Installed
         Python: 2.7.9 (default, Mar  1 2015, 12:57:24)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.4.0
           RAET: Not Installed
          smmap: 0.8.2
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.0.5

System Versions:
           dist: debian 8.5 
        machine: x86_64
        release: 3.16.0-4-amd64
         system: Linux
        version: debian 8.5 
@fracklen
Copy link
Contributor

fracklen commented Sep 5, 2016

👍

@Inveracity
Copy link
Contributor Author

It appears that changing line 956

ret = salt.utils.cloud.bootstrap(vm_, __opts__)

to

ret = __utils__['cloud.bootstrap'](vm_, __opts__)

Seems to fix it

@rallytime
Copy link
Contributor

@Inveracity Thanks for filing this issue and for finding the __utils__ fix. We fixed up some of the cloud drivers in #35483, but we missed some of the references in the opennebula driver. #36070 should fix this up for you.

@rallytime rallytime added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around fixed-pls-verify fix is linked, bug author to confirm fix Regression The issue is a bug that breaks functionality known to work in previous releases. Salt-Cloud P2 Priority 2 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. TEAM Core ZRELEASED - 2016.3.4 labels Sep 6, 2016
@rallytime rallytime added this to the C 4 milestone Sep 6, 2016
@rallytime rallytime self-assigned this Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 Regression The issue is a bug that breaks functionality known to work in previous releases. RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around ZRELEASED - 2016.3.4
Projects
None yet
Development

No branches or pull requests

3 participants