Open
Description
Description
When installing a new image of a wrong type (bin
instead of swi
), the error is not thrown if the binary version of new matches the binary version of current image.
Steps to reproduce the issue
- Attempt to install a
bin
image on a Arista device. - If the OS version of the new image matches the OS version of current image, the expected error is not thrown.
Describe the results you received
Instead of throwing an error (non-zero return code, the image installation matches the OS version and sets it as a default.
This is not very harmful as the wrong image is not installed, but ideally an error is expected instead of success path.
admin@abc-7060:~$ sudo sonic_installer install -y sonic-broadcom.bin
Downloading image...
...99%, 756 MB, 48399 KB/s, 0 seconds left... Image SONiC-OS-20191130.51 is already installed. Setting it as default...
Command: sync;sync;sync
Command: sleep 3
Done
admin@abc-7060:~$
Describe the results you expected
Ideally, the image installation should fail with following error or a warning.
Downloading image...
Image file '{}' is of a different type than running image.
If you are sure you want to install this image, use -f|--force.
Aborting...
Aborted!
Additional information you deem important (e.g. issue happens only occasionally)
Output of show version
(paste your output here)