Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image installation false positive seen for wrong platform images #1195

Open
vaibhavhd opened this issue Oct 27, 2020 · 0 comments · May be fixed by #1196
Open

Image installation false positive seen for wrong platform images #1195

vaibhavhd opened this issue Oct 27, 2020 · 0 comments · May be fixed by #1196

Comments

@vaibhavhd
Copy link
Contributor

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

  1. Attempt to install a bin image on a Arista device.
  2. 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant