Closed barbacbd closed 1 year ago
@barbacbd This problem is very strange and cannot be reproduced locally. Could you please help to provide how to reproduce this problem? In addition, could you please provide the VM configuration information you need in the list? In order to better solve this problem, thank you!
@Fred-sun Some background information might help =). I created some RHCOS nodes using the openshift installer. I wanted to grab the node information that I created and copy those and create new RHEL nodes. Really the only information that I need right now is the ID of the VM(s).
The easiest way to reproduce this is to create a VM in azure, then from the ansible task snippet above you can grab the resource group name of the vm and pass it to the task as {{ azure_resource_group }}
. From this I should be able to get a list of all VMs matching that resource group.
Is this enough information to go on?
@barbacbd I did the same, but got the VM information right. Thanks!
@barbacbd Could you please provide the version information of all the packages installed(such as "pip3 list")? Thanks!
Package Version
------------------------------------- -----------
-zure-mgmt-compute 26.1.0
adal 1.2.7
ansible-compat 2.2.7
ansible-core 2.16.0.dev0
antlr4-python3-runtime 4.9.3
applicationinsights 0.11.10
argcomplete 1.12.3
arrow 1.2.3
attrs 22.2.0
azure-appconfiguration 1.1.1
azure-cli-core 2.34.0
azure-cli-telemetry 1.0.6
azure-common 1.1.11
azure-containerregistry 1.0.0
azure-core 1.26.4
azure-cosmos 3.2.0
azure-data-tables 12.4.0
azure-graphrbac 0.60.0
azure-identity 1.7.0
azure-keyvault 1.1.0
azure-keyvault-certificates 4.7.0
azure-loganalytics 0.1.1
azure-mgmt-advisor 9.0.0
azure-mgmt-apimanagement 3.0.0
azure-mgmt-authorization 3.0.0
azure-mgmt-automation 1.0.0
azure-mgmt-batch 5.0.1
azure-mgmt-batchai 7.0.0b1
azure-mgmt-billing 6.0.0
azure-mgmt-botservice 2.0.0
azure-mgmt-cdn 11.0.0
azure-mgmt-compute 29.1.0
azure-mgmt-containerinstance 10.1.0
azure-mgmt-containerregistry 9.1.0
azure-mgmt-containerservice 20.0.0
azure-mgmt-core 1.3.0
azure-mgmt-cosmosdb 6.4.0
azure-mgmt-databoxedge 1.0.0
azure-mgmt-datafactory 2.0.0
azure-mgmt-datalake-analytics 0.2.1
azure-mgmt-datalake-nspkg 3.0.1
azure-mgmt-datalake-store 1.0.0
azure-mgmt-devtestlabs 3.0.0
azure-mgmt-dns 8.0.0
azure-mgmt-eventhub 10.1.0
azure-mgmt-extendedlocation 1.0.0b2
azure-mgmt-hdinsight 9.0.0
azure-mgmt-iothub 2.3.0
azure-mgmt-iothubprovisioningservices 1.1.0
azure-mgmt-keyvault 10.0.0
azure-mgmt-loganalytics 12.0.0
azure-mgmt-managedservices 1.0.0
azure-mgmt-managementgroups 0.2.0
azure-mgmt-marketplaceordering 1.1.0
azure-mgmt-media 9.0.0
azure-mgmt-monitor 3.0.0
azure-mgmt-network 19.1.0
azure-mgmt-notificationhubs 7.0.0
azure-mgmt-nspkg 2.0.0
azure-mgmt-privatedns 1.0.0
azure-mgmt-rdbms 10.2.0b8
azure-mgmt-recoveryservices 2.2.0
azure-mgmt-recoveryservicesbackup 3.0.0
azure-mgmt-redhatopenshift 1.2.0
azure-mgmt-redis 13.0.0
azure-mgmt-resource 21.1.0
azure-mgmt-search 8.0.0
azure-mgmt-servicebus 7.1.0
azure-mgmt-servicefabric 1.0.0
azure-mgmt-signalr 1.1.0
azure-mgmt-sql 3.0.1
azure-mgmt-storage 21.0.0
azure-mgmt-trafficmanager 1.0.0
azure-mgmt-web 6.1.0
azure-nspkg 2.0.0
azure-storage-blob 12.11.0
azure-storage-common 1.4.2
azure-synapse-managedprivateendpoints 0.4.0
azure-synapse-spark 0.2.0
bcrypt 4.0.1
binaryornot 0.4.4
boto3 1.26.66
botocore 1.29.66
cachetools 5.3.0
certifi 2022.12.7
cffi 1.15.1
chardet 3.0.4
charset-normalizer 3.0.1
click 8.1.3
click-help-colors 0.9.1
colorama 0.4.6
cookiecutter 2.1.1
cryptography 39.0.0
Deprecated 1.2.13
distro 1.8.0
enrich 1.2.7
fabric 2.7.1
google-api-core 2.11.0
google-api-python-client 2.74.0
google-auth 2.16.0
google-auth-httplib2 0.1.0
googleapis-common-protos 1.58.0
httplib2 0.21.0
humanfriendly 10.0
idna 3.4
importlib-resources 5.0.7
invoke 1.7.3
isodate 0.6.1
javaproperties 0.5.2
Jinja2 3.1.2
jinja2-ansible-filters 1.3.2
jinja2-time 0.2.0
jmespath 1.0.1
jsondiff 2.0.0
jsonschema 4.17.3
knack 0.9.0
markdown-it-py 2.1.0
MarkupSafe 2.1.2
mdurl 0.1.2
molecule 4.0.4
molecule-gce 1.0.0
msal 1.20.0
msal-extensions 0.3.1
msrest 0.7.1
msrestazure 0.6.4
ntlm-auth 1.5.0
oauthlib 3.2.2
packaging 21.3
paramiko 2.12.0
pathlib2 2.3.7.post1
pip 20.2.4
pkginfo 1.9.6
pluggy 1.0.0
portalocker 1.7.1
protobuf 4.21.12
psutil 5.9.4
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
pycryptodome 3.17
PyGithub 1.58.0
Pygments 2.14.0
PyJWT 2.6.0
PyMySQL 1.0.2
PyNaCl 1.5.0
pyOpenSSL 23.0.0
pyparsing 3.0.9
pyrsistent 0.19.3
python-dateutil 2.8.2
python-slugify 8.0.0
pywinrm 0.4.3
PyYAML 6.0
requests 2.28.2
requests-ntlm 1.1.0
requests-oauthlib 1.3.1
resolvelib 0.8.1
rich 13.3.1
rsa 4.9
s3transfer 0.6.0
scp 0.13.6
semver 2.13.0
setuptools 50.3.2
six 1.16.0
sshtunnel 0.1.5
subprocess-tee 0.4.1
tabulate 0.9.0
text-unidecode 1.3
typing-extensions 4.5.0
uritemplate 4.1.1
urllib3 1.26.14
urllib3-secure-extra 0.1.0
websocket-client 1.3.3
wrapt 1.15.0
xmltodict 0.13.0
I installed the azure packages from the list in .ansible/collections/ansible_collections/azure/azcollection
. I just noticed the first package in the list seems incorrect. The name certainly looks corrupted.
@Fred-sun based on the comment above I see some other info. The requirements list has the version listed that looks corrupted, but the version installed is 29.x.x. I wonder if this caused some different packages to be installed that don't match.
@barbacbd Yes, there is a problem with the version you are using, it is recommended that you install the version specified by requirement-azure.txt. Please try the following method, thank you!
Reinstall azure-mgmt-compute to v26.1.0
sudo pip3 install azure-mgmt-compute==26.1.0 -I
SUMMARY
Attempting to create azure virtual machines but the creation is running into
ISSUE TYPE
COMPONENT NAME
azure_rm_virtualmachine.py
ANSIBLE VERSION
Built off of devel branch
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
RHEL 8.7
STEPS TO REPRODUCE
EXPECTED RESULTS
Find the azure vms given the resource search values
ACTUAL RESULTS