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

Error when execute config clock timezone #2954

Open
ccy opened this issue Aug 27, 2023 · 0 comments
Open

Error when execute config clock timezone #2954

ccy opened this issue Aug 27, 2023 · 0 comments

Comments

@ccy
Copy link

ccy commented Aug 27, 2023

Description

I install SONiC-ONIE-Mellanox on my Mellanox SN2410 switch. When I execute clock timezone Asia/Kuala_Lumpur, I encounter this error:

No such file or directory: 'timedatectl list-timezones'

This should related to implementation of #2793

Steps to reproduce the issue

Execute clock timezone Asia/Kuala_Lumpur

Describe the results you received

Traceback (most recent call last):
  File "/usr/local/bin/config", line 8, in <module>
    sys.exit(config())
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/config/main.py", line 7222, in timezone
    if timezone not in get_tzs(None, None, ''):
  File "/usr/local/lib/python3.9/dist-packages/config/main.py", line 7206, in get_tzs
    ret = clicommon.run_command('timedatectl list-timezones',
  File "/usr/local/lib/python3.9/dist-packages/utilities_common/cli.py", line 545, in run_command
    proc = subprocess.Popen(command, shell=shell, text=True, stdout=subprocess.PIPE)
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'timedatectl list-timezones'

Describe the results you expected

No error

Additional information you deem important (e.g. issue happens only occasionally)

Output of show version

SONiC Software Version: SONiC.master.346523-618bddc07
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-18-2-amd64
Build commit: 618bddc07
Build date: Fri Aug 25 12:31:05 UTC 2023
Built by: AzDevOps@vmss-soni001UVZ

Platform: x86_64-mlnx_msn2410-r0
HwSKU: ACS-MSN2410
ASIC: mellanox
ASIC Count: 1
Serial Number: 01AD903YF50YD88X003
Model Number: 01AD903
Hardware Revision: A2
Uptime: 21:18:27 up  4:25,  1 user,  load average: 0.76, 0.73, 0.95
Date: Mon 19 Jun 2023 21:18:27

Docker images:
REPOSITORY                    TAG                       IMAGE ID       SIZE
docker-syncd-mlnx             latest                    2acfb4cb90eb   830MB
docker-syncd-mlnx             master.346523-618bddc07   2acfb4cb90eb   830MB
docker-platform-monitor       latest                    b75deae4714e   820MB
docker-platform-monitor       master.346523-618bddc07   b75deae4714e   820MB
docker-macsec                 latest                    5631a65bdd84   325MB
docker-dhcp-relay             latest                    8f42dfe0c666   306MB
docker-eventd                 latest                    b6e86e08d9e7   299MB
docker-eventd                 master.346523-618bddc07   b6e86e08d9e7   299MB
docker-orchagent              latest                    0ad97b2ab9d4   335MB
docker-orchagent              master.346523-618bddc07   0ad97b2ab9d4   335MB
docker-fpm-frr                latest                    53b8d16929e9   355MB
docker-fpm-frr                master.346523-618bddc07   53b8d16929e9   355MB
docker-nat                    latest                    e396690fc7ff   326MB
docker-nat                    master.346523-618bddc07   e396690fc7ff   326MB
docker-sflow                  latest                    bae9938cbfd6   325MB
docker-sflow                  master.346523-618bddc07   bae9938cbfd6   325MB
docker-teamd                  latest                    a7577c25324a   323MB
docker-teamd                  master.346523-618bddc07   a7577c25324a   323MB
docker-sonic-p4rt             latest                    dfc3d6da0644   870MB
docker-sonic-p4rt             master.346523-618bddc07   dfc3d6da0644   870MB
docker-sonic-telemetry        latest                    cca5ec2d25e7   600MB
docker-sonic-telemetry        master.346523-618bddc07   cca5ec2d25e7   600MB
docker-snmp                   latest                    6ca3ae80436e   338MB
docker-snmp                   master.346523-618bddc07   6ca3ae80436e   338MB
docker-router-advertiser      latest                    7b668856361f   299MB
docker-router-advertiser      master.346523-618bddc07   7b668856361f   299MB
docker-lldp                   latest                    2f057b97a4c1   341MB
docker-lldp                   master.346523-618bddc07   2f057b97a4c1   341MB
docker-database               latest                    a3df0a8e29bf   299MB
docker-database               master.346523-618bddc07   a3df0a8e29bf   299MB
docker-mux                    latest                    4b101e9f2161   348MB
docker-mux                    master.346523-618bddc07   4b101e9f2161   348MB
docker-sonic-mgmt-framework   latest                    8ed4471ae6dc   416MB
docker-sonic-mgmt-framework   master.346523-618bddc07   8ed4471ae6dc   416MB
@ccy ccy changed the title Error when execute config clock timezone on Mellanox SN2410 switch Error when execute config clock timezone Sep 4, 2023
limshengli added a commit to eStreamSoftware/sonic-utilities that referenced this issue Sep 4, 2023
limshengli added a commit to eStreamSoftware/sonic-utilities that referenced this issue Sep 15, 2023
limshengli added a commit to eStreamSoftware/sonic-utilities that referenced this issue Sep 15, 2023
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

No branches or pull requests

1 participant