Bug 2160634

Summary: ceph deploy | DCN HCI | TypeError: __init__() got an unexpected keyword argument 'location'
Product: Red Hat OpenStack Reporter: swogat pradhan <swogatpradhan22>
Component: openstack-tripleo-heat-templatesAssignee: Manoj Katari <mkatari>
Status: CLOSED UPSTREAM QA Contact: Alfredo <alfrgarc>
Severity: high Docs Contact:
Priority: high    
Version: 17.0 (Wallaby)CC: fpantano, mariel, mburns, mkatari, tkajinam
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-13 15:35:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description swogat pradhan 2023-01-13 06:21:39 UTC
Description of problem:
I am trying to setup a DCN HCI and when running ceph deploy i am getting an error and i am not sure how to fix it.

$ 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

Version-Release number of selected component (if applicable):


How reproducible:
run:
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

Steps to Reproduce:
1. provision network
2. provision node
3. run ceph deploy using the command mentioned above

Actual results:
TypeError: __init__() got an unexpected keyword argument 'location' 

Expected results:
Ceph should be successfully deployed

Additional info:
(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
<...>

Comment 4 Manoj Katari 2023-02-13 15:35:50 UTC
Couldn't reproduce with the latest fix (available in wallaby)