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

[services] Job for sonic.target canceled. #7508

Closed
vivekrnv opened this issue May 3, 2021 · 6 comments · Fixed by sonic-net/sonic-utilities#1814
Closed

[services] Job for sonic.target canceled. #7508

vivekrnv opened this issue May 3, 2021 · 6 comments · Fixed by sonic-net/sonic-utilities#1814
Labels
Issue for 202012 Triaged this issue has been triaged

Comments

@vivekrnv
Copy link
Contributor

vivekrnv commented May 3, 2021

Description

This is seen intermittently. The sonic.target job is cancelled when the config reload is run. This is also seen in the cases of applying ZTP Plugins.

sonic.target is introduced in this PR: #5705

Note that this doesn't imply a problem with the sonic.target. According to systemd, even when the job is cancelled, the service won't go into the failed state. Also, the config reload will likely work the very next time you run it.

A potential fix for ZTP might be to, run the config reload again if this happens.

Steps to reproduce the issue:

In the case of ZTP plugins

1.Boot sonic with ZTP enabled feature
2.Announce DHCP option 67 pointing to ztp_config.json (see at the bottom)
3.Put all necessary plugins and configuration files using in ZTP process on WEB server.
4. Start ZTP process

ztp erase
ztp run

5.Wait till ZTP process has finished.
6.Verify the status of ZTP execution:
7.sudo show ztp status --verbose
8.Check /var/log/ztp.log and syslog

Describe the results you received:

Apr 19 12:53:54.947222 sonic INFO sonic-ztp[15343]: Stopping SONiC target ...
..........
..........
Apr 19 12:53:55.153250 sonic INFO sonic-ztp[15374]: Job for sonic.target canceled.
Apr 19 12:53:55.729680 sonic ERR sonic-ztp[13308]: configdb-json: Command 'config reload -y /tmp/config_dl.json' failed with exit code(1).

Describe the results you expected:

config reload should complete and so does the plugin of ZTP

Output of show version:

Output of show techsupport:

sonic_dump_DUT-1_20210419_130556.tar.gz

ZTP Plugins File

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

@anshuv-mfst
Copy link

@adam-yeung could you please take a look, thanks.

@dgsudharsan
Copy link
Collaborator

@adam-yeung could you please take a look, thanks.

Hi Adam,
Can you please provide an update?

@adyeung
Copy link
Collaborator

adyeung commented Jun 23, 2021

@rajendra-dendukuri pls help check

@vivekrnv
Copy link
Contributor Author

vivekrnv commented Jun 25, 2021

Update: sonic.target cancelled can be easily reproduced even without running config reload -y.

root@sonic:~$ systemctl stop sonic.target

In paralell, 
admin@sonic:~$ sudo systemctl start dhcp_relay.service

Which would result in 
root@sonic:~$ systemctl stop sonic.target
Job for sonic.target canceled.

This happens because, stop job of sonic.target gets cancelled if there is a conflicting job installed even for one of it's dependent stop jobs

@qiluo-msft
Copy link
Collaborator

Update: sonic.target cancelled can be easily reproduced even without running config reload -y.

root@sonic:~$ systemctl stop sonic.target

In paralell, 
admin@sonic:~$ sudo systemctl start dhcp_relay.service

Which would result in 
root@sonic:~$ systemctl stop sonic.target
Job for sonic.target canceled.

This happens because, stop job of sonic.target gets cancelled if there is a conflicting job installed even for one of it's dependent stop jobs

This observation makes sense. What is wrong from your point of view?

@vivekrnv
Copy link
Contributor Author

Agree, but this is affecting config reload and thus ZTP which depends on the config reload to proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue for 202012 Triaged this issue has been triaged
Projects
None yet
7 participants