saltstack / saltstack/salt

[BUG][SALT][CLOUD][EVENT] Missing events from salt-cloud

Open
#64,628 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage Salt-Cloud
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
Hello,

I provision virtual machines on Azure and I get the events:

  • salt/cloud/<VM NAME>/creating
  • salt/cloud/<VM NAME>/deploying
  • salt/cloud/<VM NAME>/requesting

But, I don't find the events :

  • salt/cloud/<VM NAME>/destroying
  • salt/cloud/<VM NAME>/destroyed

Best regards,

Setup
I installed the package below :

salt-3006.1-0.x86_64
salt-master-3006.1-0.x86_64
salt-cloud-3006.1-0.x86_64
salt-minion-3006.1-0.x86_64

Steps to Reproduce the behavior
salt-cloud -m /etc/salt/cloud.maps.d/azure/staging/aswm1805.map -y -l debug -d

Expected behavior

{"data": {"driver": "azurearm", "name": "aswm1805", "provider": "staging:azurearm", "profile": "asw-2019", "event": "starting destroy", "_stamp": "2023-07-13T17:45:00.514108"}, "tag": "salt/cloud/aswm1805/destroying"}

Versions Report

Salt Version:
          Salt: 3006.1
 
Python Version:
        Python: 3.10.11 (main, May  5 2023, 02:31:54) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: 2.8.1
     docker-py: 1.10.6
         gitdb: 4.0.10
     gitpython: 3.1.31
        Jinja2: 3.1.2
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: 1.2.4
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.9.8
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: 23.2.0
        relenv: 0.12.3
         smmap: 5.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: rocky 9.2 Blue Onyx
        locale: utf-8
       machine: x86_64
       release: 5.14.0-284.11.1.el9_2.x86_64
        system: Linux
       version: Rocky Linux 9.2 Blue Onyx

Additional context

[root@salt-master ~]# /opt/saltstack/salt/salt-pip list
Package                               Version
------------------------------------- ---------
adal                                  1.2.7
azure                                 4.0.0
azure-applicationinsights             0.1.1
azure-batch                           4.1.3
azure-common                          1.1.28
azure-core                            1.27.1
azure-cosmosdb-nspkg                  2.0.2
azure-cosmosdb-table                  1.0.6
azure-datalake-store                  0.0.53
azure-eventgrid                       1.3.0
azure-graphrbac                       0.40.0
azure-keyvault                        1.1.0
azure-loganalytics                    0.1.1
azure-mgmt                            4.0.0
azure-mgmt-advisor                    1.0.1
azure-mgmt-applicationinsights        0.1.1
azure-mgmt-authorization              0.50.0
azure-mgmt-batch                      5.0.1
azure-mgmt-batchai                    2.0.0
azure-mgmt-billing                    0.2.0
azure-mgmt-cdn                        3.1.0
azure-mgmt-cognitiveservices          3.0.0
azure-mgmt-commerce                   1.0.1
azure-mgmt-compute                    4.6.2
azure-mgmt-consumption                2.0.0
azure-mgmt-containerinstance          1.5.0
azure-mgmt-containerregistry          2.8.0
azure-mgmt-containerservice           4.4.0
azure-mgmt-cosmosdb                   0.4.1
azure-mgmt-datafactory                0.6.0
azure-mgmt-datalake-analytics         0.6.0
azure-mgmt-datalake-nspkg             3.0.1
azure-mgmt-datalake-store             0.5.0
azure-mgmt-datamigration              1.0.0
azure-mgmt-devspaces                  0.1.0
azure-mgmt-devtestlabs                2.2.0
azure-mgmt-dns                        2.1.0
azure-mgmt-eventgrid                  1.0.0
azure-mgmt-eventhub                   2.6.0
azure-mgmt-hanaonazure                0.1.1
azure-mgmt-iotcentral                 0.1.0
azure-mgmt-iothub                     0.5.0
azure-mgmt-iothubprovisioningservices 0.2.0
azure-mgmt-keyvault                   1.1.0
azure-mgmt-loganalytics               0.2.0
azure-mgmt-logic                      3.0.0
azure-mgmt-machinelearningcompute     0.4.1
azure-mgmt-managementgroups           0.1.0
azure-mgmt-managementpartner          0.1.1
azure-mgmt-maps                       0.1.0
azure-mgmt-marketplaceordering        0.1.0
azure-mgmt-media                      1.0.1
azure-mgmt-monitor                    0.5.2
azure-mgmt-msi                        0.2.0
azure-mgmt-network                    2.7.0
azure-mgmt-notificationhubs           2.1.0
azure-mgmt-nspkg                      3.0.2
azure-mgmt-policyinsights             0.1.0
azure-mgmt-powerbiembedded            2.0.0
azure-mgmt-rdbms                      1.9.0
azure-mgmt-recoveryservices           0.3.0
azure-mgmt-recoveryservicesbackup     0.3.0
azure-mgmt-redis                      5.0.0
azure-mgmt-relay                      0.1.0
azure-mgmt-reservations               0.2.1
azure-mgmt-resource                   2.2.0
azure-mgmt-scheduler                  2.0.0
azure-mgmt-search                     2.1.0
azure-mgmt-servicebus                 0.5.3
azure-mgmt-servicefabric              0.2.0
azure-mgmt-signalr                    0.1.1
azure-mgmt-sql                        0.9.1
azure-mgmt-storage                    2.0.0
azure-mgmt-subscription               0.2.0
azure-mgmt-trafficmanager             0.50.0
azure-mgmt-web                        0.35.0
azure-nspkg                           3.0.2
azure-servicebus                      0.21.1
azure-servicefabric                   6.3.0.0
azure-servicemanagement-legacy        0.20.7
azure-storage-blob                    1.5.0
azure-storage-common                  1.4.2
azure-storage-file                    1.4.0
azure-storage-queue                   1.4.0
certifi                               2022.12.7
cffi                                  1.14.6
chardet                               3.0.4
cheroot                               8.5.2
CherryPy                              18.6.1
contextvars                           2.4
cryptography                          39.0.2
distro                                1.5.0
docker-py                             1.10.6
docker-pycreds                        0.4.0
gitdb                                 4.0.10
GitPython                             3.1.31
idna                                  2.8
immutables                            0.15
importlib-metadata                    6.0.0
isodate                               0.6.1
jaraco.classes                        3.2.1
jaraco.collections                    3.4.0
jaraco.functools                      2.0
jaraco.text                           3.5.1
Jinja2                                3.1.2
jmespath                              1.0.1
looseversion                          1.0.2
lxml                                  4.9.2
Mako                                  1.2.4
MarkupSafe                            2.1.2
more-itertools                        5.0.0
msal                                  1.22.0
msgpack                               1.0.2
msrest                                0.7.1
msrestazure                           0.6.4
oauthlib                              3.2.2
packaging                             22.0
pip                                   22.3.1
portend                               2.4
psutil                                5.8.0
pycparser                             2.21
pycryptodomex                         3.9.8
PyJWT                                 2.7.0
pyOpenSSL                             23.0.0
pypsexec                              0.3.0
pyspnego                              0.9.1
python-dateutil                       2.8.1
python-gnupg                          0.4.8
pytz                                  2022.1
pyvmomi                               6.5
pywinrm                               0.4.3
PyYAML                                5.4.1
pyzmq                                 23.2.0
relenv                                0.12.3
requests                              2.25.1
requests-ntlm                         1.2.0
requests-oauthlib                     1.3.1
rpm-vercmp                            0.1.2
salt                                  3006.1
setproctitle                          1.3.2
setuptools                            65.7.0
six                                   1.16.0
smbprotocol                           1.10.1
smmap                                 5.0.0
tempora                               4.1.1
timelib                               0.2.5
typing_extensions                     4.6.3
urllib3                               1.26.6
websocket-client                      1.6.0
wheel                                 0.40.0
xmltodict                             0.13.0
zc.lockfile                           1.4
zipp                                  3.6.0

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: /opt/saltstack/salt/bin/python3.10 -m pip install --upgrade pip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the provided salt-cloud destroy command and debug logging, then trace Azure destroy handling and event publication. Done means the destroying and destroyed events are emitted for the Azure workflow as shown in the expected JSON.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.