IBM / ansible-power-hmc

Developer contributions for Ansible Automation on Power (HMC)
GNU General Public License v3.0
26 stars 41 forks source link

ibm.power_hmc.powervm_inventory SystemName name missing of "identify_unknown_by" lpars #94

Closed MalfuncEddie closed 11 months ago

MalfuncEddie commented 1 year ago

Describe the bug When gathering facts of an HMC I have added the not running lpars. I assumed that even if the lpar is powered off the SystemName of where the lpar is would be added

plugin: ibm.power_hmc.powervm_inventory
hmc_hosts:
  - hmc: "xxx"
    user: "xxx"
    password: "xxx"
identify_unknown_by: PartitionName
compose:
  server_name: SystemName
keyed_groups:
  - prefix: "server_group"
    key: SystemName
  - prefix: "partition_type"
    key: PartitionType

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior SystemName should be available even if the lpar is powered off

Additional context

For reporting purposes I am gathering facts of the lpars via the HMC. I would suspect that gathering fact of an powered off system should work yet it needs the SystemName and that is not inserted into the inventory test

naveenkandakur commented 1 year ago

As part of April-2023 release System_Name parameter will be optional for lpar facts, power off, power on and delete operations.(It works only if the lpar name is unique in the HMC) This will help you to gather the facts of lpar without System_Name.

theonewizard commented 1 year ago

Is there a way to get all lpars listed under the managed system without any omitted? It seems like an inactive RMC is enough to case it not to be listed.

naveenkandakur commented 1 year ago

No, We are considering only lpars with Active RMC in case AIX/Linux and Running lpars in case of IBMi, remaining are part of unknown group.

naveenkandakur commented 11 months ago

Closing this issue as there is no response.