HewlettPackard / oneview-ansible-collection

Ansible Collection and Sample Playbooks for HPE OneView
Apache License 2.0
24 stars 22 forks source link

Module hpe.oneview.oneview_server_profile powers off server hardware #271

Open tiagodcc opened 10 months ago

tiagodcc commented 10 months ago

We are automating the registration of server hardware and creation of server profiles in HPE OneView using Ansible. Therefore, we use the Ansible collection hpe.oneview.

We have encountered an issue that the server hardware is always powered off when creating a server profile. Reason for this is that this functionality is hard coded in the module code:

https://github.com/HewlettPackard/oneview-ansible-collection/blob/80ebbfc879a92fd89ac2e4d2b0f7b53d97ce303f/plugins/modules/oneview_server_profile.py#L421-L423

When executing the same query using the ansible.builtin.uri module, the hardware isn't powered off as we do not change any settings that would require a reboot.

This issue should be considered a feature request so that the server hardware is not turned off by default. From my understanding, HPE OneView would do this on its own.

akshith-gunasheelan commented 10 months ago

Hi @tiagodcc thanks for reaching out to us. Please let us know the settings enabled in your server profile. For example, if you have connections or advanced settings enabled, it would require a server hardware power-off.

tiagodcc commented 10 months ago

Hi @akshith-gunasheelan thank you for your rapid message. I have only set iLO settings (set administrator password, directory configuration and hostname settings). As explained in the issue description, the hardware isn't powered off when I apply the server profile on server hardware manually.

akshith-gunasheelan commented 10 months ago

Hi @tiagodcc we are trying to reproduce the issue, can you please let us know what is the Server Hardware Type you are using ?

tiagodcc commented 10 months ago

Hi @akshith-gunasheelan I am using a HPE ProLiant DL380 Gen 10 server. However, as described in the code snipped, I assume that this behavior is not depending on the server hardware type used.

akshith-gunasheelan commented 9 months ago

Hi @tiagodcc This looks like we need to do a condition-based power-off, which needs code changes. We will look into it, put it into our backlog and take it up as per our priority. Thank you.

tiagodcc commented 9 months ago

Hi @akshith-gunasheelan, You have closed this issue. I wanted to ask, which part of the code was the cause for the problem and how it was fixed.

Torie-Coding commented 2 months ago

Is there any new Information on this topic?