Skip to content

Error on upgrade Switch #8

@massimoalba

Description

@massimoalba

Hi, i've a problem on upgrade switch, i've tyed to follow the guide here https://galaxy.ansible.com/dell-networking/dellos-image-upgrade whitout success,

here my config file

ansible.cfg

[root@localhost ansible]# cat ansible.cfg
[defaults]
network_group_modules=os10

[persistent_connection]
command_timeout = 90

hosts

[root@localhost ansible]# cat hosts
[sw_os10]
leaf1 ansible_host=10.20.20.26

leaf.yaml

[root@localhost ansible]# cat leaf.yaml
- hosts: [sw_os10]
  connection: ansible.netcommon.network_cli
  collections:
     - dellemc.os10
  roles:
     - os10_image_upgrade

host_vars/leaf1

[root@localhost ansible]# cat host_vars/leaf1
hostname: leaf1
ansible_user: admin
ansible_password: admin
ansible_become: true
ansible_become_method: enable
ansible_become_password: admin
ansible_connection: ansible.netcommon.network_cli
ansible_network_os: dellemc.os10.os10
#ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
os10_image_upgrade:
  operation_type: install
  software_image_url: 'http://10.23.11.117/files/PKGS_OS10-Enterprise-10.5.5.6.226buster-installer-x86_64.bin'
  software_version: 10.5.5
  number_of_retries: 50

Ansible Version

ansible [core 2.14.8]
[root@localhost ansible]# ansible --version
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.11.5 (main, Aug 28 2023, 00:00:00) [GCC 13.2.1 20230728 (Red Hat 13.2.1-1)] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

OS Version

[root@localhost ansible]# cat /etc/*release
Fedora release 38 (Thirty Eight)
NAME="Fedora Linux"
VERSION="38 (Server Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Server Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Server Edition"
VARIANT_ID=server
Fedora release 38 (Thirty Eight)
Fedora release 38 (Thirty Eight)
[root@localhost ansible]#

if i try to install the image on the switch directly work fine

[root@localhost ansible]# ssh admin@10.20.20.26
Debian GNU/Linux 10

Dell EMC Networking Operating System (OS10)
admin@10.20.20.26's password:
Linux ciaopippo 4.19.194 #1d SMP Debian 4.19.194-3 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.


-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
-*         Dell EMC  Network Operating System (OS10)           *-
-*                                                             *-
-* Copyright (c) 1999-2021 by Dell Inc. All Rights Reserved.   *-
-*                                                             *-
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

This product is protected by U.S. and international copyright and
intellectual property laws. Dell EMC and the Dell EMC logo are
trademarks of Dell Inc. in the United States and/or other
jurisdictions. All other marks and names mentioned herein may be
trademarks of their respective companies.

%Warning : Default password for admin account should be changed to secure the system
%Warning : Default password for linuxadmin account should be changed to secure the system.
ciaopippo#
ciaopippo#
ciaopippo# image install http://10.23.11.117/files/PKGS_OS10-Enterprise-10.5.5.6.226buster-installer-x86_64.bin
Install started.
Use 'show image status' for updates
ciaopippo# show image status
Image Upgrade State:     download
==================================================
File Transfer State:     download
--------------------------------------------------
  State Detail:          In progress
  Task Start:            2023-09-19T20:18:46Z
  Task End:              0000-00-00T00:00:00Z
  Transfer Progress:     0 %
  Transfer Bytes:        1447739 bytes
  File Size:             910608226 bytes
  Transfer Rate:         547 kbps

Installation State:      idle
--------------------------------------------------
  State Detail:          No install information available
  Task Start:            0000-00-00T00:00:00Z
  Task End:              0000-00-00T00:00:00Z
ciaopippo# show image status
Image Upgrade State:     download
==================================================
File Transfer State:     download
--------------------------------------------------
  State Detail:          In progress
  Task Start:            2023-09-19T20:18:46Z
  Task End:              0000-00-00T00:00:00Z
  Transfer Progress:     1 %
  Transfer Bytes:        6237723 bytes
  File Size:             910608226 bytes
  Transfer Rate:         649 kbps

Installation State:      idle
--------------------------------------------------
  State Detail:          No install information available
  Task Start:            0000-00-00T00:00:00Z
  Task End:              0000-00-00T00:00:00Z
ciaopippo#

here the collection list

[root@localhost ansible]# ansible-galaxy collection list

# /root/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
ansible.netcommon 2.6.1
ansible.utils     2.11.0
dellemc.os10      1.2.1

