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

[ZTP] "show ztp status" command requires root privileges to be executed #5377

Closed
MaxYaremchuk opened this issue Sep 15, 2020 · 5 comments
Closed

Comments

@MaxYaremchuk
Copy link

Description

show ztp status command requires root privileges to be executed

Steps to reproduce the issue

  1. On the SONiC image with enabled ZTP feature issue the command show ztp status

Describe the results you received

$ show ztp status --verbose     
Root privileges are required for this operation

Describe the results you expected
show ztp status command should be successfully executed under admin credentials.

Output of show version

SONiC Software Version: SONiC.HEAD.0-fffee7e3
Distribution: Debian 9.12
Kernel: 4.9.0-11-2-amd64
Build commit: fffee7e3
Build date: Sun Jun 21 09:33:14 UTC 2020
Built by: ezrada@r-build-sonic02

Platform: x86_64-mlnx_msn2700-r0
HwSKU: Mellanox-SN2700 

sonic_dump_DUT-1_20200902_193652.tar.gz

@rajendra-dendukuri
Copy link
Contributor

@liat-grozovik
Copy link
Collaborator

@rajendra-dendukuri will you be able to check if the fix can also be cherry picked to 201911?

@rajendra-dendukuri
Copy link
Contributor

@rajendra-dendukuri will you be able to check if the fix can also be cherry picked to 201911?

@liat-grozovik Yes. There are two PR's pending review and approval to be merged to 201911. Once they are approved I can merge them to 201911.

@liat-grozovik
Copy link
Collaborator

liat-grozovik commented Nov 3, 2020 via email

@MaxYaremchuk
Copy link
Author

The bug has been fixed. Verified on:

$ show ver

SONiC Software Version: SONiC.SONIC.202012.28-08bf372_Internal
Distribution: Debian 10.8
Kernel: 4.19.0-12-2-amd64
Build commit: 08bf372b
Build date: Sun Feb 28 14:57:46 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci02
admin@sonic-step-03:~$ show ztp status
ZTP Admin Mode : True
ZTP Service    : Inactive
ZTP Status     : SUCCESS
ZTP Source     : dhcp-opt67 (eth0)
Runtime        : 16m 32s
Timestamp      : 2021-03-04 12:18:01 UTC

ZTP Service is not running

01-snmp: SUCCESS
02-script-01: SUCCESS
03-configdb-json: SUCCESS
05-script-02: FAILED
06-script-04: SUCCESS
07-script-05: FAILED
08-script-06: SUCCESS
09-post-provisioning-script: SUCCESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants