You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to Reproduce the behavior
state.apply with an appropriate Azure blob sotrage setup with test container and file created.
Expected behavior
The file is downloaded to the local machine per the state configuration
Actual behaviour
[olielli@test-salt-master ~]$ sudo salt my-test-host state.apply -l quiet --state-verbose=false
my-test-host:
----------
ID: Download latest backup from Azure Blob Storage
Function: libcloud_storage.file_present
Name: myexamplefile.tar
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/salt/state.py", line 2180, in call
*cdata["args"], **cdata["kwargs"]
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
return callable(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1249, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/states/libcloud_storage.py", line 191, in file_present
path, container, name, profile, overwrite_existing
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1201, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/contextvars/__init__.py", line 38, in run
return callable(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/loader/lazy.py", line 1216, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/salt/modules/libcloud_storage.py", line 282, in download_object
obj = conn.get_object(container_name, object_name)
File "/usr/local/lib/python3.6/site-packages/libcloud/storage/drivers/azure_blobs.py", line 531, in get_object
container = self.get_container(container_name=container_name)
File "/usr/local/lib/python3.6/site-packages/libcloud/storage/drivers/azure_blobs.py", line 521, in get_container
"Unexpected status code: %s" % (response.status), driver=self
libcloud.common.types.LibcloudError: <LibcloudError in <libcloud.storage.drivers.azure_blobs.AzureBlobsStorageDriver object at 0x7efed6eee710> 'Unexpected status code: 400'>
Started: 12:47:04.235824
Duration: 271.885 ms
Changes:
Summary for my-test-host
-------------
Succeeded: 10
Failed: 1
-------------
Total states run: 11
Total run time: 6.812 s
ERROR: Minions returned with non-zero exit code
I will create a PR with the fix (re-ordering the arguments in the state code)
Versions Report
Salt Version:
Salt: 3004.1
Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: 2.6.1
docker-py: Not Installed
gitdb: 4.0.1
gitpython: 3.0.9
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: 0.35.2
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: 2.14
pycrypto: Not Installed
pycryptodome: Not Installed
pygit2: Not Installed
Python: 3.6.8 (default, Nov 9 2021, 14:44:26)
python-gnupg: Not Installed
PyYAML: 3.12
PyZMQ: 19.0.0
smmap: 3.0.1
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: rocky 8.5 Green Obsidian
locale: UTF-8
machine: x86_64
release: 4.18.0-348.12.2.el8_5.x86_64
system: Linux
version: Rocky Linux 8.5 Green Obsidian
The text was updated successfully, but these errors were encountered:
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!
OliElli
changed the title
[BUG]
[BUG] libcloud_storage file_present state returns HTTP 400, module works fine
May 17, 2022
Description
The libcloud_storage state uses the args in the wrong order, leading to a HTTP 400 from the provider. The module works fine.
Setup
Local minion config:
State:
Steps to Reproduce the behavior
state.apply with an appropriate Azure blob sotrage setup with test container and file created.
Expected behavior
The file is downloaded to the local machine per the state configuration
Actual behaviour
I will create a PR with the fix (re-ordering the arguments in the state code)
Versions Report
The text was updated successfully, but these errors were encountered: