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

[BUG] salt-cloud (cloud.profile) fails when show_deploy_args is not passed. #61236

Closed
cheburakshu opened this issue Nov 15, 2021 · 1 comment · Fixed by #64191
Closed

[BUG] salt-cloud (cloud.profile) fails when show_deploy_args is not passed. #61236

cheburakshu opened this issue Nov 15, 2021 · 1 comment · Fixed by #64191
Assignees
Labels
Bug broken, incorrect, or confusing behavior Salt-Cloud

Comments

@cheburakshu
Copy link

Description

When cloud.profile is used, the below error is thrown when show_deploy_args is not passed or passed as False. A workaround is to pass it as None. Below is the invocation.

# Verify if the target host is reachable
    # show_deploy_args = None needs to be passed, salt-cloud arg parser fails if not passed.
    log.info('deploy.minion:%s:Verifying if remote host is accessible. Profile - %s', minion_id, profile_name)
    try:
        ret = __salt__['cloud.profile'](profile_name, minion_id, show_deploy_args=None)
[DEBUG   ] Runner return: Exception occurred in runner cloud.profile: Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/salt/client/mixins.py", line 390, in low
    data["return"] = func(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/salt/loader.py", line 1241, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/salt/loader.py", line 2274, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "/usr/lib/python3.7/site-packages/salt/loader.py", line 2289, in _run_as
    return _func_or_method(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/salt/runners/cloud.py", line 114, in profile
    info = client.profile(prof, instances, **salt.utils.args.clean_kwargs(**kwargs))
  File "/usr/lib/python3.7/site-packages/salt/cloud/__init__.py", line 355, in profile
    mapper.run_profile(profile, names, vm_overrides=vm_overrides)
  File "/usr/lib/python3.7/site-packages/salt/cloud/__init__.py", line 1416, in run_profile
    ret[name].pop("deploy_kwargs", None)
AttributeError: 'bool' object has no attribute 'pop'

root@cmbu-e2e-ssem14 [ ~ ]# salt-master -V
/usr/lib/python3.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.11) or chardet (4.0.0) doesn't match a supported version!
  RequestsDependencyWarning)
Salt Version:
          Salt: 3003.3
 
Dependency Versions:
          cffi: 1.15.0
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.0.2
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 0.5.6
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: 2.6.1
  pycryptodome: 3.9.8
        pygit2: Not Installed
        Python: 3.7.5 (default, Apr  1 2021, 14:31:41)
  python-gnupg: Not Installed
        PyYAML: 3.13
         PyZMQ: 17.1.2
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
Salt Extensions:
        SSEAPE: 8.6.1.2
 
System Versions:
          dist: photon 3.0 
        locale: utf-8
       machine: x86_64
       release: 4.19.208-1.ph3
        system: Linux
       version: VMware Photon OS 3.0 
 
root@cmbu-e2e-ssem14 [ ~ ]# 

cc: @whytewolf

@garethgreenaway
Copy link
Contributor

closed by #64191

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 Salt-Cloud
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants