Repository navigation
Description
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:
salt/salt/cloud/clouds/digitalocean.py
Lines 680 to 692 in c2779df
| 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:
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:
Line 1211 in c2779df
| 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
welcome commentedon Sep 30, 2023
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!
dwoz commentedon Oct 15, 2026
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.
dwoz commentedon Oct 17, 2026
Reopening — there is an open PR tracking a fix for this: #69558.
dwoz commentedon Oct 28, 2026
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.