F5Networks / f5-ansible

Imperative Ansible modules for F5 BIG-IP products
GNU General Public License v3.0
376 stars 229 forks source link

bigip_software_install fails to activate or reboot device #2374

Open caliraftdude opened 11 months ago

caliraftdude commented 11 months ago
COMPONENT NAME

f5networks.f5_modules.bigip_software_install

Environment

ANSIBLE VERSION
ansible [core 2.15.5]
  config file = /home/dholland/dev/phase-1/repo/ansible.cfg
  configured module search path = ['/home/dholland/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/dholland/dev/phase-1/.venv/lib/python3.10/site-packages/ansible
  ansible collection location = /home/dholland/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/dholland/dev/phase-1/.venv/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/home/dholland/dev/phase-1/.venv/bin/python)
  jinja version = 3.1.2
  libyaml = True
BIGIP VERSION
Sys::Version
Main Package
  Product     BIG-IP
  Version     14.1.4.2
  Build       0.0.5
  Edition     Point Release 2
  Date        Fri Apr 16 13:04:55 PDT 2021
CONFIGURATION

cat ansible.cfg [defaults] host_key_checking = false

OS / ENVIRONMENT

uname -a Linux ansible-mgr 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

SUMMARY

bigip_software_install completes the task and indicates a successful completion:

ok: [f5 -> localhost] => { "changed": false, "invocation": { "module_args": { "block_device_image": null, "image": "BIGIP-15.1.10.2-0.0.2.iso", "provider": { "auth_provider": null, "no_f5_teem": false, "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "server": "10.1.1.151", "server_port": 443, "timeout": null, "transport": "rest", "user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "validate_certs": false }, "state": "activated", "type": "standard", "volume": "HD1.2" } } }

However, when reviewing the system: show sys software status

Sys::Software Status Volume Product Version Build Active Status

HD1.1 BIG-IP 14.1.4.2 0.0.5 yes complete HD1.2 BIG-IP 15.1.10.2 0.0.2 no complete

and the system does NOT reboot.

STEPS TO REPRODUCE
---
- name: BIG-IP Upload and Install Update
  hosts: lb
  connection: local
  gather_facts: false

  tasks:
    - name: Setup provider
      set_fact:
        provider:
          server: "{{private_ip}}"
          user: "{{ansible_user}}"
          password: "{{ansible_pass}}"
          server_port: 443
          validate_certs: false
    - name: Activate the new image and reboot into that volume
      bigip_software_install:
        image: BIGIP-15.1.10.2-0.0.2.iso
        volume: HD1.2
        state: activated
        provider: "{{provider}}"
      delegate_to: localhost

hosts:
[all:vars]
ansible_user=admin
ansible_password=admin

[lb]
f5 ansible_host=10.1.1.151 private_ip=10.1.1.151 ansible_user=admin ansible_password=admin

[ssh]
10.1.1.151 ansible_connection=ssh ansible_ssh_user=root ansible_ssh_pass=default

Setup is pretty vanilla and should be easy to replicate.
EXPECTED RESULTS

From the documentation: When installed, ensures the software is installed on the volume and the volume is set to be booted from. The device is not rebooted into the new software.

When activated, performs the same operation as installed, but the system is rebooted to the new software. Choices: "activated" ← (default) "installed"

I have tried both installed and activated as options and neither activates the volume, and as stated before 'activated' doesn't reboot the system into the installed volume. I have also tried, in both cases, to delete HD1.2 and leave the volume in tact. Same results with either initial conditions. Additionally, no failure conditions or errors are reported and the playbook thinks it has performed the actions correctly.

ACTUAL RESULTS
redirecting (type: modules) ansible.builtin.bigip_software_install to f5networks.f5_modules.bigip_software_install
redirecting (type: action) ansible.builtin.bigip to f5networks.f5_modules.bigip
redirecting (type: action) ansible.builtin.bigip to f5networks.f5_modules.bigip
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: dholland
<localhost> EXEC /bin/sh -c 'echo ~dholland && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/dholland/.ansible/tmp `"&& mkdir "` echo /home/dholland/.ansible/tmp/ansible-tmp-1697653176.9143548-66497-169115058289022 `" && echo ansible-tmp-1697653176.9143548-66497-169115058289022="` echo /home/dholland/.ansible/tmp/ansible-tmp-1697653176.9143548-66497-169115058289022 `" ) && sleep 0'
redirecting (type: modules) ansible.builtin.bigip_software_install to f5networks.f5_modules.bigip_software_install
Using module file /home/dholland/dev/phase-1/.venv/lib/python3.10/site-packages/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_software_install.py
<localhost> PUT /home/dholland/.ansible/tmp/ansible-local-6631526maysa1/tmp546_ihrx TO /home/dholland/.ansible/tmp/ansible-tmp-1697653176.9143548-66497-169115058289022/AnsiballZ_bigip_software_install.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/dholland/.ansible/tmp/ansible-tmp-1697653176.9143548-66497-169115058289022/ /home/dholland/.ansible/tmp/ansible-tmp-1697653176.9143548-66497-169115058289022/AnsiballZ_bigip_software_install.py && sleep 0'
<localhost> EXEC /bin/sh -c '/home/dholland/dev/phase-1/.venv/bin/python /home/dholland/.ansible/tmp/ansible-tmp-1697653176.9143548-66497-169115058289022/AnsiballZ_bigip_software_install.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/dholland/.ansible/tmp/ansible-tmp-1697653176.9143548-66497-169115058289022/ > /dev/null 2>&1 && sleep 0'
ok: [f5 -> localhost] => {
    "changed": false,
    "invocation": {
        "module_args": {
            "block_device_image": null,
            "image": "BIGIP-15.1.10.2-0.0.2.iso",
            "provider": {
                "auth_provider": null,
                "no_f5_teem": false,
                "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
                "server": "10.1.1.151",
                "server_port": 443,
                "timeout": null,
                "transport": "rest",
                "user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
                "validate_certs": false
            },
            "state": "activated",
            "type": "standard",
            "volume": "HD1.2"
        }
    }
}

however - volume HD1.2 is NOT activated in any case and when the state is set to activated it also doesn't reboot into that volume.
pgouband commented 11 months ago

Hi @caliraftdude,

Thanks for reporting this issue. We will review it and as a workaround you can add bigip_command in your playbook to run "tmsh reboot volume HDX.Y"

caliraftdude commented 11 months ago

Yup - that's precisely what I am doing as a workaround. Let me know if you need any additional information.

pgouband commented 11 months ago

Hi @caliraftdude,

Thanks for the feedback. As there is a workaround and we are focusing new F5 platform and OS so there will be no fix to this issue.

f5killer commented 3 months ago

how long it will take to fix the issue?

pgouband commented 3 months ago

Hi @f5killer,

As there is a workaround and we are focusing new F5 platform and OS so there will be no fix to this issue.