# /usr/lib/python3.11/site-packages/ansible_collections
Collection                    Version
----------------------------- -------
amazon.aws                    5.5.1
ansible.netcommon             4.1.0
ansible.posix                 1.5.4
ansible.utils                 2.10.3
ansible.windows               1.14.0
arista.eos                    6.0.1
awx.awx                       21.14.0
azure.azcollection            1.16.0
check_point.mgmt              4.0.0
chocolatey.chocolatey         1.4.0
cisco.aci                     2.6.0
cisco.asa                     4.0.1
cisco.dnac                    6.7.2
cisco.intersight              1.0.27
cisco.ios                     4.6.1
cisco.iosxr                   4.1.0
cisco.ise                     2.5.12
cisco.meraki                  2.15.1
cisco.mso                     2.4.0
cisco.nso                     1.0.3
cisco.nxos                    4.4.0
cisco.ucs                     1.8.0
cloud.common                  2.1.3
cloudscale_ch.cloud           2.3.1
community.aws                 5.5.0
community.azure               2.0.0
community.ciscosmb            1.0.6
community.crypto              2.14.0
community.digitalocean        1.23.0
community.dns                 2.5.5
community.docker              3.4.7
community.fortios             1.0.0
community.general             6.6.2
community.google              1.0.0
community.grafana             1.5.4
community.hashi_vault         4.2.1
community.hrobot              1.8.0
community.libvirt             1.2.0
community.mongodb             1.6.0
community.mysql               3.7.2
community.network             5.0.0
community.okd                 2.3.0
community.postgresql          2.4.2
community.proxysql            1.5.1
community.rabbitmq            1.2.3
community.routeros            2.8.2
community.sap                 1.0.0
community.sap_libs            1.4.1
community.skydive             1.0.0
community.sops                1.6.2
community.vmware              3.7.0
community.windows             1.13.0
community.zabbix              1.9.3
containers.podman             1.10.2
cyberark.conjur               1.2.0
cyberark.pas                  1.0.19
dellemc.enterprise_sonic      2.0.0
dellemc.openmanage            6.3.0
dellemc.os10                  1.1.1
dellemc.os6                   1.0.7
dellemc.os9                   1.0.4
dellemc.powerflex             1.6.0
dellemc.unity                 1.6.0
f5networks.f5_modules         1.25.0
fortinet.fortimanager         2.2.0
fortinet.fortios              2.3.0
frr.frr                       2.0.2
gluster.gluster               1.0.2
google.cloud                  1.1.3
grafana.grafana               1.1.1
hetzner.hcloud                1.11.0
hpe.nimble                    1.1.4
ibm.qradar                    2.1.0
ibm.spectrum_virtualize       1.12.0
infinidat.infinibox           1.3.12
infoblox.nios_modules         1.5.0
inspur.ispim                  1.3.0
inspur.sm                     2.3.0
junipernetworks.junos         4.1.0
kubernetes.core               2.4.0
lowlydba.sqlserver            1.3.1
mellanox.onyx                 1.0.0
microsoft.ad                  1.2.0
netapp.aws                    21.7.0
netapp.azure                  21.10.0
netapp.cloudmanager           21.22.0
netapp.elementsw              21.7.0
netapp.ontap                  22.7.0
netapp.storagegrid            21.11.1
netapp.um_info                21.8.0
netapp_eseries.santricity     1.4.0
netbox.netbox                 3.13.0
ngine_io.cloudstack           2.3.0
ngine_io.exoscale             1.0.0
ngine_io.vultr                1.1.3
openstack.cloud               1.10.0
openvswitch.openvswitch       2.1.1
ovirt.ovirt                   2.4.1
purestorage.flasharray        1.19.1
purestorage.flashblade        1.11.0
purestorage.fusion            1.5.0
sensu.sensu_go                1.13.2
splunk.es                     2.1.0
t_systems_mms.icinga_director 1.33.1
theforeman.foreman            3.11.0
vmware.vmware_rest            2.3.1
vultr.cloud                   1.8.0
vyos.vyos                     4.1.0
wti.remote                    1.0.5

the result is always a "Unrecognize command"

[root@localhost ansible]# ansible-playbook -i hosts leaf.yaml -vvvv
ansible-playbook [core 2.14.8]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.11.5 (main, Aug 28 2023, 00:00:00) [GCC 13.2.1 20230728 (Red Hat 13.2.1-1)] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
Parsed /etc/ansible/hosts inventory source with ini plugin
Loading collection dellemc.os10 from /root/.ansible/collections/ansible_collections/dellemc/os10
redirecting (type: action) dellemc.os10.os10_command to dellemc.os10.os10
redirecting (type: action) dellemc.os10.os10_command to dellemc.os10.os10
redirecting (type: action) dellemc.os10.os10_command to dellemc.os10.os10
redirecting (type: action) dellemc.os10.os10_command to dellemc.os10.os10
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python3.11/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: leaf.yaml ********************************************************************************************************************************************************************************************************************************************************************
Positional arguments: leaf.yaml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/etc/ansible/hosts',)
forks: 5
1 plays in leaf.yaml

