Skip to content

[DOCS] salt-cloud script() function should not be listed as required #65323

Closed as not planned

Description

@I3urny

Description
The Writing Cloud Providers documentation lists the script() function as required for libcloud-based providers and "likely to be moved into the salt.utils.cloud library in the near future, as it is very generic and can usually be copied wholesale from another module" for non-libcloud-based providers.

So according to the docs the following code should be copied to new non-libcloud-based providers:

def script(vm_):
"""
Return the script deployment object
"""
deploy_script = salt.utils.cloud.os_script(
config.get_cloud_config_value("script", vm_, __opts__),
vm_,
__opts__,
salt.utils.cloud.salt_config_to_yaml(
salt.utils.cloud.minion_config(__opts__, vm_)
),
)
return deploy_script

However, this functionality seems to be already implemented within the cloud.bootstrap() function which both provider types use so declaring the script() function is obsolete:

salt/salt/utils/cloud.py

Lines 446 to 452 in c2779df

minion_conf = minion_config(opts, vm_)
deploy_script_code = os_script(
salt.config.get_cloud_config_value("os", vm_, opts, default="bootstrap-salt"),
vm_,
opts,
minion_conf,
)

The os attribute value is copied from script beforehand:

vm_["os"] = salt.config.get_cloud_config_value("script", vm_, self.opts)

Suggested Fix
The script() function should not be declared as required anymore since the cloud.bootstrap() does all of the work script() is supposed to do.

Type of documentation
Salt documentation

Location or format of documentation
https://docs.saltproject.io/en/latest/topics/cloud/cloud.html

Additional context
I'm currently rewriting the proxmox cloud provider and was wondering which functions are actually needed.
I also noticed other errors in the Writing Cloud Providers documentation like it still naming the Linode cloud provider as being based on libclouds when f7c7c09 switched it from libcloud to its own REST API 8 years ago but that should probably be a separate issue.

Activity

  1. added
    documentation
    on Sep 30, 2023
  2. welcome commented on Sep 30, 2023

    @welcome

    Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
    Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

    There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
    If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

  3. added
    severity-medium
    and removed on Oct 2, 2023
  4. added this to the Sulphur v3006.26 milestone on Jun 25, 2026
  5. dwoz commented on Oct 15, 2026

    @dwoz
    Contributor

    Thanks for the original report. This issue has been open for more than three years without recent activity and carries a severity label below severity-high. As part of a backlog cleanup, we're closing older low- and medium-severity issues so triage can focus on reports against currently supported releases.

    Closing isn't a judgement that the problem wasn't real — only that the codebase has moved through several releases since this was filed, and much of the surrounding code has changed.

    If you — or anyone else — can still reproduce this on the 3008.x LTS release, please leave a comment with a reproduction and a maintainer will reopen. The original reporter can also reopen directly.

  6. dwoz commented on Oct 17, 2026

    @dwoz
    Contributor

    Reopening — there is an open PR tracking a fix for this: #69558.

  7. reopened this on Oct 17, 2026
  8. dwoz commented on Oct 28, 2026

    @dwoz
    Contributor

    Closing — consolidated into #70585. The checkbox for this item is in the appropriate theme section of that tracker. Please pick up the sub-item there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Salt-Clouddocumentationseverity-mediumtime-estimate-sprint

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions