RuntimeError: The expected HostnameMap and RoleHostnameFormat are not defined in data file: /home/stack/dcn01/dcn01_overcloud-baremetal-deployed.yaml | Openstack wallaby | tripleo | centos 8 stream
Hi, INFO: Openstack wallaby on centos 8 stream I am trying to deploy a DCN and during the ceph deploy command i am getting the following error: (undercloud) [stack@hkg2director dcn01]$ openstack overcloud ceph deploy dcn01_overcloud-baremetal-deployed.yaml --stack dcn01 --config initial-ceph.conf --output deployed_ceph.yaml --container-image-prepare containers-prepare-parameter.yaml --network-data custom_network_data.yaml --cluster dcn01 --roles-data dcn01_roles.yaml -vvv The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 241, in get_deployed_roles_to_hosts UnboundLocalError: local variable 'matching_hosts' referenced before assignment During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 102, in <module> File "<stdin>", line 94, in _ansiballz_main File "<stdin>", line 40, in invoke_module File "/usr/lib64/python3.6/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 500, in <module> File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 471, in main File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 246, in get_deployed_roles_to_hosts RuntimeError: The expected HostnameMap and RoleHostnameFormat are not defined in data file: /home/stack/dcn01/dcn01_overcloud-baremetal-deployed.yaml 2023-01-13 01:27:15.811878 | 48d539a1-1679-ea57-d54d-000000000013 | FATAL | Create Ceph spec based on baremetal_deployed_path and tripleo_roles | undercloud | error={ "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 241, in get_deployed_roles_to_hosts\nUnboundLocalError: local variable 'matching_hosts' referenced before assignment\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 500, in <module>\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 471, in main\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 246, in get_deployed_roles_to_hosts\nRuntimeError: The expected HostnameMap and RoleHostnameFormat are not defined in data file: /home/stack/dcn01/dcn01_overcloud-baremetal-deployed.yaml\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } (undercloud) [stack@hkg2director dcn01]$ cat /home/stack/dcn01/dcn01_overcloud-baremetal-deployed.yaml parameter_defaults: DeployedServerPortMap: dcn01-hci-0-ctlplane: fixed_ips: - ip_address: 172.25.221.96 dcn01-hci-1-ctlplane: fixed_ips: - ip_address: 172.25.221.90 dcn01-hci-2-ctlplane: fixed_ips: - ip_address: 172.25.221.106 HCICount: 3 HCIHostnameFormat: '%stackname%-hci-%index%' HostnameMap: dcn01-hci-0: dcn01-hci-0 dcn01-hci-1: dcn01-hci-1 dcn01-hci-2: dcn01-hci-2 NodePortMap: dcn01-hci-0: ctlplane: ip_address: 172.25.221.96 ...> Can someone please tell me what could be the issue here?? Am I missing something? With regards, Swogat Pradhan
Hi, The above issue was passed. Now i am facing another issue ( TypeError: __init__() got an unexpected keyword argument 'location' ) $ openstack overcloud ceph deploy dcn01_overcloud-baremetal-deployed.yaml --stack dcn01 --config initial-ceph.conf --output deployed_ceph.yaml --container-image-prepare containers-prepare-parameter.yaml --network-data custom_network_data.yaml --cluster dcn01 --roles-data dcn01_roles.yaml -vvv 2023-01-13 13:57:41.039472 | 48d539a1-1679-6d35-f36d-000000000013 | TASK | Create Ceph spec based on baremetal_deployed_path and tripleo_roles Using module file /usr/share/ansible/plugins/modules/ceph_spec_bootstrap.py Pipelining is enabled. <localhost> ESTABLISH LOCAL CONNECTION FOR USER: stack <localhost> EXEC /bin/sh -c '/usr/bin/python3 && sleep 0' The full traceback is: Traceback (most recent call last): File "<stdin>", line 102, in <module> File "<stdin>", line 94, in _ansiballz_main File "<stdin>", line 40, in invoke_module File "/usr/lib64/python3.6/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_ceph_spec_bootstrap_payload_67bkkver/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 500, in <module> File "/tmp/ansible_ceph_spec_bootstrap_payload_67bkkver/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 487, in main File "/tmp/ansible_ceph_spec_bootstrap_payload_67bkkver/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 333, in get_specs TypeError: __init__() got an unexpected keyword argument 'location' 2023-01-13 13:57:42.204777 | 48d539a1-1679-6d35-f36d-000000000013 | FATAL | Create Ceph spec based on baremetal_deployed_path and tripleo_roles | undercloud | error={ "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_67bkkver/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 500, in <module>\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_67bkkver/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 487, in main\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_67bkkver/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 333, in get_specs\nTypeError: __init__() got an unexpected keyword argument 'location'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } 2023-01-13 13:57:42.206279 | 48d539a1-1679-6d35-f36d-000000000013 | TIMING | Create Ceph spec based on baremetal_deployed_path and tripleo_roles | undercloud | 0:00:02.169503 | 1.16s (undercloud) [stack@hkg2director dcn01]$ cat dcn01_overcloud-baremetal-deployed.yaml parameter_defaults: DeployedServerPortMap: dcn01-hci-0-ctlplane: fixed_ips: - ip_address: 172.25.221.108 dcn01-hci-1-ctlplane: fixed_ips: - ip_address: 172.25.221.96 dcn01-hci-2-ctlplane: fixed_ips: - ip_address: 172.25.221.105 DistributedComputeHCICount: 3 DistributedComputeHCIHostnameFormat: '%stackname%-distributedcomputehci-%index%' HostnameMap: dcn01-distributedcomputehci-0: dcn01-hci-0 dcn01-distributedcomputehci-1: dcn01-hci-1 dcn01-distributedcomputehci-2: dcn01-hci-2 NodePortMap: dcn01-hci-0: ctlplane: ip_address: 172.25.221.108 ip_address_uri: 172.25.221.108 <...> (undercloud) [stack@hkg2director dcn01]$ cat dcn01_roles.yaml ############################################################################### # File generated by TripleO ############################################################################### ############################################################################### # Role: DistributedComputeHCI # ############################################################################### - name: DistributedComputeHCI description: | Distributed Compute Node role with Ceph, Cinder volume, and Glance. tags: - compute networks: InternalApi: subnet: internal_apis2_subnet Tenant: subnet: tenants2_subnet Storage: subnet: storages2_subnet StorageMgmt: subnet: storage_mgmts2_subnet HostnameFormatDefault: '%stackname%-hci-%index%' RoleParametersDefault: FsAioMaxNumber: 1048576 TunedProfileName: "throughput-performance" # CephOSD present so serial has to be 1 update_serial: 1 ServicesDefault: - OS::TripleO::Services::Aide - OS::TripleO::Services::AuditD - OS::TripleO::Services::BarbicanClient <...> On Thu, Jan 12, 2023 at 11:09 PM Swogat Pradhan <swogatpradhan22@gmail.com> wrote:
Hi, INFO: Openstack wallaby on centos 8 stream
I am trying to deploy a DCN and during the ceph deploy command i am getting the following error:
(undercloud) [stack@hkg2director dcn01]$ openstack overcloud ceph deploy dcn01_overcloud-baremetal-deployed.yaml --stack dcn01 --config initial-ceph.conf --output deployed_ceph.yaml --container-image-prepare containers-prepare-parameter.yaml --network-data custom_network_data.yaml --cluster dcn01 --roles-data dcn01_roles.yaml -vvv
The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 241, in get_deployed_roles_to_hosts UnboundLocalError: local variable 'matching_hosts' referenced before assignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "<stdin>", line 102, in <module> File "<stdin>", line 94, in _ansiballz_main File "<stdin>", line 40, in invoke_module File "/usr/lib64/python3.6/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 500, in <module> File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 471, in main File "/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py", line 246, in get_deployed_roles_to_hosts RuntimeError: The expected HostnameMap and RoleHostnameFormat are not defined in data file: /home/stack/dcn01/dcn01_overcloud-baremetal-deployed.yaml 2023-01-13 01:27:15.811878 | 48d539a1-1679-ea57-d54d-000000000013 | FATAL | Create Ceph spec based on baremetal_deployed_path and tripleo_roles | undercloud | error={ "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 241, in get_deployed_roles_to_hosts\nUnboundLocalError: local variable 'matching_hosts' referenced before assignment\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 500, in <module>\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 471, in main\n File \"/tmp/ansible_ceph_spec_bootstrap_payload_c4o_1q1y/ansible_ceph_spec_bootstrap_payload.zip/ansible/modules/ceph_spec_bootstrap.py\", line 246, in get_deployed_roles_to_hosts\nRuntimeError: The expected HostnameMap and RoleHostnameFormat are not defined in data file: /home/stack/dcn01/dcn01_overcloud-baremetal-deployed.yaml\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 }
(undercloud) [stack@hkg2director dcn01]$ cat /home/stack/dcn01/dcn01_overcloud-baremetal-deployed.yaml parameter_defaults: DeployedServerPortMap: dcn01-hci-0-ctlplane: fixed_ips: - ip_address: 172.25.221.96 dcn01-hci-1-ctlplane: fixed_ips: - ip_address: 172.25.221.90 dcn01-hci-2-ctlplane: fixed_ips: - ip_address: 172.25.221.106 HCICount: 3 HCIHostnameFormat: '%stackname%-hci-%index%' HostnameMap: dcn01-hci-0: dcn01-hci-0 dcn01-hci-1: dcn01-hci-1 dcn01-hci-2: dcn01-hci-2 NodePortMap: dcn01-hci-0: ctlplane: ip_address: 172.25.221.96 ...>
Can someone please tell me what could be the issue here?? Am I missing something?
With regards,
Swogat Pradhan
participants (1)
-
Swogat Pradhan