PLAY [sw_os10] *************************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************************************************************************************************************************************************************
task path: /etc/ansible/leaf.yaml:1
Loading collection ansible.netcommon from /root/.ansible/collections/ansible_collections/ansible/netcommon
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<10.20.20.26> attempting to start connection
<10.20.20.26> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/bin/ansible-connection
<10.20.20.26> local domain socket does not exist, starting it
<10.20.20.26> control socket path is /root/.ansible/pc/170971dd22
<10.20.20.26> Loading collection ansible.netcommon from /root/.ansible/collections/ansible_collections/ansible/netcommon
<10.20.20.26> Loading collection dellemc.os10 from /root/.ansible/collections/ansible_collections/dellemc/os10
<10.20.20.26> local domain socket listeners started successfully
<10.20.20.26> loaded cliconf plugin ansible_collections.dellemc.os10.plugins.cliconf.os10 from path /root/.ansible/collections/ansible_collections/dellemc/os10/plugins/cliconf/os10.py for network_os dellemc.os10.os10
<10.20.20.26> ssh type is set to paramiko
<10.20.20.26>
<10.20.20.26> local domain socket path is /root/.ansible/pc/170971dd22
<10.20.20.26> ESTABLISH LOCAL CONNECTION FOR USER: root
<10.20.20.26> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-311093vuqzx2 `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154388.5920453-3114-129915704804397 `" && echo ansible-tmp-1695154388.5920453-3114-129915704804397="` echo /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154388.5920453-3114-129915704804397 `" ) && sleep 0'
Using module file /usr/lib/python3.11/site-packages/ansible/modules/setup.py
<10.20.20.26> PUT /root/.ansible/tmp/ansible-local-311093vuqzx2/tmp1uj_sgxn TO /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154388.5920453-3114-129915704804397/AnsiballZ_setup.py
<10.20.20.26> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154388.5920453-3114-129915704804397/ /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154388.5920453-3114-129915704804397/AnsiballZ_setup.py && sleep 0'
<10.20.20.26> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154388.5920453-3114-129915704804397/AnsiballZ_setup.py && sleep 0'
<10.20.20.26> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154388.5920453-3114-129915704804397/ > /dev/null 2>&1 && sleep 0'
ok: [leaf1]
redirecting (type: action) dellemc.os10.os10_command to dellemc.os10.os10
Loading collection ansible.netcommon from /root/.ansible/collections/ansible_collections/ansible/netcommon

TASK [dellemc.os10.os10_image_upgrade : Process image install operation] ***************************************************************************************************************************************************************************************************************
task path: /root/.ansible/collections/ansible_collections/dellemc/os10/roles/os10_image_upgrade/tasks/main.yml:3
redirecting (type: become) ansible.builtin.enable to ansible.netcommon.enable
<10.20.20.26> attempting to start connection
<10.20.20.26> using connection plugin ansible.netcommon.network_cli
Found ansible-connection at path /usr/bin/ansible-connection
<10.20.20.26> found existing local domain socket, using it!
<10.20.20.26> updating play_context for connection
<10.20.20.26>
<10.20.20.26> local domain socket path is /root/.ansible/pc/170971dd22
redirecting (type: action) dellemc.os10.os10_command to dellemc.os10.os10
redirecting (type: action) dellemc.os10.os10_command to dellemc.os10.os10
<10.20.20.26> ANSIBLE_NETWORK_IMPORT_MODULES: disabled
<10.20.20.26> ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended
<10.20.20.26> ESTABLISH LOCAL CONNECTION FOR USER: root
<10.20.20.26> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-311093vuqzx2 `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154395.2759995-3163-146896146453809 `" && echo ansible-tmp-1695154395.2759995-3163-146896146453809="` echo /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154395.2759995-3163-146896146453809 `" ) && sleep 0'
Using module file /root/.ansible/collections/ansible_collections/dellemc/os10/plugins/modules/os10_command.py
<10.20.20.26> PUT /root/.ansible/tmp/ansible-local-311093vuqzx2/tmpwdr4o56h TO /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154395.2759995-3163-146896146453809/AnsiballZ_os10_command.py
<10.20.20.26> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154395.2759995-3163-146896146453809/ /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154395.2759995-3163-146896146453809/AnsiballZ_os10_command.py && sleep 0'
<10.20.20.26> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154395.2759995-3163-146896146453809/AnsiballZ_os10_command.py && sleep 0'
<10.20.20.26> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-311093vuqzx2/ansible-tmp-1695154395.2759995-3163-146896146453809/ > /dev/null 2>&1 && sleep 0'
fatal: [leaf1]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "commands": [
                "{'command': 'image install http://10.23.11.117/files/PKGS_OS10-Enterprise-10.5.5.6.226buster-installer-x86_64.bin'}"
            ],
            "interval": 1,
            "match": "all",
            "provider": null,
            "retries": 10,
            "wait_for": null
        }
    },
    "msg": "{'command': 'image install http://10.23.11.117/files/PKGS_OS10-Enterp\u001bErise-10.5.5.6.226buster-installer-x86_64.bin'}\r\n% Error: Unrecognized command.\r\n\u0007ciaopippo# ",
    "rc": -32603
}

PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************************************
leaf1                      : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

the strange thing is in the command
"{'command': 'image install http://10.23.11.117/files/PKGS_OS10-Enterprise-10.5.5.6.226buster-installer-x86_64.bin'}"

why there is a \u001b inside the name file?

"msg": "{'command': 'image install http://10.23.11.117/files/PKGS_OS10-Enterp\u001bErise-10.5.5.6.226buster-installer-x86_64.bin'}\r\n% Error: Unrecognized command.\r\n\u0007ciaopippo# "

is this a bug?

Thanks
Massimo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions