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

[sonic_installer] Firmware upgrade log is not a part of syslog #6264

Closed
nazariig opened this issue Dec 21, 2020 · 0 comments · Fixed by sonic-net/sonic-utilities#1369
Closed

Comments

@nazariig
Copy link
Collaborator

Description

SONiC journal is missing info related to image firmware upgrade.
This makes an issues with failures analysis when working with techsupport file.

Steps to reproduce the issue:

  1. sonic-installer install sonic-mellanox.bin

Describe the results you received:

root@sonic:/home/admin# sonic-installer install sonic-mellanox.bin
New image will be installed, continue? [y/N]: y
Installing image SONiC-OS-201911.263-35fc12c3 and setting it as default...
Command: bash ./sonic-mellanox.bin
/tmp/tmp.gJ7CKnoyWE/installer/install.sh: 547: /tmp/tmp.gJ7CKnoyWE/installer/install.sh: [[: not found
Verifying image checksum ... OK.
Preparing image archive ... OK.
Installing SONiC in SONiC
ONIE Installer: platform: x86_64-mellanox-r0
onie_platform: x86_64-mlnx_msn4700-r0
Installing SONiC to /host/image-201911.263-35fc12c3
Archive:  fs.zip
   creating: /host/image-201911.263-35fc12c3/boot/
  inflating: /host/image-201911.263-35fc12c3/boot/vmlinuz-4.9.0-11-2-amd64
  inflating: /host/image-201911.263-35fc12c3/boot/config-4.9.0-11-2-amd64
  inflating: /host/image-201911.263-35fc12c3/boot/initrd.img-4.9.0-11-2-amd64
  inflating: /host/image-201911.263-35fc12c3/boot/System.map-4.9.0-11-2-amd64
   creating: /host/image-201911.263-35fc12c3/platform/
   creating: /host/image-201911.263-35fc12c3/platform/x86_64-grub/
  inflating: /host/image-201911.263-35fc12c3/platform/x86_64-grub/grub-pc-bin_2.02~beta3-5+deb9u2_amd64.deb
 extracting: /host/image-201911.263-35fc12c3/platform/firsttime
  inflating: /host/image-201911.263-35fc12c3/fs.squashfs
Switch CPU vendor is: GenuineIntel
Installed SONiC base image SONiC-OS successfully

Command: grub-set-default --boot-directory=/host 0

Command: config-setup backup
Taking backup of curent configuration

Command: mkdir -p /tmp/image-201911.263-35fc12c3-fs
Command: mount -t squashfs /host/image-201911.263-35fc12c3/fs.squashfs /tmp/image-201911.263-35fc12c3-fs
Command: sonic-cfggen -d -y /tmp/image-201911.263-35fc12c3-fs/etc/sonic/sonic_version.yml -t /tmp/image-201911.263-35fc12c3-fs/usr/share/sonic/templates/sonic-environment.j2
Command: umount -rf /tmp/image-201911.263-35fc12c3-fs
Command: rm -rf /tmp/image-201911.263-35fc12c3-fs
Command: sync;sync;sync

Command: sleep 3

Done

root@sonic:/home/admin# tail -F /var/log/syslog

Describe the results you expected:
The stdout/stderr of firmware upgrade log should be also redirected to syslog

Additional information you deem important (e.g. issue happens only occasionally):
Output of show version:

(paste your output here)

Attach debug file sudo generate_dump:

(paste your output here)
qiluo-msft pushed a commit to sonic-net/sonic-utilities that referenced this issue Jan 28, 2021
**- What I did**
Add information related to updating firmware image from sonic-installer.
fix sonic-net/sonic-buildimage#6264

**- How I did it**
Replace click.echo with a function that combines echo and logger functions

**- How to verify it**
Start the sonic-installer process and then grep syslog
$ sonic-installer install http://not_exist.com
$ tail -n 100 /var/log/syslog | grep "sonic-installer"
daall pushed a commit to sonic-net/sonic-utilities that referenced this issue Jan 30, 2021
**- What I did**
Add information related to updating firmware image from sonic-installer.
fix sonic-net/sonic-buildimage#6264

**- How I did it**
Replace click.echo with a function that combines echo and logger functions

**- How to verify it**
Start the sonic-installer process and then grep syslog
$ sonic-installer install http://not_exist.com
$ tail -n 100 /var/log/syslog | grep "sonic-installer"
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this issue Mar 2, 2021
**- What I did**
Add information related to updating firmware image from sonic-installer.
fix sonic-net/sonic-buildimage#6264

**- How I did it**
Replace click.echo with a function that combines echo and logger functions

**- How to verify it**
Start the sonic-installer process and then grep syslog
$ sonic-installer install http://not_exist.com
$ tail -n 100 /var/log/syslog | grep "sonic-installer"
CharlieChenEC pushed a commit to CharlieChenEC/sonic-utilities that referenced this issue May 14, 2021
…et#1369)

**- What I did**
Add information related to updating firmware image from sonic-installer.
fix sonic-net/sonic-buildimage#6264

**- How I did it**
Replace click.echo with a function that combines echo and logger functions

**- How to verify it**
Start the sonic-installer process and then grep syslog
$ sonic-installer install http://not_exist.com
$ tail -n 100 /var/log/syslog | grep "sonic-installer"
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this issue Aug 3, 2023
**- What I did**
Add information related to updating firmware image from sonic-installer.
fix sonic-net/sonic-buildimage#6264

**- How I did it**
Replace click.echo with a function that combines echo and logger functions

**- How to verify it**
Start the sonic-installer process and then grep syslog
$ sonic-installer install http://not_exist.com
$ tail -n 100 /var/log/syslog | grep "sonic-installer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant